[go: up one dir, main page]

Tezlink/Node: add dynamic registration to block rpc directory

What

We register dynamically the block info rpc

Why

We're going to need to return different directories depending on the block in future MRs.

How

Use register_dynamic_directory instead of register for the whole block directory.

We tried merging a static directory /chains/main/blocks/<..>/... and a dynamic /chains/main/blocks/<...>/ but had a merge conflict. So we make the whole block directory dynamic.

Manually testing the MR

The dynamic directory only appears as <dynamic> in the description, so we add to the describe test a call to a description of the chains/main/blocks/head directly.

Limit: at the moment, the root of that directory is not describe. I dont know why but don't think it's that much of a priority right now.

To test manualy, start a sandbox, and check that the rpcs in the block directory are still accessible

./octez-evm-node run tezlink sandbox --kernel evm_kernel.wasm --data-dir test_sandbox
curl http://localhost:8545/tezlink/chains/main/blocks/head/header
curl http://localhost:8545/tezlink/chains/main/blocks/head/

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 Pierre-Emmanuel CORNILLEAU

Merge request reports

Loading