Tezlink : Add counter/manager fields to bootstrap accounts
Depends on !17732 (merged) for the end-to-end test
What
Update the handling of Tezos bootstrap accounts in kernel configuration to accept public keys instead of contract addresses. Additionally, store more information for each account in the kernel state, including the manager and counter.
Why
The previous interface required bootstrap accounts to be passed as implicit contract addresses (tz1...), which limited flexibility and omitted essential account information. Switching to public keys (edpk...) allows for proper generation of associated contract addresses within the kernel installer command, and storing additional fields like the manager and counter.
How
- Changed
tez_bootstrap_accountsparameter fromContract.t listtoPublic_key.t list. - Updated the
make_l2function to:- Compute contract address from each public key.
- Write the
manager, andcounterfields for each account.
- Introduced
to_hex/of_hexintezos_types.mlto serialize public keys. - Replaced the CLI parameter to accept public keys (edpk...) instead of public key hash (tz1...).
- Updated tests and documentation to reflect the change in expected input format.
Manually testing the MR
Run the kernel installer with the --tez-bootstrap-account argument using public key and verify:
Here is the command ./octez-evm-node make l2 kernel installer config "setup_file" --tez-bootstrap-account "edpkv8EUUH68jmo3f7Um5PezmfGrRF24gnfLpH3sVNwJnV5bVCxL2n" --l2-chain-id 1337
- The installer completes without error.
- The resulting kernel config includes correctly mapped paths for
balance,manager_key, andcounter.
Run :
make octez-evm-node \
&& dune exec etherlink/tezt/tests/main.exe -- tezlink counter \
&& dune exec etherlink/tezt/tests/main.exe -- tezlink manager_key