Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory optimization or bug? the 4 PB limit of Hasher.stack #23

Open
glycerine opened this issue Feb 1, 2025 · 0 comments
Open

memory optimization or bug? the 4 PB limit of Hasher.stack #23

glycerine opened this issue Feb 1, 2025 · 0 comments

Comments

@glycerine
Copy link

type Hasher struct {
    // log(n) set of Merkle subtree roots, at most one per height.                  
    stack   [64 - (guts.MaxSIMD + 10)][8]uint32 

I think technically that should be log2(guts.MaxSIMD)==4,
instead of guts.MaxSIMD == 16, to get full 2^64-1 input support
that the spec requires.

Its an extra 12*32 = 384 bytes per Hasher (so from 1216 bytes -> 1536 bytes
for the stack), so probably not too expensive.

glycerine pushed a commit to glycerine/blake3 that referenced this issue Feb 2, 2025
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

No branches or pull requests

1 participant