Skip to content

fix(stump_modified_add): skip all 0's input#516

Merged
brunoerg merged 1 commit intobitcoinfuzz:v2from
KY-U:2026-04-stump-modify-add
Apr 7, 2026
Merged

fix(stump_modified_add): skip all 0's input#516
brunoerg merged 1 commit intobitcoinfuzz:v2from
KY-U:2026-04-stump-modify-add

Conversation

@KY-U
Copy link
Copy Markdown
Contributor

@KY-U KY-U commented Apr 7, 2026

While utreexo's Go implementation considers a hash consisting of all 0 bytes as empty, rustreexo has no such restriction, considering it a valid hash, which means that an all 0's input is outside the shared domain of both implementations and should be skipped.

Added a lambda function in driver.cpp's stump_modified_add target to skip the case where a hash is composed of all zeros.

Comment thread driver.cpp
@KY-U KY-U force-pushed the 2026-04-stump-modify-add branch from 65483d0 to d755d92 Compare April 7, 2026 14:35
@KY-U
Copy link
Copy Markdown
Contributor Author

KY-U commented Apr 7, 2026

Force pushed solving #516 (comment).

Copy link
Copy Markdown
Collaborator

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

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

Force pushed solving #516 (comment).

I don't see the comment in the code.

@KY-U KY-U force-pushed the 2026-04-stump-modify-add branch from d755d92 to 1c078c7 Compare April 7, 2026 18:01
@KY-U
Copy link
Copy Markdown
Contributor Author

KY-U commented Apr 7, 2026

Force pushed solving #516 (comment).

I don't see the comment in the code.

Forgot to save the change before amending, skill issue.

Comment thread driver.cpp Outdated
if (hash.size() < 32) {
break;
}
// Skip all-zero hashes because Utreexo treats them as a special case (empty
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Utreexo or Utreexod implementation?

Suggested change
// Skip all-zero hashes because Utreexo treats them as a special case (empty
// Skip all-zero hashes because Utreexod treats them as a special case (empty

Copy link
Copy Markdown
Contributor Author

@KY-U KY-U Apr 7, 2026

Choose a reason for hiding this comment

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

Utreexod is the full node implementation. The dynamic acumulator repo is indeed called utreexo. But it probably isn't clear for a user that "utreexo" is refering to the specific go implementation. I'll change that.

Copy link
Copy Markdown
Contributor Author

@KY-U KY-U Apr 7, 2026

Choose a reason for hiding this comment

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

Changed comment to better specify reference to utreexod's specific accumulator implementation.

@KY-U KY-U force-pushed the 2026-04-stump-modify-add branch 3 times, most recently from 6504e41 to bc6aa5a Compare April 7, 2026 18:20
While utreexo's Go implementation considers a hash consisting of all 0 bytes as e^Cty, rustreexo has no such restriction, considering it a valid hash, which means that an all 0's input is outside the shared domain of both implementations and should be skipped.
@KY-U KY-U force-pushed the 2026-04-stump-modify-add branch from bc6aa5a to 3290a29 Compare April 7, 2026 18:24
Copy link
Copy Markdown
Collaborator

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

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

code review ACK 3290a29

@brunoerg brunoerg merged commit 2584e9c into bitcoinfuzz:v2 Apr 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants