Skip to content

Add proptest harness for blacklist_add_many/remove_many state convergence with randomized order #477

Description

@thlpkee20-wq

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
    • cargo test --all
  • 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

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions