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

feat(bridge-withdrawer): add ics20 withdrawal timeout duration option to withdrawer #1719

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

Conversation

noot
Copy link
Collaborator

@noot noot commented Oct 22, 2024

Summary

add ics20 withdrawal timeout duration option to withdrawer.

Background

potentially useful for testing the timeout path of ics20 transfers.

Changes

  • add ics20 withdrawal timeout duration option to withdrawer

Testing

existing unit tests; can't really test this fully without an actual ibc connection/smoke test setup

@noot noot requested review from a team as code owners October 22, 2024 22:59
@github-actions github-actions bot added the cd label Oct 22, 2024
@SuperFluffy
Copy link
Member

Is there a justification for this outside of testing? If the reason to get this in is testing timeouts then we should also provide some kind of tests - at least blackbox tests.

Copy link
Contributor

@quasystaty1 quasystaty1 left a comment

Choose a reason for hiding this comment

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

Charts LGTM

@noot
Copy link
Collaborator Author

noot commented Oct 23, 2024

@SuperFluffy main reason right now is testing, but it could be used normally, for example if someone deploys their own bridge and they want a custom/different ibc transfer timeout time.

Copy link
Contributor

@Fraser999 Fraser999 left a comment

Choose a reason for hiding this comment

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

LGTM (just a couple of nitpicks), but I agree with @SuperFluffy that it would be good to have test coverage of this new functionality.

@@ -48,6 +48,9 @@ ASTRIA_BRIDGE_WITHDRAWER_ROLLUP_ASSET_DENOMINATION="nria"
# Should match the bridge address in the geth rollup's bridge configuration for that asset.
ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_BRIDGE_ADDRESS=""

# The timeout duration for `Ics20Withdrawal`s in seconds.
ASTRIA_BRIDGE_WITHDRAWER_ICS20_WITHDRAWAL_TIMEOUT_DURATION=300
Copy link
Contributor

Choose a reason for hiding this comment

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

Might make the units more visible if we named this ASTRIA_BRIDGE_WITHDRAWER_ICS20_WITHDRAWAL_TIMEOUT_SECONDS?

@@ -26,6 +26,8 @@ pub struct Config {
pub rollup_asset_denomination: asset::denom::TracePrefixed,
// The bridge address corresponding to the bridged rollup asset on the sequencer.
pub sequencer_bridge_address: String,
// The timeout duration for `Ics20Withdrawal`s in seconds.
pub ics20_withdrawal_timeout_duration: u64,
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise, since this isn't a Duration yet, renaming to ics20_withdrawal_timeout_seconds might be slightly clearer?

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.

4 participants