Skip to content

feat(protocol,incentive,contracts)!: remove the dead StreamResponse redirect field (#1838) - #1842

Merged
thiras merged 3 commits into
mainfrom
feat/remove-stream-response-redirect
Aug 26, 2026
Merged

thiras merged 3 commits into
mainfrom
feat/remove-stream-response-redirect

Conversation

@thiras

@thiras thiras commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1838. StreamResponseBody.redirect: Option is a dead wire field: no node ever populates it, no client ever follows it, yet it is carried on the wire and folded into the EIP-712 signed set (signed as bytes32(0) on every StreamResponse) and mirrored in the on-chain SlashJudge type-hash. ADR 041 forbids redirects as a client-steering attack surface, so the field is reserved-but-inert.

Removed now while pre-launch wire-breaking changes are free. Per CLAUDE.md: change the format, update every side in the same PR, delete the old shape.

Changes

  • protocol: drop redirect from StreamResponseBody and its doc comment; remove the round-trip test and the wire-format byte expectation
  • node: drop the redirect: None literal at the four producer sites (dispatch.rs, window.rs ×2, wire.rs)
  • client-pull: remove the two redirect.is_some() bail! guards and the out-of-scope note
  • incentive: remove redirect from the EIP-712 typed data, struct field, from_response_body mapping, and related unit tests
  • contracts: remove redirect from the SlashJudge struct and type-hash string; re-run forge fmt
  • e2e: drop redirect from the chain fixtures
  • regenerate the public-API snapshot
  • ADRs 005/013/014: strike the redirect flow and its signed-set mention; ADR 041 now cites that the field no longer exists

Verification

  • cargo build && cargo clippy && cargo fmt -- --check — clean
  • cargo nextest run — 3044 passed
  • forge test — 843 passed
  • anvil-e2e suite — 53 passed, including real_node_responses_are_valid_on_chain_evidence which confirms the off-chain EIP-712 digest byte-matches what SlashJudge recovers on-chain
  • The StreamResponse EIP-712 type string is byte-identical across stream_sig.rs, SlashJudge.sol, and all tests

Notes

  • Wire-breaking is acceptable pre-launch; no compat shim or dual-format reader added.
  • The FOUNDRY_PROFILE=ci forge build --deny warnings lint failures are pre-existing (confirmed present on main — block-timestamp/named-struct-fields across the codebase), unrelated to this change.

…edirect field (#1838)

StreamResponseBody.redirect is a dead wire field: no node populates it, no
client follows it, yet it is carried on the wire and folded into the
EIP-712 signed set (signed as bytes32(0) on every StreamResponse) and
mirrored in the on-chain SlashJudge type-hash. ADR 041 forbids redirects
as a client-steering attack surface, so the field is reserved-but-inert.

Remove it now while pre-launch wire-breaking changes are free. Change the
format, update every side in the same PR, and delete the old shape:

- protocol: drop redirect from StreamResponseBody and its doc comment
- node: drop the redirect: None literal at the four producer sites
- client-pull: remove the two redirect.is_some() bail guards and the
  out-of-scope note
- incentive: remove redirect from the EIP-712 typed data, struct field,
  from_response_body mapping, and related unit tests
- contracts: remove redirect from the SlashJudge struct and type-hash
  string; re-run forge fmt
- e2e: drop redirect from the chain fixtures
- regenerate the public-api snapshot
- ADRs 005/013/014: strike the redirect flow and its signed-set mention;
  ADR 041 now cites that the field no longer exists
Copilot AI lite review requested due to automatic review settings August 26, 2026 19:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Contracts coverage

Line coverage: 89.69% (2575/2871 lines)
▲ +0.00pp vs base (89.69% → 89.69%)
Run: 33009193965

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 82.00% (was 82.01%, ● 0.00%) — 68381/83387 lines

File Coverage Lines Δ
crates/client-pull/src/lib.rs 89.24% 1676/1878 ▲ +0.06%
crates/e2e/src/chain.rs 13.50% 229/1696 ▲ +0.02%
crates/incentive/src/stream_sig.rs 97.66% 209/214 ▼ 0.25%
crates/node/src/handlers/client/dispatch.rs 86.15% 448/520 ▼ 0.03%
crates/node/src/handlers/client/window.rs 75.13% 296/394 ▼ 0.13%
crates/node/src/handlers/client/wire.rs 95.69% 400/418 ▼ 0.01%
crates/protocol/src/client.rs 97.52% 1063/1090 ▼ 0.04%
History
Commit Total Δ vs base
f407ad9 82.00% ▼ 0.01%
ca5d217 (HEAD) 82.00% ● 0.00%

…redirect removal

Deleting the section and field left five docs sites reading wrong when read cold.

ADR 005: the seek-and-resume sentence had fallen under `#### Namespace routing`, a section about `namespace_id` resolution; it gets its own `#### Seek and resume` heading, and both ADR 038 links now point at it instead of the 300-line `cdn/client/v1` section. "The network is fully opaque." lost its antecedent when the redirect clause went, so it goes too — the invariant it carried returns as a field-independent Consequences bullet.

ADR 041 named a `redirect` field that no longer exists, in conditional voice. It now states the rule about route hints in present tense.

`stream_sig.rs` pointed at `StreamResponseBody.channel_id`; the wire field is `pool_id` and only the contract calls it `channelId`. `client-pull`'s `# Scope` list was down to a single entry that described what is in scope rather than a boundary, so it becomes a titled section.

Follow-up work on the EIP-712 type-hash — the live Arbitrum Sepolia `SlashJudge` redeploy, a default-CI pin between the Rust and Solidity type strings, and ADR 014's `poolId`/`channelId` split — is tracked in #1843.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@thiras
thiras merged commit eb9d1b2 into main Aug 26, 2026
25 checks passed
@thiras
thiras deleted the feat/remove-stream-response-redirect branch August 26, 2026 20:23
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.

Remove dead redirect field from StreamResponse before launch

3 participants