test(grey-state): add proptests for transition validation and judgments#830
test(grey-state): add proptests for transition validation and judgments#830wangzishuai1987 wants to merge 1 commit into
Conversation
Add property-based tests for the block state transition module: - validate_header: rejects non-advancing timeslot, accepts advancing - apply_judgments: supermajority → good, zero positive → bad, minority → wonky, multiple verdicts handled independently - rotate_auth_pool: clears pool on epoch boundaries 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 The transition proptest coverage is a good target area, but this patch appears not to compile against the current API: State has no Default implementation, and rotate_auth_pool takes (&mut State, &GuaranteesExtrinsic, &Config), not a boolean. Even aside from compilation, the “valid author index” header test uses a minimal state without constructing validators. Ranked high enough for attempting meaningful state-transition coverage, but design is last until the tests are wired to real fixtures. |
|
JAR Bot: Review recorded from @johandroid (1 reviews, 0 meta-reviews). |
Summary
Adds property-based tests for the block state transition module (Section 4):
validate_header:
apply_judgments (Section 10):
rotate_auth_pool:
Refs: #229