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

fix(genesis bridge): get rollapp by light client ID rather than chain ID in transfer enabled check #1339

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Oct 21, 2024

Description


Closes #1324

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments
  • Updated the scripts for local run, e.g genesis_config_commands.sh if the PR changes parameters
  • Add an issue in the e2e-tests repo if necessary

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys
  • UInt to byte conversion should use BigEndian

Full security checklist here


For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

After reviewer approval:

  • In case the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

@danwt danwt requested a review from a team as a code owner October 21, 2024 17:00
// 2. It is for rollapp but the light client of this transfer is not yet canonical or will never
// be marked canonical: for a correct rollapp the transfer channel is only created after it's
// marked canonical, so this transfer corresponds to a not-relevant channel.
// Note: IBC prevents sending to a channel which is not OPEN, which prevents making the transfer
Copy link
Contributor

Choose a reason for hiding this comment

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

IFAIU, channel can be established and OPEN even before we have canonical channel set, which set on the first state update.
which means the channel will be enabled until the canonical channel will be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

such channel will never be canonical so not important, such a rollapp is improperly created


btw I acknowledge it's awkward, it's due to a bad decision to make canonical client lazy instead of making it on the hub with the rollapp, but we are not going to change it for 3d release

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ut fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

such channel will never be canonical so not important,

oh I see it now.
channel can be canonical only if established over already canonical client.
channel established before the client became canonical (even if it's going to be soon), will not be canonical.

thx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah! sorry I know it's confusing

@mtsitrin
Copy link
Contributor

@danwt UT fails

@danwt danwt requested a review from mtsitrin October 22, 2024 08:39
@mtsitrin mtsitrin merged commit c9dae97 into main Oct 22, 2024
5 checks passed
@mtsitrin mtsitrin deleted the danwt/1324-fix-lc-bug branch October 22, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot send from hub to normal chain because hub mistakenly thinks it is sending to rollapp
2 participants