docs: align mainnet name + RPC URLs to chainlist registry#560
Merged
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
5 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tomlhadname = "Sentrix Mainnet". Every frontend now usesSentrix Chain. The genesis hash invariants are timestamp / parent_hash / coinbase tx (per the file header) —nameis metadata, not consensus, so changing it does not fork the chain. Boot logs now printSentrix Chaininstead ofSentrix Mainnet.docs/operations/METAMASK.mdhad the mainnet network name as bare"Sentrix"(the only file in the codebase doing that), and a stray/rpcsuffix 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:Sentrix ChainSentrix Testnethttps://rpc.sentrixchain.comhttps://testnet-rpc.sentrixchain.comSRXSRXhttps://scan.sentrixchain.comhttps://scan-testnet.sentrixchain.comMainnet 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) anddocs/operations/API_REFERENCE.mdstill 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].namefrom the loaded genesis (so testnet self-describes asSentrix 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_hardcodedstill passes (block hash is independent ofname)loaded genesis: Sentrix Chain (chain_id 7119)notSentrix Mainnet