[go: up one dir, main page]

Implement header RPC

What

This MR provides the chain/block/header RPC, capable of retrieving information of tezos blocks stored.

Why

  • This facilitates testing the monitor_heads RPC, needed for the accounts demo in Tezlink;
  • The header RPC will be used in the L1 demo.

How

  • Importing the L1 equivalent service to header and registering it;
  • Implementing the RPC by finding the number of the latest block and reading it from storage using tez_nth_block;
  • Implementing the auxiliary chain_id RPC;
  • Providing mock values for necessary values that only make sense on the L1;
  • Introduction of functions to convert ethereum.block_hash to Block_hash.t and the Tezlink block to the L1 Tezos block;
  • Registering the new RPCs in Tezlink;
  • New test helper that verifies the consitency of read headers;
  • Creating a test that produces two blocks and verifies their contents are correct;

Manually testing the MR

dune exec etherlink/tezt/tests/main.exe -- /dal /threshold_encryption latest alpha tezlink header
Edited by Luciano Freitas

Merge request reports

Loading