Repository navigation
fix: qualify Bradbury Phase 2 contracts and RPC identity - #236
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/run-e2e all |
|
E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally. |
Keep what Phase 2 needs and follow the existing chain-preset pattern: - testnetBradbury: Phase 2 addresses, refreshed ConsensusMain/ConsensusData ABIs and the new RPC/explorer URLs. ABIs keep the file's existing key order and narrow-ABI style; Appeals.canAppeal gains its decision-id argument. - createClient: an endpoint override copies the chain instead of mutating the shared preset. - check:chains: Bradbury reads a pinned copy of genlayer-consensus deployments/bradbury-phase-2.json and the explorer-verified ABIs through a CHAINS entry, instead of name checks in the loop. Removed: - genesisHash/addressManager chain fields and the identity check in the transport. It added ~15 RPC calls on first use and before every broadcast, and failed every CLI custom network based on testnet-bradbury. The SDK already resolves AddressManager on chain from ConsensusMain. - the 429 retry loop in the transport. Unrelated to Phase 2 and it partly reverses #110; it belongs in its own PR if wanted. - check:bradbury script, its node:test checks (not run anywhere) and the README section that described the removed behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@jmlago I pushed d9ce1bc on top of your commits to keep this PR to the Bradbury Phase 2 chain preset (details in the updated description). Kept: Phase 2 addresses/ABIs/URLs, the endpoint-override copy fix, and the drift check (now a CHAINS entry over a pinned copy of genlayer-consensus deployments/bradbury-phase-2.json). Removed: the transport identity guard (≈15 extra RPC calls per first use and per broadcast, and it fails CLI custom networks based on testnet-bradbury), the 429 retry loop (separate concern, partly reverses #110), and check:bradbury. Could you take a look? If you want the retry or identity check, happy to review them as separate PRs. |
|
/run-e2e all |
|
E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally. |
The Bradbury Phase 2 public RPC answers HTTP 429 once a burst passes about five concurrent calls, so getEpochInfo and getValidatorInfo failed on most runs. Retry reads up to three times, honouring Retry-After. Writes are never retried, so a transaction cannot be broadcast twice (#110). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin the merge commit of genlayerlabs/genlayer-js#236 on v2-dev (b629021, tree identical to its reviewed head 7ce4330), matching how earlier pins track v2-dev merge commits. Restores the lockfile integrity hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix: bundle Bradbury Phase 2 SDK and isolate validator configuration * fix: validate registry configuration and keep Windows tests portable * fix(staking): replace removed ValidatorInfo.live with hasUnclaimedRewards genlayer-js 2.0.0-rc.1 drops ValidatorInfo.live (no alias; see its consumer-migration-v06 note). esbuild does not type-check and tests mock the SDK, so the build stayed green while validator-info printed 'live: undefined' and every primed, non-active validator showed 'inactive'. Surface the raw hasUnclaimedRewards flag instead and derive 'pending' from a self-stake deposit that is still activating. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(network): don't inherit base deployment identity in custom profiles The Phase 2 SDK checks genesisHash and AddressManager before every request. Custom profiles cloned them from the base chain, so any profile overriding contracts or the chain ID failed every call. Like the block explorer, drop them for such profiles; an --rpc-only profile (another provider for the same deployment) keeps the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(staking): point the epoch-0 note at validator-info Name the concrete command to check activation and document the satisfied-minimum branch in assertOrWarnSelfStakeMinimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * revert: move GENLAYER_CONFIG_DIR out of the Phase 2 PR Unrelated to Bradbury Phase 2 qualification and not used by docs, skills, node or e2e. It also isn't fully isolated: unlocked keys are cached in the OS keychain by account name only. Recoverable from da816a8 for a separate PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * revert(network): drop custom-profile identity handling genlayer-js#236 removed the transport identity guard (genesisHash/addressManager) before merging, so custom profiles have nothing to drop. Reverts e93b0e5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(deps): pin genlayer-js to the merged Bradbury Phase 2 SDK Pin the merge commit of genlayerlabs/genlayer-js#236 on v2-dev (b629021, tree identical to its reviewed head 7ce4330), matching how earlier pins track v2-dev merge commits. Restores the lockfile integrity hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Darien Hernandez <dohernandez@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Bradbury Phase 2 reuses chain ID 4221 but deploys a new contract set. This points the
testnetBradburypreset at the Phase 2 contracts and the public chain RPC/explorer domains.Changes
testnetBradbury: Phase 2 addresses, refreshed ConsensusMain/ConsensusData ABIs (explorer-verified implementations), RPChttps://rpc.testnet-chain.genlayer.com, explorerhttps://scan.testnet-chain.genlayer.com.Appeals.canAppealgains its_expectedDecisionIdargument (the SDK already calls it that way via its train ABI).createClient: anendpointoverride now copies the chain instead of mutating the shared exported preset, socreateClient({chain: testnetBradbury, endpoint})can target another endpoint (e.g. the assigned Conduit RPC) without changing defaults for other clients.getEpochInfo/getValidatorInfofail on most runs. Reads are retried up to 3 times (honouringRetry-After); writes are never retried, so nothing is broadcast twice (fix(client): disable viem transport retries (retryCount=0) to avoid d… #110).check:chains: Phase 2 is not in genlayer-networks yet, so the Bradbury entry reads a pinned copy of genlayer-consensusdeployments/bradbury-phase-2.json(scripts/deployments/) and the explorer-verified implementation ABIs. Point it back at genlayer-networks once Phase 2 is published there.Addresses, AddressManager registry entries and the genesis hash were checked against the live RPC on 2026-10-19.
Scoped out (d9ce1bc)
An earlier revision also added a network-identity guard in the transport and a
check:bradburyscript. They were removed to keep this PR to the chain preset:testnet-bradbury(genlayer network add … --base testnet-bradbury), because those inherit the genesis pin and contract snapshot. The SDK already resolves AddressManager on chain from ConsensusMain.Validation
npm run build,vitest --typecheck(206 tests), ESLint on changed files,npm run check:chains(no drift), and repeatedgetEpochInfoagainst the public RPC (5/5 succeed; 2 of 3 failed without the retry). This change does not declare a published CLI or node release ready.🤖 Generated with Claude Code