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

node: Extend flow cancel by configuring allow-list of chain ID pairs ("pipes") #4229

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

johnsaigle
Copy link
Contributor

No description provided.

- 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.)
@johnsaigle johnsaigle changed the title node: Extend flow cancel by configuring allow-liss of chain ID pairs ("pipes") node: Extend flow cancel by configuring allow-list of chain ID pairs ("pipes") Jan 21, 2025
- Add unit tests to ensure that the flow cancel feature works iff valid
  pipes are configured
- Adds unit tests for the pipe type (validity, equality between two
  pipes)
- Modifies pipe.equals() to always return false for invalid pipes
@johnsaigle johnsaigle marked this pull request as ready for review January 22, 2025 18:46
)
// Process the next pending transfer
continue
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've lost this continue skipping logic with this PR if an error occurs...is this deliberate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think it was, thanks for the catch. I'm not totally sure if it matters but to make the changes here as minimal as they can be, I'll add a continue in the if...err check for tryAddFlowCancelTransfer()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants