Skip to content

fix(proof): translate targets before pairing them with proof hashes - #166

Merged
Davidson-Souza merged 1 commit into
mit-dci:mainfrom
Davidson-Souza:fix/return-translated-targets
Oct 7, 2026
Merged

Davidson-Souza merged 1 commit into
mit-dci:mainfrom
Davidson-Souza:fix/return-translated-targets

Conversation

@Davidson-Souza

Copy link
Copy Markdown
Collaborator

calculate_hashes builds its node list out of self.targets, which are positions in MAX_FOREST_ROWS space, and then pairs it with proof positions that are in the forest's own rows. Both spaces agree for targets at row 0, so this stays invisible until a deletion promotes a leaf: from then on that target sorts nowhere near its sibling and verification fails with MissingSibling, even though the proof is valid.

Use the already-computed translated positions instead, which is what the calculate_hashes_delete twin does.

This is a cherry-pick of #152. The author seems unresponsive to a red CI, but I want this before releasing implicit dels.

`calculate_hashes` builds its node list out of `self.targets`, which are
positions in `MAX_FOREST_ROWS` space, and then pairs it with proof positions
that are in the forest's own rows. Both spaces agree for targets at row 0, so
this stays invisible until a deletion promotes a leaf: from then on that target
sorts nowhere near its sibling and verification fails with `MissingSibling`,
even though the proof is valid.

Use the already-computed `translated` positions instead, which is what the
`calculate_hashes_delete` twin does.
@Davidson-Souza Davidson-Souza added the bug Something isn't working label Oct 6, 2026

@JoseSK999 JoseSK999 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 23af8a6; swift-synced signet using this branch, and continued

@csgui csgui 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.

tACK 23af8a6

@Davidson-Souza
Davidson-Souza merged commit 1d7263b into mit-dci:main Oct 7, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants