Repository navigation
Limit how many nodes a refit proof can carry - #929
Conversation
[Medium impact] The PR appears safe to merge. SummaryThe PR limits each node list in a refit proof to 128 entries and adds a rejection test.
Reviews (3) · Last reviewed commit: "Skip the upgrade node check when there i..." · Reviewed by Greptile |
| function hasTooManyNodes(proof) { | ||
| if (proof.block && proof.block.nodes.length > MAX_NODES) return true | ||
| if (proof.hash && proof.hash.nodes.length > MAX_NODES) return true | ||
| return proof.upgrade.nodes.length > MAX_NODES || proof.upgrade.additionalNodes.length > MAX_NODES |
There was a problem hiding this comment.
Dont you need to guard this with if (upgrade)?
There was a problem hiding this comment.
Good point, added!
|
@greptileai explain why you missed #929 (comment) |
|
I missed it because I focused on whether the new node-count limit bounded the proof, and didn’t trace the optional So my “safe to merge” summary was too confident: I caught the intended limit and its test, but missed this missing-input-shape check. |
Co-authored with AI