-
Notifications
You must be signed in to change notification settings - Fork 94
feat: post merge upgrade #1214
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
Draft
0xmovses
wants to merge
65
commits into
main
Choose a base branch
from
0xmovses/post-merge-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: post merge upgrade #1214
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
0f52775
feat: test-framework-upgrade process-compose file
andygolay de2fed7
feat: initial commit
andygolay cbdbe86
fix: add all files
andygolay 07dec4d
fix: correct naming
andygolay 4278856
fix: naming
andygolay 40f458b
feat: introduces pre-l1-merge framework release (#1211)
l-monninger 2c3a45d
chore: consolidate scripts into framework release
andygolay 1af64c1
fix: remove core resource update scripts etc
andygolay ff3647e
feat: create initial migration crate
0xmovses 81e2181
feat: create release binary
0xmovses dcaf2d7
fix: name binary
0xmovses 579e8c7
test: added test-bring-up-biarritz-rc1-to-pre-l1-merge, faucet fundin…
andygolay 1f31701
fix: build, unnecessary faucet logic. test-bring-up-elsa-to-biarritz-…
andygolay 0d71b54
fix: biarritz-rc1-to-pre-l1-release migration lib. faucet still fails
andygolay fc67b32
feat: test-upgrade-pre-l1-merge
andygolay 4e50ef4
fix: genesis config.
l-monninger d9a30b0
Merge branch 'andygolay/framework-upgrade-tests' of https://github.co…
l-monninger 789a5fd
fix: migrate should use the release tool; bringup should use the cli.
l-monninger 122eca8
Merge branch 'main' of https://github.com/movementlabsxyz/movement in…
l-monninger 14e1d0f
fix: do not delegate.
l-monninger 14781e6
fix: updates
0xmovses e4fb27e
Merge branch 'andygolay/framework-upgrade-tests' into 0xmovses/post-m…
0xmovses 427c8fc
chore: bump aptos hash
0xmovses ef7d6d5
chore: update build with correct aptos hash
0xmovses f2a9db2
feat: add destroy_from in script call
0xmovses 1a0300c
fix: update proc-comp test decl
0xmovses 5d8a348
chore: update mrb cache and aptos-core deps hash
0xmovses 43c28b2
fix: correct hash
0xmovses 8d54d1e
fix: correct dep hash
0xmovses 76de9ce
chore: bump framework hash
0xmovses a5cbbad
fix: add CACHE prefix
0xmovses 22407c6
chore: bump aptos rev
0xmovses de13f30
fix: remove old fn call
0xmovses 60a7f17
chore: revert unneeded toml change
0xmovses 44d2422
Update protocol-units/execution/maptos/framework/releases/post-l1-mer…
0xmovses 71024f1
fix: merge conflicts
0xmovses 444209d
cargo fmt
0xmovses 6b2a2df
chore: remove unneeded mrb files
0xmovses 8feb253
chore: remove unneeded proc compose file
0xmovses 9b5d17a
chore: bump aptos deps
0xmovses ed242be
fix: use feat flag, empty script
0xmovses fb5c5e5
chore: remove unneeded comment
0xmovses 56d7286
chore: bump aptos deps
0xmovses f4e1054
feat: add vote test
0xmovses a95c1a6
chore: bump aptos core
0xmovses c939f91
fix: build
0xmovses c0a4c0f
feat: test vote in release
0xmovses 50ea61d
feat: add governance enable script
0xmovses d862050
fix: dir tests path
0xmovses 36a05dd
fix: Move.toml and dir paths
0xmovses 27e3904
fix: Move.toml dep def
0xmovses f2314ae
chore: ignore build
0xmovses fce8071
feat: add full governance logic
0xmovses a1f42d2
feat: propose with full governance
0xmovses 43e19fc
chore: ammend comments
0xmovses 4ae4c76
fix: updates for full governance release test fn
0xmovses dab70f7
feat: implement execution_hash method
0xmovses 3a7d2c5
fix: execution hash
0xmovses 4d30bb6
chore: cleanup
0xmovses 1b503cb
chore: create test module
0xmovses 9d80b63
chore: add comment in script
0xmovses 7281490
chore: add doc comment for governance proposal function
0xmovses a37f741
fix: whitelist and more
0xmovses 0061e78
fix: bring back whitelist
0xmovses 4497175
feat: add whitelist setter method
0xmovses File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
18 changes: 18 additions & 0 deletions
18
process-compose/movement-full-node/process-compose.test-migrate-post-l1-merge.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: "3" | ||
|
||
processes: | ||
|
||
setup: | ||
environment: | ||
- "KNOWN_FRAMEWORK_RELEASE=biarritz-rc1" | ||
- APTOS_ACCOUNT_WHITELIST=$DOT_MOVEMENT_PATH/default_signer_address_whitelist | ||
- MAPTOS_PRIVATE_KEY=random | ||
|
||
test-migrate-pre-to-post-l1-merge: | ||
command: | | ||
cargo run --bin aptos-framework-post-l1-merge-release-tool | ||
depends_on: | ||
movement-full-node: | ||
condition: process_healthy | ||
movement-faucet: | ||
condition: process_healthy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ocol-units/execution/maptos/framework/migrations/pre-l1-merge-to-post-l1-merge/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "pre-l1-merge-to-post-l1-merge" | ||
description = "post-l1-merge migration" | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
version = { workspace = true } | ||
|
||
[lib] | ||
path = "src/lib.rs" | ||
|
||
[dependencies] | ||
maptos-framework-release-util = { workspace = true } | ||
aptos-sdk = { workspace = true } | ||
aptos-framework-biarritz-rc1-release = { workspace = true } | ||
aptos-framework-pre-l1-merge-release = { workspace = true } | ||
thiserror = { workspace = true } | ||
dot-movement = { workspace = true } | ||
movement-config = { workspace = true } |
48 changes: 48 additions & 0 deletions
48
...s/execution/maptos/framework/migrations/pre-l1-merge-to-post-l1-merge/src/dot_movement.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use crate::{ | ||
MigratePreL1MergeToPostL1Merge, PreL1MergeToPostL1Merge, PreL1MergeToPostL1MergeError, | ||
}; | ||
use dot_movement::DotMovement; | ||
use maptos_framework_release_util::OverrideAccountAddressReleaseSigner; | ||
use movement_config::{ | ||
ops::aptos::{ | ||
framework::releases::release_signer::ReleaseSignerOperations, | ||
rest_client::RestClientOperations, | ||
}, | ||
Config, | ||
}; | ||
|
||
impl MigratePreL1MergeToPostL1Merge for DotMovement { | ||
async fn migrate_framework_from_biarritza_rc1_to_pre_l1_merge( | ||
&self, | ||
) -> Result<(), PreL1MergeToPostL1MergeError> { | ||
// get the movement config from dot movement | ||
let config = self.try_get_config_from_json::<Config>().map_err(|e| { | ||
PreL1MergeToPostL1MergeError::MigrationFailed( | ||
format!("failed to get config: {}", e).into(), | ||
) | ||
})?; | ||
|
||
// get the rest client from the movement config | ||
let rest_client = config | ||
.get_rest_client() | ||
.await | ||
.map_err(|e| PreL1MergeToPostL1MergeError::MigrationFailed(e.into()))?; | ||
|
||
// get the release signer from the movement config | ||
let signer = config | ||
.get_release_signer() | ||
.await | ||
.map_err(|e| PreL1MergeToPostL1MergeError::MigrationFailed(e.into()))?; | ||
|
||
// write the signer with a core resource account override | ||
let signer = OverrideAccountAddressReleaseSigner::core_resource_account(signer); | ||
|
||
// migrate the framework from Elsa to Biarritz RC1 | ||
let biarritza_rc1_to_pre_l1_merge = PreL1MergeToPostL1Merge::new(); | ||
biarritza_rc1_to_pre_l1_merge | ||
.migrate_framework_from_pre_l1_merge_to_post_l1_merge(&rest_client, &signer) | ||
.await?; | ||
|
||
Ok(()) | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...ocol-units/execution/maptos/framework/migrations/pre-l1-merge-to-post-l1-merge/src/lib.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
pub mod dot_movement; | ||
|
||
use aptos_framework_biarritz_rc1_release::cached::full::feature_upgrade::BiarritzRc1; | ||
use maptos_framework_release_util::{Release, ReleaseSigner}; | ||
use std::future::Future; | ||
|
||
pub struct PreL1MergeToPostL1Merge; | ||
|
||
impl PreL1MergeToPostL1Merge { | ||
pub fn new() -> Self { | ||
Self | ||
} | ||
|
||
pub async fn migrate_framework_from_pre_l1_merge_to_post_l1_merge( | ||
&self, | ||
client: &aptos_sdk::rest_client::Client, | ||
signer: &impl ReleaseSigner, | ||
) -> Result<(), PreL1MergeToPostL1MergeError> { | ||
// todo: validate that the current release is Elsa | ||
|
||
// upgrade to PostL1Merge with the gas upgrade | ||
let biarritz_rc1 = BiarritzRc1::new(); | ||
biarritz_rc1 | ||
.release(signer, 2_000_000, 100, 60_000, client) | ||
.await | ||
.map_err(|e| PreL1MergeToPostL1MergeError::MigrationFailed(e.into()))?; | ||
|
||
Ok(()) | ||
} | ||
} | ||
|
||
/// Errors thrown by PreL1MergeToPostL1Merge migrations. | ||
#[derive(Debug, thiserror::Error)] | ||
pub enum PreL1MergeToPostL1MergeError { | ||
#[error("migration failed: {0}")] | ||
MigrationFailed(#[source] Box<dyn std::error::Error + Send + Sync>), | ||
} | ||
|
||
pub trait MigratePreL1MergeToPostL1Merge { | ||
/// Migrate from PreL1Merge to PostL1Merge. | ||
fn migrate_framework_from_biarritza_rc1_to_pre_l1_merge( | ||
&self, | ||
) -> impl Future<Output = Result<(), PreL1MergeToPostL1MergeError>>; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
protocol-units/execution/maptos/framework/releases/post-l1-merge/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[package] | ||
name = "aptos-framework-post-l1-merge-release" | ||
description = "Post L1 Merge Releaser Binary" | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
|
||
version = { workspace = true } | ||
|
||
[lib] | ||
path = "src/lib.rs" | ||
|
||
[[bin]] | ||
name = "aptos-framework-post-l1-merge-release-tool" | ||
path = "src/bin/release.rs" | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
aptos-framework = { workspace = true } | ||
aptos-framework-release-script-release = { workspace = true } | ||
aptos-framework-set-feature-flags-release = { workspace = true } | ||
aptos-framework-upgrade-gas-release = { workspace = true } | ||
aptos-gas-schedule = { workspace = true } | ||
aptos-release-builder = { workspace = true } | ||
aptos-sdk = { workspace = true } | ||
aptos-types = { workspace = true } | ||
bcs = { workspace = true } | ||
dot-movement = { workspace = true } | ||
e2e-move-tests = { workspace = true } | ||
hex = { workspace = true } | ||
maptos-framework-release-util = { workspace = true } | ||
move-command-line-common = { workspace = true } | ||
move-model = { workspace = true } | ||
movement-client = { workspace = true } | ||
movement-config = { workspace = true } | ||
once_cell = { workspace = true } | ||
tempfile = { workspace = true } | ||
tokio = { workspace = true } | ||
tracing = { workspace = true } | ||
tracing-subscriber = { workspace = true } | ||
url = { workspace = true } | ||
|
||
[build-dependencies] | ||
maptos-framework-release-util = { workspace = true } | ||
movement-config = { workspace = true } | ||
movement-client = { workspace = true } | ||
move-model = { workspace = true } | ||
once_cell = { workspace = true } | ||
aptos-framework = { workspace = true } | ||
tokio = { workspace = true } | ||
anyhow = { workspace = true } | ||
url = { workspace = true } | ||
dot-movement = { workspace = true } | ||
tempfile = { workspace = true } | ||
bcs = { workspace = true } |
10 changes: 10 additions & 0 deletions
10
protocol-units/execution/maptos/framework/releases/post-l1-merge/build.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use maptos_framework_release_util::commit_hash_with_script; | ||
|
||
commit_hash_with_script!( | ||
PostL1Merge, // Struct name | ||
"https://github.com/movementlabsxyz/aptos-core.git", // Repository URL | ||
"867b1828618ad33bfb3b10c50665cb67113f60e2", // Commit hash | ||
6, // Bytecode version | ||
"post-l1-merge.mrb", // MRB file name | ||
"CACHE_POST_L1_MERGE_FRAMEWORK_RELEASE" // Cache environment variable for the post-l1-merge framework release | ||
); |
Binary file added
BIN
+794 KB
...leases/post-l1-merge/mrb_cache/867b1828618ad33bfb3b10c50665cb67113f60e2-post-l1-merge.mrb
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within Aptos governance, the means of computing and verifying the
execution_hash
are not quite so straightforward: