Skip to content

feat(rpc): add signet_networkStatus endpoint (ENG-479)#78

Open
init4samwise wants to merge 1 commit intomainfrom
samwise/eng-479-network-status-endpoint
Open

feat(rpc): add signet_networkStatus endpoint (ENG-479)#78
init4samwise wants to merge 1 commit intomainfrom
samwise/eng-479-network-status-endpoint

Conversation

@init4samwise
Copy link
Contributor

Summary

Adds a new signet_networkStatus RPC endpoint that returns Signet-specific network information.

Background

The original SignetNoopNetwork implementation (now removed) had TODOs for exposing proper values for:

  • genesis: The genesis block hash
  • config: The chain configuration
  • head: The current head block hash

These were previously returning Default::default() values. Since Signet is a rollup, it should expose its OWN network status rather than delegating to the host (L1) network.

Changes

Added a new signet_networkStatus endpoint in crates/rpc/src/signet/endpoints.rs that returns:

{
  "chainId": 12345,
  "genesis": "0x...",
  "head": "0x...",
  "headNumber": 123456
}
  • chainId: The Signet rollup chain ID (from constants.ru_chain_id())
  • genesis: The hash of block 0 (genesis block)
  • head: The hash of the current head block
  • headNumber: The current head block number

Implementation Notes

  • The endpoint uses the existing SignetCtx provider to retrieve block information
  • Response fields use camelCase serialization to match standard RPC conventions
  • The SignetNetworkStatus struct is exported for use by consumers

Testing

Will be tested by CI. Manually verified changes compile with cargo check.

Closes ENG-479

Adds a new signet_networkStatus RPC endpoint that returns Signet-specific
network information:
- chain_id: The Signet rollup chain ID
- genesis: The genesis block hash (block 0)
- head: The current head block hash
- headNumber: The current head block number

This addresses the TODOs from the original SignetNoopNetwork implementation
which returned Default::default() for these values. The new endpoint exposes
the actual Signet network state rather than delegating to the host network.

The endpoint is exposed as signet_networkStatus and returns a JSON object
with camelCase field names.

Closes ENG-479
@init4samwise init4samwise requested a review from a team as a code owner February 15, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant