Skip to content

Revert "fix: support proof-bearing validator joins (#206)" — unblocks e2e - #207

Merged
MuncleUscles merged 1 commit into
v2-devfrom
revert/js-206-proof-bearing-validator-join
Aug 11, 2026
Merged

Revert "fix: support proof-bearing validator joins (#206)" — unblocks e2e#207
MuncleUscles merged 1 commit into
v2-devfrom
revert/js-206-proof-bearing-validator-join

Conversation

@MuncleUscles

Copy link
Copy Markdown
Member

Reverts #206. Unblocks e2e across every repo that follows the v0.6 matrix.

Diagnosis and bracketing are @darien's — this PR is just the mechanical revert.

What happened

genlayer-js #206 ("support proof-bearing validator joins") was one of a coordinated five-repo set. Only the SDK half landed:

Repo / PR Role Status
genlayer-js #206 SDK requires the proof merged
genlayer-cli #405 cli sends the proof open
genlayer-e2e #716 e2e drivers send the proof open
genlayer-consensus #1285 chain verifies the proof open
genlayer-explorer #485 explorer sends the proof open

validatorJoin went from proofless {amount, operator?} to requiring {registration} plus a client-side verifyOperatorRegistration. Since tracks/v0.6/matrix.yaml pins genlayer-js: v2-dev — a moving branch, not a commit — every downstream build began pulling an SDK that demands a proof its callers don't send.

Both lanes fail on the same shared join as a validator setup step, with the same error — Operator registration proof does not match the owner, registrar, chain, or public key:

  • js lanejs-driver calls validatorJoin({amount}) in-process; the SDK throws.
  • cli lane — the CLI is built against the matrix SDK, so the throw happens inside the CLI and it exits 1.

The chain couldn't have satisfied it regardless: the deployed consensus is proofless, and the proof-bearing on-chain surface lives only on the still-open #1285.

Bracketed on an otherwise identical matrix, only the floating tip differing — last green 31282868593 (08-08 22:57), first red 31324780948 (08-09 16:49), immediately after the merge.

Why revert rather than pin the matrix

Pinning genlayer-js to 0b7e3bd would unblock CI just as fast, but it leaves v2-dev broken for everyone else consuming it and creates a stale pin someone has to remember to remove. Reverting restores the property the matrix depends on — v2-dev is always usable — and #206 re-lands unchanged with its four companions, which is what should have happened.

Nothing landed on top of #206, so this is a clean single-commit revert: the resulting tree is byte-identical to 0b7e3bd6, the last-green commit (git diff 0b7e3bd6 HEAD is empty).

Worth fixing separately

#206's own E2E Tests check never ran — it sat permanently pending, because gate_policy: release-branches makes e2e advisory on *-dev branches. It merged on the unit-test job via the merge queue. No green e2e ever certified it, which is why a five-repo breaking change could land alone without anything objecting.

@coderabbitai

coderabbitai Bot commented Aug 11, 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: 762b9626-80fa-43b3-843c-467b43863b07

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 merged commit 7666f0b into v2-dev Aug 11, 2026
8 of 10 checks passed
MuncleUscles added a commit that referenced this pull request Aug 18, 2026
…mpanions) (#208)

* Reapply "fix: support proof-bearing validator joins (#206)" (#207)

This reverts commit 7666f0b.

* feat(staking): support the two-step operator rotation

CON-715 removed ValidatorWalletBlueprint.setOperator in favour of
initiateOperatorTransfer + completeOperatorTransfer. The SDK only spoke the
single-call surface, so rotating an operator against a consensus deployment
that carries the change fails: the selector no longer exists, so viem reverts
with no reason and the Python SDK reports ABIFunctionNotFound.

Adds both calls plus cancelOperatorTransfer and the getPendingOperator view,
and keeps setOperator for deployments that still expose it.

The proof binding is the subtle part. validatorJoin's possession proof is
verified by the ValidatorWalletFactory and is bound to it; rotation is verified
by the wallet, so the registrar is the wallet's own address
(PubKeyUtils.validateWithPossession(pubKey, address(this), owner(), proof)).
createOperatorRegistration already takes the registrar as a parameter, so no
change was needed there — but a join proof silently fails to verify for a
rotation, which is the easy mistake to make. getOperatorTransferContext builds
the wallet-bound context and reads owner() from the wallet rather than assuming
the caller is the owner, so a mismatch surfaces as a clear local error instead
of an onlyOwner revert. A test pins that a join-bound proof does not verify for
rotation while a wallet-bound one does.

Callers still need updating; this only adds the surface they need:
genlayer-e2e's driver interface, genlayer-cli's staking set-operator, and
genlayer-py's staking_set_operator all remain single-call.

Verified: npx tsc --noEmit, npm test -- --run (123/123, no type errors),
npm run build.

* fix(staking): resolve the Claim/Commit layout from the chain

CON-715 widened both staking structs — Claim gained `offset`, Commit gained
`outstanding`/`priced`/`fragmented` and narrowed several members — while
keeping the same function names and arguments. Static tuples decode
positionally, so reading a post-CON-715 chain with the shape in STAKING_ABI
does not fail: `commit.input` picks up `claim.commit`. Pending deposits came
back as small indices instead of amounts, which is why the e2e delegator
scenarios asserted 0.1 GEN and got "0" or "2".

Both layouts are deployed — consensus v0.6-dev has the old one, #1290 the new —
so neither shape can simply replace the other. STAKING_COMMIT_VIEWS_CURRENT_ABI
adds the post-CON-715 shape for the four struct-returning views, and
readCommitView resolves which one the chain speaks, once, then caches it for
the client: getStakeInfo loops over every pending entry and must not re-probe
per entry.

The probe only works in one direction, and the tests pin that: decoding a
legacy response with the current shape throws (the response is short), while
decoding a current response with the legacy shape succeeds and lies. So the
current shape is always attempted first and a decode *failure* identifies a
legacy chain. If that asymmetry ever breaks, the probe would quietly start
reporting wrong balances again — hence the test asserting the exact misread
value rather than merely "not equal".

Also drops duplicate ValidatorWalletBlueprint entries: the ABI already carried
initiateOperatorTransfer/completeOperatorTransfer/cancelOperatorTransfer/
getPendingOperator, with initiateOperatorTransfer declared as taking an address
rather than the pubkey and possession proof it actually takes.

Verified: npx tsc --noEmit, npm test -- --run (126/126, no type errors),
npm run build.

---------

Co-authored-by: kirilaa <kirilantevski@gmail.com>
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