Skip to content

Commit 5ad0aa2

Browse files
committed
fix: merge main.
2 parents d73fb1e + 62cbe08 commit 5ad0aa2

File tree

47 files changed

+1754
-1029
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1754
-1029
lines changed

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,5 @@ rustflags = [
9696

9797
[http]
9898
check-revoke = false
99+
100+
[env]

.github/workflows/nix-command.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,23 @@ on:
1919

2020
jobs:
2121
run-command:
22-
runs-on: macos-latest
22+
runs-on: buildjet-16vcpu-ubuntu-2204
2323
steps:
24+
- name: Free Disk Space (Ubuntu)
25+
uses: jlumbroso/free-disk-space@main
26+
with:
27+
tool-cache: true
28+
2429
- uses: actions/checkout@v4
25-
30+
2631
- name: Install Nix
2732
uses: DeterminateSystems/nix-installer-action@main
28-
33+
2934
- name: Enable Nix Flakes
3035
run: |
3136
mkdir -p ~/.config/nix
3237
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
33-
38+
3439
- name: Run Command in Nix Shell
3540
run: |
3641
echo "Running command: ${{ inputs.command }}"

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# cargo checks and tests
1313
- cargo check --all-targets
1414
- cargo test
15-
15+
1616
with:
1717
command: ${{ matrix.command }}
1818
nix_flake_path: '.'

Cargo.lock

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

Cargo.toml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ members = [
1212
"checks/executor/util/*",
1313
"checks/executor/citeria/*",
1414
"checks/executor/checks/*",
15+
"checks/executor/preludes",
1516
# e2e
1617
"checks/e2e/util/*",
1718
"checks/e2e/citeria/*",
1819
# util
19-
"util/include-dir"
20+
"util/include-dir",
21+
"util/movement-syncing",
2022

2123
]
2224

@@ -85,20 +87,26 @@ jemallocator = { version = "0.5.0", features = [
8587
jemalloc-sys = "0.5.4"
8688

8789
either = "1.8.1"
90+
tempdir = "0.3.7"
91+
sysinfo = "0.34.2"
8892

8993
# movement
9094
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
9195
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
92-
93-
# maptos-core
94-
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
95-
aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
96-
aptos-rest-client = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
97-
aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
98-
aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
99-
aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
100-
aptos_schemadb = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
101-
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "6da77d982f82d6e41ace3fcd3651e208a9c1e301" }
96+
syncador = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
97+
movement-types = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
98+
maptos-execution-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "aa1ffed1a113441a65662792d15682ad52406108" }
99+
100+
# aptos-core
101+
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
102+
aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
103+
aptos-rest-client = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
104+
aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
105+
aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
106+
aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
107+
aptos_schemadb = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
108+
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
109+
aptos-db-indexer = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "2941ee2b5876ab93cfb8010154c9466d7d593ed9" }
102110
# model checking and verification
103111

104112

@@ -124,6 +132,10 @@ clap-markdown-ext = { git = "https://github.com/movementlabsxyz/clap-markdown-ex
124132
### core
125133
mtma-core = { path = "migration/core/mtma" }
126134
mtma-null-core = { path = "migration/core/mtma-null" }
135+
136+
### preludes
137+
migration-executor-preludes = { path = "checks/executor/preludes" }
138+
127139
### util
128140
migration-executor-types = { path = "migration/util/executor-types" }
129141

@@ -140,6 +152,7 @@ migration-e2e-test-types = { path = "checks/e2e/util/types" }
140152

141153
## util
142154
include-dir = { path = "util/include-dir" }
155+
movement-syncing = { path = "util/movement-syncing" }
143156

144157
[workspace.lints.clippy]
145158
debug_assert_with_mut_call = "deny"
File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[package]
2+
name = "migration-executor-checks-mainnet"
3+
version = { workspace = true }
4+
edition = { workspace = true }
5+
license = { workspace = true }
6+
authors = { workspace = true }
7+
homepage = { workspace = true }
8+
publish = { workspace = true }
9+
rust-version = { workspace = true }
10+
11+
[dependencies]
12+
migration-executor-test-types = { workspace = true }
13+
anyhow = { workspace = true }
14+
mtma-null-core = { workspace = true }
15+
migration-executor-test-global-storage-injective-criterion = { workspace = true }
16+
migration-executor-test-global-storage-includes-criterion = { workspace = true }
17+
migration-executor-test-global-storage-not-empty-criterion = { workspace = true }
18+
migration-executor-preludes = { workspace = true }
19+
movement-syncing = { workspace = true }
20+
maptos-execution-util = { workspace = true }
21+
tokio = { workspace = true }
22+
chrono = { workspace = true }
23+
rand = { workspace = true }
24+
futures = { workspace = true }
25+
sysinfo = { workspace = true }
26+
27+
[dev-dependencies]
28+
tracing-test = { workspace = true }
29+
tracing = { workspace = true }
30+
31+
[lints]
32+
workspace = true
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#[cfg(test)]
2+
pub mod test {
3+
4+
use futures::channel::mpsc as futures_mpsc;
5+
use maptos_execution_util::config::Config as MaptosConfig;
6+
use migration_executor_test_global_storage_includes_criterion::GlobalStorageIncludes;
7+
use migration_executor_test_types::{
8+
check::checked_migration,
9+
criterion::movement_executor::{MovementExecutor, MovementOptExecutor},
10+
prelude::Prelude,
11+
};
12+
use movement_syncing::db::DbSync;
13+
use mtma_null_core::config::Config as MtmaNullConfig;
14+
use sysinfo::Disks;
15+
16+
#[tokio::test]
17+
#[tracing_test::traced_test]
18+
async fn test_global_storage_includess_null() -> Result<(), anyhow::Error> {
19+
let disks = Disks::new_with_refreshed_list();
20+
21+
let total_disk_space: u64 = disks.iter().map(|disk| disk.total_space()).sum();
22+
23+
let total_free_space: u64 = disks.iter().map(|disk| disk.available_space()).sum();
24+
25+
const REQUIRED_SPACE: u64 = 1_000_000_000_000; // 1 TB
26+
27+
if total_disk_space < REQUIRED_SPACE {
28+
println!("Device has less than 1 TB of *total* disk space — skipping test (not a viable test platform).");
29+
return Ok(()); // soft pass
30+
}
31+
32+
if total_free_space < REQUIRED_SPACE {
33+
println!("Device has enough total disk space, but less than 1 TB is free.");
34+
return Err(anyhow::anyhow!("not enough free disk space"));
35+
}
36+
37+
println!("Sufficient disk space available.");
38+
39+
// sync the db
40+
let db_sync = DbSync::mainnet_debug();
41+
db_sync.pull().await?;
42+
43+
// form the executor
44+
let (sender, _receiver) = futures_mpsc::channel(100);
45+
let mut config = MaptosConfig::default();
46+
config.chain.maptos_db_path = Some(db_sync.destination_db_path().clone());
47+
let movement_opt_executor = MovementOptExecutor::try_from_config(config, sender).await?;
48+
let mut movement_executor = MovementExecutor::new(movement_opt_executor);
49+
50+
// empty prelude
51+
let prelude = Prelude::new_empty();
52+
53+
// form the migration
54+
let migration_config = MtmaNullConfig::default();
55+
let migration = migration_config.build()?;
56+
57+
// run the checked migration
58+
checked_migration(
59+
&mut movement_executor,
60+
&prelude,
61+
&migration,
62+
vec![Box::new(GlobalStorageIncludes::new())],
63+
)
64+
.await?;
65+
Ok(())
66+
}
67+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod global_storage_includes;

checks/executor/checks/sketchpad/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ mtma-null-core = { workspace = true }
1515
migration-executor-test-global-storage-injective-criterion = { workspace = true }
1616
migration-executor-test-global-storage-includes-criterion = { workspace = true }
1717
migration-executor-test-global-storage-not-empty-criterion = { workspace = true }
18+
migration-executor-preludes = { workspace = true }
1819
tokio = { workspace = true }
1920
chrono = { workspace = true }
2021
rand = { workspace = true }

0 commit comments

Comments
 (0)