update remerkleable; mul/div bound checks, update config loading #1709
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.
Update the SSZ library from v0.1.12 to v0.1.13, now with bound checks and type preservation on mul and floordiv. To catch overflow/underflow cases better. See #1701
This remerkleable release is fully backwards compatible.
Updating one test helper value that was supposed to be a signed integer, and was previously (mul output was an
int
), but needed to be updated.And updating the config loader to load config values with their existing types, and ignore unknown config keys (we do not want phase1 keys to leak into phase0 unnecessarily). An optional argument can make the ignored values explicit for debugging.
Notes about new remerkleable functionality:
One other new feature is that it offers some
readonly_iter()
iterators to allow for much faster stack-based iteration of compound views. Useful for users outside of the spec that want things to run faster. I am considering making this the default, but what should be noted here is that "readonly" means that updates/removals/additions of items in the iterated container during iteration cannot be seen until after the iteration is done. Maybe not so bad, given that many program languages default to not allowing modifications at all, or do the same?Additionally, this readonly iter is the default for
Container
(since we don't normally iterate it dynamically), and enables fast unpacking: