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

Genesis bridge: better UX for chains without genesis transfers #922

Closed
danwt opened this issue Jun 10, 2024 · 4 comments · Fixed by #961
Closed

Genesis bridge: better UX for chains without genesis transfers #922

danwt opened this issue Jun 10, 2024 · 4 comments · Fixed by #961
Assignees

Comments

@danwt
Copy link
Contributor

danwt commented Jun 10, 2024

We can trivially support them with a MsgCreateRollapp flag (transfersEnabled) but it leaves room for user error

Ideally we'd have something on the RA side, but there is no obvious way to transmit that info the Hub without piggybacking the memo, but there is no transfer being made to memo off of

@danwt danwt self-assigned this Jun 10, 2024
@danwt
Copy link
Contributor Author

danwt commented Jun 10, 2024

@danwt danwt changed the title Gracefully support unlocking the bridge for chains without genesis transfers Genesis bridge: Gracefully support unlocking the bridge for chains without genesis transfers Jun 11, 2024
@danwt danwt changed the title Genesis bridge: Gracefully support unlocking the bridge for chains without genesis transfers Genesis bridge: better UX for chains without genesis transfers Jun 13, 2024
@danwt
Copy link
Contributor Author

danwt commented Jun 19, 2024

@mtsitrin made the suggestion that we just use the first transfer RA->Hub that does not include the 'genesis transfer special memo' to signal that the bridge should be opened.

It's an elegant solution because it removes the need for rollapps that don't want to use genesis transfers to have to set 'transfersEnabled' on the MsgCreateRollapp

Also, it allows a possible additional simplification: we may not require a genesis transfer counter on the hub. The hub could simply use the first normal transfer as the signal.

The only problem with this additional simplification is that the rollapps would break their genesis phase if a regular transfer accidentally got relayed before all the genesis transfers. To mitigate that, we could either

  • a) place the responsibility on the operator
  • b) we could keep the transfer counter on the hub. In this way, after the first genesis transfer arrives then all are expected. This does't completely avoid the problem in theory though, since a regular transfer can still race ahead of all the genesis ones
  • c) disable transfers on the rollapp until successful acks have been received for every genesis transfer packet (currently we do not do this, we just allow them to be sent, but they will get refunded)

Personally, I like the idea, and option (a)

cc @omritoptix

@omritoptix
Copy link
Contributor

@danwt how do you imagine this being enforced by (a)? i.e does he need to make sure there are special conditions in place and protect from specific attack vectors? if so I think we should avoid this. imo should be smooth experience with minimal "learning" overhead.

given what I wrote, and the fact that I'm still not sure exactly about what (a) requires from the operator, I think (c) makes sense.

@danwt
Copy link
Contributor Author

danwt commented Jun 19, 2024

how do you imagine this being enforced by (a)

Yeah I was just thinking, because we already agreed that it is up to the operator not expose his RPC endpoint before he finishes creating the channel with the Hub, then it might also be reasonable to assume that he shall not expose the endpoint until all the genesis transfers have finished being relayed

He could know when it's finished by waiting until all packet commits are cleared

But anyways, sure, I will investigate (c), should be easy

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

Successfully merging a pull request may close this issue.

2 participants