Repository navigation
[STF] Bound work reports by work-package limits - #376
Merged
Merged
Conversation
- implements Graypaper #563 - adds `validate_work_package_limits`, which bounds each work report by the seven work-package limits - renames the old `W_B` constant to `MAX_PACKAGE_INPUT_SIZE` (`W_I`) - adds `MAX_PACKAGE_BUNDLE_SIZE` (`W_B`) - makes the work-package gas limits inclusive - maps the new errors to the reports error codes of jam-test-vectors `master` - ignores 40 reports vectors whose v0.8.0 segment count is not the total exports
- jam-test-vectors `master` (`5e8d2a24`) regenerates the reports vectors for GP #563 and adds vectors on top of `v0.8.0` - registers the new authorizations, disputes, reports and safrole vectors - maps the new reports and safrole types and error codes - un-ignores the 40 reports vectors ignored for the `v0.8.0` segment count
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.
Summary
Implements GP #563.
Deviation from GP v0.8.0
master(CHANGELOG, vectors regenerated in45022c47). The pinned v0.8.0 reports vectors break the segment count rule.Changes
GuaranteesXtValidator::validate_work_package_limitschecks each report against the #563 bounds, right after the accumulate gas check. The bounds cover refine gas, imports, exports, extrinsic count and size, bundle length and authorizer gas, plus the rule that the segment count equals the total exports. Each bound has its own error, mapped to the new reports error codes of jam-test-vectorsmaster.W_Bis renamedW_I(MAX_PACKAGE_INPUT_SIZE), and the newW_Bis added asMAX_PACKAGE_BUNDLE_SIZE.