generated from vacp2p/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The set of assertions registerMembership, attemptExtensionRace, attemptErasureRace was used to simulate RLN smart contract behavior with Echidna. During simulation both attemptExtensionRace and attemptErasureRace had each an instance with invalid result. It seems the contract allows extension of a membership outside the grace period when many users attempt to do so.
Impact
Low occurrence, medium impact.
To reproduce from replay
- Checkout 0238995
- cd waku-rlnv2-contract
- forge test --match-test test_attemptExtensionRace_WakuRLN -vvv or forge test --match-test test_attemptErasureRace_WakuRLN -vvv
To reproduce from Echidna run
- Checkout 657c917
- cd waku-rlnv2-contract
- echidna test/EchidnaTestRaces.t.sol --contract EchidnaTestRaces --config echidna.config.yaml --format json > echidna_log.json
- Go to
https://getrecon.xyz/tools/echidnaand pasteechidna_log.jsoncontent - Copy the converted test cases into replay contract.
- Fix issues unrelated to membership extension (invalid commitment, high GAS consumption) - use AI to help
- forge test --match-test test_attemptExtensionRace_WakuRLN -vvv or forge test --match-test test_attemptErasureRace_WakuRLN -vvv
Expected behavior
RLN contract should ideally never allow membership extension outside of the grace period.
Screenshots/logs
echidna_log.json
test_attemptExtensionRace_WakuRLN.log
test_attemptErasureRace_Waku.log
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working