Skip to content

Add robinhood chains to ethgas readers and ethrpc networks - #217

Merged
pkieltyka merged 2 commits into
masterfrom
robinhood-gas-price-reader
Sep 17, 2026
Merged

pkieltyka merged 2 commits into
masterfrom
robinhood-gas-price-reader

Conversation

@pkieltyka

@pkieltyka pkieltyka commented Sep 17, 2026

Copy link
Copy Markdown
Member

Adds robinhood (4663) and robinhood-testnet (46630) to the two chain-ID registries that treat Arbitrum chains specially. Both are Arbitrum Orbit chains running Arbitrum Nitro.

1. ethgas/readers.go — gas price paid reader

 	200:    arbitrumGasPricePaidReader, // arbitrum xdai
+	4663:   arbitrumGasPricePaidReader, // robinhood
+	46630:  arbitrumGasPricePaidReader, // robinhood testnet

Without an entry these chains fall through to DefaultGasPricePaidReader, which reports each transaction's GasFeeCap — the maximum the sender was willing to pay. On these chains that overstates what was actually paid:

  • eth_maxPriorityFeePerGas returns 0 on both, and feeHistory p50 rewards are 0 across 100 blocks
  • The docs state ordering is "first-come, first-served based on sequencer arrival time" and that "increasing your fee will not shift your transaction ahead of others already in the queue"

So tips cannot affect inclusion and effectively nothing is paid above base fee. arbitrumGasPricePaidReader reports block.BaseFee(), which is what was really paid. Affects gas statistics only, not correctness.

2. ethrpc/networks.go — Networks registry

+	4663: {
+		Name:                "robinhood",
+		ChainID:             4663,
+		NumBlocksToFinality: 50,
+	},
+	46630: {
+		Name:                "robinhood-testnet",
+		ChainID:             46630,
+		NumBlocksToFinality: 50,
+	},

ethreceipts consults this for NumBlocksToFinality when a caller doesn't set its own. 50 matches every arbitrum entry in the map (arbitrum, arbitrum-testnet, arbitrum-nova). Without an entry both chains fell back to DefaultNumBlocksToFinality of 40 — workable, but implicit and inconsistent with the family.

Worth flagging: 50 blocks is ~5s at robinhood's 100ms block time, against ~12.5s for arbitrum at 250ms. Reorg depth is block-based so matching the family's depth is the sensible reading, but the wall-clock window is shorter. Easy to raise if you'd prefer time parity.

There's no ArbitrumChain field on the Network struct — only OptimismChain — so nothing else to set.

Verification

go build ./... passes and gofmt is clean for both files. go test ./ethgas/... passes.

go test ./ethrpc/... fails with panic: ethtest: unable to connect to testchain — confirmed pre-existing by running the same test on an unmodified tree, where it panics identically. That suite needs a local testchain that isn't running in this environment.

Context

Companion to 0xsequence/relayer#189, which adds the same two chain IDs to the relayer's isArbitrum() — that one does affect correctness, since it was silently overriding MinGasTip to 1 Gwei on a ~0.05 Gwei chain. Chain configs are in 0xsequence/devops#4687.

Both repos now carry hardcoded chain-ID allowlists for this, so each new Orbit chain needs a release in both. Replacing that with a config flag is planned as a separate follow-up.

🤖 Generated with Claude Code

Adds robinhood (4663) and robinhood-testnet (46630) to
CustomGasPricePaidReaders. Both are Arbitrum Orbit chains running
Arbitrum Nitro, so they belong with the other arbitrum entries.

Without this they fall through to DefaultGasPricePaidReader, which
reports each transaction's GasFeeCap -- the maximum the sender was
willing to pay. On these chains that overstates the price actually
paid: eth_maxPriorityFeePerGas returns 0, and ordering is
first-come-first-served by sequencer arrival, so tips cannot affect
inclusion and effectively nothing is paid above the base fee.
arbitrumGasPricePaidReader reports block.BaseFee() instead, which is
what was really paid.

Affects gas statistics only, not transaction correctness.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pkieltyka
pkieltyka requested a review from a team September 17, 2026 16:17
Adds robinhood (4663) and robinhood-testnet (46630) to ethrpc.Networks,
which ethreceipts consults for NumBlocksToFinality when a caller does
not set its own.

NumBlocksToFinality 50 matches every arbitrum entry in this map
(arbitrum, arbitrum-testnet, arbitrum-nova), which is the right
reference since robinhood is an Arbitrum Orbit chain. Without an entry
both chains fell back to DefaultNumBlocksToFinality of 40 -- workable,
but implicit and inconsistent with the rest of the family.

Note 50 blocks is ~5s at robinhood's 100ms block time, against ~12.5s
for arbitrum at 250ms. Reorg depth is block-based, so matching the
family's depth is the sensible reading, but the wall-clock window is
correspondingly shorter.

There is no ArbitrumChain field on the Network struct -- only
OptimismChain -- so nothing else to set here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pkieltyka pkieltyka changed the title ethgas: use the arbitrum gas price paid reader for robinhood chains Add robinhood chains to ethgas readers and ethrpc networks Sep 17, 2026
@pkieltyka
pkieltyka merged commit 74d664f into master Sep 17, 2026
14 checks passed
@pkieltyka
pkieltyka deleted the robinhood-gas-price-reader branch September 17, 2026 17:01
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