Commit 4feebce
fix: compare hashes instead of CIDs for anchor proof validation (#754)
The blockchain only stores the 32-byte hash, not the CID codec. When
validating single-event anchors where the original event uses dag-jose
codec, reconstruction assumed dag-cbor, causing validation failure.
Since the security property we care about is that the hash matches,
compare hashes directly rather than full CIDs.
Co-authored-by: Mohsin Zaidi <2236875+smrz2001@users.noreply.github.com>1 parent 89b1c0c commit 4feebce
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | | - | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | | - | |
| 307 | + | |
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| |||
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
341 | | - | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
0 commit comments