Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVM: NttManagerWithoutRateLimiting #519

Conversation

bruce-riley
Copy link

@bruce-riley bruce-riley commented Sep 18, 2024

This PR breaks up the EVM NTT Manager into two components, the existing NttManager, which works as always and a new NttManagerWithoutRateLimiting, which does not do rate limiting. This allows integrators to chose whether or not they wish to use rate limiting.

This is done by adding an abstract contract called NttManagerBase which contains most of the implementation, except for rate limiting.

The NttManagerWithoutRateLimiting does not implement rate limiting, but it does implement that IRateLimiter interface. This is being done to maintain ABI compatibility between the two contracts.

This change increases the size of the NttManager contract by 67 bytes (leaving 90 bytes free).
The NttManagerWithoutRateLimiting contract has 6689 bytes free.

@bruce-riley bruce-riley force-pushed the evm_NttManagerWithoutRateLimiting branch 4 times, most recently from 439bcbe to f7e35bc Compare September 18, 2024 15:24
@bruce-riley bruce-riley force-pushed the evm_NttManagerWithoutRateLimiting branch from f7e35bc to 4f09f85 Compare September 18, 2024 16:15
@bruce-riley bruce-riley force-pushed the evm_NttManagerWithoutRateLimiting branch 2 times, most recently from a05d871 to cc45269 Compare September 18, 2024 19:40
@bruce-riley bruce-riley force-pushed the evm_NttManagerWithoutRateLimiting branch from cc45269 to 2da6b15 Compare September 18, 2024 19:40
@bruce-riley
Copy link
Author

bruce-riley commented Sep 19, 2024

I verified that the output from these commands match the output from the NttManager contract on main. This should ensure that the external interfaces have not changed.

jq .methodIdentifiers out/NttManager.sol/NttManager.json
jq .methodIdentifiers out/NttManagerWithoutRateLimiting.sol/NttManagerWithoutRateLimiting.json

@evan-gray
Copy link
Contributor

Closing this in favor of #520 which supports a smaller diff and an easier migration strategy (for those who disabled rate limiting)

@evan-gray evan-gray closed this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants