-
Notifications
You must be signed in to change notification settings - Fork 75
Finish most remaining TODOs #54
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -359,6 +359,8 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable { | |
| bytes32 relayerRefundRoot, | ||
| bytes32 slowRelayRoot | ||
| ) public override nonReentrant noActiveRequests { | ||
| // Note: this is to prevent "empty block" style attacks where someone can make empty proposals that are | ||
| // technically valid but not useful. This could also potentially be enforced at the UMIP-level. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think there's a situation where we want to publish a new relayer refund root or slow relay root to the SpokePool but we don't want to execute a pool rebalance? In this case, how do we submit an "no-op" pool rebalance root?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It depends what you mean by "execute a pool rebalance". It's possible in the current design to set up rules where the pool rebalance doesn't actually send tokens until the deficit gets pretty big, so there would be a rebalance leaf, but that leaf wouldn't result in tokens being sent. |
||
| require(poolRebalanceLeafCount > 0, "Bundle must have at least 1 leaf"); | ||
|
|
||
| uint64 requestExpirationTimestamp = uint64(getCurrentTime() + liveness); | ||
|
|
@@ -398,6 +400,9 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable { | |
| "Bad Proof" | ||
| ); | ||
|
|
||
| // Before interacting with a particular chain's adapter, ensure that the adapter is set. | ||
| require(address(crossChainContracts[poolRebalanceLeaf.chainId].adapter) != address(0), "No adapter for chain"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there any advantage to prevent setting the adapter contract address to 0x0 in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that's a worthwhile check! Will add.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I think we should actually allow this to allow a chain to be de-whitelisted. |
||
|
|
||
| // Set the leafId in the claimed bitmap. | ||
| rootBundleProposal.claimedBitMap = MerkleLib.setClaimed1D( | ||
| rootBundleProposal.claimedBitMap, | ||
|
|
||
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.
add a comment on the unchecked block below
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.