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: e2e upgrade software #727

Merged
merged 38 commits into from
Jul 26, 2024
Merged

feat: e2e upgrade software #727

merged 38 commits into from
Jul 26, 2024

Conversation

RafilxTenfen
Copy link
Contributor

@RafilxTenfen RafilxTenfen commented Jul 24, 2024

  • e2e Add new upgrade configurer that does:
    1. Start 3 node chain with tag babylonchain/babylond-before-upgrade
    2. Simple logic before upgrade (bank sends)
    3. Submit gov prop
    4. Vote from all nodes
    5. Waits for proposal block height
    6. Stops nodes and removes container resources
    7. Start the chain with a tag from the current branch babylonchain/babylond with the same state data as before, since the mounting point also writes locally, it just needs to use the same mount path
  • New Makefile directives
    • e2e-build-script build binaries for e2e initialization of chain
    • build-docker-e2e that build docker images
    babylonchain/babylond-e2e-init-chain   latest    cd037b0f3446   10 minutes ago   214MB
    babylonchain/babylond                  latest    83f1ed78ff1f   11 minutes ago   217MB
    babylonchain/babylond-before-upgrade   latest    331290b48b56   2 hours ago      217MB
    • clean-docker-network removes the network with name bbn-test
    • babylond-before-upgrade called by build-docker-e2e
    • e2e-init-chain called by build-docker-e2e
  • Fix vanilla upgrade to be deterministic (this one was tricky 🤯). Local nodes after the upgrade were not reaching consensus if a different key was generated/removed
  • Fix gov genesis to use ubbn in min deposit and voting time of 10s

fork upgrade was not tested, but I still left the code there...

@RafilxTenfen RafilxTenfen marked this pull request as ready for review July 25, 2024 01:33
Copy link
Member

@SebastianElvis SebastianElvis left a comment

Choose a reason for hiding this comment

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

Great work pulling this off! The code looks good to me, mostly questions

app/app.go Show resolved Hide resolved
contrib/images/Makefile Outdated Show resolved Hide resolved
test/e2e/configurer/chain/commands.go Show resolved Hide resolved
test/e2e/configurer/chain/queries.go Show resolved Hide resolved
test/e2e/configurer/factory.go Outdated Show resolved Hide resolved
test/e2e/containers/config.go Show resolved Hide resolved
test/e2e/initialization/config.go Outdated Show resolved Hide resolved
test/e2e/containers/containers.go Show resolved Hide resolved
test/e2e/software_upgrade_e2e_test.go Show resolved Hide resolved
Copy link
Member

@SebastianElvis SebastianElvis left a comment

Choose a reason for hiding this comment

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

Amazing work putting everything together 👏

Makefile Show resolved Hide resolved
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

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

LGTM, great work. Just some style and clarity suggestions.

contrib/images/Makefile Outdated Show resolved Hide resolved
app/upgrades/vanilla/upgrades.go Show resolved Hide resolved
test/e2e/btc_staking_e2e_test.go Show resolved Hide resolved
test/e2e/configurer/base.go Show resolved Hide resolved
test/e2e/containers/config.go Show resolved Hide resolved
test/e2e/software_upgrade_e2e_test.go Outdated Show resolved Hide resolved
test/e2e/software_upgrade_e2e_test.go Outdated Show resolved Hide resolved
test/e2e/software_upgrade_e2e_test.go Show resolved Hide resolved
@RafilxTenfen RafilxTenfen merged commit 3428cf1 into dev Jul 26, 2024
8 checks passed
@maurolacy maurolacy deleted the rafilx/e2e-upgrade-software branch July 29, 2024 05:41
RafilxTenfen added a commit to babylonlabs-io/babylon that referenced this pull request Jul 30, 2024
- Test e2e upgrade test with current `dev` branch -
5f8af8c

Applied from PRs babylonchain/babylon#730 and
babylonchain/babylon#727
vitsalis pushed a commit to babylonlabs-io/babylon that referenced this pull request Aug 14, 2024
- Test e2e upgrade test with current `dev` branch -
5f8af8c

Applied from PRs babylonchain/babylon#730 and
babylonchain/babylon#727
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 this pull request may close these issues.

3 participants