Skip to content

[STF] Bound work reports by work-package limits - #376

Merged
0xjunha merged 2 commits into
mainfrom
bound-work-reports
Nov 19, 2026
Merged

0xjunha merged 2 commits into
mainfrom
bound-work-reports

Conversation

@0xjunha

@0xjunha 0xjunha commented Nov 19, 2026

Copy link
Copy Markdown
Member

Summary

Implements GP #563.

Deviation from GP v0.8.0

  • GP v0.8.0 does not bound a work report's refine load, bundle length or authorizer gas, and does not tie its segment count to the digest exports.
  • The 0.8.0 fuzz campaign already rejects such blocks, per the Deviations of jam-fuzzing#212.
  • jam-test-vectors lists it as a deviation only on master (CHANGELOG, vectors regenerated in 45022c47). The pinned v0.8.0 reports vectors break the segment count rule.

Changes

  • GuaranteesXtValidator::validate_work_package_limits checks 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-vectors master.
  • The old W_B is renamed W_I (MAX_PACKAGE_INPUT_SIZE), and the new W_B is added as MAX_PACKAGE_BUNDLE_SIZE.
  • The work-package gas limits are now inclusive.

- 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
@0xjunha
0xjunha merged commit ec6edb6 into main Nov 19, 2026
1 check passed
@0xjunha
0xjunha deleted the bound-work-reports branch November 19, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant