Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ debug
.direnv
.DS_Store
.vendors
.vendor
.vendor
*.log
3,176 changes: 1,692 additions & 1,484 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ portpicker = "0.1.0"


# movement
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
syncador = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-types = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
maptos-execution-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
aptos-framework-pre-l1-merge-release = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-signer = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-signer-loader = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
movement-config = { git = "https://github.com/movementlabsxyz/movement.git", rev = "07d5fe82f2c824a7f7e032c9dce339afdbbcb5a0" }
maptos-opt-executor = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-client = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
syncador = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-types = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
maptos-execution-util = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-full-node = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
aptos-framework-pre-l1-merge-release = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-signer = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-signer-loader = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }
movement-config = { git = "https://github.com/movementlabsxyz/movement.git", rev = "2abf42ea1eb192b7f877a7cdc7a3365c8912789d" }

# aptos-core
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "cb3b7b02f68c7d6982257e4c59955d0e63b513db" }
Expand Down
1 change: 0 additions & 1 deletion checks/node/checks/movement-mainnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mtma-node-test-global-storage-includes-criterion = { workspace = true }
movement-syncing = { workspace = true }
maptos-execution-util = { workspace = true }
tokio = { workspace = true }
futures = { workspace = true }
sysinfo = { workspace = true }
tracing = { workspace = true }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#[cfg(test)]
pub mod test {

use futures::channel::mpsc as futures_mpsc;
use maptos_execution_util::config::Config as MaptosConfig;
use movement_syncing::db::DbSync;
use mtma_node_null_core::config::Config as MtmaNullConfig;
Expand Down Expand Up @@ -43,7 +42,7 @@ pub mod test {
db_sync.pull().await?;

// form the executor
let (sender, _receiver) = futures_mpsc::channel(100);
let (sender, _receiver) = tokio::sync::mpsc::unbounded_channel();
let mut config = MaptosConfig::default();
config.chain.maptos_db_path = Some(db_sync.destination_db_path().clone());
let movement_opt_executor = MovementOptExecutor::try_from_config(config, sender).await?;
Expand Down
1 change: 0 additions & 1 deletion checks/node/util/types/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ impl Prelude {
movement_executor
.opt_executor_mut()
.execute_block(block)
.await
.map_err(|e| PreludeError::Internal(e.into()))?;
}

Expand Down
32 changes: 16 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 34 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
rust-overlay.url = "github:oxalica/rust-overlay/47beae969336c05e892e1e4a9dbaac9593de34ab";
flake-utils.url = "github:numtide/flake-utils";
crane.url = "github:ipetkov/crane";
movement.url = "github:movementlabsxyz/movement/aa1ffed1a113441a65662792d15682ad52406108";
movement.url = "github:movementlabsxyz/movement/278863e49276f280fb7c719c5fddeb3826fe85ee";
};

outputs = { nixpkgs, rust-overlay, flake-utils, crane, movement, ... }:
Expand Down Expand Up @@ -127,27 +127,41 @@
export CPPFLAGS="-I/opt/homebrew/opt/zlib/include"
fi

# Check if podman machine exists and is running
if [ "$BUILD" != "docker" ]; then
if ! podman machine inspect podman-machine-default &>/dev/null; then
echo "Initializing podman machine..."
podman machine init
podman machine start
elif ! podman machine inspect podman-machine-default --format '{{.State}}' | grep -q 'running'; then
echo "Starting podman machine..."
podman machine start
# Always force recreation of the podman machine
if podman machine inspect podman-machine-default &>/dev/null; then
echo "Destroying existing podman machine..."
if ! podman machine stop podman-machine-default 2>podman_stop_err.log; then
echo "podman machine stop failed. Error output:" >&2
cat podman_stop_err.log >&2
fi

# Find the actual podman socket location
PODMAN_SOCKET=$(find /tmp/nix-shell.*/podman -name "podman-machine-default-api.sock" -type s 2>/dev/null | head -n 1)
if [ -n "$PODMAN_SOCKET" ]; then
export DOCKER_HOST="unix://$PODMAN_SOCKET"
echo "Set DOCKER_HOST to Podman socket: $DOCKER_HOST"
else
echo "Warning: Could not find Podman socket"
if ! podman machine rm podman-machine-default -f 2>podman_rm_err.log; then
echo "podman machine rm failed. Error output:" >&2
cat podman_rm_err.log >&2
exit 1
fi
else
echo "Build is docker podman will not be started."
fi

echo "Initializing podman machine..."
if ! podman machine init 2>podman_init_err.log; then
echo "podman machine init failed. Error output:" >&2
cat podman_init_err.log >&2
exit 1
fi
if ! podman machine start 2>podman_start_err.log; then
echo "podman machine start failed. Error output:" >&2
cat podman_start_err.log >&2
exit 1
fi

echo "Podman machine is running"

# Find the actual podman socket location
PODMAN_SOCKET=$(find /tmp/nix-shell.*/podman -name "podman-machine-default-api.sock" -type s 2>/dev/null | head -n 1)
if [ -n "$PODMAN_SOCKET" ]; then
export DOCKER_HOST="unix://$PODMAN_SOCKET"
echo "Set DOCKER_HOST to Podman socket: $DOCKER_HOST"
else
echo "Warning: Could not find Podman socket"
fi

# Add ./target/debug/* to PATH
Expand Down
1 change: 0 additions & 1 deletion migration/cli/migrate-node-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ mtma-node-test-global-storage-includes-criterion = { workspace = true }
mtma-node-test-types = { workspace = true }
movement-syncing = { workspace = true }
maptos-execution-util = { workspace = true }
futures = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

Expand Down
3 changes: 1 addition & 2 deletions migration/cli/migrate-node-dev/src/cli/migrate_checked.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use clap::Parser;
use futures::channel::mpsc as futures_mpsc;
use maptos_execution_util::config::Config as MaptosConfig;
use movement_syncing::db::DbSync;
use mtma_node_null_core::config::Config as MtmaNullConfig;
Expand Down Expand Up @@ -88,7 +87,7 @@ impl MigrateChecked {
};

// form the executor
let (sender, _receiver) = futures_mpsc::channel(100);
let (sender, _receiver) = tokio::sync::mpsc::unbounded_channel();
let mut config = MaptosConfig::default();
config.chain.maptos_db_path = Some(db_path.clone());
let movement_opt_executor = MovementOptExecutor::try_from_config(config, sender).await?;
Expand Down
4 changes: 2 additions & 2 deletions migration/cli/migrate-node/docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ Usage: --environment-box.* [OPTIONS] --rest-api-url <REST_API_URL> --db-dir <DB_
Options:
--rest-api-url <REST_API_URL> The rest api url of the box environment
--db-dir <DB_DIR> The db dir of the box environment
--snapshot-dir <SNAPSHOT_DIR> Whether to isolate the box environment by snapshotting the movement
runner and where to store the snapshot
--snapshot-dir <SNAPSHOT_DIR> Whether to isolate the box environment by snapshotting the movement runner and where to
store the snapshot
-h, --help Print help (see more with '--help')

**Selection (3/4):** `environment-provisioner`
Expand Down
9 changes: 2 additions & 7 deletions migration/core/migrator/pre-l1-merge/src/migrate/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ use aptos_framework_pre_l1_merge_release::maptos_framework_release_util::{
LocalAccountReleaseSigner, OverrideAccountAddressReleaseSigner,
};
use clap::Parser;
use movement_core::{
movement::{Celestia, Eth},
Config as MovementCoreConfig,
};
use movement_core::{Config as MovementCoreConfig, Overlays};
use mtma_node_null_core::Config as MtmaNodeNullConfig;
use mtma_types::movement::aptos_sdk::types::{
account_address::AccountAddress, account_config::aptos_test_root_address, LocalAccount,
Expand Down Expand Up @@ -46,9 +43,7 @@ impl Default for Config {
let mut movement_core = MovementCoreConfig {
movement_config_string: None,
setup: false,
celestia: Celestia::Local,
eth: Eth::Local,
biarritz_rc1_to_pre_l1_merge: false,
overlays: Overlays::default().as_vec(),
ping_rest_api: false,
ping_faucet: false,
};
Expand Down
5 changes: 3 additions & 2 deletions migration/util/node-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ thiserror = { workspace = true }
either = { workspace = true }
tracing = { workspace = true }
movement-aptos-core = { workspace = true }
futures-channel = { workspace = true }
movement-util = { workspace = true }

uuid = { workspace = true }
walkdir = { workspace = true }
mtma-types = { workspace = true }
mtma-util = { workspace = true }
movement-full-node = { workspace = true }
tokio = { workspace = true }

[dev-dependencies]
tempfile = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions migration/util/node-types/src/executor/movement_executor.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Context;
use either::Either;
pub use maptos_opt_executor::Executor as MovementOptExecutor;
use movement_util::common_args::MovementArgs;
use movement_full_node::common_args::MovementArgs;
use mtma_types::movement::aptos_crypto::HashValue;
use mtma_types::movement::aptos_storage_interface::state_view::DbStateView;
use mtma_types::movement::aptos_storage_interface::DbReader;
Expand Down Expand Up @@ -113,7 +113,7 @@ impl MovementNode {

info!("maptos config: {:?}", maptos_config);

let (sender, _receiver) = futures_channel::mpsc::channel(1024);
let (sender, _receiver) = tokio::sync::mpsc::unbounded_channel();
let opt_executor = MovementOptExecutor::try_from_config(maptos_config, sender)
.await
.context("failed to create movement opt executor")?;
Expand Down
3 changes: 2 additions & 1 deletion util/movement/core-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ publish = { workspace = true }
rust-version = { workspace = true }

[dependencies]
movement-util = { workspace = true }

movement-client = { workspace = true }
maptos-opt-executor = { workspace = true }
movement-config = { workspace = true }
movement-full-node = { workspace = true }

[lints]
workspace = true
17 changes: 2 additions & 15 deletions util/movement/core-util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pub use maptos_opt_executor::{self, *};
pub use movement_client::{self, *};
pub use movement_config;
pub use movement_util::{self, *};
pub use movement_full_node::{self, *};

pub const CONTAINER_REPO: &str = "ghcr.io/movementlabsxyz";
pub const CONTAINER_REV: &str = "c2372ff";
pub const CONTAINER_REV: &str = "278863e";

#[derive(Debug, Clone)]
pub struct Container<'a> {
Expand All @@ -23,20 +23,7 @@ impl<'a> Container<'a> {
}
}

// "movement-full-node"
// "movement-celestia-da-light-node"
// "movement-full-node-setup"
// "movement-faucet-service"
// "movement-celestia-bridge"
// "movement-celestia-appd"
// "wait-for-celestia-light-node"

pub const CONTAINERS: &[Container] = &[
Container { repo: CONTAINER_REPO, name: "movement-full-node", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "movement-celestia-da-light-node", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "movement-full-node-setup", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "movement-faucet-service", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "movement-celestia-bridge", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "movement-celestia-appd", rev: CONTAINER_REV },
Container { repo: CONTAINER_REPO, name: "wait-for-celestia-light-node", rev: CONTAINER_REV },
];
Loading
Loading