Fix nonce reuse across draws, validate inputs, drop runtime deps - #1
Merged
Merged
Conversation
A Provable instance built its byte stream once, so repeated floats()/ints() calls kept the original nonce and the emitted state no longer reproduced the outcome. Every draw now opens a stream for the current nonce, then advances and emits; long-lived and re-created instances agree. Byte stream, float and integer conversions and rotation are unchanged and pinned by fixed vectors. Also: validate seeds and integers (canonical decimal strings accepted), always derive serverHash from serverSeed, stop mutating caller objects, fix HashChain asserts and bounds, document HashSeries as immutable, restore the LICENSE holder, replace lodash and uuid with built-ins, add a files field, and rewrite the README to match the algorithm.
npm version patch|minor|major is now the whole release: preversion checks the CHANGELOG has an Unreleased entry and runs the tests, version dates the entry and rewrites the compare links, postversion pushes commit and vX.Y.Z tag. publish.yml publishes on v* tags with npm provenance and creates the GitHub release from the changelog section; ci.yml runs tests on Node 16-24. Commit the Yarn 3.3.0 lockfile (node-modules linker, global cache), switch repository.url to https for provenance, backfill CHANGELOG for 1.0.0 and 1.0.1, document the versioning policy, and drop the old release script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Provable instance built its byte stream once, so repeated floats()/ints() calls kept the original nonce and the emitted state no longer reproduced the outcome. Every draw now opens a stream for the current nonce, then advances and emits; long-lived and re-created instances agree. Byte stream, float and integer conversions and rotation are unchanged and pinned by fixed vectors.
Also: validate seeds and integers (canonical decimal strings accepted), always derive serverHash from serverSeed, stop mutating caller objects, fix HashChain asserts and bounds, document HashSeries as immutable, restore the LICENSE holder, replace lodash and uuid with built-ins, add a files field, and rewrite the README to match the algorithm.