ChainSecurity/deployment_validation

Early quit validation of critical events

Opened this issue · 1 comments

Current behaviour

When validating a DVF, a critical event is queried throughout the entire range of blocks. Once the querying part is done, the expected event behaviour is compared to what is specified in the DVF.

Problem

It takes an unnecessary long time for some validations to fail. For instance, if the number of occurrences of an event does not match, this can be spotted early on during the event querying.

Example

I was validating the USDC proxy contract, and after about 20 minutes I got this error:

Validation failed. Deployment invalid: Found 8 occurrences of event AdminChanged(address,address), but expected 0.

I was expecting this error, but I would have liked the querying to early stop at the first event occurrence found.