Skip to content

docs: align mainnet name + RPC URLs to chainlist registry#560

Merged
github-actions[bot] merged 1 commit into
mainfrom
docs/align-metamask-to-chainlist
May 10, 2026
Merged

docs: align mainnet name + RPC URLs to chainlist registry#560
github-actions[bot] merged 1 commit into
mainfrom
docs/align-metamask-to-chainlist

Conversation

@satyakwok
Copy link
Copy Markdown
Member

Summary

Two doc / config files were the loudest outliers vs. the chainlist registry submission (ethereum-lists/chains#8266) and the frontend chain configs (Sentriscloud/frontend#49):

  • genesis/mainnet.toml had name = "Sentrix Mainnet". Every frontend now uses Sentrix Chain. The genesis hash invariants are timestamp / parent_hash / coinbase tx (per the file header) — name is metadata, not consensus, so changing it does not fork the chain. Boot logs now print Sentrix Chain instead of Sentrix Mainnet.

  • docs/operations/METAMASK.md had the mainnet network name as bare "Sentrix" (the only file in the codebase doing that), and a stray /rpc suffix in the testnet table while the mainnet table was bare. Now all four user-facing fields (mainnet name, both RPC URLs, testnet block explorer) match the chainlist values:

    Mainnet Testnet
    Network Name Sentrix Chain Sentrix Testnet
    RPC URL https://rpc.sentrixchain.com https://testnet-rpc.sentrixchain.com
    Symbol SRX SRX
    Explorer https://scan.sentrixchain.com https://scan-testnet.sentrixchain.com

Mainnet section also moved above testnet since it's the default user path now.

Out of scope (follow-up)

crates/sentrix-rpc/src/routes/ops.rs (the / self-describe endpoint) and docs/operations/API_REFERENCE.md still hardcode "name": "Sentrix" — that surface is not consumed by chainlist or wallet-add flows. Worth standardising in a separate change because the right fix is to read [chain].name from the loaded genesis (so testnet self-describes as Sentrix Testnet), not to hardcode another string.

Test plan

  • cargo build --release (genesis change is parsed by serde, no schema change)
  • cargo test test_mainnet_genesis_block_hash_matches_hardcoded still passes (block hash is independent of name)
  • On a fresh node, boot log line reads loaded genesis: Sentrix Chain (chain_id 7119) not Sentrix Mainnet
  • Walk through METAMASK.md mainnet steps in a fresh MetaMask install — network shows up as "Sentrix Chain"

genesis/mainnet.toml chain name: "Sentrix Mainnet" → "Sentrix Chain".
Metadata only — `name` is not in the genesis hash invariants
(timestamp / parent_hash / coinbase tx are), so this does not fork the
chain. Brought in line with the ethereum-lists/chains submission and the
frontend chain configs.

docs/operations/METAMASK.md: mainnet network name was bare "Sentrix"
(an outlier — every frontend says "Sentrix Chain"); RPC URLs in the
testnet table and curl examples carried a stray /rpc suffix while the
mainnet section was bare. Standardize on bare URLs and the canonical
"Sentrix Chain" / "Sentrix Testnet" names. Mainnet section moved above
testnet since it's the default user path. Block explorer for testnet
now points at scan-testnet.sentrixchain.com so EIP-3091 routing is
unambiguous.
@github-actions github-actions Bot enabled auto-merge (squash) May 10, 2026 17:41
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot merged commit 4325fd9 into main May 10, 2026
8 checks passed
github-actions Bot pushed a commit that referenced this pull request May 10, 2026
* fix(rpc): self-describe reads chain name from genesis (not hardcoded)

Closes the deferred TODO from PR #560 (genesis [chain].name + METAMASK
doc alignment). The /  RPC root handler hardcoded "name": "Sentrix"
on every network — testnet binaries pretended to be mainnet for any
caller probing the self-describe endpoint.

Now Blockchain holds chain_name (sourced from genesis.chain.name in
new_with_genesis) and the route reads it. Mainnet returns "Sentrix
Chain", testnet returns "Sentrix Testnet" — matches the canonical
chainlist registry submission.

The chain_name field carries a serde default ("Sentrix Chain") to
keep pre-this-commit state-blob deserialisations working; real boot
always overwrites via new_with_genesis.

Field impact is purely cosmetic — wallets / chainid registry use
chain_id (eth_chainId) for identity, not the / endpoint. But honest
self-describe is the right thing for any future tooling that probes
it (block-explorer auto-config, dApp-ops dashboards, status pages).

* fix(rpc): chain_name fix-up on load (upgrade-path bug)

The original commit relied on new_with_genesis to set chain_name,
but that path only runs on a fresh init. Existing chain.dbs (mainnet
+ testnet today) come up via load_blockchain, which deserialises an
old blob without the chain_name field — serde defaults silently
fired and testnet would still self-describe as "Sentrix Chain".

Override from the canonical chain_id mapping right after the blob
deserialises. First save_blockchain after this fix-up persists the
corrected name so subsequent boots find it already right.

Custom chain_ids (third-party deployments) fall through to whatever
genesis set; we only normalise the two we ship.
@satyakwok satyakwok deleted the docs/align-metamask-to-chainlist branch May 13, 2026 09:55
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