Skip to content

fix: sign proof-bearing validator joins - #405

Merged
MuncleUscles merged 4 commits into
v0.40-devfrom
fix/validator-registration-proof
Aug 18, 2026
Merged

fix: sign proof-bearing validator joins#405
MuncleUscles merged 4 commits into
v0.40-devfrom
fix/validator-registration-proof

Conversation

@MuncleUscles

@MuncleUscles MuncleUscles commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • build chain/factory/owner-bound operator possession proofs for liquid and vesting validator joins
  • reuse the already-decrypted owner key, or require --operator to match an imported local CLI account
  • keep browser-wallet ownership while signing the operator proof with the selected local operator keystore
  • add --operator-password for non-interactive selected-operator proof signing
  • update interactive, non-interactive, unit, and browser-tier paths to the proof-bearing SDK API

Root cause

Consensus #1285 removed the address-only validator join overloads. The CLI still called the retired validatorJoin({amount, operator}) and vestingValidatorJoin({vesting, operator, amount}) surfaces, so tooling joins could not enter the proof-bearing validator wallet factory.

Validation

  • npm run build
  • focused staking, wizard, and vesting suites: 95/95
  • full unit suite: 792/792
  • affected Tier 2 browser E2E: 6/6
  • git diff --check

Depends-On: genlayerlabs/genlayer-consensus#1290

@coderabbitai

coderabbitai Bot commented Aug 9, 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: Pro Plus

Run ID: a1977039-f5ca-4c5f-980c-54ef9132b1ce

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

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.

@MuncleUscles
MuncleUscles marked this pull request as ready for review August 9, 2026 15:40
@MuncleUscles
MuncleUscles requested a review from cgmello August 9, 2026 16:47
CON-715 removed ValidatorWalletBlueprint.setOperator in favour of
initiateOperatorTransfer + completeOperatorTransfer, so `staking set-operator`
fails against a consensus deployment carrying that change: the selector is gone
and the call reverts with no decodable reason.

set-operator now prefers the two-step flow and falls back to the single call
when the wallet does not expose it, so it keeps working against both older and
newer deployments. The two halves are also available on their own as
`staking initiate-operator-transfer` and `staking complete-operator-transfer`,
for deployments whose operatorTransferDelay is non-zero and where one command
therefore cannot finish the rotation.

The incoming operator has to sign its own possession proof, so its key must be
reachable: --operator-account names the keystore entry, otherwise the operator
address is looked up locally via findLocalAccountByAddress. Without a match the
command takes the legacy path unchanged, which is what keeps existing callers
working.

Note the proof binding differs from a join: the wallet verifies rotation
proofs itself, so createOperatorTransferRegistration builds them against the
SDK's getOperatorTransferContext (registrar = the wallet) rather than the
factory-bound validator registration context.

Requires genlayer-js with initiateOperatorTransfer/completeOperatorTransfer.

Verified: npm run build against the linked SDK, and vitest — 782 passing,
including three new cases covering initiate+complete, a pending transfer when
the delay has not elapsed, and the legacy fallback. tests/libs/keychainManager
fails locally only because keytar's native binding is absent under
--ignore-scripts.
@MuncleUscles
MuncleUscles merged commit e822a9e into v0.40-dev Aug 18, 2026
12 of 13 checks passed
@MuncleUscles
MuncleUscles deleted the fix/validator-registration-proof branch August 18, 2026 14:13
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