[go: up one dir, main page]

Implement get_chain_family RPC

What

This Merge Request introduces a new JSON RPC method to retrieve the chain family of a node. It replaces the current approach of reading the state in /evm/chain_configurations/[chain_id]/chain_family with a more robust and future-proof approach.

Why

  • Future-proofing: We plan to migrate Michelson RPCs to RESTO services. Using the state_value RPC to read /evm/chain_configurations/[chain_id]/chain_family will no longer work, so we need a standardized way to obtain the chain_family without relying on that direct lookup.
  • Unified retrieval: If we are reading the family of chain, then it must be unknown. Thus, we want a single, consistent method to retrieve it.

How

  • Durable Storage: New functions were added to retrieve the chain_family from durable storage by chain ID.
  • New JSON RPC: A JSON RPC endpoint now provides external access to that information. This abstracts away storage details and centralizes the chain family lookup.

Testing

  • test_make_l2_kernel_installer_config test modification: This test has been updated to call the new RPC and verify that it correctly returns the chain_family.
Edited by Luciano Freitas

Merge request reports

Loading