-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node: Add ability to limit Flow Cancel to pairs of chains
- Add a concept of "pipes" which consist of a pair of chains - Add field in the Governer that enables flow cancel only for "pipes" which are explicitly enabled - Set the Eth-Sui pipe as the only flow cancel-enabled pair. Sui is the only chain with frequent governor congestion so it is the only one that really needs the Flow Cancel capabilities. Ethereum is the main chain that Sui is interacting with in terms of volume moving in and out of Sui. - Refactor calling sites for flow cancel transfer functions so that all checks are done in one place. (Should help prevent bugs where only one calling site is updated.)
- Loading branch information
1 parent
4f0e46f
commit 40c4b1e
Showing
5 changed files
with
163 additions
and
68 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package governor | ||
|
||
import "github.com/wormhole-foundation/wormhole/sdk/vaa" | ||
|
||
// FlowCancelPipes returns a list of `pipe`s representing a pair of chains for which flow canceling is enabled. | ||
// In practice this list should contain pairs of chains that have a large amount of volume between each other. | ||
// These are more likely to cause chronic congestion which flow canceling can help to alleviate. | ||
// Pairs of chains that are not frequently congested do not need to enable flow canceling as they should have | ||
// plenty of regular Governor capacity to work with. | ||
func FlowCancelPipes() []pipe { | ||
return []pipe{ | ||
{first: vaa.ChainIDEthereum, second: vaa.ChainIDSui}, | ||
} | ||
} |
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