Repository navigation
feat(protocol,incentive,contracts)!: remove the dead StreamResponse redirect field (#1838) - #1842
Merged
Merged
Conversation
…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
Contracts coverageLine coverage: 89.69% (2575/2871 lines) |
Gas snapshotNo gas changes vs base. |
Coverage reportTotal: 82.00% (was 82.01%, ● 0.00%) — 68381/83387 lines
History
|
3 tasks
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1838.
StreamResponseBody.redirect: Optionis 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 asbytes32(0)on everyStreamResponse) and mirrored in the on-chainSlashJudgetype-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
redirectfromStreamResponseBodyand its doc comment; remove the round-trip test and the wire-format byte expectationredirect: Noneliteral at the four producer sites (dispatch.rs,window.rs×2,wire.rs)redirect.is_some()bail!guards and the out-of-scope noteredirectfrom the EIP-712 typed data, struct field,from_response_bodymapping, and related unit testsredirectfrom theSlashJudgestruct and type-hash string; re-runforge fmtredirectfrom the chain fixturesVerification
cargo build && cargo clippy && cargo fmt -- --check— cleancargo nextest run— 3044 passedforge test— 843 passedanvil-e2esuite — 53 passed, includingreal_node_responses_are_valid_on_chain_evidencewhich confirms the off-chain EIP-712 digest byte-matches whatSlashJudgerecovers on-chainStreamResponseEIP-712 type string is byte-identical acrossstream_sig.rs,SlashJudge.sol, and all testsNotes
FOUNDRY_PROFILE=ci forge build --deny warningslint failures are pre-existing (confirmed present onmain—block-timestamp/named-struct-fieldsacross the codebase), unrelated to this change.