Skip to content

feat(ethexe-consensus): introduce Watcher non-signing validator state#5531

Draft
grishasobol wants to merge 4 commits into
av/ethexe-value-claims-merkle-rootfrom
gsobol/ethexe/consensus-watcher
Draft

feat(ethexe-consensus): introduce Watcher non-signing validator state#5531
grishasobol wants to merge 4 commits into
av/ethexe-value-claims-merkle-rootfrom
gsobol/ethexe/consensus-watcher

Conversation

@grishasobol
Copy link
Copy Markdown
Member

Summary

Introduces a Watcher state in the ethexe consensus validator state machine — the non-signing twin of Participant. Nodes without a validator key (or whose key is not in the current era's validator set) enter Watcher once a coordinator is elected and follow the same validate_batch_commitment path as participants, populating the local outgoing_actions cache without signing.

  • New ethexe/consensus/src/validator/watcher.rs (468 lines): waits for the coordinator's validation request, re-derives the batch, transitions back to Idle.
  • BatchCommitmentManager consolidates value-claim persistence: the two call sites that previously called store_outgoing_actions_for_chain_commitment(&ChainCommitment) are replaced with a single persist_outgoing_actions(&BatchCommitment) invoked after the batch is validated against the requested digest. Both validators and watchers persist via this same path so any node can serve mirror.outgoing_actions(state_hash) for merkle-proof clients.
  • validator/mod.rs routes elected/coordinator transitions to either Participant (signing) or Watcher (non-signing) based on whether the local key is in the era's validator set.
  • ethexe/service/src/tests/mod.rs adds a non-signing-node scenario (env helpers updated accordingly).

Test plan

  • cargo nextest run -p ethexe-consensus
  • cargo nextest run -p ethexe-service (incl. the new non-validator scenario)
  • Workspace clippy/fmt via PR CI

Based on top of #5XXX (av/ethexe-value-claims-merkle-root).

🤖 Generated with Claude Code

@grishasobol grishasobol added type: feat New functionality or user-visible improvement scope: vara.eth Vara Ethereum application layer (L2) labels May 28, 2026
@grishasobol grishasobol force-pushed the gsobol/ethexe/consensus-watcher branch from e528fa8 to af71bad Compare May 28, 2026 16:58
grishasobol and others added 3 commits May 28, 2026 23:57
- Bump EXPECTED_TYPE_INFO_HASH to match db types as drifted via merged master.
- Update CLONES_CONTRACT_START to include Gear copyright header and pragma
  ^0.8.35 so the generator output matches the committed Clones.sol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rust stable 1.96 (rust-lld) no longer treats undefined wasm symbols as
imports by default for the wasm32v1-none target, causing the
test-program (and any gear program built via wasm-builder) to fail
linking with "undefined symbol: gr_debug" etc. Pass --import-undefined
through the existing rustc link-arg list so syscall symbols and the
gear-dlmalloc allocator hooks remain resolvable as wasm imports.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vara.eth Vara Ethereum application layer (L2) type: feat New functionality or user-visible improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant