test(javm): add proptests for PVM blob parsing#832
Conversation
Add property-based tests for the JAR blob parsing and building: - build_simple_blob → parse_blob roundtrip always succeeds - Code bytes survive build → parse roundtrip - Bitmask roundtrip (all-ones and arbitrary) - Jump table entries survive build → parse roundtrip - parse_blob and parse_code_blob never panic on arbitrary input - Empty blob and wrong-magic blob are rejected Refs: jarchain#229
Genesis ReviewComparison targets:
How to reviewPost a comment with the following format (rank from best to worst): Use the short commit hashes above and To meta-review another reviewer's comment, react with 👍 or 👎. |
|
/review Adds focused proptest coverage for JAVM program blob parsing: build/parse roundtrips for code, bitmask, and jump table data, plus no-panic checks for arbitrary parser input. Ranked below the transpiler optimization and merkle deduplication targets, but above smaller test/refactor/doc changes because binary parser robustness is a meaningful assurance gain. This touches javm, though only tests, so a benchmark is not likely informative but the javm path is flagged by the review workflow. |
|
JAR Bot: Review recorded from @johandroid (1 reviews, 0 meta-reviews). |
Summary
Adds property-based tests for the JAR blob parsing and building pipeline in the PVM (PolkaVM) module:
Roundtrip properties:
build_simple_blob→parse_blobalways succeeds for valid inputsRobustness properties:
parse_blobnever panics on arbitrary input bytesparse_code_blobnever panics on arbitrary input bytesNone)These tests are important because blob parsing handles untrusted input — the node must never panic when receiving a malformed blob from the network or database.
Refs: #229