Skip to content

fix(rpc): gate testnet-rpc expected-bank-hash; template hardcoded shred-version#405

Merged
POPPIN-FUMI merged 2 commits into
mainfrom
fix/rpc-stale-restart-params
Jun 6, 2026
Merged

fix(rpc): gate testnet-rpc expected-bank-hash; template hardcoded shred-version#405
POPPIN-FUMI merged 2 commits into
mainfrom
fix/rpc-stale-restart-params

Conversation

@POPPIN-FUMI

Copy link
Copy Markdown
Contributor

Problem

testnet-rpc/start-validator.sh.j2 emitted, unconditionally and hardcoded:

--expected-shred-version 57087 \
--expected-bank-hash YFxSkDcvSPiA7EQpSTbCsWbJvNYMAsWXGvwGc3bXHEA \

--expected-bank-hash is a coordinated-cluster-restart parameter. Carrying a stale value into a normal restart (e.g. a version upgrade) can hang the node or fail it with a bank-hash mismatch — the same class of bug already fixed for the testnet validator templates in #402. Hit live while upgrading a testnet Index RPC to jito 4.1.0-beta.2.

Fix

testnet-rpc/start-validator.sh.j2:

  • --expected-shred-version{{ expected_shred_version | default("57087") }} (kept; needed for gossip, now overridable)
  • --expected-bank-hash → gated behind {% if expected_bank_hash is defined %} (emitted only when an operator explicitly sets it for a cluster restart)

For consistency, the hardcoded --expected-shred-version 50093 in the mainnet-rpc start scripts (index/grpc/tx/main + start-validator) and mainnet-validator/start-validator.sh.j2 is now templated with a default("50093") — overridable, with no behavior change for existing hosts. (These have no expected-bank-hash, so nothing to gate there.)

Testing

Rendered testnet-rpc/start-validator.sh.j2 for jito/agave × Index/Geyser: --expected-bank-hash is absent when unset, present when set, --expected-shred-version is retained, and no line-continuation/concatenation breakage. mainnet-rpc renders the templated shred version (default 50093).

The testnet validator templates (already gated in #402) are unchanged.

🤖 Generated with Claude Code

POPPIN-FUMI and others added 2 commits June 6, 2026 19:51
…ed-version

testnet-rpc/start-validator.sh.j2 emitted `--expected-bank-hash <stale> ` and a
hardcoded `--expected-shred-version 57087` unconditionally. The bank hash is a
coordinated-cluster-restart parameter; carrying a stale value into a normal
restart can hang the node or fail with a bank-hash mismatch (same class of bug
already fixed for the testnet *validator* templates in #402). Now:
- expected-shred-version is templated with a default (overridable per host)
- expected-bank-hash is gated behind `is defined` (emitted only when set)

Also template the hardcoded `--expected-shred-version 50093` in the mainnet-rpc
(index/grpc/tx/main + start-validator) and mainnet-validator start scripts so the
shred version is overridable; the default preserves current behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… defined

Review follow-up: `{% if x is defined %}` is true for a declared-but-empty var,
and the example inventories document `expected_bank_hash: ""` /
`wait_for_supermajority: ""` as the commented "unset" form. Uncommenting that
would render `--expected-bank-hash  ` (empty) and break the launch. Gate on
`is defined and x` so empty-string/null also suppresses the flag. Applied to the
new testnet-rpc gate and the existing testnet-validator gates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@POPPIN-FUMI POPPIN-FUMI merged commit b5de856 into main Jun 6, 2026
3 checks passed
@POPPIN-FUMI POPPIN-FUMI deleted the fix/rpc-stale-restart-params branch June 6, 2026 10:59
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