Description
Batched blacklist ops should converge to the same final state regardless of input order. Add a proptest harness that shuffles input vectors and asserts the post-state is identical and that emitted events form an order-equivalent multiset.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/test_blacklist_batch_gas.rs
- Harness must include duplicate and overlapping add/remove vectors
Suggested execution
- Fork the repo and create a branch
git checkout -b test/blacklist-batch-prop
- Implement changes
- Define
proptest::collection::vec(any::<Addr>(), 0..50) strategies
- Compare final blacklist state under shuffled execution
- Assert event multiset equivalence with sorted comparison
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- Empty input vector must be a no-op with no events
- Include test output and security notes
Example commit message
test: add proptest for blacklist batch order-independence
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Batched blacklist ops should converge to the same final state regardless of input order. Add a proptest harness that shuffles input vectors and asserts the post-state is identical and that emitted events form an order-equivalent multiset.
Requirements and context
Revora-Contracts/src/test_blacklist_batch_gas.rsSuggested execution
git checkout -b test/blacklist-batch-propproptest::collection::vec(any::<Addr>(), 0..50)strategiesTest and commit
cargo test --allExample commit message
test: add proptest for blacklist batch order-independenceGuidelines