Skip to content

Commit c2372ff

Browse files
feat: pre-l1-merge framework upgrade + e2e tests (#1212)
Co-authored-by: Liam Monninger <[email protected]> Co-authored-by: Liam Monninger <[email protected]>
1 parent 51e8ff5 commit c2372ff

File tree

32 files changed

+909
-278
lines changed

32 files changed

+909
-278
lines changed

.github/workflows/checks-all.yml

Lines changed: 123 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ jobs:
230230
nix develop --command bash -c "just movement-full-node native build.setup.eth-holesky.celestia-local.test -t=false"
231231
nix develop --command bash -c "just movement-full-node native build.setup.eth-holesky.celestia-local.test -t=false"
232232
233-
# Elsa to Biarritz RC1
234-
movement-elsa-to-biarritz-rc1-bring-up:
233+
# Gas Dos
234+
gas-dos:
235235
if: >
236-
github.event.label.name == 'cicd:movement-elsa-to-biarritz-rc1'
236+
github.event.label.name == 'cicd:gas-dos'
237237
|| github.ref == 'refs/heads/main'
238238
|| startsWith(github.ref, 'refs/tags/')
239239
@@ -360,9 +360,8 @@ jobs:
360360
- name: Checkout repository
361361
uses: actions/checkout@v4
362362

363-
364-
- name: Run MCR Client Tests
365-
run: nix develop --command bash -c "just mcr-client native build.local.test -t=false"
363+
- name: Run MCR Client Tests
364+
run: nix develop --command bash -c "just mcr-client native build.local.test -t=false"
366365

367366
cargo-fmt-check:
368367
name: Cargo Format Check
@@ -376,6 +375,124 @@ jobs:
376375
run: |
377376
cargo fmt --all -- --check
378377
378+
# Elsa to Biarritz RC1 Checks
379+
bring-up-elsa-to-biarritz-rc1:
380+
if: >
381+
github.event.label.name == 'cicd:bring-up-elsa-to-biarritz-rc1'
382+
|| github.ref == 'refs/heads/main'
383+
|| startsWith(github.ref, 'refs/tags/')
384+
strategy:
385+
matrix:
386+
include:
387+
- os: ubuntu-22.04
388+
arch: x86_64
389+
runs-on: buildjet-16vcpu-ubuntu-2204
390+
391+
runs-on: ${{ matrix.runs-on }}
392+
393+
steps:
394+
- name: Checkout repository
395+
uses: actions/checkout@v4
396+
with:
397+
submodules: true
398+
399+
- name: Install Nix
400+
uses: DeterminateSystems/nix-installer-action@main
401+
402+
- name: Run Elsa to Biarritz RC1 Bring Up Test
403+
env:
404+
CELESTIA_LOG_LEVEL: FATAL
405+
run: |
406+
nix develop --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.test-bring-up-elsa-to-biarritz-rc1 -t=false"
407+
408+
migrate-elsa-to-biarritz-rc1:
409+
if: >
410+
github.event.label.name == 'cicd:migrate-elsa-to-biarritz-rc1'
411+
|| github.ref == 'refs/heads/main'
412+
|| startsWith(github.ref, 'refs/tags/')
413+
strategy:
414+
matrix:
415+
include:
416+
- os: ubuntu-22.04
417+
arch: x86_64
418+
runs-on: buildjet-16vcpu-ubuntu-2204
419+
420+
runs-on: ${{ matrix.runs-on }}
421+
422+
steps:
423+
- name: Checkout repository
424+
uses: actions/checkout@v4
425+
with:
426+
submodules: true
427+
428+
- name: Install Nix
429+
uses: DeterminateSystems/nix-installer-action@main
430+
431+
- name: Run Elsa to Biarritz RC1 Migrate Test
432+
env:
433+
CELESTIA_LOG_LEVEL: FATAL
434+
run: |
435+
nix develop --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.test-migrate-elsa-to-biarritz-rc1 -t=false"
436+
437+
# Biarritz RC1 to Pre-L1 Merge Checks
438+
bring-up-biarritz-rc1-to-pre-l1-merge:
439+
if: >
440+
github.event.label.name == 'cicd:bring-up-biarritz-rc1-to-pre-l1-merge'
441+
|| github.ref == 'refs/heads/main'
442+
|| startsWith(github.ref, 'refs/tags/')
443+
strategy:
444+
matrix:
445+
include:
446+
- os: ubuntu-22.04
447+
arch: x86_64
448+
runs-on: buildjet-16vcpu-ubuntu-2204
449+
450+
runs-on: ${{ matrix.runs-on }}
451+
452+
steps:
453+
- name: Checkout repository
454+
uses: actions/checkout@v4
455+
with:
456+
submodules: true
457+
458+
- name: Install Nix
459+
uses: DeterminateSystems/nix-installer-action@main
460+
461+
- name: Run Biarritz RC1 to Pre-L1 Merge Bring Up Test
462+
env:
463+
CELESTIA_LOG_LEVEL: FATAL
464+
run: |
465+
nix develop --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.test-bring-up-biarritz-rc1-to-pre-l1-merge -t=false"
466+
467+
migrate-biarritz-rc1-to-pre-l1-merge:
468+
if: >
469+
github.event.label.name == 'cicd:migrate-biarritz-rc1-to-pre-l1-merge'
470+
|| github.ref == 'refs/heads/main'
471+
|| startsWith(github.ref, 'refs/tags/')
472+
strategy:
473+
matrix:
474+
include:
475+
- os: ubuntu-22.04
476+
arch: x86_64
477+
runs-on: buildjet-16vcpu-ubuntu-2204
478+
479+
runs-on: ${{ matrix.runs-on }}
480+
481+
steps:
482+
- name: Checkout repository
483+
uses: actions/checkout@v4
484+
with:
485+
submodules: true
486+
487+
- name: Install Nix
488+
uses: DeterminateSystems/nix-installer-action@main
489+
490+
- name: Run Biarritz RC1 to Pre-L1 Merge Migrate Test
491+
env:
492+
CELESTIA_LOG_LEVEL: FATAL
493+
run: |
494+
nix develop --command bash -c "just movement-full-node native build.setup.eth-local.celestia-local.test-migrate-biarritz-rc1-to-pre-l1-merge -t=false"
495+
379496
# Indexer:
380497
# strategy:
381498
# matrix:

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ maptos-framework-release-util = { path = "protocol-units/execution/maptos/framew
8282
aptos-framework-head-release = { path = "protocol-units/execution/maptos/framework/releases/head" }
8383
aptos-framework-elsa-release = { path = "protocol-units/execution/maptos/framework/releases/elsa" }
8484
aptos-framework-biarritz-rc1-release = { path = "protocol-units/execution/maptos/framework/releases/biarritz-rc1" }
85+
aptos-framework-pre-l1-merge-release = { path = "protocol-units/execution/maptos/framework/releases/pre-l1-merge" }
8586
aptos-framework-upgrade-gas-release = { path = "protocol-units/execution/maptos/framework/releases/upgrade-gas" }
8687
aptos-framework-known-release = { path = "protocol-units/execution/maptos/framework/releases/known-release" }
8788
aptos-framework-set-feature-flags-release = { path = "protocol-units/execution/maptos/framework/releases/feature-flags" }
8889
aptos-framework-release-script-release = { path = "protocol-units/execution/maptos/framework/releases/release-script" }
8990

9091
# framework migrations
9192
aptos-framework-elsa-to-biarritz-rc1-migration = { path = "protocol-units/execution/maptos/framework/migrations/elsa-to-biarritz-rc1" }
93+
aptos-framework-biarritz-rc1-to-pre-l1-merge-migration = { path = "protocol-units/execution/maptos/framework/migrations/biarritz-rc1-to-pre-l1-merge" }
9294

9395
## infra
9496
movement-rest = { path = "protocol-units/movement-rest" }

networks/movement/movement-client/src/bin/e2e/simple_interaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async fn main() -> Result<(), anyhow::Error> {
136136
.transfer(&mut alice, bob.address(), 1_000, None)
137137
.await
138138
.context("Failed to submit transaction to transfer coins")?; // <:!:section_5
139-
// :!:>section_6
139+
// :!:>section_6
140140
rest_client
141141
.wait_for_transaction(&txn_hash)
142142
.await

networks/movement/movement-client/src/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async fn test_example_interaction() -> Result<(), anyhow::Error> {
159159
.transfer(&mut alice, bob.address(), 1_000, None)
160160
.await
161161
.context("Failed to submit transaction to transfer coins")?; // <:!:section_5
162-
// :!:>section_6
162+
// :!:>section_6
163163
rest_client
164164
.wait_for_transaction(&txn_hash)
165165
.await

networks/movement/movement-full-node/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ mcr-settlement-config = { workspace = true }
4444
clap = { workspace = true }
4545
movement-da-light-node-client = { workspace = true}
4646
aptos-framework-elsa-to-biarritz-rc1-migration = { workspace = true }
47+
aptos-framework-biarritz-rc1-to-pre-l1-merge-migration = { workspace = true }
4748
movement-signer = { workspace = true }
4849
movement-signer-loader = { workspace = true }
4950
syncador = { workspace = true }
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use crate::common_args::MovementArgs;
2+
use clap::Parser;
3+
4+
#[derive(Debug, Parser, Clone)]
5+
#[clap(rename_all = "kebab-case", about = "Downgrades from Pre L1 Merge to Biarritz RC1")]
6+
pub struct Downgrade {
7+
#[clap(flatten)]
8+
pub movement_args: MovementArgs,
9+
}
10+
11+
impl Downgrade {
12+
pub async fn execute(&self) -> Result<(), anyhow::Error> {
13+
Ok(())
14+
}
15+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pub mod downgrade;
2+
pub mod upgrade;
3+
4+
use clap::Subcommand;
5+
6+
#[derive(Subcommand, Debug)]
7+
#[clap(
8+
rename_all = "kebab-case",
9+
about = "Commands for migrating from Biarritz RC1 to Pre-L1 Merge"
10+
)]
11+
pub enum BiarritzRc1ToPreL1Merge {
12+
Upgrade(upgrade::Upgrade),
13+
Downgrade(downgrade::Downgrade),
14+
}
15+
16+
impl BiarritzRc1ToPreL1Merge {
17+
pub async fn execute(&self) -> Result<(), anyhow::Error> {
18+
match self {
19+
BiarritzRc1ToPreL1Merge::Upgrade(upgrade) => upgrade.execute().await,
20+
BiarritzRc1ToPreL1Merge::Downgrade(downgrade) => downgrade.execute().await,
21+
}
22+
}
23+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use crate::common_args::MovementArgs;
2+
use aptos_framework_biarritz_rc1_to_pre_l1_merge_migration::MigrateBiarritzRc1ToPreL1Merge;
3+
use clap::Parser;
4+
5+
#[derive(Debug, Parser, Clone)]
6+
#[clap(rename_all = "kebab-case", about = "Upgrades from Biarritz RC1 to Pre-L1 Merge")]
7+
pub struct Upgrade {
8+
#[clap(flatten)]
9+
pub movement_args: MovementArgs,
10+
/// The canonical string for the Maptos signer used in the upgrade.
11+
pub maptos_signer: String,
12+
/// The canonical string for the DA signer used in the upgrade
13+
pub da_signer: String,
14+
/// The canonical string for the DA signer used in the upgrade
15+
pub mcr_signer: String,
16+
}
17+
18+
impl Upgrade {
19+
pub async fn execute(&self) -> Result<(), anyhow::Error> {
20+
// get the movement config from dot movement
21+
let dot_movement = self.movement_args.dot_movement()?;
22+
23+
// run the framework migration
24+
dot_movement.migrate_framework_from_biarritz_rc1_to_pre_l1_merge().await?;
25+
26+
Ok(())
27+
}
28+
}

networks/movement/movement-full-node/src/admin/bring_up/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod biarritz_rc1_to_pre_l1_merge;
12
pub mod elsa_to_biarritz_rc1;
23
use clap::Subcommand;
34

@@ -6,6 +7,8 @@ use clap::Subcommand;
67
pub enum BringUp {
78
#[clap(subcommand)]
89
ElsaToBiarritzRc1(elsa_to_biarritz_rc1::ElsaToBiarritzRc1),
10+
#[clap(subcommand)]
11+
BiarritzRc1ToPreL1Merge(biarritz_rc1_to_pre_l1_merge::BiarritzRc1ToPreL1Merge),
912
}
1013

1114
impl BringUp {
@@ -14,6 +17,9 @@ impl BringUp {
1417
BringUp::ElsaToBiarritzRc1(elsa_to_biarritz_rc1) => {
1518
elsa_to_biarritz_rc1.execute().await
1619
}
20+
BringUp::BiarritzRc1ToPreL1Merge(biarritz_rc1_to_pre_l1_merge) => {
21+
biarritz_rc1_to_pre_l1_merge.execute().await
22+
}
1723
}
1824
}
1925
}

0 commit comments

Comments
 (0)