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(genesis bridge): genesis transfers #279

Merged
merged 62 commits into from
Jun 25, 2024
Merged

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Jun 12, 2024

Description

See

https://github.com/dymensionxyz/research/issues/278 for the master issue.

There are a few outstanding items, that this PR does not try to solve.

This PR:

  • do not allow opening any ibc connections starting at the RA side
  • hard codes alice/bob keys in test scripts to make the address deterministic
  • adds -y to register rollapp / register sequencer cmds
  • wires in the new hub genesis ibc module (see RDK pr feat(genesis bridge): genesis transfers dymension-rdk#449)

NOTE: I will update the go.mod to the correct dependencies after the other prs are merged


Closes #278

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.

Summary by CodeRabbit

  • New Features

    • Introduced a message type check to prevent connection openings from one side.
  • Improvements

    • Updated scripts for setting up IBC paths and registering rollapps, sequencers, and genesis accounts with new flags for automation and better organization.
    • Enhanced genesis file updates for account balances, metadata, and elevated addresses.
  • Permissions

    • Modified permissions for specific module names.
    • Adjusted TransferKeeper initialization for better control.

@danwt
Copy link
Contributor Author

danwt commented Jun 19, 2024

Thanks @srene I've fixed the readme now

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
mtsitrin
mtsitrin previously approved these changes Jun 19, 2024
README.md Outdated Show resolved Hide resolved
@danwt danwt requested review from mtsitrin and zale144 June 20, 2024 12:14
app/app.go Outdated Show resolved Hide resolved
scripts/update_genesis_file.sh Show resolved Hide resolved
@danwt danwt requested a review from zale144 June 25, 2024 11:35
@mtsitrin mtsitrin merged commit f0e0909 into main Jun 25, 2024
11 of 12 checks passed
@mtsitrin mtsitrin deleted the danwt/278-genesis-bridge branch June 25, 2024 13:06
Comment on lines +21 to +23
# ---------------------------- add genesis accounts for the hub ---------------------------- #
genesis_accounts=$(cat "$ROLLAPP_SETTLEMENT_INIT_DIR_PATH"/genesis_accounts.json)
jq --argjson genesis_accounts "$genesis_accounts" '.app_state.hubgenesis.state.genesis_accounts = $genesis_accounts' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Genesis bridge v2 : first milestone
4 participants