Commit 9bc101a
fix(types): keep AppSignResponse wire keys backward-compatible
Earlier in this PR I added explicit json: tags on AppSignResponse —
"operator_address" / "partial_signature" — alongside the type change to
common.Address. That broke wire compat with operators on pre-PR builds:
the old serialization used the unexported defaults ("OperatorAddress",
"PartialSignature"), so a node from master couldn't decode responses
from a node on this branch and vice versa.
The security fix is the type itself (common.Address canonicalises the
20-byte form on both sides of the wire and rules out hex-encoding
aliasing). The key rename is incidental. Drop the json: tags so the
wire keys revert to "OperatorAddress" / "PartialSignature", keeping
the type-level Sybil defense without a coordinated rollout.
Added Test_AppSignResponse_WireKeysAreStable that pins the wire keys
("OperatorAddress" / "PartialSignature" present, snake_case absent)
so a future maintainer can't silently reintroduce the rename.
Existing canonicalization test updated to use the stable wire keys.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent de1ba8a commit 9bc101a
2 files changed
Lines changed: 41 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
32 | 59 | | |
33 | 60 | | |
34 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | | - | |
128 | | - | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
| |||
0 commit comments