Skip to content

age: Replace HashSet with BTreeSet for deterministic iteration#612

Open
antonleviathan wants to merge 1 commit intostr4d:mainfrom
antonleviathan:deterministic-iteration
Open

age: Replace HashSet with BTreeSet for deterministic iteration#612
antonleviathan wants to merge 1 commit intostr4d:mainfrom
antonleviathan:deterministic-iteration

Conversation

@antonleviathan
Copy link
Copy Markdown

@antonleviathan antonleviathan commented Apr 17, 2026

This change is to remove a source of nondeterminism in age's label handling.

In downstream reproducible-build testing, we were seeing otherwise-identical builds produce different zcash-devtool binaries.

diffoscope narrowed that down to code generation differences in age::error::PluginError::fmt, which pointed back to non-deterministic iteration order from HashSet-backed label metadata. Switching these paths to BTreeSet makes the iteration order deterministic.

I tested this by pointing zcash-devtool at a local checkout of this branch and rebuilding with the patched age crate.

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.

1 participant