Skip to content

fix: qualify CLI staking for Bradbury Phase 2 - #427

Merged
jmlago merged 8 commits into
v0.40-devfrom
fix/bradbury-phase-2-v040
Oct 19, 2026
Merged

jmlago merged 8 commits into
v0.40-devfrom
fix/bradbury-phase-2-v040

Conversation

@jmlago

@jmlago jmlago commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Bundle the Bradbury Phase 2 SDK from genlayerlabs/genlayer-js#236 so staking commands use the deployed addresses and tolerate bounded read throttling (429 retry for reads only). Correct the epoch-zero message when self-stake already meets the minimum: registration still does not imply activation.

Validation:

  • Production build and 828 tests passed across 76 files (before the review fixes below; now 829).
  • Live CLI epoch-info: epoch 0, validator/delegator minimum 0.01 GEN.
  • Live validator-join with distinct encrypted owner/operator keystores and possession proof succeeded with 0.01 GEN: validator 0xf00f26f5b1a30953aF621c8AbfD70D8106C3F0c4, tx 0xca70746f31ab53e2c1a1654fe2b2905c956a1c03cae118ffb7a3a515697102c3.
  • CLI transfer of 0.1 GEN to the operator succeeded.
  • Node candidate ec51b80c6 doctor verifies all 97 contracts against the trusted manifest, owner/operator registration, stake, GenVM, LLM and WebDriver. Public Conduit startup is blocked by WebSocket HTTP 401 without an assigned key. A separate diagnostic run through the internal gateway successfully started and synchronized; activation is not claimed.
  • Public RPC now verifies Phase 2 genesis and public explorer returns HTTP 200 (2026-10-19 qualification).

The SDK is pinned to its full commit SHA; this PR does not publish a release. Related: genlayerlabs/genlayer-docs#705 and genlayerlabs/skills#44.

Completed node diagnostic (2026-10-19)

The same locally built ec51b80c6 candidate was then run through a temporary tunnel to the existing internal gateway on the same verified Phase 2 chain. It started in validator mode and synchronized: gen_syncing reported blocksBehind: 0 (block 48637), /health returned healthy, and doctor passed every configuration check. RPC, WebSocket, priming, stake, operator funds, LLM and WebDriver conditions were healthy. The validator remains registered for epoch 2; this does not test consensus voting before activation.

Remaining external prerequisites: assigned Conduit WebSocket key (public/raw endpoints return 401 anonymously), and publication of the approved binary (v0.6.0-rc.2 tarball still returned 404). The internal gateway diagnostic does not establish public WebSocket readiness.

Registry and access corrections

The SDK pin now includes AddressManager registry validation. Windows CI found a platform-dependent path assertion and a CRLF/hashbang import failure; the path assertion now uses the platform path API and .mjs checkouts use LF. The CRLF failure was reproduced locally and the corrected tests pass.

Binary and Docker qualification

Both execution modes were tested from the same local ec51b80c6 candidate against the verified Phase 2 internal gateway, one at a time with the test operator. The Docker image was built using the maintained release Dockerfile and tarball, and started with the shipped Compose services adapted for isolated local ports/data. Its original entrypoint completed GenVM precompilation; the node ran as UID 10001 with read-only configuration and a read-only Docker API proxy. Binary and Docker each reached healthy state and gen_syncing.blocksBehind = 0; manifest admission, stake, priming, LLM and WebDriver checks passed. This is candidate qualification, not a published rc.2 artifact or public-Conduit access qualification.

Depends-On: genlayerlabs/genlayer-js#236

Review fixes

  • ValidatorInfo.live was removed by genlayer-js 2.0.0-rc.1 (no alias, per its consumer-migration-v06 note). esbuild does not type-check and the tests mock the SDK, so this was invisible: validator-info printed live: undefined and primed non-active validators showed inactive. They now show hasUnclaimedRewards, and status is pending while a self-stake deposit is still activating. npx tsc --noEmit is clean apart from a pre-existing stakingWizard.test.ts:83 error that is also on v0.40-dev.
  • Epoch-0 note now names genlayer staking validator-info <validator-wallet>, and the assertOrWarnSelfStakeMinimum comment documents the new branch.
  • GENLAYER_CONFIG_DIR moved out of this PR. It is unrelated to Phase 2 qualification and is not fully isolated, because unlocked keys are cached in the OS keychain by account name. It can be restored from da816a8 in a separate PR.
  • SDK pin now targets the merge commit of fix: qualify Bradbury Phase 2 contracts and RPC identity genlayer-js#236 on v2-dev (b629021, tree identical to its reviewed head 7ce4330), with the lockfile integrity hash restored. feat: use keystore to store private keys #236 dropped the transport genesis/AddressManager guard before merging, so the custom-profile handling added earlier in review was reverted.

Validation on 0b1a29a: 828 tests, clean type check, production build. Live on the public Bradbury RPC: staking epoch-info passes repeatedly (it failed every time on an SDK build without the 429 retry), validator-info and staking validators show validator 0xf00f26f5… as pending at epoch 0.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13df59be-b05f-4ac7-b669-f1df9830c8f0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jmlago

jmlago commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

/run-e2e all

@ci-core-e2e-runner

Copy link
Copy Markdown
Contributor

E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally.

dohernandez and others added 4 commits October 19, 2026 23:37
…ards

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>
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>
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>
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>
@dohernandez

Copy link
Copy Markdown
Member

/run-e2e all

@ci-core-e2e-runner

Copy link
Copy Markdown
Contributor

E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally.

dohernandez and others added 2 commits October 20, 2026 00:56
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>
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>
@dohernandez

Copy link
Copy Markdown
Member

/run-e2e all

@ci-core-e2e-runner

Copy link
Copy Markdown
Contributor

E2E status was updated. Follow the current E2E and merge checks on this PR. Detailed diagnostics are available internally.

@jmlago
jmlago merged commit b45e517 into v0.40-dev Oct 19, 2026
13 checks passed
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