[go: up one dir, main page]

Tezlink/Kernel: Introduce Tezlink context and account storage for balance

Previous MR

!17259 (merged)

Next MR

!17469 (merged)

What

Introduce Tezlink context and account_storage in the kernel

Why

To support the get_balance rpc we need to represent a Tezlink account in the durable storage. To be Tezos compatible, we take Tezos context as an example. For now only the root path were implemented and the contracts_index where are stored data on tezos accounts.

How

'/tezlink/context' path is equivalent to '/evm/world_state' but for Tezlink. To prevent this path to appear multiple times like Etherlink world state we build a context object and will only be able to access to the paths with functions exposed in the implementation.

For Tezlink account storage, it's really similar to evm_execution/src/account_storage.rs

Tezos Compatibilty

For Tezos compatibility, we want the tezlink_context.rs to match the tezos context. If you want to see what a Tezos context looks like you can use the command octez-client to create a mockup with an existing context.

octez-client \   
  --protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK \
  --base-dir /tmp/mockup \
  --mode mockup \
  create mockup

And then you can inspect at /tmp/mockup/mockup/context.json and this is what a Tezos context looks like

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Arnaud Bihan

Merge request reports

Loading