Skip to content

Add Onyx mainnet and testnet - #284

Merged
tonatoz merged 1 commit into
drpcorg:mainfrom
rabm2k7:add_onyx
Nov 5, 2026
Merged

tonatoz merged 1 commit into
drpcorg:mainfrom
rabm2k7:add_onyx

Conversation

@rabm2k7

@rabm2k7 rabm2k7 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Add Onyx (native coin XCN, formerly Goliath), an EVM-compatible L1.

Chains

  • Mainnet: chain ID 327 (0x147), grpcId 1179, RPC https://rpc.onyx.org, explorer https://onyxscan.org
  • Testnet: chain ID 8901 (0x22c5), grpcId 10214, RPC https://rpc.testnet.goliath.net

Settings

  • type: eth, validate-peers: false: the JSON-RPC relay (goliath-relay) returns Unsupported JSON-RPC method for net_peerCount.
  • expected-block-time: 1s (measured: ~1.0s per block over blocks 1,048,576 to 2,097,152 on mainnet). Testnet overridden to 2s (~2.15s over the same range).
  • eth_chainId verified on both endpoints; eth_getBlockReceipts is supported. baseFeePerGas is 0.
  • Native XCN has 8 decimals on the ledger and 18 over JSON-RPC (values must be a multiple of 10^10): https://docs.onyx.org/developer-guide/decimal-handling

Files

  • chains.yaml, chains-meta.yaml
  • proto/common.proto and the regenerated pkg/dshackle/common.pb.go (ChainRef 1179 / 10214; protoc 36.1, protoc-gen-go v1.36.12, same as the existing header)

Not included: icon and description, lower-bounds.

@tonatoz tonatoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! The overall structure looks good: chain IDs and grpcId values don't collide with main, eth_chainId matches on both endpoints, and the regenerated common.pb.go is consistent with the proto change. A few things to address before merge:

  1. Testnet expected-block-time doesn't match the observed block time (details inline).
  2. The testnet entry in chains-meta.yaml points to the mainnet explorer (details inline).
  3. The chain icon is missing. Could you add it to icons/ and register it in icons/getChainIcon.ts under the onyx key? Without it, the chain shows up in the UI without a logo.

Also, a heads-up: #289 (LUKSO) touches the same lines in chains.yaml, chains-meta.yaml, proto/common.proto and pkg/dshackle/common.pb.go, so one of the two PRs will need a rebase and a common.pb.go regeneration after the other one is merged.

Comment thread chains.yaml Outdated
short-names: [onyx-testnet]
chain-id: 0x22c5
settings:
expected-block-time: 2s

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On https://rpc.testnet.goliath.net the average block time is ~3.7s right now: 3.67s over the last 1,000 blocks and 3.70s over the last 100,000 blocks. Could you update this to match the current value (e.g. 4s)? The value is used for lag and head-staleness detection, so a too-low value may cause testnet upstreams to be marked as lagging.

Comment thread chains-meta.yaml Outdated
decimals: 18
chain-id: 8901
explorers:
- https://onyxscan.org

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the mainnet explorer. Is there a dedicated testnet explorer (chain ID 8901)? If so, please use its URL here. If there isn't one, it's better to leave the explorers list empty than to point to mainnet.

@rabm2k7

rabm2k7 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review; I'll rebase as @pxlvre 's PR has been merged today

@tonatoz
tonatoz merged commit 81915d8 into drpcorg:main Nov 5, 2026
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.

2 participants