movementlabsxyz / movement

The Movement Network is a Move-based L2 on Ethereum.
Apache License 2.0
82 stars 66 forks source link

Implement Rate Limiter Contract #851

Open 0xmovses opened 1 week ago

0xmovses commented 1 week ago

Summary

For a full spec please read MIP-56

Changelog

Testing

Adds the solidity unit test testRateLimitExceeded for both Initiator and Counterparty Contracts cd protocol-units/bridge/contracts && forge test

Outstanding issues

Integration tests with the relayer should be added in a separate PR, more solidity unit tests could be added to test out the RateLimiter.sol

l-monninger commented 1 week ago

@0xmovses is there a good way to test this e2e? Or, should we trust in the forge ~sim and reserve the rest for our time working on operational bits?

0xmovses commented 1 week ago

@l-monninger e2e will happen in another PR after #690 goes in.

l-monninger commented 1 week ago

I know this is implemented for the Bilbao Model, but ideally we don't have to report the insurance fund balance and it can instead be queried on-chain. Even if it's just an account, as long as we know the account we can call balanceOf to determine how much it can ensure.

0xmovses commented 1 week ago

@l-monninger sounds good.