[go: up one dir, main page]

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_accounts parameter from Contract.t list to Public_key.t list.
  • Updated the make_l2 function to:
    • Compute contract address from each public key.
    • Write the manager, and counter fields for each account.
  • Introduced to_hex/of_hex in tezos_types.ml to 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, and counter.

Run :

make octez-evm-node \
&& dune exec etherlink/tezt/tests/main.exe -- tezlink counter \
&& dune exec etherlink/tezt/tests/main.exe -- tezlink manager_key
Edited by Brahima Dibassi

Merge request reports

Loading