You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
e2e G-GOV-03: real node responses as valid on-chain evidence #1042
Depends on: e2e harness. Feeds slash evidence into G-NODE-05.
Setup: two nodes; induce a rate bait-and-switch (probe rate < stream rate within 30 s) and a phantom announcement (has_blob=true then ok=false).
Steps: capture the real signed ProbeResponse/StreamResponse from the daemon → submit to SlashJudge with a challenge bond → assert the slash lands, escrow + 50/50 split, and vote-weight zero-out.
Negative: evidence outside the 30 s window rejected; forged signatures rejected; a failed/bad challenge forfeits the challenger bond. Proves daemon signing produces court-admissible evidence that SlashJudge.t.sol cannot cover with synthetic signatures alone.
Triage note for a later run: automated dispatch skipped this on one production-code prerequisite plus two unknowns. The premise is sound and the gap is real — worth doing once these are closed.
Fixtures are in good shape.ChainFixture::launch (crates/e2e/src/chain.rs:137) gives anvil + full deploy; NodeFixture::launch/launch_with_blobs (e2e/src/node.rs:80, :135); funded buyer + fetch/probe (e2e/src/client.rs:60, :99, :208). Governance helpers exist including slash_operator_via_judge (chain.rs:628), which already drives the commit -> increase_time(65) -> submitPhantomChallenge reveal dance, plus fast_track_appeal (:760), slashed_at_epoch (:590), served_bytes (:450). Two-node tests are established (g_node_04_blacklist_compliance.rs:198-200).
The issue's premise checks out. Both existing "signed evidence" e2e paths cheat: chain.rs:664-690 and g_node_04_blacklist_compliance.rs:336-343 construct ProbeSlashData/StreamSlashData and sign with node.operator() — the test holds the operator key. That is exactly the synthetic-signature gap this issue calls out, and nothing currently covers it.
Blocker — the stream half needs a production change. The probe half is capturable today: ClientFixture::probe (e2e/src/client.rs:208-228) returns the real ProbeResponse with the daemon-produced slash_sig over the same EIP-712 digest SlashJudge._verifyPair checks (protocol/src/message.rs:218-231), so it can feed submitPhantomChallenge directly. The stream half cannot: UpstreamRefused carries only error: StreamError (client-pull/src/lib.rs:426-431) and the signed StreamResponse body plus its slash_sig are discarded at client-pull/src/lib.rs:744-748 (refusal()). The node does sign refusals (node/src/handlers/client.rs:2885-2941) — the evidence is produced and then thrown away client-side. Surfacing it is ~40-60 non-test LOC in client-pull, i.e. a production change, not test-only work.
Two unknowns to close first: (a) is rate_per_mb actually in the hot-reloadable set (node/src/runtime/reload.rs)? If yes, the bait-and-switch is inducible by rewriting the config at NodeFixture::config_path() (node.rs:125) and calling admin_v1_reload (admin.rs:579) between probe and stream; if not, the only lever is NodeFixture::restart() (node.rs:266) inside SlashJudge's 30s window, which is fragile. (b) Is there a phantom inducer that reliably fits that 30s window? The blacklist path at g_node_04_blacklist_compliance.rs:145-161 (probe true -> blacklist -> serve refuses) is the natural candidate but is tight against the blacklist watcher's poll cycle.
Size: ~350-450 test LOC for a new crates/e2e/tests/g_gov_03_*.rs, plus the ~40-60 LOC client-pull change, plus ~80 LOC refactoring slash_operator_via_judge to accept caller-supplied real evidence rather than synthesizing it (it currently hardcodes at chain.rs:658-690).
Activity
yigitdot commentedon Jul 18, 2026
Triage note for a later run: automated dispatch skipped this on one production-code prerequisite plus two unknowns. The premise is sound and the gap is real — worth doing once these are closed.
Fixtures are in good shape.
ChainFixture::launch(crates/e2e/src/chain.rs:137) gives anvil + full deploy;NodeFixture::launch/launch_with_blobs(e2e/src/node.rs:80, :135); funded buyer +fetch/probe(e2e/src/client.rs:60, :99, :208). Governance helpers exist includingslash_operator_via_judge(chain.rs:628), which already drives the commit ->increase_time(65)->submitPhantomChallengereveal dance, plusfast_track_appeal(:760),slashed_at_epoch(:590),served_bytes(:450). Two-node tests are established (g_node_04_blacklist_compliance.rs:198-200).The issue's premise checks out. Both existing "signed evidence" e2e paths cheat: chain.rs:664-690 and g_node_04_blacklist_compliance.rs:336-343 construct
ProbeSlashData/StreamSlashDataand sign withnode.operator()— the test holds the operator key. That is exactly the synthetic-signature gap this issue calls out, and nothing currently covers it.Blocker — the stream half needs a production change. The probe half is capturable today:
ClientFixture::probe(e2e/src/client.rs:208-228) returns the realProbeResponsewith the daemon-producedslash_sigover the same EIP-712 digestSlashJudge._verifyPairchecks (protocol/src/message.rs:218-231), so it can feedsubmitPhantomChallengedirectly. The stream half cannot:UpstreamRefusedcarries onlyerror: StreamError(client-pull/src/lib.rs:426-431) and the signedStreamResponsebody plus itsslash_sigare discarded at client-pull/src/lib.rs:744-748 (refusal()). The node does sign refusals (node/src/handlers/client.rs:2885-2941) — the evidence is produced and then thrown away client-side. Surfacing it is ~40-60 non-test LOC inclient-pull, i.e. a production change, not test-only work.Two unknowns to close first: (a) is
rate_per_mbactually in the hot-reloadable set (node/src/runtime/reload.rs)? If yes, the bait-and-switch is inducible by rewriting the config atNodeFixture::config_path()(node.rs:125) and callingadmin_v1_reload(admin.rs:579) between probe and stream; if not, the only lever isNodeFixture::restart()(node.rs:266) inside SlashJudge's 30s window, which is fragile. (b) Is there a phantom inducer that reliably fits that 30s window? The blacklist path at g_node_04_blacklist_compliance.rs:145-161 (probe true -> blacklist -> serve refuses) is the natural candidate but is tight against the blacklist watcher's poll cycle.Size: ~350-450 test LOC for a new
crates/e2e/tests/g_gov_03_*.rs, plus the ~40-60 LOCclient-pullchange, plus ~80 LOC refactoringslash_operator_via_judgeto accept caller-supplied real evidence rather than synthesizing it (it currently hardcodes at chain.rs:658-690).test!: drop tests of dead code, removed features and duplicates (#2959)