[go: up one dir, main page]

Tezlink: implement constants RPC

What

This MR implements the /tezlink/chains/<chain>/blocks/<block>/context/constants RPC within Tezlink.

How

  • Fetches Tezlink constants directly from tezlink_constants.ml instead of passing them at node initialization.
  • Introduces fixed and parametric constant types in Tezlink, along with conversion functions so they remain compatible with L1.
  • Imports both fixed and parametric constants (previously only parametric constants were imported).
  • Implements the new RPC.
  • Copies the L1 service, since it depends on unexposed values in lib_protocol (to be addressed in protocol S, see !17512 (merged)).
  • Registers the new service in Tezlink.
  • Adds a regression test specifically for these constants, and updates the existing regression test outputs.

Manual Testing

To compare this RPC with the one on L1, run the following command on L1:

./octez-client --endpoint https://mainnet.smartpy.io rpc get /chains/main/blocks/head/context/constants

The returned values match the MR’s regression tests except for two fields:

Variable Tezlink Value L1 Mainnet Value
dal_page 1 5726209
dal_parameters 1 5726209

These discrepancies are due to a migration bug (see !17611 ).

Edited by Luciano Freitas

Merge request reports

Loading