-
Notifications
You must be signed in to change notification settings - Fork 207
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
IBC Rate Limiting Audit Fixes #818
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8e59f69
added undo rate limit send packet
sampocs 3c449a6
added pending packet sequence keepers
sampocs ea03a06
implemented sequence checks and unit tests
sampocs b595566
added whitelist address keeper functions
sampocs 42e283d
implemented address whitelist and unit tests
sampocs a20260f
updated readme
sampocs f4de6e8
added whitelist address in register host zone
sampocs f6ac6e7
fixed unit test
sampocs 1e5cbd8
added queries for denom blacklist and address whitelist
sampocs 8bedb4a
only stored pending packet if rate limit exists
sampocs 7b2af20
fixed bug in build.sh with juno
sampocs 9d60d30
increased gas
sampocs af2a635
fixed rate limit integration tests
sampocs 2ad2213
fixed init/export genesis
sampocs 489748c
changes after testing timeout/failure
sampocs 8cd33f8
addressed aidan PR comments
sampocs 0ee1f22
temporarily reverted address whitelist check
sampocs a98df1d
added whitelist to protos
sampocs 74fb0cf
implemented new whitelist and unit tests
sampocs 0c9b08d
added whitelist address in register host zone
sampocs 5ed0bfd
fixed queries and init genesis
sampocs 730d7ec
renamed whitelist address data struct and keepers
sampocs c347de9
updated readme
sampocs c6846d3
Merge branch 'main' into sam/ratelimit-audit-fix-timeout
sampocs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
only stored pending packet if rate limit exists
- Loading branch information
commit 8bedb4a06ed82b962d42336a7dc60dcaf096cb62
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this condition is more specific, it's unnecessarily broad right now (e.g. sending to stride's module account address on a counterparty chain would be whitelisted)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asalzmann thinking about this a bit more, I'm wondering if we should just remove the ICA accounts from the whitelist now that there's the extra clause that specifies the packet type?
The epochly transfer would be a SEND_PACKET with Sender == module account, and the prop 8 transfer would be a RECV_PACKET with Receiver == module account. I'm not sure there's any other cases to worry about
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems cleaner to me. Agree that those are the only two cases. Note: I believe prop 8 rev goes into a separate module account, that will need to be whitelisted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually an even slightly safer design imo would be
Whitelist
With the "either or" whitelist approach and whitelisting the main stakeibc mod acct and the delegation ICA, I think we've disabled rate limits along these paths: