From e61c11220635b8c62664bbfa5a949deaf4ebcba8 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sun, 12 May 2024 21:59:30 -0700 Subject: [PATCH 001/101] fix: adding stub. --- Cargo.lock | 13 +++ Cargo.toml | 2 + .../settlement/mcr/client/Cargo.toml | 28 +++++ .../settlement/mcr/client/src/lib.rs | 25 +++++ .../settlement/mcr/client/src/stub.rs | 100 ++++++++++++++++++ util/movement-types/Cargo.toml | 2 +- util/movement-types/src/lib.rs | 28 +++++ 7 files changed, 197 insertions(+), 1 deletion(-) create mode 100644 protocol-units/settlement/mcr/client/Cargo.toml create mode 100644 protocol-units/settlement/mcr/client/src/lib.rs create mode 100644 protocol-units/settlement/mcr/client/src/stub.rs diff --git a/Cargo.lock b/Cargo.lock index d8ebc70d4..85966c75c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6137,6 +6137,19 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "mcr-settlement-client" +version = "0.3.0" +dependencies = [ + "anyhow", + "async-stream", + "movement-types", + "serde_json", + "tokio", + "tokio-stream", + "tonic", +] + [[package]] name = "memchr" version = "2.7.2" diff --git a/Cargo.toml b/Cargo.toml index c80f46065..efcc93216 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,8 @@ members = [ "protocol-units/mempool/*", + "protocol-units/settlement/mcr/*", + "util/*", "util/buildtime/buildtime-helpers", "util/buildtime/buildtime-macros", diff --git a/protocol-units/settlement/mcr/client/Cargo.toml b/protocol-units/settlement/mcr/client/Cargo.toml new file mode 100644 index 000000000..a400830dc --- /dev/null +++ b/protocol-units/settlement/mcr/client/Cargo.toml @@ -0,0 +1,28 @@ +[package] +name = "mcr-settlement-client" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +repository = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +tonic = { workspace = true } +tokio = { workspace = true } +anyhow = { workspace = true } +tokio-stream = { workspace = true } +movement-types = { workspace = true } +serde_json = { workspace = true } +async-stream = { workspace = true } + +[features] +default = ["stub"] +stub = [] + +[lints] +workspace = true diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs new file mode 100644 index 000000000..14df80307 --- /dev/null +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -0,0 +1,25 @@ +use movement_types::BlockCommitment; +use tokio_stream::Stream; + +#[cfg(feature = "stub")] +pub mod stub; + +#[cfg(feature = "stub")] +pub use stub::*; + + +type CommitmentStream = std::pin::Pin> + Send>>; + +#[tonic::async_trait] +pub trait McrSettlementClientOperations { + + async fn post_block_commitment(&self, block_commitment : BlockCommitment) -> Result<(), anyhow::Error>; + + async fn stream_block_commitments(&self) -> Result< + CommitmentStream, + anyhow::Error + >; + + async fn get_commitment_at_height(&self, height : u64) -> Result, anyhow::Error>; + +} \ No newline at end of file diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs new file mode 100644 index 000000000..0e0d24f93 --- /dev/null +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -0,0 +1,100 @@ +use movement_types::BlockCommitment; +use std::collections::HashMap; +use std::sync::Arc; +use tokio::sync::{Mutex, mpsc}; +use crate::CommitmentStream; + +#[tonic::async_trait] +pub trait McrSettlementClientOperations { + async fn post_block_commitment(&self, block_commitment: BlockCommitment) -> Result<(), anyhow::Error>; + async fn stream_block_commitments(&self) -> Result; + async fn get_commitment_at_height(&self, height: u64) -> Result, anyhow::Error>; +} + +pub struct McrSettlementClient { + commitments: Arc>>, + stream_sender: mpsc::Sender>, + // todo: this is logically dangerous, but it's just a stub + stream_receiver: Arc>>>, +} + +impl McrSettlementClient { + pub fn new() -> Self { + let (stream_sender, receiver) = mpsc::channel(10); + McrSettlementClient { + commitments: Arc::new(Mutex::new(HashMap::new())), + stream_sender, + stream_receiver: Arc::new(Mutex::new(receiver)), + } + } +} + + +#[tonic::async_trait] +impl McrSettlementClientOperations for McrSettlementClient { + + async fn post_block_commitment(&self, block_commitment: BlockCommitment) -> Result<(), anyhow::Error> { + let mut commitments = self.commitments.lock().await; + commitments.insert(block_commitment.height, block_commitment.clone()); + self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. + Ok(()) + } + + async fn stream_block_commitments(&self) -> Result< + CommitmentStream, + anyhow::Error + > { + + let receiver = self.stream_receiver.clone(); + let stream = async_stream::try_stream! { + let mut receiver = receiver.lock().await; + while let Some(commitment) = receiver.recv().await { + yield commitment?; + } + }; + + Ok(Box::pin(stream) as CommitmentStream) + } + + async fn get_commitment_at_height(&self, height: u64) -> Result, anyhow::Error> { + let guard = self.commitments.lock().await; + Ok(guard.get(&height).cloned()) + } +} + +#[cfg(test)] +pub mod test { + + use super::*; + use movement_types::Commitment; + use tokio_stream::StreamExt; + + #[tokio::test] + async fn test_post_block_commitment() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.post_block_commitment(commitment.clone()).await.unwrap(); + let guard = client.commitments.lock().await; + assert_eq!(guard.get(&1), Some(&commitment)); + Ok(()) + } + + #[tokio::test] + async fn test_stream_block_commitments() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.post_block_commitment(commitment.clone()).await.unwrap(); + let mut stream = client.stream_block_commitments().await?; + assert_eq!(stream.next().await.unwrap().unwrap(), commitment); + Ok(()) + } + +} \ No newline at end of file diff --git a/util/movement-types/Cargo.toml b/util/movement-types/Cargo.toml index a1b02251b..36a22a039 100644 --- a/util/movement-types/Cargo.toml +++ b/util/movement-types/Cargo.toml @@ -12,7 +12,7 @@ rust-version = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = { workspace = true } +serde = { workspace = true, features = ["derive"] } serde_with = { workspace = true } derivative = { workspace = true } anyhow = { workspace = true } diff --git a/util/movement-types/src/lib.rs b/util/movement-types/src/lib.rs index 2d28a6619..2b3b3ace2 100644 --- a/util/movement-types/src/lib.rs +++ b/util/movement-types/src/lib.rs @@ -138,4 +138,32 @@ impl Block { self.transactions.push(transaction); } +} + +#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct Commitment(pub Vec); + +impl Commitment { + pub fn test() -> Self { + Self(vec![0]) + } +} + +impl From> for Commitment { + fn from(data : Vec) -> Self { + Self(data) + } +} + +impl From for Vec { + fn from(commitment : Commitment) -> Vec { + commitment.0 + } +} + +#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct BlockCommitment { + pub height : u64, + pub block_id : Id, + pub commitment : Commitment, } \ No newline at end of file From bd6c85d2e6dd1296dc1582386150387bb119363e Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 13 May 2024 04:48:57 -0700 Subject: [PATCH 002/101] fix: remove duplicate trait. --- protocol-units/settlement/mcr/client/src/stub.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs index 0e0d24f93..8786d10ba 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -2,14 +2,7 @@ use movement_types::BlockCommitment; use std::collections::HashMap; use std::sync::Arc; use tokio::sync::{Mutex, mpsc}; -use crate::CommitmentStream; - -#[tonic::async_trait] -pub trait McrSettlementClientOperations { - async fn post_block_commitment(&self, block_commitment: BlockCommitment) -> Result<(), anyhow::Error>; - async fn stream_block_commitments(&self) -> Result; - async fn get_commitment_at_height(&self, height: u64) -> Result, anyhow::Error>; -} +use crate::{McrSettlementClientOperations, CommitmentStream}; pub struct McrSettlementClient { commitments: Arc>>, From 15c7781ce7479607f2188ddca2822268e1c3a6bf Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 13 May 2024 04:54:32 -0700 Subject: [PATCH 003/101] fix: cleanup. --- flake.nix | 2 -- scripts/celestia/celestia-local-appd | 1 - scripts/celestia/celestia-local-bridge | 1 - 3 files changed, 4 deletions(-) diff --git a/flake.nix b/flake.nix index e3e62e9cd..168d67f82 100644 --- a/flake.nix +++ b/flake.nix @@ -93,8 +93,6 @@ shellHook = '' #!/bin/bash export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1) - export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin - export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/ cat <<'EOF' _ _ __ _ _ ____ _ _ ____ __ _ ____ ( \/ ) / \ / )( \( __)( \/ )( __)( ( \(_ _) diff --git a/scripts/celestia/celestia-local-appd b/scripts/celestia/celestia-local-appd index 3d5f0462c..fb17a124f 100755 --- a/scripts/celestia/celestia-local-appd +++ b/scripts/celestia/celestia-local-appd @@ -1,5 +1,4 @@ #!/bin/bash -e -exec > /dev/null 2>&1 # TODO: drop this line once we have debugged APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" celestia-appd start --grpc.enable --home $APP_PATH \ No newline at end of file diff --git a/scripts/celestia/celestia-local-bridge b/scripts/celestia/celestia-local-bridge index 66ccb77e6..72b631d38 100755 --- a/scripts/celestia/celestia-local-bridge +++ b/scripts/celestia/celestia-local-bridge @@ -25,7 +25,6 @@ fi export CELESTIA_CUSTOM=$CELESTIA_CHAIN_ID:$GENESIS echo "$CELESTIA_CUSTOM" -exec > /dev/null 2>&1 # TODO: drop when we have debugged celestia bridge init --node.store $NODE_PATH celestia bridge start \ --node.store $NODE_PATH --gateway \ From e4a5b6593be9202698e7311874cd6e556b07c10e Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 13 May 2024 15:00:02 +0300 Subject: [PATCH 004/101] mcr-settlement-client: fmt --- .../settlement/mcr/client/src/lib.rs | 27 ++-- .../settlement/mcr/client/src/stub.rs | 141 +++++++++--------- 2 files changed, 84 insertions(+), 84 deletions(-) diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs index 14df80307..b1c4a6cdf 100644 --- a/protocol-units/settlement/mcr/client/src/lib.rs +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -7,19 +7,20 @@ pub mod stub; #[cfg(feature = "stub")] pub use stub::*; - -type CommitmentStream = std::pin::Pin> + Send>>; +type CommitmentStream = + std::pin::Pin> + Send>>; #[tonic::async_trait] pub trait McrSettlementClientOperations { - - async fn post_block_commitment(&self, block_commitment : BlockCommitment) -> Result<(), anyhow::Error>; - - async fn stream_block_commitments(&self) -> Result< - CommitmentStream, - anyhow::Error - >; - - async fn get_commitment_at_height(&self, height : u64) -> Result, anyhow::Error>; - -} \ No newline at end of file + async fn post_block_commitment( + &self, + block_commitment: BlockCommitment, + ) -> Result<(), anyhow::Error>; + + async fn stream_block_commitments(&self) -> Result; + + async fn get_commitment_at_height( + &self, + height: u64, + ) -> Result, anyhow::Error>; +} diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs index 8786d10ba..938558636 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -1,93 +1,92 @@ +use crate::{CommitmentStream, McrSettlementClientOperations}; use movement_types::BlockCommitment; use std::collections::HashMap; use std::sync::Arc; -use tokio::sync::{Mutex, mpsc}; -use crate::{McrSettlementClientOperations, CommitmentStream}; +use tokio::sync::{mpsc, Mutex}; pub struct McrSettlementClient { - commitments: Arc>>, - stream_sender: mpsc::Sender>, - // todo: this is logically dangerous, but it's just a stub - stream_receiver: Arc>>>, + commitments: Arc>>, + stream_sender: mpsc::Sender>, + // todo: this is logically dangerous, but it's just a stub + stream_receiver: Arc>>>, } impl McrSettlementClient { - pub fn new() -> Self { - let (stream_sender, receiver) = mpsc::channel(10); - McrSettlementClient { - commitments: Arc::new(Mutex::new(HashMap::new())), - stream_sender, - stream_receiver: Arc::new(Mutex::new(receiver)), - } - } + pub fn new() -> Self { + let (stream_sender, receiver) = mpsc::channel(10); + McrSettlementClient { + commitments: Arc::new(Mutex::new(HashMap::new())), + stream_sender, + stream_receiver: Arc::new(Mutex::new(receiver)), + } + } } - #[tonic::async_trait] impl McrSettlementClientOperations for McrSettlementClient { + async fn post_block_commitment( + &self, + block_commitment: BlockCommitment, + ) -> Result<(), anyhow::Error> { + let mut commitments = self.commitments.lock().await; + commitments.insert(block_commitment.height, block_commitment.clone()); + self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. + Ok(()) + } - async fn post_block_commitment(&self, block_commitment: BlockCommitment) -> Result<(), anyhow::Error> { - let mut commitments = self.commitments.lock().await; - commitments.insert(block_commitment.height, block_commitment.clone()); - self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. - Ok(()) - } - - async fn stream_block_commitments(&self) -> Result< - CommitmentStream, - anyhow::Error - > { + async fn stream_block_commitments(&self) -> Result { + let receiver = self.stream_receiver.clone(); + let stream = async_stream::try_stream! { + let mut receiver = receiver.lock().await; + while let Some(commitment) = receiver.recv().await { + yield commitment?; + } + }; - let receiver = self.stream_receiver.clone(); - let stream = async_stream::try_stream! { - let mut receiver = receiver.lock().await; - while let Some(commitment) = receiver.recv().await { - yield commitment?; - } - }; + Ok(Box::pin(stream) as CommitmentStream) + } - Ok(Box::pin(stream) as CommitmentStream) - } - - async fn get_commitment_at_height(&self, height: u64) -> Result, anyhow::Error> { - let guard = self.commitments.lock().await; - Ok(guard.get(&height).cloned()) - } + async fn get_commitment_at_height( + &self, + height: u64, + ) -> Result, anyhow::Error> { + let guard = self.commitments.lock().await; + Ok(guard.get(&height).cloned()) + } } #[cfg(test)] pub mod test { - use super::*; - use movement_types::Commitment; - use tokio_stream::StreamExt; - - #[tokio::test] - async fn test_post_block_commitment() -> Result<(), anyhow::Error> { - let client = McrSettlementClient::new(); - let commitment = BlockCommitment { - height: 1, - block_id: Default::default(), - commitment: Commitment::test(), - }; - client.post_block_commitment(commitment.clone()).await.unwrap(); - let guard = client.commitments.lock().await; - assert_eq!(guard.get(&1), Some(&commitment)); - Ok(()) - } + use super::*; + use movement_types::Commitment; + use tokio_stream::StreamExt; - #[tokio::test] - async fn test_stream_block_commitments() -> Result<(), anyhow::Error> { - let client = McrSettlementClient::new(); - let commitment = BlockCommitment { - height: 1, - block_id: Default::default(), - commitment: Commitment::test(), - }; - client.post_block_commitment(commitment.clone()).await.unwrap(); - let mut stream = client.stream_block_commitments().await?; - assert_eq!(stream.next().await.unwrap().unwrap(), commitment); - Ok(()) - } + #[tokio::test] + async fn test_post_block_commitment() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.post_block_commitment(commitment.clone()).await.unwrap(); + let guard = client.commitments.lock().await; + assert_eq!(guard.get(&1), Some(&commitment)); + Ok(()) + } -} \ No newline at end of file + #[tokio::test] + async fn test_stream_block_commitments() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.post_block_commitment(commitment.clone()).await.unwrap(); + let mut stream = client.stream_block_commitments().await?; + assert_eq!(stream.next().await.unwrap().unwrap(), commitment); + Ok(()) + } +} From eee8edda0acc48092724bfccf7636a1a6be832ff Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 13 May 2024 21:17:17 +0300 Subject: [PATCH 005/101] movement-types: Commitment from StateProof --- Cargo.lock | 2 ++ util/movement-types/Cargo.toml | 2 ++ util/movement-types/src/lib.rs | 16 +++++++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee8ad56c2..cbbb1b017 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7216,6 +7216,8 @@ name = "movement-types" version = "0.3.0" dependencies = [ "anyhow", + "aptos-types", + "bcs 0.1.4", "serde", "serde_with", "sha2 0.10.8", diff --git a/util/movement-types/Cargo.toml b/util/movement-types/Cargo.toml index 69ddb6ddf..76a9deb7a 100644 --- a/util/movement-types/Cargo.toml +++ b/util/movement-types/Cargo.toml @@ -12,6 +12,8 @@ rust-version = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +aptos-types = { workspace = true } +bcs = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_with = { workspace = true } # derivative = { workspace = true } diff --git a/util/movement-types/src/lib.rs b/util/movement-types/src/lib.rs index 2b3b3ace2..dc225803a 100644 --- a/util/movement-types/src/lib.rs +++ b/util/movement-types/src/lib.rs @@ -1,7 +1,10 @@ -use core::fmt::Display; +use aptos_types::state_proof::StateProof; + use serde::{Deserialize, Serialize}; use sha2::Digest; +use core::fmt; + #[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Id(pub Vec); @@ -20,8 +23,8 @@ impl Id { } -impl Display for Id { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl fmt::Display for Id { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{:?}", &self.0) } } @@ -147,6 +150,13 @@ impl Commitment { pub fn test() -> Self { Self(vec![0]) } + + /// Creates a commitment by making a cryptographic digest of the state proof. + pub fn digest_state_proof(state_proof: &StateProof) -> Self { + let mut hasher = sha2::Sha256::new(); + bcs::serialize_into(&mut hasher, &state_proof).expect("unexpected serialization error"); + Self(hasher.finalize().to_vec()) + } } impl From> for Commitment { From edc750fd8e62e2ea4f7bf688f5cba65dee392480 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 13 May 2024 21:21:29 +0300 Subject: [PATCH 006/101] opt-executor: reorder use statements --- .../maptos/opt-executor/src/executor.rs | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index a85866d24..9d2d722f6 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -1,45 +1,48 @@ -use anyhow::Context as _; +use aptos_api::{ + get_api_service, + runtime::{get_apis, Apis}, + Context, +}; +use aptos_config::config::NodeConfig; +use aptos_crypto::{ed25519::Ed25519PublicKey, HashValue}; use aptos_db::AptosDB; +use aptos_executor::{ + block_executor::BlockExecutor, + db_bootstrapper::{generate_waypoint, maybe_bootstrap}, +}; use aptos_executor_types::BlockExecutorTrait; +use aptos_mempool::SubmissionStatus; use aptos_mempool::{ core_mempool::{CoreMempool, TimelineState}, MempoolClientRequest, MempoolClientSender, }; +use aptos_sdk::types::mempool_status::{MempoolStatus, MempoolStatusCode}; +use aptos_sdk::types::on_chain_config::{OnChainConsensusConfig, OnChainExecutionConfig}; use aptos_storage_interface::DbReaderWriter; use aptos_types::{ - block_executor::{config::BlockExecutorConfigFromOnchain, partitioner::ExecutableBlock}, chain_id::ChainId, transaction::{ - ChangeSet, SignedTransaction, Transaction, WriteSetPayload - }, validator_signer::ValidatorSigner + aggregate_signature::AggregateSignature, + block_info::BlockInfo, + ledger_info::{LedgerInfo, LedgerInfoWithSignatures}, + transaction::Version, +}; +use aptos_types::{ + block_executor::{config::BlockExecutorConfigFromOnchain, partitioner::ExecutableBlock}, + chain_id::ChainId, + transaction::{ChangeSet, SignedTransaction, Transaction, WriteSetPayload}, + validator_signer::ValidatorSigner, }; use aptos_vm::AptosVM; -use std::{path::PathBuf, sync::Arc}; -use tokio::sync::RwLock; -use aptos_config::config::NodeConfig; -use aptos_executor::{ - block_executor::BlockExecutor, - db_bootstrapper::{generate_waypoint, maybe_bootstrap}, +use aptos_vm_genesis::{ + default_gas_schedule, encode_genesis_change_set, GenesisConfiguration, TestValidator, Validator, }; -use aptos_api::{get_api_service, runtime::{get_apis, Apis}, Context}; + +use anyhow::Context as _; use futures::channel::mpsc as futures_mpsc; -use poem::{listener::TcpListener, Route, Server}; -use aptos_sdk::types::mempool_status::{MempoolStatus, MempoolStatusCode}; -use aptos_mempool::SubmissionStatus; use futures::StreamExt; -use aptos_types::{ - aggregate_signature::AggregateSignature, - block_info::BlockInfo, - ledger_info::{LedgerInfo, LedgerInfoWithSignatures}, - transaction::Version -}; -use aptos_crypto::{ - ed25519::{Ed25519PrivateKey, Ed25519PublicKey}, - HashValue -}; -use aptos_vm_genesis::{TestValidator, Validator, encode_genesis_change_set, GenesisConfiguration, default_gas_schedule}; -use aptos_sdk::types::on_chain_config::{ - OnChainConsensusConfig, OnChainExecutionConfig -}; -// use aptos_types::test_helpers::transaction_test_helpers::block; +use poem::{listener::TcpListener, Route, Server}; +use tokio::sync::RwLock; + +use std::{path::PathBuf, sync::Arc}; /// The `Executor` is responsible for executing blocks and managing the state of the execution /// against the `AptosVM`. From 1e5d8039f26058ee3aa08a669497f206d7ee1f95 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 13 May 2024 22:00:24 +0300 Subject: [PATCH 007/101] Return Commitment from executors' execute_block In MonzaExecutor and SuzukaExecutor, return the Commitment value from execute_block. The underlying opt-executor is changed to produce the commitment from proof data. --- Cargo.lock | 3 +++ .../execution/maptos/opt-executor/Cargo.toml | 5 +++-- .../maptos/opt-executor/src/executor.rs | 17 ++++++++++------- .../execution/monza/executor/Cargo.toml | 1 + .../execution/monza/executor/src/lib.rs | 6 ++++-- .../execution/monza/executor/src/v1.rs | 3 ++- .../execution/suzuka/executor/Cargo.toml | 1 + .../execution/suzuka/executor/src/lib.rs | 6 ++++-- .../execution/suzuka/executor/src/v1.rs | 11 ++++++++--- 9 files changed, 36 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cbbb1b017..e252af6c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6175,6 +6175,7 @@ dependencies = [ "lazy_static", "log", "maptos-execution-util", + "movement-types", "poem", "poem-openapi", "rand 0.7.3", @@ -6383,6 +6384,7 @@ dependencies = [ "log", "maptos-execution-util", "maptos-opt-executor", + "movement-types", "poem-openapi", "rand 0.7.3", "rand_core 0.5.1", @@ -10089,6 +10091,7 @@ dependencies = [ "log", "maptos-execution-util", "maptos-opt-executor", + "movement-types", "poem-openapi", "rand 0.7.3", "rand_core 0.5.1", diff --git a/protocol-units/execution/maptos/opt-executor/Cargo.toml b/protocol-units/execution/maptos/opt-executor/Cargo.toml index 40afd1406..be2705a0c 100644 --- a/protocol-units/execution/maptos/opt-executor/Cargo.toml +++ b/protocol-units/execution/maptos/opt-executor/Cargo.toml @@ -33,6 +33,8 @@ tokio = { workspace = true } rand = { workspace = true } rand_core = { workspace = true } bcs = { workspace = true} +futures = { workspace = true } +async-channel = { workspace = true } aptos-vm = { workspace = true } aptos-config = { workspace = true } @@ -58,9 +60,8 @@ aptos-mempool = { workspace = true } aptos-temppath = { workspace = true } aptos-faucet-core = { workspace = true } aptos-cached-packages = { workspace = true } -futures = { workspace = true } -async-channel = { workspace = true } maptos-execution-util = { workspace = true } +movement-types = { workspace = true } dirs = { workspace = true } tempfile = { workspace = true } diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 9d2d722f6..f637ee32a 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -35,6 +35,7 @@ use aptos_vm::AptosVM; use aptos_vm_genesis::{ default_gas_schedule, encode_genesis_change_set, GenesisConfiguration, TestValidator, Validator, }; +use movement_types::Commitment; use anyhow::Context as _; use futures::channel::mpsc as futures_mpsc; @@ -256,7 +257,7 @@ impl Executor { pub async fn execute_block( &self, block: ExecutableBlock, - ) -> Result<(), anyhow::Error> { + ) -> Result { let block_id = block.block_id.clone(); let parent_block_id = { @@ -285,14 +286,14 @@ impl Executor { )?; } - { + let proof = { let reader = self.db.read().await.reader.clone(); - let proof = reader.get_state_proof( + reader.get_state_proof( state_compute.version(), - )?; - } + )? + }; - Ok(()) + Ok(Commitment::digest_state_proof(&proof)) } pub async fn try_get_context(&self) -> Result, anyhow::Error> { @@ -582,7 +583,9 @@ mod tests { // Create and execute the block. let block = ExecutableBlock::new(block_id.clone(), transactions); - executor.execute_block(block).await?; + let commitment = executor.execute_block(block).await?; + + // TODO: verify commitment against the state. // Access the database reader to verify state after execution. let db_reader = executor.db.read().await.reader.clone(); diff --git a/protocol-units/execution/monza/executor/Cargo.toml b/protocol-units/execution/monza/executor/Cargo.toml index c67d12f0b..bce354d38 100644 --- a/protocol-units/execution/monza/executor/Cargo.toml +++ b/protocol-units/execution/monza/executor/Cargo.toml @@ -63,6 +63,7 @@ aptos-proptest-helpers = { workspace = true } maptos-opt-executor = { workspace = true } maptos-execution-util = { workspace = true } +movement-types = { workspace = true } dirs = "5.0.1" tempfile = "3.10.1" diff --git a/protocol-units/execution/monza/executor/src/lib.rs b/protocol-units/execution/monza/executor/src/lib.rs index dbd7e9b87..d836735ed 100644 --- a/protocol-units/execution/monza/executor/src/lib.rs +++ b/protocol-units/execution/monza/executor/src/lib.rs @@ -7,10 +7,12 @@ pub use aptos_types::{ transaction::{SignedTransaction, Transaction} }; pub use aptos_crypto::hash::HashValue; -use async_channel::Sender; use aptos_api::runtime::Apis; + pub use maptos_execution_util::FinalityMode; +use movement_types::Commitment; +use async_channel::Sender; #[tonic::async_trait] pub trait MonzaExecutor { @@ -26,7 +28,7 @@ pub trait MonzaExecutor { &self, mode : &FinalityMode, block: ExecutableBlock, - ) -> Result<(), anyhow::Error>; + ) -> Result; /// Sets the transaction channel. async fn set_tx_channel(&mut self, tx_channel: Sender) -> Result<(), anyhow::Error>; diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 43f3f3faf..e01b2d058 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -2,6 +2,7 @@ use crate::*; use aptos_types::transaction::SignedTransaction; use async_channel::Sender; use maptos_opt_executor::Executor; +use movement_types::Commitment; #[derive(Clone)] pub struct MonzaExecutorV1 { @@ -45,7 +46,7 @@ impl MonzaExecutor for MonzaExecutorV1 { &self, mode: &FinalityMode, block: ExecutableBlock, - ) -> Result<(), anyhow::Error> { + ) -> Result { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { diff --git a/protocol-units/execution/suzuka/executor/Cargo.toml b/protocol-units/execution/suzuka/executor/Cargo.toml index 91391697d..196025731 100644 --- a/protocol-units/execution/suzuka/executor/Cargo.toml +++ b/protocol-units/execution/suzuka/executor/Cargo.toml @@ -62,6 +62,7 @@ aptos-temppath = { workspace = true } maptos-opt-executor = { workspace = true } maptos-execution-util = { workspace = true } +movement-types = { workspace = true } dirs = "5.0.1" tempfile = "3.10.1" diff --git a/protocol-units/execution/suzuka/executor/src/lib.rs b/protocol-units/execution/suzuka/executor/src/lib.rs index affbb9f26..ae860ba48 100644 --- a/protocol-units/execution/suzuka/executor/src/lib.rs +++ b/protocol-units/execution/suzuka/executor/src/lib.rs @@ -7,10 +7,12 @@ pub use aptos_types::{ transaction::{SignedTransaction, Transaction} }; pub use aptos_crypto::hash::HashValue; -use async_channel::Sender; use aptos_api::runtime::Apis; + pub use maptos_execution_util::FinalityMode; +use movement_types::Commitment; +use async_channel::Sender; #[tonic::async_trait] pub trait SuzukaExecutor { @@ -26,7 +28,7 @@ pub trait SuzukaExecutor { &self, mode : &FinalityMode, block: ExecutableBlock, - ) -> Result<(), anyhow::Error>; + ) -> Result; /// Sets the transaction channel. async fn set_tx_channel(&mut self, tx_channel: Sender) -> Result<(), anyhow::Error>; diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index fc07e6e3c..ef9590da1 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -2,6 +2,7 @@ use crate::*; use maptos_opt_executor::Executor; use async_channel::Sender; use aptos_types::transaction::SignedTransaction; +use movement_types::Commitment; #[derive(Clone)] pub struct SuzukaExecutorV1 { @@ -50,7 +51,7 @@ impl SuzukaExecutor for SuzukaExecutorV1 { &self, mode : &FinalityMode, block: ExecutableBlock, - ) -> Result<(), anyhow::Error> { + ) -> Result { match mode { FinalityMode::Dyn => unimplemented!(), @@ -138,7 +139,7 @@ mod opt_tests { #[tokio::test] async fn test_execute_opt_block() -> Result<(), anyhow::Error> { let (tx, rx) = async_channel::unbounded(); - let mut executor = SuzukaExecutorV1::try_from_env(tx).await?; + let executor = SuzukaExecutorV1::try_from_env(tx).await?; let block_id = HashValue::random(); let tx = SignatureVerifiedTransaction::Valid(Transaction::UserTransaction( create_signed_transaction(0), @@ -228,7 +229,11 @@ mod opt_tests { )); let txs = ExecutableTransactions::Unsharded(vec![tx]); let block = ExecutableBlock::new(block_id.clone(), txs); - executor.execute_block(&FinalityMode::Opt, block).await?; + let commitment = executor.execute_block(&FinalityMode::Opt, block).await?; + + println!("Commitment: {:?}", commitment); + + // TODO: test the commitment services_handle.abort(); background_handle.abort(); From 4c38cc22a5e40f07de2a53f9c5b14204c8cc3e77 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 14 May 2024 03:36:21 -0700 Subject: [PATCH 008/101] fix: drop contracts. --- Cargo.toml | 2 +- .../settlement/mcr/client/src/lib.rs | 2 ++ .../settlement/mcr/client/src/stub.rs | 31 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index efcc93216..3fbc6b4a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ "protocol-units/mempool/*", - "protocol-units/settlement/mcr/*", + "protocol-units/settlement/mcr/client", "util/*", "util/buildtime/buildtime-helpers", diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs index 14df80307..b60597df7 100644 --- a/protocol-units/settlement/mcr/client/src/lib.rs +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -15,6 +15,8 @@ pub trait McrSettlementClientOperations { async fn post_block_commitment(&self, block_commitment : BlockCommitment) -> Result<(), anyhow::Error>; + async fn post_block_commitment_batch(&self, block_commitment: Vec) -> Result<(), anyhow::Error>; + async fn stream_block_commitments(&self) -> Result< CommitmentStream, anyhow::Error diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs index 8786d10ba..adf6f10ac 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -33,6 +33,14 @@ impl McrSettlementClientOperations for McrSettlementClient { Ok(()) } + async fn post_block_commitment_batch(&self, block_commitment: Vec) -> Result<(), anyhow::Error> { + for commitment in block_commitment { + self.post_block_commitment(commitment).await?; + } + Ok(()) + } + + async fn stream_block_commitments(&self) -> Result< CommitmentStream, anyhow::Error @@ -76,6 +84,29 @@ pub mod test { Ok(()) } + #[tokio::test] + async fn test_post_block_commitment_batch() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.post_block_commitment_batch(vec![ + commitment.clone(), + commitment2.clone(), + ]).await.unwrap(); + let guard = client.commitments.lock().await; + assert_eq!(guard.get(&1), Some(&commitment)); + assert_eq!(guard.get(&2), Some(&commitment2)); + Ok(()) + } + #[tokio::test] async fn test_stream_block_commitments() -> Result<(), anyhow::Error> { let client = McrSettlementClient::new(); From b1a41ba0f783c5cd5535a6b76a00686943464e45 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 14 May 2024 03:38:41 -0700 Subject: [PATCH 009/101] fix: swap tonic for async trait. --- Cargo.lock | 2 +- protocol-units/settlement/mcr/client/Cargo.toml | 2 +- protocol-units/settlement/mcr/client/src/lib.rs | 2 +- protocol-units/settlement/mcr/client/src/stub.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ee8ad56c2..0dcc03ad7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6216,11 +6216,11 @@ version = "0.3.0" dependencies = [ "anyhow", "async-stream", + "async-trait", "movement-types", "serde_json", "tokio", "tokio-stream", - "tonic", ] [[package]] diff --git a/protocol-units/settlement/mcr/client/Cargo.toml b/protocol-units/settlement/mcr/client/Cargo.toml index a400830dc..c0581a27b 100644 --- a/protocol-units/settlement/mcr/client/Cargo.toml +++ b/protocol-units/settlement/mcr/client/Cargo.toml @@ -12,7 +12,7 @@ rust-version = { workspace = true } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tonic = { workspace = true } +async-trait = { workspace = true } tokio = { workspace = true } anyhow = { workspace = true } tokio-stream = { workspace = true } diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs index b60597df7..1a76eac6d 100644 --- a/protocol-units/settlement/mcr/client/src/lib.rs +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -10,7 +10,7 @@ pub use stub::*; type CommitmentStream = std::pin::Pin> + Send>>; -#[tonic::async_trait] +#[async_trait::async_trait] pub trait McrSettlementClientOperations { async fn post_block_commitment(&self, block_commitment : BlockCommitment) -> Result<(), anyhow::Error>; diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs index adf6f10ac..21226cd33 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -23,7 +23,7 @@ impl McrSettlementClient { } -#[tonic::async_trait] +#[async_trait::async_trait] impl McrSettlementClientOperations for McrSettlementClient { async fn post_block_commitment(&self, block_commitment: BlockCommitment) -> Result<(), anyhow::Error> { From 959fbbba4fa0d4a3d6e5a6cd80ecc0f63d1597bc Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 14 May 2024 03:53:31 -0700 Subject: [PATCH 010/101] feat: add max tolerable height. --- .../settlement/mcr/client/src/lib.rs | 4 +- .../settlement/mcr/client/src/stub.rs | 51 ++++++++++++++----- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs index b65bbe5ec..93502f06f 100644 --- a/protocol-units/settlement/mcr/client/src/lib.rs +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -12,7 +12,7 @@ type CommitmentStream = #[async_trait::async_trait] pub trait McrSettlementClientOperations { - + async fn post_block_commitment( &self, block_commitment: BlockCommitment, @@ -24,4 +24,6 @@ pub trait McrSettlementClientOperations { async fn get_commitment_at_height(&self, height : u64) -> Result, anyhow::Error>; + async fn get_max_tolerable_block_height(&self) -> Result; + } diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/stub.rs index a2b80f2ce..2060f6d52 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/stub.rs @@ -2,22 +2,26 @@ use crate::{CommitmentStream, McrSettlementClientOperations}; use movement_types::BlockCommitment; use std::collections::HashMap; use std::sync::Arc; -use tokio::sync::{mpsc, Mutex}; +use tokio::sync::{mpsc, RwLock}; pub struct McrSettlementClient { - commitments: Arc>>, + commitments: Arc>>, stream_sender: mpsc::Sender>, // todo: this is logically dangerous, but it's just a stub - stream_receiver: Arc>>>, + stream_receiver: Arc>>>, + pub current_height: Arc>, + pub block_lead_tolerance: u64 } impl McrSettlementClient { pub fn new() -> Self { let (stream_sender, receiver) = mpsc::channel(10); McrSettlementClient { - commitments: Arc::new(Mutex::new(HashMap::new())), + commitments: Arc::new(RwLock::new(HashMap::new())), stream_sender, - stream_receiver: Arc::new(Mutex::new(receiver)), + stream_receiver: Arc::new(RwLock::new(receiver)), + current_height: Arc::new(RwLock::new(0)), + block_lead_tolerance: 16, } } } @@ -29,9 +33,22 @@ impl McrSettlementClientOperations for McrSettlementClient { &self, block_commitment: BlockCommitment, ) -> Result<(), anyhow::Error> { - let mut commitments = self.commitments.lock().await; - commitments.insert(block_commitment.height, block_commitment.clone()); - self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. + + let height = block_commitment.height; + + { + let mut commitments = self.commitments.write().await; + commitments.insert(block_commitment.height, block_commitment.clone()); + self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. + } + + { + let mut current_height = self.current_height.write().await; + if height > *current_height { + *current_height = height; + } + } + Ok(()) } @@ -45,7 +62,7 @@ impl McrSettlementClientOperations for McrSettlementClient { async fn stream_block_commitments(&self) -> Result { let receiver = self.stream_receiver.clone(); let stream = async_stream::try_stream! { - let mut receiver = receiver.lock().await; + let mut receiver = receiver.write().await; while let Some(commitment) = receiver.recv().await { yield commitment?; } @@ -57,9 +74,14 @@ impl McrSettlementClientOperations for McrSettlementClient { &self, height: u64, ) -> Result, anyhow::Error> { - let guard = self.commitments.lock().await; + let guard = self.commitments.write().await; Ok(guard.get(&height).cloned()) } + + async fn get_max_tolerable_block_height(&self) -> Result { + Ok(*self.current_height.read().await + self.block_lead_tolerance) + } + } #[cfg(test)] @@ -71,6 +93,7 @@ pub mod test { #[tokio::test] async fn test_post_block_commitment() -> Result<(), anyhow::Error> { + let client = McrSettlementClient::new(); let commitment = BlockCommitment { height: 1, @@ -78,8 +101,12 @@ pub mod test { commitment: Commitment::test(), }; client.post_block_commitment(commitment.clone()).await.unwrap(); - let guard = client.commitments.lock().await; + let guard = client.commitments.write().await; assert_eq!(guard.get(&1), Some(&commitment)); + + assert_eq!(*client.current_height.read().await, 1); + assert_eq!(client.get_max_tolerable_block_height().await?, 17); + Ok(()) } @@ -100,7 +127,7 @@ pub mod test { commitment.clone(), commitment2.clone(), ]).await.unwrap(); - let guard = client.commitments.lock().await; + let guard = client.commitments.write().await; assert_eq!(guard.get(&1), Some(&commitment)); assert_eq!(guard.get(&2), Some(&commitment2)); Ok(()) From 2753f1de901dfd6500df237d08b7ede9d42a8729 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Tue, 14 May 2024 15:29:16 +0300 Subject: [PATCH 011/101] feat: Instantiate MCR settlement client In SuzukaPartialNode, instantiate the stub McrSettlementClient. --- Cargo.lock | 1 + Cargo.toml | 2 + networks/suzuka/suzuka-full-node/Cargo.toml | 1 + .../suzuka/suzuka-full-node/src/partial.rs | 40 ++++++++++++++----- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26928723c..23e98f701 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10163,6 +10163,7 @@ dependencies = [ "async-channel", "env_logger 0.11.3", "m1-da-light-node-client", + "mcr-settlement-client", "movement-types", "serde_json", "sha2 0.10.8", diff --git a/Cargo.toml b/Cargo.toml index 7ea2e1f10..46700cfdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,6 +63,8 @@ m1-da-light-node-grpc = { path = "protocol-units/da/m1/light-node-grpc" } m1-da-light-node-util = { path = "protocol-units/da/m1/util" } m1-da-light-node-verifier = { path = "protocol-units/da/m1/light-node-verifier" } m1-da-light-node-client = { path = "protocol-units/da/m1/light-node-client" } +## settlement +mcr-settlement-client = { path = "protocol-units/settlement/mcr/client" } ## mempool mempool-util = { path = "protocol-units/mempool/util" } move-rocks = { path = "protocol-units/mempool/move-rocks" } diff --git a/networks/suzuka/suzuka-full-node/Cargo.toml b/networks/suzuka/suzuka-full-node/Cargo.toml index 32f734865..db5f54c36 100644 --- a/networks/suzuka/suzuka-full-node/Cargo.toml +++ b/networks/suzuka/suzuka-full-node/Cargo.toml @@ -14,6 +14,7 @@ rust-version = { workspace = true } [dependencies] suzuka-executor = { workspace = true } m1-da-light-node-client = { workspace = true } +mcr-settlement-client = { workspace = true } async-channel = { workspace = true } serde_json = { workspace = true } anyhow = { workspace = true } diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 6d880cc49..bc06dc972 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -19,25 +19,36 @@ use crate::*; use tokio_stream::StreamExt; use tokio::sync::RwLock; use movement_types::Block; - +use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; #[derive(Clone)] -pub struct SuzukaPartialNode { +pub struct SuzukaPartialNode +{ executor: T, transaction_sender : Sender, pub transaction_receiver : Receiver, light_node_client: Arc>>, + settlement_client: C, } -impl SuzukaPartialNode { - - pub fn new(executor : T, light_node_client: LightNodeServiceClient) -> Self { +impl SuzukaPartialNode +where + T: SuzukaExecutor + Send + Sync, + C: McrSettlementClientOperations +{ + + pub fn new( + executor: T, + light_node_client: LightNodeServiceClient, + settlement_client: C, + ) -> Self { let (transaction_sender, transaction_receiver) = async_channel::unbounded(); Self { executor : executor, transaction_sender, transaction_receiver, light_node_client : Arc::new(RwLock::new(light_node_client)), + settlement_client } } @@ -46,8 +57,12 @@ impl SuzukaPartialNode { Ok(()) } - pub async fn bound(executor : T, light_node_client: LightNodeServiceClient) -> Result { - let mut node = Self::new(executor, light_node_client); + pub async fn bound( + executor: T, + light_node_client: LightNodeServiceClient, + settlement_client: C, + ) -> Result { + let mut node = Self::new(executor, light_node_client, settlement_client); node.bind_transaction_channel().await?; Ok(node) } @@ -180,7 +195,11 @@ impl SuzukaPartialNode { } -impl SuzukaFullNode for SuzukaPartialNode { +impl SuzukaFullNode for SuzukaPartialNode +where + T: SuzukaExecutor + Send + Sync, + C: McrSettlementClientOperations + Send + Sync, +{ /// Runs the services until crash or shutdown. async fn run_services(&self) -> Result<(), anyhow::Error> { @@ -217,7 +236,7 @@ impl SuzukaFullNode for SuzukaPartialN } -impl SuzukaPartialNode { +impl SuzukaPartialNode { pub async fn try_from_env() -> Result { let (tx, _) = async_channel::unbounded(); @@ -225,7 +244,8 @@ impl SuzukaPartialNode { let executor = SuzukaExecutorV1::try_from_env(tx).await.context( "Failed to get executor from environment" )?; - Self::bound(executor, light_node_client).await + let settlement_client = McrSettlementClient::new(); + Self::bound(executor, light_node_client, settlement_client).await } } \ No newline at end of file From 01cd70732b8bb03214a9ddc38c99619f6ff1452a Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Tue, 14 May 2024 22:35:08 +0300 Subject: [PATCH 012/101] Return BlockCommitment from execute_block Moar data that the executor should be able to immediately provide upon executing the block. --- .../suzuka/suzuka-full-node/src/partial.rs | 18 +++++++++++++++--- .../maptos/opt-executor/src/executor.rs | 11 ++++++++--- .../execution/monza/executor/src/lib.rs | 4 ++-- .../execution/monza/executor/src/v1.rs | 4 ++-- .../execution/suzuka/executor/src/lib.rs | 4 ++-- .../execution/suzuka/executor/src/v1.rs | 4 ++-- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index a6171b946..b6ca625e2 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -17,6 +17,7 @@ use async_channel::{Sender, Receiver}; use sha2::Digest; use crate::*; use tokio_stream::StreamExt; +use tokio::sync::mpsc::{self, error::TrySendError}; use tokio::sync::RwLock; use movement_types::Block; use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; @@ -122,9 +123,11 @@ where // receive transactions from the transaction channel and send them to be executed // ! This assumes the m1 da light node is running sequencer mode pub async fn read_blocks_from_da(&self) -> Result<(), anyhow::Error> { - + let block_head_height = self.executor.get_block_head_height().await?; - + + let (sender, receiver) = mpsc::channel(16); + let mut stream = { let client_ptr = self.light_node_client.clone(); let mut light_node_client = client_ptr.write().await; @@ -179,13 +182,22 @@ where block ); let block_id = executable_block.block_id; - self.executor.execute_block( + let commitment = self.executor.execute_block( FinalityMode::Opt, executable_block ).await?; println!("Executed block: {:?}", block_id); + match sender.try_send(commitment) { + Ok(_) => {}, + Err(TrySendError::Closed(_)) => { + break; + }, + Err(TrySendError::Full(_commitment)) => { + println!("Commitment channel full, dropping commitment"); + } + } } Ok(()) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 7a0092b78..af7d84fd5 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -35,7 +35,7 @@ use aptos_vm::AptosVM; use aptos_vm_genesis::{ default_gas_schedule, encode_genesis_change_set, GenesisConfiguration, TestValidator, Validator, }; -use movement_types::Commitment; +use movement_types::{Id, Commitment, BlockCommitment}; use anyhow::Context as _; use futures::channel::mpsc as futures_mpsc; @@ -257,7 +257,7 @@ impl Executor { pub async fn execute_block( &self, block: ExecutableBlock, - ) -> Result { + ) -> Result { let block_id = block.block_id.clone(); let parent_block_id = { @@ -293,7 +293,12 @@ impl Executor { )? }; - Ok(Commitment::digest_state_proof(&proof)) + let commitment = Commitment::digest_state_proof(&proof); + Ok(BlockCommitment { + block_id: Id(block_id.to_vec()), + commitment, + height: latest_version, + }) } fn context(&self) -> Arc { diff --git a/protocol-units/execution/monza/executor/src/lib.rs b/protocol-units/execution/monza/executor/src/lib.rs index 9c349ef2c..da89d498c 100644 --- a/protocol-units/execution/monza/executor/src/lib.rs +++ b/protocol-units/execution/monza/executor/src/lib.rs @@ -10,7 +10,7 @@ pub use aptos_crypto::hash::HashValue; use aptos_api::runtime::Apis; pub use maptos_execution_util::FinalityMode; -use movement_types::Commitment; +use movement_types::BlockCommitment; use async_channel::Sender; @@ -28,7 +28,7 @@ pub trait MonzaExecutor { &self, mode: FinalityMode, block: ExecutableBlock, - ) -> Result; + ) -> Result; /// Sets the transaction channel. fn set_tx_channel( diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index ae082f00f..501826959 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -2,7 +2,7 @@ use crate::*; use aptos_types::transaction::SignedTransaction; use async_channel::Sender; use maptos_opt_executor::Executor; -use movement_types::Commitment; +use movement_types::BlockCommitment; #[derive(Clone)] pub struct MonzaExecutorV1 { @@ -46,7 +46,7 @@ impl MonzaExecutor for MonzaExecutorV1 { &self, mode: FinalityMode, block: ExecutableBlock, - ) -> Result { + ) -> Result { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { diff --git a/protocol-units/execution/suzuka/executor/src/lib.rs b/protocol-units/execution/suzuka/executor/src/lib.rs index 57e99a6b7..f3e3ed2b5 100644 --- a/protocol-units/execution/suzuka/executor/src/lib.rs +++ b/protocol-units/execution/suzuka/executor/src/lib.rs @@ -10,7 +10,7 @@ pub use aptos_crypto::hash::HashValue; use aptos_api::runtime::Apis; pub use maptos_execution_util::FinalityMode; -use movement_types::Commitment; +use movement_types::BlockCommitment; use async_channel::Sender; @@ -28,7 +28,7 @@ pub trait SuzukaExecutor { &self, mode: FinalityMode, block: ExecutableBlock, - ) -> Result; + ) -> Result; /// Sets the transaction channel. fn set_tx_channel( diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index 5395d35e7..c777a0c82 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -2,7 +2,7 @@ use crate::*; use maptos_opt_executor::Executor; use async_channel::Sender; use aptos_types::transaction::SignedTransaction; -use movement_types::Commitment; +use movement_types::BlockCommitment; #[derive(Clone)] pub struct SuzukaExecutorV1 { @@ -51,7 +51,7 @@ impl SuzukaExecutor for SuzukaExecutorV1 { &self, mode: FinalityMode, block: ExecutableBlock, - ) -> Result { + ) -> Result { match mode { FinalityMode::Dyn => unimplemented!(), From aad48b85ac1de05683d9529ca5896eee77960765 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 15 May 2024 01:38:04 +0300 Subject: [PATCH 013/101] feat(suzuka-full-node): settle block commitments Send the block commitments to the MCR contract via the settlement client. This is done in a separate task from the executor loop to avoid blocking it. --- .../suzuka/suzuka-full-node/src/partial.rs | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index b6ca625e2..85d0db536 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -19,7 +19,7 @@ use crate::*; use tokio_stream::StreamExt; use tokio::sync::mpsc::{self, error::TrySendError}; use tokio::sync::RwLock; -use movement_types::Block; +use movement_types::{Block, BlockCommitment}; use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; #[derive(Clone)] @@ -29,13 +29,13 @@ pub struct SuzukaPartialNode transaction_sender : Sender, pub transaction_receiver : Receiver, light_node_client: Arc>>, - settlement_client: C, + settlement_client: Arc, } impl SuzukaPartialNode where T: SuzukaExecutor + Send + Sync, - C: McrSettlementClientOperations + C: McrSettlementClientOperations + Send + Sync + 'static, { pub fn new( @@ -49,7 +49,7 @@ where transaction_sender, transaction_receiver, light_node_client : Arc::new(RwLock::new(light_node_client)), - settlement_client + settlement_client: Arc::new(settlement_client) } } @@ -138,6 +138,14 @@ where ).await? }.into_inner(); + let settlement_client = self.settlement_client.clone(); + // TODO: consume the commitment stream to finalize blocks + let commitment_stream = settlement_client.stream_block_commitments().await?; + + tokio::spawn(async move { + process_commitments(receiver, settlement_client).await; + }); + while let Some(blob) = stream.next().await { println!("Stream hot!"); @@ -206,10 +214,24 @@ where } +async fn process_commitments( + mut receiver: mpsc::Receiver, + settlement_client: Arc, +) -> Result<(), anyhow::Error> +where + C: McrSettlementClientOperations, +{ + while let Some(commitment) = receiver.recv().await { + println!("Got commitment: {:?}", commitment); + settlement_client.post_block_commitment(commitment).await?; + } + Ok(()) +} + impl SuzukaFullNode for SuzukaPartialNode where T: SuzukaExecutor + Send + Sync, - C: McrSettlementClientOperations + Send + Sync, + C: McrSettlementClientOperations + Send + Sync + 'static, { /// Runs the services until crash or shutdown. From de96f0d3a978758ff4c75fa1e90d1706626c366a Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 15 May 2024 11:20:49 +0300 Subject: [PATCH 014/101] print error returned by process_commitment --- networks/suzuka/suzuka-full-node/src/partial.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 85d0db536..c5d7d2ee5 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -143,7 +143,9 @@ where let commitment_stream = settlement_client.stream_block_commitments().await?; tokio::spawn(async move { - process_commitments(receiver, settlement_client).await; + if let Err(e) = process_commitments(receiver, settlement_client).await { + eprintln!("Error processing commitments: {:?}", e); + } }); while let Some(blob) = stream.next().await { From 843822aa2cd6d9d9c88df9abc6c067bd64d07a6d Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 15 May 2024 11:27:29 +0300 Subject: [PATCH 015/101] Use get_max_tolerable_block_height In suzuka-full-node, don't send block commitments for settlement if their block height is greater than the maximum block height that will be tolerated by the settlement contract. --- networks/suzuka/suzuka-full-node/src/partial.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index c5d7d2ee5..19c29aa4f 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -225,6 +225,14 @@ where { while let Some(commitment) = receiver.recv().await { println!("Got commitment: {:?}", commitment); + let max_height = settlement_client.get_max_tolerable_block_height().await?; + if commitment.height > max_height { + println!( + "Commitment height {} is greater than max tolerable height {}, skipping.", + commitment.height, max_height + ); + continue; + } settlement_client.post_block_commitment(commitment).await?; } Ok(()) From ac810cc57d944eb16c311ddc6a27451036f53b05 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Wed, 15 May 2024 17:09:04 -0400 Subject: [PATCH 016/101] chore: cleanup. --- networks/monza/monza-full-node/src/partial.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/networks/monza/monza-full-node/src/partial.rs b/networks/monza/monza-full-node/src/partial.rs index 95094b924..b7f86c79a 100644 --- a/networks/monza/monza-full-node/src/partial.rs +++ b/networks/monza/monza-full-node/src/partial.rs @@ -60,7 +60,6 @@ impl MonzaPartialNode { let mut transactions = Vec::new(); - while let Ok(transaction_result) = tokio::time::timeout(Duration::from_millis(100), self.transaction_receiver.recv()).await { match transaction_result { From b4e8b4366b6ffbc445e4265081551686316e8158 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Wed, 15 May 2024 17:35:25 -0400 Subject: [PATCH 017/101] feat: m1-da-light-node. --- docker/build/celestia-app/Dockerfile | 28 +++++++++++++++ docker/build/celestia-node/Dockerfile | 28 +++++++++++++++ docker/build/m1-da-light-node/Dockerfile | 2 +- docker/build/monza-full-node/Dockerfile | 2 +- docker/build/rd/Dockerfile | 11 ------ docker/build/suzuka-full-node/Dockerfile | 28 +++++++++++++++ flake.nix | 6 ++++ nix/m1-da-light-node.nix | 46 ++++++++++++++++++++++++ 8 files changed, 138 insertions(+), 13 deletions(-) create mode 100644 docker/build/celestia-app/Dockerfile create mode 100644 docker/build/celestia-node/Dockerfile delete mode 100644 docker/build/rd/Dockerfile create mode 100644 docker/build/suzuka-full-node/Dockerfile create mode 100644 nix/m1-da-light-node.nix diff --git a/docker/build/celestia-app/Dockerfile b/docker/build/celestia-app/Dockerfile new file mode 100644 index 000000000..7c1a11fd6 --- /dev/null +++ b/docker/build/celestia-app/Dockerfile @@ -0,0 +1,28 @@ +# Nix builder +FROM nixos/nix:latest AS builder + +# Copy our source and setup our working dir. +COPY . /tmp/build +WORKDIR /tmp/build + +# Build our Nix environment +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + build -A celestia-app + +# Copy the Nix store closure into a directory. The Nix store closure is the +# entire set of Nix store values that we need for our build. +RUN mkdir /tmp/nix-store-closure +RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure + +# Final image is based on scratch. We copy a bunch of Nix dependencies +# but they're fully self-contained so we don't need Nix anymore. +FROM scratch + +WORKDIR /app + +# Copy /nix/store +COPY --from=builder /tmp/nix-store-closure /nix/store +COPY --from=builder /tmp/build/result /app +CMD ["/app/bin/app"] \ No newline at end of file diff --git a/docker/build/celestia-node/Dockerfile b/docker/build/celestia-node/Dockerfile new file mode 100644 index 000000000..5050cc8a1 --- /dev/null +++ b/docker/build/celestia-node/Dockerfile @@ -0,0 +1,28 @@ +# Nix builder +FROM nixos/nix:latest AS builder + +# Copy our source and setup our working dir. +COPY . /tmp/build +WORKDIR /tmp/build + +# Build our Nix environment +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + build -A celestia-node + +# Copy the Nix store closure into a directory. The Nix store closure is the +# entire set of Nix store values that we need for our build. +RUN mkdir /tmp/nix-store-closure +RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure + +# Final image is based on scratch. We copy a bunch of Nix dependencies +# but they're fully self-contained so we don't need Nix anymore. +FROM scratch + +WORKDIR /app + +# Copy /nix/store +COPY --from=builder /tmp/nix-store-closure /nix/store +COPY --from=builder /tmp/build/result /app +CMD ["/app/bin/app"] \ No newline at end of file diff --git a/docker/build/m1-da-light-node/Dockerfile b/docker/build/m1-da-light-node/Dockerfile index 3158d12ef..4212442be 100644 --- a/docker/build/m1-da-light-node/Dockerfile +++ b/docker/build/m1-da-light-node/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - build + build '.#m1-da-light-node' # Copy the Nix store closure into a directory. The Nix store closure is the # entire set of Nix store values that we need for our build. diff --git a/docker/build/monza-full-node/Dockerfile b/docker/build/monza-full-node/Dockerfile index 3158d12ef..f1269517b 100644 --- a/docker/build/monza-full-node/Dockerfile +++ b/docker/build/monza-full-node/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - build + build -A monza-full-node # Copy the Nix store closure into a directory. The Nix store closure is the # entire set of Nix store values that we need for our build. diff --git a/docker/build/rd/Dockerfile b/docker/build/rd/Dockerfile deleted file mode 100644 index 2d3672e0c..000000000 --- a/docker/build/rd/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -# Use the latest Nix image -FROM nixos/nix:latest - -# Set up working directory where the flake will be copied -WORKDIR /app - -# Copy the flake files into the container -COPY . /app - -# Set the entrypoint to use `nix develop` to execute commands within the Nix environment -ENTRYPOINT ["nix", "develop", "--command", "bash", "-c"] diff --git a/docker/build/suzuka-full-node/Dockerfile b/docker/build/suzuka-full-node/Dockerfile new file mode 100644 index 000000000..fc5706cf2 --- /dev/null +++ b/docker/build/suzuka-full-node/Dockerfile @@ -0,0 +1,28 @@ +# Nix builder +FROM nixos/nix:latest AS builder + +# Copy our source and setup our working dir. +COPY . /tmp/build +WORKDIR /tmp/build + +# Build our Nix environment +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + build -A suzuka-full-node + +# Copy the Nix store closure into a directory. The Nix store closure is the +# entire set of Nix store values that we need for our build. +RUN mkdir /tmp/nix-store-closure +RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure + +# Final image is based on scratch. We copy a bunch of Nix dependencies +# but they're fully self-contained so we don't need Nix anymore. +FROM scratch + +WORKDIR /app + +# Copy /nix/store +COPY --from=builder /tmp/nix-store-closure /nix/store +COPY --from=builder /tmp/build/result /app +CMD ["/app/bin/app"] \ No newline at end of file diff --git a/flake.nix b/flake.nix index b3e9318b2..a8e096b2b 100644 --- a/flake.nix +++ b/flake.nix @@ -81,6 +81,9 @@ # monza-aptos monza-aptos = import ./nix/monza-aptos.nix { inherit pkgs; }; + + # m1-da-light-node + m1-da-light-node = import ./nix/m1-da-light-node.nix { inherit pkgs; }; in with pkgs; { @@ -88,6 +91,9 @@ # Monza Aptos packages.monza-aptos = monza-aptos; + # M1 DA Light Node + packages.m1-da-light-node = m1-da-light-node; + # Development Shell devShells.default = mkShell { diff --git a/nix/m1-da-light-node.nix b/nix/m1-da-light-node.nix new file mode 100644 index 000000000..8d9ab9140 --- /dev/null +++ b/nix/m1-da-light-node.nix @@ -0,0 +1,46 @@ +{ pkgs }: + +pkgs.rustPlatform.buildRustPackage rec { + pname = "m1-da-light-node"; + version = "0.1.0"; + + buildInput = with pkgs; [ + llvmPackages.bintools + openssl + openssl.dev + libiconv + pkg-config + process-compose + just + jq + libclang.lib + libz + clang + pkg-config + protobuf + rustPlatform.bindgenHook + lld + coreutils + gcc + ] ++ lib.optionals stdenv.isDarwin [ + frameworks.Security + frameworks.CoreServices + frameworks.SystemConfiguration + frameworks.AppKit + ] ++ lib.optionals stdenv.isLinux [ + udev + systemd + ]; + + src = ./..; # Use the current directory as the source + + cargoSha256 = pkgs.lib.fakeSha256; + + meta = with pkgs.lib; { + description = "M1 DA Light Node"; + homepage = "https://github.com/movementlabsxyz/movement"; + license = licenses.mit; + maintainers = [ maintainers.your_name ]; + }; + +} From a231b16cd76b4e8c28737a7e548902de97fe74ae Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Wed, 15 May 2024 22:57:42 -0400 Subject: [PATCH 018/101] fix: remove vendors. --- .cargo/config.toml | 2 +- Cargo.toml | 1 - flake.nix | 10 +++++++++- nix/m1-da-light-node.nix | 29 +++++++++++++++++++++++++++-- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index d7681b6c2..eeb443f5d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -32,4 +32,4 @@ rustflags = [ "force-unwind-tables=yes", "-C", "link-arg=/STACK:8000000" # Set stack to 8 MB -] +] \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 69826273c..8021350dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,6 @@ license = "MIT OR Apache-2.0" authors = ["Movement Labs"] repository = "www.github.com/movementlabs/movement" homepage = "www.homepage.com" -resolver = "2" publish = false rust-version = "1.75" diff --git a/flake.nix b/flake.nix index a8e096b2b..70dff2ac4 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,14 @@ system: let + # nix does not handle .cargo/config.toml + RUSTFLAGS = if pkgs.stdenv.hostPlatform.isLinux then + "--cfg tokio_unstable -C force-frame-pointers=yes -C force-unwind-tables=yes -C link-arg=-fuse-ld=lld -C target-feature=+sse4.2" + else if pkgs.stdenv.hostPlatform.isWindows then + "--cfg tokio_unstable -C force-frame-pointers=yes -C force-unwind-tables=yes -C link-arg=/STACK:8000000" + else + "--cfg tokio_unstable -C force-frame-pointers=yes -C force-unwind-tables=yes"; + overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml)); overlays = [ @@ -83,7 +91,7 @@ monza-aptos = import ./nix/monza-aptos.nix { inherit pkgs; }; # m1-da-light-node - m1-da-light-node = import ./nix/m1-da-light-node.nix { inherit pkgs; }; + m1-da-light-node = import ./nix/m1-da-light-node.nix { inherit pkgs frameworks RUSTFLAGS; }; in with pkgs; { diff --git a/nix/m1-da-light-node.nix b/nix/m1-da-light-node.nix index 8d9ab9140..b50bf3533 100644 --- a/nix/m1-da-light-node.nix +++ b/nix/m1-da-light-node.nix @@ -1,4 +1,4 @@ -{ pkgs }: +{ pkgs, frameworks, RUSTFLAGS }: pkgs.rustPlatform.buildRustPackage rec { pname = "m1-da-light-node"; @@ -32,10 +32,35 @@ pkgs.rustPlatform.buildRustPackage rec { systemd ]; - src = ./..; # Use the current directory as the source + src = builtins.filterSource + (path: type: baseNameOf path != ".git") + ./..; # Use the current directory as the source cargoSha256 = pkgs.lib.fakeSha256; + buildPhase = '' + # export HOME=$(mktemp -d) + # export RUSTFLAGS="${RUSTFLAGS}" + cat .cargo/config.toml + cargo build --release + ''; + + cargoLock = { + lockFile = ../Cargo.lock; + outputHashes = { + "abstract-domain-derive-0.1.0" = "sha256-53ObE7yoEMuZWjIAXXAm4hDBBKU1VhgEj/Zc9EQ4MBA="; + "bcs-0.1.4" = "sha256-SzODBDLSQRXExjke0/7FN/wQQq3vxcwFeGOa37H3Gtg="; + "celestia-proto-0.2.0" = "sha256-/GucnpYoCqQ0plcDTwuUoZxC3rLsNnso1LVTg+tY4+k="; + "merlin-3.0.0" = "sha256-JATfmaS1EA33gcGJFNzUEZM1pBKh22q0jubA2dtLS1I="; + "poseidon-ark-0.0.1" = "sha256-xDff0iC/OOzrb3fEycfmb0Rb/omCuVjNoibDOrr/32A="; + "serde-generate-0.20.6" = "sha256-Oa9inyiTPQv1ScSQog+Ry+c7aLnAx4GcGn5ravGPthM="; + "sha2-0.10.8" = "sha256-vuFQFlbDXEW+n9+Nx2VeWanggCSd6NZ+GVEDFS9qZ2M="; + "x25519-dalek-1.2.0" = "sha256-AHjhccCqacu0WMTFyxIret7ghJ2V+8wEAwR5L6Hy1KY="; + "zstd-sys-2.0.9+zstd.1.5.5" = "sha256-n7abNAHEfDeRSjhh7SpI/BpkJCVLONJwKvaXwVB4PXs="; + }; + allowBuiltinFetchGit = true; + }; + meta = with pkgs.lib; { description = "M1 DA Light Node"; homepage = "https://github.com/movementlabsxyz/movement"; From 2f352400252270903a04b41a97737b998b00c1cd Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Wed, 15 May 2024 23:05:42 -0400 Subject: [PATCH 019/101] fix: trying top-level. --- flake.nix | 2 +- nix/m1-da-light-node.nix => m1-da-light-node.nix | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) rename nix/m1-da-light-node.nix => m1-da-light-node.nix (91%) diff --git a/flake.nix b/flake.nix index 70dff2ac4..b04e30d02 100644 --- a/flake.nix +++ b/flake.nix @@ -91,7 +91,7 @@ monza-aptos = import ./nix/monza-aptos.nix { inherit pkgs; }; # m1-da-light-node - m1-da-light-node = import ./nix/m1-da-light-node.nix { inherit pkgs frameworks RUSTFLAGS; }; + m1-da-light-node = import ./m1-da-light-node.nix { inherit pkgs frameworks RUSTFLAGS; }; in with pkgs; { diff --git a/nix/m1-da-light-node.nix b/m1-da-light-node.nix similarity index 91% rename from nix/m1-da-light-node.nix rename to m1-da-light-node.nix index b50bf3533..e66bb94af 100644 --- a/nix/m1-da-light-node.nix +++ b/m1-da-light-node.nix @@ -32,21 +32,19 @@ pkgs.rustPlatform.buildRustPackage rec { systemd ]; - src = builtins.filterSource - (path: type: baseNameOf path != ".git") - ./..; # Use the current directory as the source + src = "./"; cargoSha256 = pkgs.lib.fakeSha256; buildPhase = '' - # export HOME=$(mktemp -d) + export HOME=$(mktemp -d) # export RUSTFLAGS="${RUSTFLAGS}" cat .cargo/config.toml cargo build --release ''; cargoLock = { - lockFile = ../Cargo.lock; + lockFile = ./Cargo.lock; outputHashes = { "abstract-domain-derive-0.1.0" = "sha256-53ObE7yoEMuZWjIAXXAm4hDBBKU1VhgEj/Zc9EQ4MBA="; "bcs-0.1.4" = "sha256-SzODBDLSQRXExjke0/7FN/wQQq3vxcwFeGOa37H3Gtg="; From b747d43e00768419b7a31a399bf537cb436a7fd7 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 00:13:47 -0400 Subject: [PATCH 020/101] fix: moving back into ./nix. --- flake.lock | 39 +++++++++++++++++-- flake.nix | 9 ++++- .../m1-da-light-node.nix | 9 +++-- 3 files changed, 49 insertions(+), 8 deletions(-) rename m1-da-light-node.nix => nix/m1-da-light-node.nix (89%) diff --git a/flake.lock b/flake.lock index d0280503b..8b08e39ad 100644 --- a/flake.lock +++ b/flake.lock @@ -71,6 +71,24 @@ "type": "github" } }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1713520724, + "narHash": "sha256-CO8MmVDmqZX2FovL75pu5BvwhW+Vugc7Q6ze7Hj8heI=", + "owner": "nix-community", + "repo": "naersk", + "rev": "c5037590290c6c7dae2e42e7da1e247e54ed2d49", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1666753130, @@ -86,6 +104,20 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1715774670, + "narHash": "sha256-iJYnKMtLi5u6hZhJm94cRNSDG5Rz6ZzIkGbhPFtDRm0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b3fcfcfabd01b947a1e4f36622bbffa3985bdac6", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1715266358, "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", @@ -101,7 +133,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -121,14 +153,15 @@ "inputs": { "flake-utils": "flake-utils", "foundry": "foundry", - "nixpkgs": "nixpkgs_2", + "naersk": "naersk", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay" } }, "rust-overlay": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1712024007, diff --git a/flake.nix b/flake.nix index b04e30d02..417255aa8 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ rust-overlay.url = "github:oxalica/rust-overlay"; flake-utils.url = "github:numtide/flake-utils"; foundry.url = "github:shazow/foundry.nix/monthly"; + naersk.url = "github:nix-community/naersk"; }; outputs = { @@ -12,6 +13,7 @@ rust-overlay, flake-utils, foundry, + naersk, ... }: flake-utils.lib.eachSystem ["aarch64-darwin" "x86_64-darwin" "x86_64-linux" "aarch64-linux"] ( @@ -81,6 +83,11 @@ rustc = rust; }; + naersk' = pkgs.callPackage naersk { + cargo = rust; + rustc = rust; + }; + # celestia-node celestia-node = import ./nix/celestia-node.nix { inherit pkgs; }; @@ -91,7 +98,7 @@ monza-aptos = import ./nix/monza-aptos.nix { inherit pkgs; }; # m1-da-light-node - m1-da-light-node = import ./m1-da-light-node.nix { inherit pkgs frameworks RUSTFLAGS; }; + m1-da-light-node = import ./nix/m1-da-light-node.nix { inherit pkgs frameworks RUSTFLAGS; }; in with pkgs; { diff --git a/m1-da-light-node.nix b/nix/m1-da-light-node.nix similarity index 89% rename from m1-da-light-node.nix rename to nix/m1-da-light-node.nix index e66bb94af..8b3a9740c 100644 --- a/m1-da-light-node.nix +++ b/nix/m1-da-light-node.nix @@ -32,14 +32,14 @@ pkgs.rustPlatform.buildRustPackage rec { systemd ]; - src = "./"; + src = pkgs.lib.sourceByRegex ./. [".*"]; cargoSha256 = pkgs.lib.fakeSha256; + # several of these buildPhase = '' - export HOME=$(mktemp -d) - # export RUSTFLAGS="${RUSTFLAGS}" - cat .cargo/config.toml + # export HOME=$(mktemp -d) + export RUSTFLAGS="${RUSTFLAGS}" cargo build --release ''; @@ -56,6 +56,7 @@ pkgs.rustPlatform.buildRustPackage rec { "x25519-dalek-1.2.0" = "sha256-AHjhccCqacu0WMTFyxIret7ghJ2V+8wEAwR5L6Hy1KY="; "zstd-sys-2.0.9+zstd.1.5.5" = "sha256-n7abNAHEfDeRSjhh7SpI/BpkJCVLONJwKvaXwVB4PXs="; }; + # just setting $HOME to a temporary directory probably takes care of this allowBuiltinFetchGit = true; }; From 0899b946a0c81c0cc66e27dd1ab96c625e615b5f Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 00:50:47 -0400 Subject: [PATCH 021/101] docker: works. --- docker/build/m1-da-light-node/Dockerfile | 6 +++++- nix/m1-da-light-node.nix | 13 +++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docker/build/m1-da-light-node/Dockerfile b/docker/build/m1-da-light-node/Dockerfile index 4212442be..d41ecd9df 100644 --- a/docker/build/m1-da-light-node/Dockerfile +++ b/docker/build/m1-da-light-node/Dockerfile @@ -6,10 +6,14 @@ COPY . /tmp/build WORKDIR /tmp/build # Build our Nix environment +# RUN nix \ +# --extra-experimental-features "nix-command flakes" \ +# --option filter-syscalls false \ +# build '.#m1-da-light-node' RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - build '.#m1-da-light-node' + develop --command bash -c "cargo build -p m1-da-light-node" # Copy the Nix store closure into a directory. The Nix store closure is the # entire set of Nix store values that we need for our build. diff --git a/nix/m1-da-light-node.nix b/nix/m1-da-light-node.nix index 8b3a9740c..70663319b 100644 --- a/nix/m1-da-light-node.nix +++ b/nix/m1-da-light-node.nix @@ -32,19 +32,22 @@ pkgs.rustPlatform.buildRustPackage rec { systemd ]; - src = pkgs.lib.sourceByRegex ./. [".*"]; + src = ./..; cargoSha256 = pkgs.lib.fakeSha256; # several of these buildPhase = '' - # export HOME=$(mktemp -d) + export HOME=$(mktemp -d) export RUSTFLAGS="${RUSTFLAGS}" - cargo build --release + cargo clean + cargo build --release -p monza-full-node ''; + ## buildAndTestSubdir = "protocol-units/da/m1/light-node"; + cargoLock = { - lockFile = ./Cargo.lock; + lockFile = ../Cargo.lock; outputHashes = { "abstract-domain-derive-0.1.0" = "sha256-53ObE7yoEMuZWjIAXXAm4hDBBKU1VhgEj/Zc9EQ4MBA="; "bcs-0.1.4" = "sha256-SzODBDLSQRXExjke0/7FN/wQQq3vxcwFeGOa37H3Gtg="; @@ -56,8 +59,6 @@ pkgs.rustPlatform.buildRustPackage rec { "x25519-dalek-1.2.0" = "sha256-AHjhccCqacu0WMTFyxIret7ghJ2V+8wEAwR5L6Hy1KY="; "zstd-sys-2.0.9+zstd.1.5.5" = "sha256-n7abNAHEfDeRSjhh7SpI/BpkJCVLONJwKvaXwVB4PXs="; }; - # just setting $HOME to a temporary directory probably takes care of this - allowBuiltinFetchGit = true; }; meta = with pkgs.lib; { From 6a46edb4c55c69652c102ec5841a859ea8dfcb8e Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 12:36:24 +0300 Subject: [PATCH 022/101] suzuka-full-node: process settled commitments --- .../suzuka/suzuka-full-node/src/partial.rs | 151 +++++++++++------- 1 file changed, 92 insertions(+), 59 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 19c29aa4f..bc8adf21b 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -1,4 +1,4 @@ -use std::{sync::Arc, time::Duration}; +use std::{sync::Arc, time::Duration, collections::BTreeMap}; use anyhow::Context; use suzuka_executor::{ @@ -139,8 +139,8 @@ where }.into_inner(); let settlement_client = self.settlement_client.clone(); - // TODO: consume the commitment stream to finalize blocks - let commitment_stream = settlement_client.stream_block_commitments().await?; + let mut commitment_stream = settlement_client.stream_block_commitments().await?; + let mut commitments_to_settle = BTreeMap::new(); tokio::spawn(async move { if let Err(e) = process_commitments(receiver, settlement_client).await { @@ -148,64 +148,39 @@ where } }); - while let Some(blob) = stream.next().await { - - println!("Stream hot!"); - // get the block - let block_bytes = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { - blob_response::BlobType::SequencedBlobBlock(blob) => { - blob.data + loop { + tokio::select! { + Some(blob) = stream.next() => { + println!("Block stream hot!"); + let block_commitment = parse_and_execute_block(blob?, &self.executor).await?; + commitments_to_settle.insert( + block_commitment.height, + block_commitment.commitment.clone(), + ); + match sender.try_send(block_commitment) { + Ok(_) => {}, + Err(TrySendError::Closed(_)) => { + break; + }, + Err(TrySendError::Full(_commitment)) => { + println!("Commitment channel full, dropping commitment"); + } + } }, - _ => { anyhow::bail!("Invalid blob type in response") } - }; - - // get the block - let block : Block = serde_json::from_slice(&block_bytes)?; - println!("Received block: {:?}", block); - - // get the transactions - let mut block_transactions = Vec::new(); - for transaction in block.transactions { - let signed_transaction : SignedTransaction = serde_json::from_slice(&transaction.0)?; - let signature_verified_transaction = SignatureVerifiedTransaction::Valid( - Transaction::UserTransaction( - signed_transaction - ) - ); - block_transactions.push(signature_verified_transaction); - } - - // form the executable transactions vec - let block = ExecutableTransactions::Unsharded( - block_transactions - ); - - // hash the block bytes - let mut hasher = sha2::Sha256::new(); - hasher.update(&block_bytes); - let slice = hasher.finalize(); - let block_hash = HashValue::from_slice(slice.as_slice())?; - - // form the executable block and execute it - let executable_block = ExecutableBlock::new( - block_hash, - block - ); - let block_id = executable_block.block_id; - let commitment = self.executor.execute_block( - FinalityMode::Opt, - executable_block - ).await?; - - println!("Executed block: {:?}", block_id); - - match sender.try_send(commitment) { - Ok(_) => {}, - Err(TrySendError::Closed(_)) => { - break; + Some(res) = commitment_stream.next() => { + let settled_commitment = res?; + let height = settled_commitment.height; + if let Some(commitment) = commitments_to_settle.remove(&height) { + if commitment != settled_commitment.commitment { + println!("Commitment mismatch at height {}: expected {:?}, got {:?}", height, commitment, settled_commitment.commitment); + } + } else { + println!("No block commitment found for height {}", height); + } }, - Err(TrySendError::Full(_commitment)) => { - println!("Commitment channel full, dropping commitment"); + else => { + println!("Streams ended"); + break; } } } @@ -216,6 +191,64 @@ where } +async fn parse_and_execute_block( + block_data: StreamReadFromHeightResponse, + executor: &T, +) -> Result +where + T: SuzukaExecutor, +{ + // get the block + let block_bytes = match block_data.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { + blob_response::BlobType::SequencedBlobBlock(blob) => { + blob.data + }, + _ => { anyhow::bail!("Invalid blob type in response") } + }; + + // get the block + let block : Block = serde_json::from_slice(&block_bytes)?; + println!("Received block: {:?}", block); + + // get the transactions + let mut block_transactions = Vec::new(); + for transaction in block.transactions { + let signed_transaction : SignedTransaction = serde_json::from_slice(&transaction.0)?; + let signature_verified_transaction = SignatureVerifiedTransaction::Valid( + Transaction::UserTransaction( + signed_transaction + ) + ); + block_transactions.push(signature_verified_transaction); + } + + // form the executable transactions vec + let block = ExecutableTransactions::Unsharded( + block_transactions + ); + + // hash the block bytes + let mut hasher = sha2::Sha256::new(); + hasher.update(&block_bytes); + let slice = hasher.finalize(); + let block_hash = HashValue::from_slice(slice.as_slice())?; + + // form the executable block and execute it + let executable_block = ExecutableBlock::new( + block_hash, + block + ); + let block_id = executable_block.block_id; + let block_commitment = executor.execute_block( + FinalityMode::Opt, + executable_block + ).await?; + + println!("Executed block: {:?}", block_id); + + Ok(block_commitment) +} + async fn process_commitments( mut receiver: mpsc::Receiver, settlement_client: Arc, From 60330fe68b22dbcdd87cb05daafcd39b7ef2e31d Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 13:50:02 +0300 Subject: [PATCH 023/101] test(opt-executor): verify block commitment --- .../execution/maptos/opt-executor/src/executor.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index af7d84fd5..b7f3f1279 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -538,7 +538,7 @@ mod tests { let tx_factory = TransactionFactory::new(executor.aptos_config.chain_id.clone()); // Loop to simulate the execution of multiple blocks. - for _ in 0..10 { + for i in 0..10 { // Generate a random block ID. let block_id = HashValue::random(); // Clone the signer from the executor for signing the metadata. @@ -585,9 +585,7 @@ mod tests { // Create and execute the block. let block = ExecutableBlock::new(block_id.clone(), transactions); - let commitment = executor.execute_block(block).await?; - - // TODO: verify commitment against the state. + let block_commitment = executor.execute_block(block).await?; // Access the database reader to verify state after execution. let db_reader = executor.db.read().await.reader.clone(); @@ -609,6 +607,12 @@ mod tests { assert!(queried_account_address.is_some()); let account_resource = account_state_view.get_account_resource()?; assert!(account_resource.is_some()); + + // Check the commitment against state proof + let state_proof = db_reader.get_state_proof(latest_version)?; + let expected_commitment = Commitment::digest_state_proof(&state_proof); + // assert_eq!(block_commitment.height, i); + assert_eq!(block_commitment.commitment, expected_commitment); } Ok(()) From 0e96fb6f7394321ac2182b7a729ab29abaac0d09 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 15:50:28 +0300 Subject: [PATCH 024/101] opt-executor: use version from state compute --- .../maptos/opt-executor/src/executor.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index b7f3f1279..0ea023d79 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -272,13 +272,14 @@ impl Executor { println!("State compute: {:?}", state_compute); - let latest_version = { - let reader = self.db.read().await.reader.clone(); - reader.get_latest_version()? - }; + let version = state_compute.version(); { - let ledger_info_with_sigs = self.get_ledger_info_with_sigs(block_id, state_compute.root_hash(), state_compute.version()); + let ledger_info_with_sigs = self.get_ledger_info_with_sigs( + block_id, + state_compute.root_hash(), + version, + ); let block_executor = self.block_executor.write().await; block_executor.commit_blocks( vec![block_id], @@ -288,16 +289,14 @@ impl Executor { let proof = { let reader = self.db.read().await.reader.clone(); - reader.get_state_proof( - state_compute.version(), - )? + reader.get_state_proof(version)? }; let commitment = Commitment::digest_state_proof(&proof); Ok(BlockCommitment { block_id: Id(block_id.to_vec()), commitment, - height: latest_version, + height: version, }) } From 92b1dd1e1ccd4cd13c68adf5ff4f7716950d9c47 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 09:15:22 -0400 Subject: [PATCH 025/101] fix: testing nix. --- docker/build/m1-da-light-node/Dockerfile | 24 +++--------------------- flake.nix | 2 +- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/docker/build/m1-da-light-node/Dockerfile b/docker/build/m1-da-light-node/Dockerfile index d41ecd9df..1ce7843c2 100644 --- a/docker/build/m1-da-light-node/Dockerfile +++ b/docker/build/m1-da-light-node/Dockerfile @@ -5,28 +5,10 @@ FROM nixos/nix:latest AS builder COPY . /tmp/build WORKDIR /tmp/build -# Build our Nix environment -# RUN nix \ -# --extra-experimental-features "nix-command flakes" \ -# --option filter-syscalls false \ -# build '.#m1-da-light-node' RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build -p m1-da-light-node" + develop --command bash -c "cargo build --release" -# Copy the Nix store closure into a directory. The Nix store closure is the -# entire set of Nix store values that we need for our build. -RUN mkdir /tmp/nix-store-closure -RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure - -# Final image is based on scratch. We copy a bunch of Nix dependencies -# but they're fully self-contained so we don't need Nix anymore. -FROM scratch - -WORKDIR /app - -# Copy /nix/store -COPY --from=builder /tmp/nix-store-closure /nix/store -COPY --from=builder /tmp/build/result /app -CMD ["/app/bin/app"] \ No newline at end of file +RUN chmod -R 755 . +CMD ["nix", "--extra-experimental-features", "nix-command flakes", "--option", "filter-syscalls", "false", "develop", "--command", "bash", "-c", "just monza-full-node local -t=false"] diff --git a/flake.nix b/flake.nix index 417255aa8..5e39e4f38 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ dependencies = with pkgs; [ foundry-bin - solc + # solc llvmPackages.bintools openssl openssl.dev From 6c6a2d8271d1da520867292f6bf803e40d55089b Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 10:49:42 -0400 Subject: [PATCH 026/101] feat: scaffolding and u8; 32. --- Cargo.lock | 14 +++++++++ Cargo.toml | 2 ++ .../settlement/mcr/manager/Cargo.toml | 29 +++++++++++++++++++ .../settlement/mcr/manager/src/lib.rs | 21 ++++++++++++++ .../settlement/mcr/manager/src/manager.rs | 11 +++++++ util/movement-types/src/lib.rs | 29 ++++++++++++++----- 6 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 protocol-units/settlement/mcr/manager/Cargo.toml create mode 100644 protocol-units/settlement/mcr/manager/src/lib.rs create mode 100644 protocol-units/settlement/mcr/manager/src/manager.rs diff --git a/Cargo.lock b/Cargo.lock index 23e98f701..860de1dea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6224,6 +6224,20 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "mcr-settlement-manager" +version = "0.3.0" +dependencies = [ + "anyhow", + "async-stream", + "async-trait", + "mcr-settlement-client", + "movement-types", + "serde_json", + "tokio", + "tokio-stream", +] + [[package]] name = "memchr" version = "2.7.2" diff --git a/Cargo.toml b/Cargo.toml index 46700cfdc..69e0f8279 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ members = [ "protocol-units/mempool/*", "protocol-units/settlement/mcr/client", + "protocol-units/settlement/mcr/manager", "util/*", "util/buildtime/buildtime-helpers", @@ -65,6 +66,7 @@ m1-da-light-node-verifier = { path = "protocol-units/da/m1/light-node-verifier" m1-da-light-node-client = { path = "protocol-units/da/m1/light-node-client" } ## settlement mcr-settlement-client = { path = "protocol-units/settlement/mcr/client" } +mcr-settlement-manager = { path = "protocol-units/settlement/mcr/manager" } ## mempool mempool-util = { path = "protocol-units/mempool/util" } move-rocks = { path = "protocol-units/mempool/move-rocks" } diff --git a/protocol-units/settlement/mcr/manager/Cargo.toml b/protocol-units/settlement/mcr/manager/Cargo.toml new file mode 100644 index 000000000..a70d7a8f5 --- /dev/null +++ b/protocol-units/settlement/mcr/manager/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "mcr-settlement-manager" +version = { workspace = true } +edition = { workspace = true } +license = { workspace = true } +authors = { workspace = true } +repository = { workspace = true } +homepage = { workspace = true } +publish = { workspace = true } +rust-version = { workspace = true } + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +async-trait = { workspace = true } +tokio = { workspace = true } +anyhow = { workspace = true } +tokio-stream = { workspace = true } +movement-types = { workspace = true } +serde_json = { workspace = true } +async-stream = { workspace = true } +mcr-settlement-client = { workspace = true } + +[features] +default = ["stub"] +stub = [] + +[lints] +workspace = true diff --git a/protocol-units/settlement/mcr/manager/src/lib.rs b/protocol-units/settlement/mcr/manager/src/lib.rs new file mode 100644 index 000000000..7e6c1ca10 --- /dev/null +++ b/protocol-units/settlement/mcr/manager/src/lib.rs @@ -0,0 +1,21 @@ +use movement_types::{BlockCommitment, BlockCommitmentEvent}; +use tokio_stream::Stream; + +pub mod manager; + +type CommitmentEventStream = + std::pin::Pin> + Send>>; + +#[async_trait::async_trait] +pub trait McrSettlementManagerOperations { + + /// Adds a block commitment to the manager queue. + async fn post_block_commitment( + &self, + block_commitment: BlockCommitment, + ) -> Result<(), anyhow::Error>; + + /// Streams block commitment events. + async fn stream_block_commitment_events(&self) -> Result; + +} diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs new file mode 100644 index 000000000..4525cde1d --- /dev/null +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -0,0 +1,11 @@ +use mcr_settlement_client::{McrSettlementClient, /*McrSettlementClientOperations*/}; + +pub struct Manager { + pub client: McrSettlementClient, +} + +impl Manager { + pub fn new(client: McrSettlementClient) -> Self { + Self { client } + } +} \ No newline at end of file diff --git a/util/movement-types/src/lib.rs b/util/movement-types/src/lib.rs index dc225803a..935f78a8e 100644 --- a/util/movement-types/src/lib.rs +++ b/util/movement-types/src/lib.rs @@ -144,29 +144,30 @@ impl Block { } #[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub struct Commitment(pub Vec); +pub struct Commitment(pub [u8; 32]); impl Commitment { pub fn test() -> Self { - Self(vec![0]) + Self([0; 32]) } /// Creates a commitment by making a cryptographic digest of the state proof. pub fn digest_state_proof(state_proof: &StateProof) -> Self { let mut hasher = sha2::Sha256::new(); bcs::serialize_into(&mut hasher, &state_proof).expect("unexpected serialization error"); - Self(hasher.finalize().to_vec()) + todo!("finish implementing digest_state_proof") + // Self(hasher.finalize().as_slice()) } } -impl From> for Commitment { - fn from(data : Vec) -> Self { +impl From<[u8;32]> for Commitment { + fn from(data : [u8;32]) -> Self { Self(data) } } -impl From for Vec { - fn from(commitment : Commitment) -> Vec { +impl From for [u8;32] { + fn from(commitment : Commitment) -> [u8;32] { commitment.0 } } @@ -176,4 +177,18 @@ pub struct BlockCommitment { pub height : u64, pub block_id : Id, pub commitment : Commitment, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum BlockCommitmentRejectionReason { + InvalidBlockId, + InvalidCommitment, + InvalidHeight, + ContractError, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum BlockCommitmentEvent { + Accepted(BlockCommitment), + Rejected(BlockCommitment, BlockCommitmentRejectionReason), } \ No newline at end of file From a0ebf396a7213a517beb6210019e752b7b7c9343 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 20:58:14 +0300 Subject: [PATCH 027/101] refactor(opt-executor): method to helper fn get_ledger_info_with_sigs had no business with self and looks like an internal helper. --- .../maptos/opt-executor/src/executor.rs | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 0ea023d79..ec60a8554 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -228,30 +228,6 @@ impl Executor { } - pub fn get_ledger_info_with_sigs( - &self, - block_id: HashValue, - root_hash: HashValue, - version: Version, - ) -> LedgerInfoWithSignatures { - let block_info = BlockInfo::new( - 1, - 0, - block_id, - root_hash, version, - 0, /* timestamp_usecs, doesn't matter */ - None, - ); - let ledger_info = LedgerInfo::new( - block_info, - HashValue::zero(), /* consensus_data_hash, doesn't matter */ - ); - LedgerInfoWithSignatures::new( - ledger_info, - AggregateSignature::empty(), /* signatures */ - ) - } - /// Execute a block which gets committed to the state. /// `ExecutorState` must be set to `Commit` before calling this method. pub async fn execute_block( @@ -275,7 +251,7 @@ impl Executor { let version = state_compute.version(); { - let ledger_info_with_sigs = self.get_ledger_info_with_sigs( + let ledger_info_with_sigs = ledger_info_with_sigs( block_id, state_compute.root_hash(), version, @@ -453,6 +429,30 @@ impl Executor { } +fn ledger_info_with_sigs( + block_id: HashValue, + root_hash: HashValue, + version: Version, +) -> LedgerInfoWithSignatures { + let block_info = BlockInfo::new( + 1, + 0, + block_id, + root_hash, + version, + 0, /* timestamp_usecs, doesn't matter */ + None, + ); + let ledger_info = LedgerInfo::new( + block_info, + HashValue::zero(), /* consensus_data_hash, doesn't matter */ + ); + LedgerInfoWithSignatures::new( + ledger_info, + AggregateSignature::empty(), /* signatures */ + ) +} + #[cfg(test)] mod tests { From 07396320c8b944564d0c91842d0958e185323796 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 20:58:47 +0300 Subject: [PATCH 028/101] Implement Commitment::digest_state_proof --- util/movement-types/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/movement-types/src/lib.rs b/util/movement-types/src/lib.rs index 935f78a8e..024e50e77 100644 --- a/util/movement-types/src/lib.rs +++ b/util/movement-types/src/lib.rs @@ -155,8 +155,7 @@ impl Commitment { pub fn digest_state_proof(state_proof: &StateProof) -> Self { let mut hasher = sha2::Sha256::new(); bcs::serialize_into(&mut hasher, &state_proof).expect("unexpected serialization error"); - todo!("finish implementing digest_state_proof") - // Self(hasher.finalize().as_slice()) + Self(hasher.finalize().into()) } } From eab891cc1abffa35909596a98fbbe4a5819171ed Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 16 May 2024 20:59:52 +0300 Subject: [PATCH 029/101] opt-executor: try different way for block height Context::get_latest_info_wrapped, does not seem to cut the mustard either. --- .../execution/maptos/opt-executor/src/executor.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index ec60a8554..c30578036 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -268,11 +268,16 @@ impl Executor { reader.get_state_proof(version)? }; + // Context has a reach-around to the db so the block height should + // have been updated to the most recently committed block. + // Race conditions, anyone? + let block_height = self.context.get_latest_ledger_info_wrapped()?.block_height; + let commitment = Commitment::digest_state_proof(&proof); Ok(BlockCommitment { block_id: Id(block_id.to_vec()), commitment, - height: version, + height: block_height.into(), }) } From da3fdbeb86bf1dda9d0b2f91d72c7382a1facf03 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 14:04:16 -0400 Subject: [PATCH 030/101] fix: docker. --- docker/build/m1-da-light-node/Dockerfile | 6 ++---- justfile | 4 ++-- scripts/movement/run | 2 +- test | 2 ++ 4 files changed, 7 insertions(+), 7 deletions(-) create mode 100755 test diff --git a/docker/build/m1-da-light-node/Dockerfile b/docker/build/m1-da-light-node/Dockerfile index 1ce7843c2..e1984470a 100644 --- a/docker/build/m1-da-light-node/Dockerfile +++ b/docker/build/m1-da-light-node/Dockerfile @@ -1,5 +1,5 @@ # Nix builder -FROM nixos/nix:latest AS builder +FROM nixos/nix:latest # Copy our source and setup our working dir. COPY . /tmp/build @@ -8,7 +8,5 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release" + develop --command bash -c "echo built" -RUN chmod -R 755 . -CMD ["nix", "--extra-experimental-features", "nix-command flakes", "--option", "filter-syscalls", "false", "develop", "--command", "bash", "-c", "just monza-full-node local -t=false"] diff --git a/justfile b/justfile index abd7418cb..859fec5de 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ m1-da-light-node FEATURES *ARGS: cargo build -p m1-da-light-node - scripts/movement/run m1-da-light-node {{ FEATURES }} {{ ARGS }} + ./scripts/movement/run m1-da-light-node {{ FEATURES }} {{ ARGS }} monza-full-node FEATURES *ARGS: - scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} + ./scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} mcr-contract-tests: cd ./protocol-units/settlement/mcr/contracts && forge test \ No newline at end of file diff --git a/scripts/movement/run b/scripts/movement/run index 4fafed2ac..d14b96e53 100755 --- a/scripts/movement/run +++ b/scripts/movement/run @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash set -euo pipefail export PATH=$PATH:./target/release diff --git a/test b/test new file mode 100755 index 000000000..dc75c2118 --- /dev/null +++ b/test @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +docker run --entrypoint "nix" m1-da-light-node --extra-experimental-features "nix-command flakes" develop --command just monza-full-node test.local -t=false \ No newline at end of file From 9a1dfacd80cf5b306718db41a6997e0de1758191 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 15:00:42 -0400 Subject: [PATCH 031/101] example: bad test. --- .../maptos/opt-executor/src/executor.rs | 55 +++++++++++++------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index c30578036..07b032d36 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -250,8 +250,13 @@ impl Executor { let version = state_compute.version(); + + let (epoch, round) = self.get_next_epoch_and_round().await?; + { let ledger_info_with_sigs = ledger_info_with_sigs( + epoch, + round, block_id, state_compute.root_hash(), version, @@ -418,6 +423,13 @@ impl Executor { Ok(()) } + pub async fn get_next_epoch_and_round(&self) -> Result<(u64, u64), anyhow::Error> { + let db = self.db.read().await; + let epoch = db.reader.get_latest_ledger_info()?.ledger_info().next_block_epoch(); + // let round = db.reader.get_latest_ledger_info()?.ledger_info().round(); + Ok((epoch, 0)) + } + /// Pipes a batch of transactions from the mempool to the transaction channel. /// todo: it may be wise to move the batching logic up a level to the consuming structs. pub async fn tick_transaction_pipe( @@ -435,13 +447,15 @@ impl Executor { } fn ledger_info_with_sigs( + epoch : u64, + round : u64, block_id: HashValue, root_hash: HashValue, version: Version, ) -> LedgerInfoWithSignatures { let block_info = BlockInfo::new( - 1, - 0, + epoch, + round, block_id, root_hash, version, @@ -543,26 +557,29 @@ mod tests { // Loop to simulate the execution of multiple blocks. for i in 0..10 { + + let (epoch, round) = executor.get_next_epoch_and_round().await?; + // Generate a random block ID. let block_id = HashValue::random(); // Clone the signer from the executor for signing the metadata. - // let signer = executor.signer.clone(); + let signer = executor.signer.clone(); // Get the current time in microseconds for the block timestamp. - // let current_time_micros = chrono::Utc::now().timestamp_micros() as u64; + let current_time_micros = chrono::Utc::now().timestamp_micros() as u64; // Create a block metadata transaction. - /*let block_metadata = Transaction::BlockMetadata(BlockMetadata::new( + let block_metadata = Transaction::BlockMetadata(BlockMetadata::new( block_id, - 1, - 0, + epoch, + round, signer.author(), - vec![0], + vec![], vec![], current_time_micros, - ));*/ + )); // Create a state checkpoint transaction using the block ID. - // let state_checkpoint_tx = Transaction::StateCheckpoint(block_id.clone()); + let state_checkpoint_tx = Transaction::StateCheckpoint(block_id.clone()); // Generate a new account for transaction tests. let new_account = LocalAccount::generate(&mut rng); let new_account_address = new_account.address(); @@ -577,17 +594,23 @@ mod tests { // Store the hash of the committed transaction for later verification. let mint_tx_hash = mint_tx.clone().committed_hash(); - // Group all transactions into a single unsharded block for execution. + // Block Metadata + let transactions = ExecutableTransactions::Unsharded( + into_signature_verified_block(vec![ + block_metadata, + ]) + ); + let block = ExecutableBlock::new(block_id.clone(), transactions); + let block_commitment = executor.execute_block(block).await?; + + // Next block + let block_id = HashValue::random(); let transactions = ExecutableTransactions::Unsharded( into_signature_verified_block(vec![ - // block_metadata, Transaction::UserTransaction(user_account_creation_tx), Transaction::UserTransaction(mint_tx), - // state_checkpoint_tx, ]) ); - - // Create and execute the block. let block = ExecutableBlock::new(block_id.clone(), transactions); let block_commitment = executor.execute_block(block).await?; @@ -615,7 +638,7 @@ mod tests { // Check the commitment against state proof let state_proof = db_reader.get_state_proof(latest_version)?; let expected_commitment = Commitment::digest_state_proof(&state_proof); - // assert_eq!(block_commitment.height, i); + assert_eq!(block_commitment.height, i); assert_eq!(block_commitment.commitment, expected_commitment); } From c8edb4a8b85691475c3d537fe53707e0c5c47215 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 15:03:15 -0400 Subject: [PATCH 032/101] fix: passing test. --- protocol-units/execution/maptos/opt-executor/src/executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 07b032d36..f357e83c3 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -638,7 +638,7 @@ mod tests { // Check the commitment against state proof let state_proof = db_reader.get_state_proof(latest_version)?; let expected_commitment = Commitment::digest_state_proof(&state_proof); - assert_eq!(block_commitment.height, i); + assert_eq!(block_commitment.height, i + 1); assert_eq!(block_commitment.commitment, expected_commitment); } From 608b9475d313a1957258d481625152b86d5a7e31 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 20:35:38 -0400 Subject: [PATCH 033/101] fix: working on docker. --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 417255aa8..5e39e4f38 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ dependencies = with pkgs; [ foundry-bin - solc + # solc llvmPackages.bintools openssl openssl.dev From db80751c57440cee400d0927c3f3d07fbbb875a6 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 21:58:53 -0400 Subject: [PATCH 034/101] fix: bash. --- flake.nix | 2 +- scripts/celestia/celestia-env | 3 ++- scripts/celestia/celestia-local-appd | 3 ++- scripts/celestia/celestia-local-bridge | 3 ++- scripts/celestia/celestia-local-init | 3 ++- scripts/celestia/create-and-fund-account | 3 ++- scripts/celestia/get-arabica-11-address | 3 ++- scripts/celestia/get-local-address | 3 ++- scripts/monza/faucet | 3 ++- scripts/preludes/m1-da-light-node/prelude | 3 ++- scripts/preludes/monza-full-node/prelude | 3 ++- 11 files changed, 21 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index 5e39e4f38..182211425 100644 --- a/flake.nix +++ b/flake.nix @@ -118,7 +118,7 @@ nativeBuildInputs = dependencies; shellHook = '' - #!/bin/bash + #!/usr/bin/env bash export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1) install-foundry cat <<'EOF' diff --git a/scripts/celestia/celestia-env b/scripts/celestia/celestia-env index fdfed4d72..7643a192f 100755 --- a/scripts/celestia/celestia-env +++ b/scripts/celestia/celestia-env @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash +set -e export DA_BLOCK_HEIGHT=0 export CELESTIA_NODE_AUTH_TOKEN= export CELESTIA_ADDRESS= diff --git a/scripts/celestia/celestia-local-appd b/scripts/celestia/celestia-local-appd index fb17a124f..486e0b902 100755 --- a/scripts/celestia/celestia-local-appd +++ b/scripts/celestia/celestia-local-appd @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" celestia-appd start --grpc.enable --home $APP_PATH \ No newline at end of file diff --git a/scripts/celestia/celestia-local-bridge b/scripts/celestia/celestia-local-bridge index ff8ea5613..4c5590d65 100755 --- a/scripts/celestia/celestia-local-bridge +++ b/scripts/celestia/celestia-local-bridge @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" diff --git a/scripts/celestia/celestia-local-init b/scripts/celestia/celestia-local-init index d9054310a..5ec915b02 100755 --- a/scripts/celestia/celestia-local-init +++ b/scripts/celestia/celestia-local-init @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" diff --git a/scripts/celestia/create-and-fund-account b/scripts/celestia/create-and-fund-account index 775cf2510..35ade5ba6 100755 --- a/scripts/celestia/create-and-fund-account +++ b/scripts/celestia/create-and-fund-account @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash +set -e # Maximum number of retries max_retries=10 # Delay in seconds between retries diff --git a/scripts/celestia/get-arabica-11-address b/scripts/celestia/get-arabica-11-address index 7083f7046..d93b39d58 100755 --- a/scripts/celestia/get-arabica-11-address +++ b/scripts/celestia/get-arabica-11-address @@ -1,3 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e cd ~/.celestia-light-arabica-11 cel-key list --node.type light --keyring-backend test --p2p.network arabica --output json | sed '1d' | jq -r '.[0].address' \ No newline at end of file diff --git a/scripts/celestia/get-local-address b/scripts/celestia/get-local-address index 2b0e54ff6..cdcad2776 100755 --- a/scripts/celestia/get-local-address +++ b/scripts/celestia/get-local-address @@ -1,2 +1,3 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e cel-key list --node.type light --keyring-backend test --home $APP_PATH --keyring-dir $APP_PATH --output json | sed '1d' | jq -r '.[0].address' \ No newline at end of file diff --git a/scripts/monza/faucet b/scripts/monza/faucet index 65b28bc9c..0bc6caa4a 100755 --- a/scripts/monza/faucet +++ b/scripts/monza/faucet @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e # Copy the directory from the Nix store to a temporary location temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos diff --git a/scripts/preludes/m1-da-light-node/prelude b/scripts/preludes/m1-da-light-node/prelude index 0a18f3cf4..4b3d9c4ad 100755 --- a/scripts/preludes/m1-da-light-node/prelude +++ b/scripts/preludes/m1-da-light-node/prelude @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/monza-full-node/prelude index 11cd19db6..eba651e01 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/monza-full-node/prelude @@ -1,4 +1,5 @@ -#!/bin/bash -e +#!/usr/bin/env bash +set -e export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env From 3dd9ac6a8c306751b21ad85d53789806c99076f3 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 23:04:01 -0400 Subject: [PATCH 035/101] feat: add docker image flow. --- .cargo/config.toml | 9 +++++++ .github/workflows/containers.yml | 26 +++++++++++++++++++ docker/build/m1-da-light-node/Dockerfile | 3 +-- docker/build/movement/Dockerfile | 11 ++++++++ flake.nix | 1 - justfile | 4 ++- networks/monza/monza-full-node/src/partial.rs | 2 +- .../suzuka/suzuka-full-node/src/partial.rs | 2 +- .../src/test/e2e/raw/passthrough.rs | 4 +-- .../src/test/e2e/raw/sequencer.rs | 2 +- protocol-units/da/m1/light-node/src/v1/mod.rs | 2 +- scripts/celestia/celestia-local-bridge | 2 +- scripts/docker/build-push-image | 2 ++ scripts/movement/build-push-image | 3 +++ test | 2 +- 15 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/containers.yml create mode 100644 docker/build/movement/Dockerfile create mode 100755 scripts/docker/build-push-image create mode 100755 scripts/movement/build-push-image diff --git a/.cargo/config.toml b/.cargo/config.toml index eeb443f5d..bad1b2c66 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -21,6 +21,15 @@ rustflags = ["--cfg", "tokio_unstable", "-C", "force-frame-pointers=yes", "-C", [target.x86_64-unknown-linux-gnu] rustflags = ["--cfg", "tokio_unstable", "-C", "link-arg=-fuse-ld=lld", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes", "-C", "target-feature=+sse4.2"] +[target.aarch64-unknown-linux-gnu] +rustflags = [ + "--cfg", "tokio_unstable", + "-C", "link-arg=-fuse-ld=lld", + "-C", "force-frame-pointers=yes", + "-C", "force-unwind-tables=yes", + "-C", "target-feature=+neon" +] + # 64 bit MSVC [target.x86_64-pc-windows-msvc] rustflags = [ diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml new file mode 100644 index 000000000..0bbbd9895 --- /dev/null +++ b/.github/workflows/containers.yml @@ -0,0 +1,26 @@ +name: Checks + +on: + push: + +jobs: + containers: + + runs-on: movement-runner + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and Push Docker image movement + run: | + ./scripts/movement/build-push-image movement \ No newline at end of file diff --git a/docker/build/m1-da-light-node/Dockerfile b/docker/build/m1-da-light-node/Dockerfile index e1984470a..9b42922bb 100644 --- a/docker/build/m1-da-light-node/Dockerfile +++ b/docker/build/m1-da-light-node/Dockerfile @@ -8,5 +8,4 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "echo built" - + develop --command bash -c "cargo build" diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile new file mode 100644 index 000000000..7007b3562 --- /dev/null +++ b/docker/build/movement/Dockerfile @@ -0,0 +1,11 @@ +# Nix builder +FROM nixos/nix:latest + +# Copy our source and setup our working dir. +COPY . /tmp/build +WORKDIR /tmp/build + +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + develop --command bash -c "cargo build" \ No newline at end of file diff --git a/flake.nix b/flake.nix index 182211425..50e3b2407 100644 --- a/flake.nix +++ b/flake.nix @@ -120,7 +120,6 @@ shellHook = '' #!/usr/bin/env bash export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1) - install-foundry cat <<'EOF' _ _ __ _ _ ____ _ _ ____ __ _ ____ ( \/ ) / \ / )( \( __)( \/ )( __)( ( \(_ _) diff --git a/justfile b/justfile index 859fec5de..292abba35 100644 --- a/justfile +++ b/justfile @@ -4,4 +4,6 @@ m1-da-light-node FEATURES *ARGS: monza-full-node FEATURES *ARGS: ./scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} mcr-contract-tests: - cd ./protocol-units/settlement/mcr/contracts && forge test \ No newline at end of file + cd ./protocol-units/settlement/mcr/contracts && forge test +build-push-container {{ IMAGE }}: + ./scripts/movement/build-push-image {{ IMAGE }} \ No newline at end of file diff --git a/networks/monza/monza-full-node/src/partial.rs b/networks/monza/monza-full-node/src/partial.rs index a262d11b2..7f364e293 100644 --- a/networks/monza/monza-full-node/src/partial.rs +++ b/networks/monza/monza-full-node/src/partial.rs @@ -223,7 +223,7 @@ impl MonzaPartialNode { pub async fn try_from_env() -> Result { let (tx, _) = async_channel::unbounded(); - let light_node_client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let light_node_client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let executor = MonzaExecutorV1::try_from_env(tx).await.context( "Failed to get executor from environment" )?; diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 94534bcd9..5617b298d 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -223,7 +223,7 @@ impl SuzukaPartialNode { pub async fn try_from_env() -> Result { let (tx, _) = async_channel::unbounded(); - let light_node_client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let light_node_client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let executor = SuzukaExecutorV1::try_from_env(tx).await.context( "Failed to get executor from environment" )?; diff --git a/protocol-units/da/m1/light-node-client/src/test/e2e/raw/passthrough.rs b/protocol-units/da/m1/light-node-client/src/test/e2e/raw/passthrough.rs index 92687bc4e..1ec82f88f 100644 --- a/protocol-units/da/m1/light-node-client/src/test/e2e/raw/passthrough.rs +++ b/protocol-units/da/m1/light-node-client/src/test/e2e/raw/passthrough.rs @@ -6,7 +6,7 @@ use tokio_stream::StreamExt; #[tokio::test] async fn test_light_node_submits_blob_over_stream() -> Result<(), anyhow::Error>{ - let mut client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let mut client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let blob_write = BlobWrite { data : vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9] @@ -54,7 +54,7 @@ async fn test_light_node_submits_blob_over_stream() -> Result<(), anyhow::Error> #[tokio::test] async fn test_submit_and_read() -> Result<(), anyhow::Error>{ - let mut client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let mut client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let data = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; let blob_write = BlobWrite { diff --git a/protocol-units/da/m1/light-node-client/src/test/e2e/raw/sequencer.rs b/protocol-units/da/m1/light-node-client/src/test/e2e/raw/sequencer.rs index 02d568559..8497c7e1c 100644 --- a/protocol-units/da/m1/light-node-client/src/test/e2e/raw/sequencer.rs +++ b/protocol-units/da/m1/light-node-client/src/test/e2e/raw/sequencer.rs @@ -5,7 +5,7 @@ use movement_types::Block; #[tokio::test] async fn test_light_node_submits_blob_over_stream() -> Result<(), anyhow::Error>{ - let mut client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let mut client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let data = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; let blob_write = BlobWrite { diff --git a/protocol-units/da/m1/light-node/src/v1/mod.rs b/protocol-units/da/m1/light-node/src/v1/mod.rs index 6cba1419a..506d55af1 100644 --- a/protocol-units/da/m1/light-node/src/v1/mod.rs +++ b/protocol-units/da/m1/light-node/src/v1/mod.rs @@ -34,7 +34,7 @@ pub trait LightNodeV1Operations : LightNodeService + Send + Sync + Sized + Clone .register_encoded_file_descriptor_set(m1_da_light_node_grpc::FILE_DESCRIPTOR_SET) .build()?; - let env_addr = std::env::var("M1_DA_LIGHT_NODE_ADDR").unwrap_or_else(|_| "[::1]:30730".to_string()); + let env_addr = std::env::var("M1_DA_LIGHT_NODE_ADDR").unwrap_or_else(|_| "0.0.0.0:30730".to_string()); let addr = env_addr.parse()?; Server::builder() diff --git a/scripts/celestia/celestia-local-bridge b/scripts/celestia/celestia-local-bridge index 4c5590d65..ecd9a9b54 100755 --- a/scripts/celestia/celestia-local-bridge +++ b/scripts/celestia/celestia-local-bridge @@ -30,7 +30,7 @@ echo "$CELESTIA_CUSTOM" celestia bridge init --node.store $NODE_PATH celestia bridge start \ --node.store $NODE_PATH --gateway \ - --core.ip 127.0.0.1 \ + --core.ip 0.0.0.0 \ --keyring.accname validator \ --gateway.addr 0.0.0.0 \ --rpc.addr 0.0.0.0 \ \ No newline at end of file diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image new file mode 100755 index 000000000..712f79735 --- /dev/null +++ b/scripts/docker/build-push-image @@ -0,0 +1,2 @@ +#!/usr/env/bin bash +docker build -f $1 -t $2:$(git rev-parse HEAD) . --push \ No newline at end of file diff --git a/scripts/movement/build-push-image b/scripts/movement/build-push-image new file mode 100755 index 000000000..349e4cc4d --- /dev/null +++ b/scripts/movement/build-push-image @@ -0,0 +1,3 @@ +#!/usr/env/bin bash +FILE_PATH=./docker/build/$1/Dockerfile +./scripts/docker/build-push-image $FILE_PATH mvlbs $1 \ No newline at end of file diff --git a/test b/test index dc75c2118..4ec66b8dd 100755 --- a/test +++ b/test @@ -1,2 +1,2 @@ #!/usr/bin/env bash -docker run --entrypoint "nix" m1-da-light-node --extra-experimental-features "nix-command flakes" develop --command just monza-full-node test.local -t=false \ No newline at end of file +docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" \ No newline at end of file From ef3dc9f16c84ab5ffcbef841f08a64eb0fd89711 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 23:14:34 -0400 Subject: [PATCH 036/101] fix: should be named containers. --- .github/workflows/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 0bbbd9895..160c485c2 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -1,4 +1,4 @@ -name: Checks +name: Containers on: push: From cc67080d241a7dc7c2cfa4fce82a442b944f50ac Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 23:16:18 -0400 Subject: [PATCH 037/101] fix: should be named containers. --- .github/workflows/containers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 160c485c2..1627718d2 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -19,8 +19,8 @@ jobs: uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Build and Push Docker image movement run: | - ./scripts/movement/build-push-image movement \ No newline at end of file + ./scripts/movement/build-push-image movement \ No newline at end of file From f14f6bedcab22335ae351a9d50e69695b775db5d Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 23:24:06 -0400 Subject: [PATCH 038/101] fix: see if shell: bash fixes. --- .github/workflows/containers.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 1627718d2..b7504cbb2 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -23,4 +23,5 @@ jobs: - name: Build and Push Docker image movement run: | - ./scripts/movement/build-push-image movement \ No newline at end of file + ./scripts/movement/build-push-image movement + shell: bash \ No newline at end of file From dc2a94f54c94b859f403d0958ffda665e017b09d Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 16 May 2024 23:34:10 -0400 Subject: [PATCH 039/101] fix: dropping /usr/bin/env for now. --- justfile | 2 +- scripts/docker/build-push-image | 2 +- scripts/movement/build-push-image | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index 292abba35..e127e93de 100644 --- a/justfile +++ b/justfile @@ -5,5 +5,5 @@ monza-full-node FEATURES *ARGS: ./scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} mcr-contract-tests: cd ./protocol-units/settlement/mcr/contracts && forge test -build-push-container {{ IMAGE }}: +build-push-container IMAGE: ./scripts/movement/build-push-image {{ IMAGE }} \ No newline at end of file diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 712f79735..881502b1c 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,2 +1,2 @@ -#!/usr/env/bin bash +#!/bin/bash docker build -f $1 -t $2:$(git rev-parse HEAD) . --push \ No newline at end of file diff --git a/scripts/movement/build-push-image b/scripts/movement/build-push-image index 349e4cc4d..e3afa3441 100755 --- a/scripts/movement/build-push-image +++ b/scripts/movement/build-push-image @@ -1,3 +1,3 @@ -#!/usr/env/bin bash +#!/bin/bash FILE_PATH=./docker/build/$1/Dockerfile ./scripts/docker/build-push-image $FILE_PATH mvlbs $1 \ No newline at end of file From 0344a206d36905a228063844249f0b0bad08ff3c Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 17 May 2024 13:52:52 +0300 Subject: [PATCH 040/101] opt-executor: copy block metadata trick Replicate the simulated block metadata tx injection to the test_execute_block_state_get_api test. --- .../maptos/opt-executor/src/executor.rs | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index f357e83c3..bd15b59d0 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -667,8 +667,37 @@ mod tests { // Simulate the execution of multiple blocks. for _ in 0..10 { // For example, create and execute 3 blocks. + let (epoch, round) = executor.get_next_epoch_and_round().await?; + let block_id = HashValue::random(); // Generate a random block ID for each block. - + + // Clone the signer from the executor for signing the metadata. + let signer = executor.signer.clone(); + // Get the current time in microseconds for the block timestamp. + let current_time_micros = chrono::Utc::now().timestamp_micros() as u64; + + // Create a block metadata transaction. + let block_metadata = Transaction::BlockMetadata(BlockMetadata::new( + block_id, + epoch, + round, + signer.author(), + vec![], + vec![], + current_time_micros, + )); + // Block Metadata + let transactions = ExecutableTransactions::Unsharded( + into_signature_verified_block(vec![ + block_metadata, + ]) + ); + let block = ExecutableBlock::new(block_id.clone(), transactions); + executor.execute_block(block).await?; + + // Next block + let block_id = HashValue::random(); + // Generate new accounts and create transactions for each block. let mut transactions = Vec::new(); let mut transaction_hashes = Vec::new(); From b013d3e45cabed0c90de75d89ce9cc23b6feb9d7 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 17 May 2024 17:22:54 +0300 Subject: [PATCH 041/101] mcr-settlement-manager: flesh out logic --- Cargo.lock | 2 +- .../settlement/mcr/manager/src/lib.rs | 7 +- .../settlement/mcr/manager/src/manager.rs | 115 +++++++++++++++++- util/movement-types/src/lib.rs | 5 +- 4 files changed, 117 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 860de1dea..19d6aefa9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10177,7 +10177,7 @@ dependencies = [ "async-channel", "env_logger 0.11.3", "m1-da-light-node-client", - "mcr-settlement-client", + "mcr-settlement-manager", "movement-types", "serde_json", "sha2 0.10.8", diff --git a/protocol-units/settlement/mcr/manager/src/lib.rs b/protocol-units/settlement/mcr/manager/src/lib.rs index 7e6c1ca10..bd10f90e4 100644 --- a/protocol-units/settlement/mcr/manager/src/lib.rs +++ b/protocol-units/settlement/mcr/manager/src/lib.rs @@ -1,7 +1,9 @@ use movement_types::{BlockCommitment, BlockCommitmentEvent}; use tokio_stream::Stream; -pub mod manager; +mod manager; + +pub use manager::Manager as McrSettlementManager; type CommitmentEventStream = std::pin::Pin> + Send>>; @@ -15,7 +17,4 @@ pub trait McrSettlementManagerOperations { block_commitment: BlockCommitment, ) -> Result<(), anyhow::Error>; - /// Streams block commitment events. - async fn stream_block_commitment_events(&self) -> Result; - } diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 4525cde1d..7d07293b1 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -1,11 +1,114 @@ -use mcr_settlement_client::{McrSettlementClient, /*McrSettlementClientOperations*/}; +use crate::{BlockCommitmentEvent, CommitmentEventStream, McrSettlementManagerOperations}; +use mcr_settlement_client::McrSettlementClientOperations; +use movement_types::{BlockCommitment, BlockCommitmentRejectionReason}; + +use async_stream::try_stream; +use async_trait::async_trait; +use tokio::sync::mpsc; +use tokio_stream::StreamExt; + +use std::collections::BTreeMap; +use std::future::Future; +use std::mem; + +/// Public handle for the MCR settlement manager. pub struct Manager { - pub client: McrSettlementClient, + sender: mpsc::Sender, +} + +struct BackgroundTask { + receiver: mpsc::Receiver, + client: C, + event_sender: mpsc::Sender, } impl Manager { - pub fn new(client: McrSettlementClient) -> Self { - Self { client } - } -} \ No newline at end of file + /// Creates a new MCR settlement manager. + /// + /// Returns the handle with the public API, the stream to receive commitment events, + /// and a future that drives the background task. + pub fn new( + client: C, + ) -> (Self, CommitmentEventStream, impl Future> + Send) { + let (sender, receiver) = mpsc::channel(16); + let (event_sender, mut event_receiver) = mpsc::channel(16); + let event_stream = Box::pin(try_stream! { + while let Some(event) = event_receiver.recv().await { + yield event; + } + }); + let task = BackgroundTask { receiver, client, event_sender }; + (Self { sender }, event_stream, task.run()) + } +} + +#[async_trait] +impl McrSettlementManagerOperations for Manager { + async fn post_block_commitment( + &self, + block_commitment: BlockCommitment, + ) -> Result<(), anyhow::Error> { + self.sender.send(block_commitment).await?; + Ok(()) + } +} + +impl BackgroundTask { + async fn run(mut self) -> Result<(), anyhow::Error> { + let mut settlement_stream = self.client.stream_block_commitments().await?; + let mut max_height = self.client.get_max_tolerable_block_height().await?; + let mut ahead_of_settlement = false; + let mut commitments_to_settle = BTreeMap::new(); + let mut batch_acc = Vec::new(); + loop { + tokio::select! { + Some(block_commitment) = self.receiver.recv(), if !ahead_of_settlement => { + println!("Received commitment: {:?}", block_commitment); + commitments_to_settle.insert( + block_commitment.height, + block_commitment.commitment.clone(), + ); + if block_commitment.height > max_height { + ahead_of_settlement = true; + let batch = mem::replace(&mut batch_acc, Vec::new()); + self.client.post_block_commitment_batch(batch).await?; + } + batch_acc.push(block_commitment); + } + Some(res) = settlement_stream.next() => { + let settled_commitment = res?; + println!("Received settlement: {:?}", settled_commitment); + let height = settled_commitment.height; + if let Some(commitment) = commitments_to_settle.remove(&height) { + let event = if commitment == settled_commitment.commitment { + BlockCommitmentEvent::Accepted(settled_commitment) + } else { + BlockCommitmentEvent::Rejected { + height, + reason: BlockCommitmentRejectionReason::InvalidCommitment, + } + }; + self.event_sender.send(event).await?; + } else if let Some((&lh, _)) = commitments_to_settle.last_key_value() { + if lh < height { + // Settlement has left some commitments behind, but the client could + // deliver them of order? + todo!("Handle falling behind on settlement") + } + } + // Remove back-pressure if we can proceed settling new blocks. + if ahead_of_settlement { + let new_max_height = self.client.get_max_tolerable_block_height().await?; + if new_max_height > max_height { + max_height = new_max_height; + ahead_of_settlement = false; + } + } + } + else => break + } + } + Ok(()) + } +} diff --git a/util/movement-types/src/lib.rs b/util/movement-types/src/lib.rs index 024e50e77..4587a0ebf 100644 --- a/util/movement-types/src/lib.rs +++ b/util/movement-types/src/lib.rs @@ -189,5 +189,8 @@ pub enum BlockCommitmentRejectionReason { #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub enum BlockCommitmentEvent { Accepted(BlockCommitment), - Rejected(BlockCommitment, BlockCommitmentRejectionReason), + Rejected { + height: u64, + reason: BlockCommitmentRejectionReason, + }, } \ No newline at end of file From bdcfb377b732b3f9450e67310cd7fc510f7aec8d Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 17 May 2024 23:27:30 +0300 Subject: [PATCH 042/101] mcr-settlement-manager: revamp API Merge the background task and the event stream into a single stream instance, eliminating an internal channel. --- Cargo.lock | 1 + networks/suzuka/suzuka-full-node/Cargo.toml | 1 + networks/suzuka/suzuka-full-node/src/main.rs | 4 +- .../suzuka/suzuka-full-node/src/partial.rs | 380 +++++++----------- .../settlement/mcr/manager/src/lib.rs | 2 +- .../settlement/mcr/manager/src/manager.rs | 63 +-- 6 files changed, 193 insertions(+), 258 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19d6aefa9..cd5999e64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10177,6 +10177,7 @@ dependencies = [ "async-channel", "env_logger 0.11.3", "m1-da-light-node-client", + "mcr-settlement-client", "mcr-settlement-manager", "movement-types", "serde_json", diff --git a/networks/suzuka/suzuka-full-node/Cargo.toml b/networks/suzuka/suzuka-full-node/Cargo.toml index db5f54c36..492a7aeda 100644 --- a/networks/suzuka/suzuka-full-node/Cargo.toml +++ b/networks/suzuka/suzuka-full-node/Cargo.toml @@ -15,6 +15,7 @@ rust-version = { workspace = true } suzuka-executor = { workspace = true } m1-da-light-node-client = { workspace = true } mcr-settlement-client = { workspace = true } +mcr-settlement-manager = { workspace = true } async-channel = { workspace = true } serde_json = { workspace = true } anyhow = { workspace = true } diff --git a/networks/suzuka/suzuka-full-node/src/main.rs b/networks/suzuka/suzuka-full-node/src/main.rs index d98db0ea3..939e2c866 100644 --- a/networks/suzuka/suzuka-full-node/src/main.rs +++ b/networks/suzuka/suzuka-full-node/src/main.rs @@ -18,10 +18,12 @@ async fn main() -> Result<(), anyhow::Error> { } - let executor = SuzukaPartialNode::try_from_env().await.context( + let (executor, background_task) = SuzukaPartialNode::try_from_env().await.context( "Failed to create the executor" )?; + tokio::spawn(background_task); + executor.run().await.context( "Failed to run the executor" )?; diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index bc8adf21b..4054dd27c 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -1,71 +1,78 @@ -use std::{sync::Arc, time::Duration, collections::BTreeMap}; - -use anyhow::Context; +use crate::SuzukaFullNode; +use m1_da_light_node_client::{ + blob_response, BatchWriteRequest, BlobWrite, LightNodeServiceClient, + StreamReadFromHeightRequest, +}; +use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; +use mcr_settlement_manager::{ + CommitmentEventStream, McrSettlementManager, McrSettlementManagerOperations, +}; +use movement_types::{Block, BlockCommitmentEvent}; use suzuka_executor::{ - SuzukaExecutor, - ExecutableBlock, - HashValue, - FinalityMode, - Transaction, - SignatureVerifiedTransaction, - SignedTransaction, - ExecutableTransactions, - v1::SuzukaExecutorV1, + v1::SuzukaExecutorV1, ExecutableBlock, ExecutableTransactions, FinalityMode, HashValue, + SignatureVerifiedTransaction, SignedTransaction, SuzukaExecutor, Transaction, }; -use m1_da_light_node_client::*; -use async_channel::{Sender, Receiver}; + +use anyhow::Context; +use async_channel::{Receiver, Sender}; use sha2::Digest; -use crate::*; -use tokio_stream::StreamExt; -use tokio::sync::mpsc::{self, error::TrySendError}; use tokio::sync::RwLock; -use movement_types::{Block, BlockCommitment}; -use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; +use tokio_stream::StreamExt; -#[derive(Clone)] -pub struct SuzukaPartialNode -{ - executor: T, - transaction_sender : Sender, - pub transaction_receiver : Receiver, - light_node_client: Arc>>, - settlement_client: Arc, +use std::future::Future; +use std::sync::Arc; +use std::time::Duration; + +pub struct SuzukaPartialNode { + executor: T, + transaction_sender: Sender, + pub transaction_receiver: Receiver, + light_node_client: Arc>>, + settlement_manager: McrSettlementManager, } -impl SuzukaPartialNode +impl SuzukaPartialNode where - T: SuzukaExecutor + Send + Sync, - C: McrSettlementClientOperations + Send + Sync + 'static, + T: SuzukaExecutor + Send + Sync, { - - pub fn new( - executor: T, - light_node_client: LightNodeServiceClient, - settlement_client: C, - ) -> Self { - let (transaction_sender, transaction_receiver) = async_channel::unbounded(); - Self { - executor : executor, - transaction_sender, - transaction_receiver, - light_node_client : Arc::new(RwLock::new(light_node_client)), - settlement_client: Arc::new(settlement_client) - } - } + pub fn new( + executor: T, + light_node_client: LightNodeServiceClient, + settlement_client: C, + ) -> (Self, impl Future> + Send) + where + C: McrSettlementClientOperations + Send + 'static, + { + let (settlement_manager, commitment_events) = McrSettlementManager::new(settlement_client); + let (transaction_sender, transaction_receiver) = async_channel::unbounded(); + ( + Self { + executor, + transaction_sender, + transaction_receiver, + light_node_client: Arc::new(RwLock::new(light_node_client)), + settlement_manager, + }, + read_commitment_events(commitment_events), + ) + } fn bind_transaction_channel(&mut self) { self.executor.set_tx_channel(self.transaction_sender.clone()); } - pub fn bound( + pub fn bound( executor: T, light_node_client: LightNodeServiceClient, - settlement_client: C, - ) -> Result { - let mut node = Self::new(executor, light_node_client, settlement_client); + settlement_client: C, + ) -> Result<(Self, impl Future> + Send), anyhow::Error> + where + C: McrSettlementClientOperations + Send + 'static, + { + let (mut node, background_task) = Self::new(executor, light_node_client, settlement_client); node.bind_transaction_channel(); - Ok(node) - } + Ok((node, background_task)) + } pub async fn tick_write_transactions_to_da(&self) -> Result<(), anyhow::Error> { @@ -126,8 +133,6 @@ where let block_head_height = self.executor.get_block_head_height().await?; - let (sender, receiver) = mpsc::channel(16); - let mut stream = { let client_ptr = self.light_node_client.clone(); let mut light_node_client = client_ptr.write().await; @@ -138,190 +143,111 @@ where ).await? }.into_inner(); - let settlement_client = self.settlement_client.clone(); - let mut commitment_stream = settlement_client.stream_block_commitments().await?; - let mut commitments_to_settle = BTreeMap::new(); - - tokio::spawn(async move { - if let Err(e) = process_commitments(receiver, settlement_client).await { - eprintln!("Error processing commitments: {:?}", e); - } - }); - - loop { - tokio::select! { - Some(blob) = stream.next() => { - println!("Block stream hot!"); - let block_commitment = parse_and_execute_block(blob?, &self.executor).await?; - commitments_to_settle.insert( - block_commitment.height, - block_commitment.commitment.clone(), - ); - match sender.try_send(block_commitment) { - Ok(_) => {}, - Err(TrySendError::Closed(_)) => { - break; - }, - Err(TrySendError::Full(_commitment)) => { - println!("Commitment channel full, dropping commitment"); - } - } - }, - Some(res) = commitment_stream.next() => { - let settled_commitment = res?; - let height = settled_commitment.height; - if let Some(commitment) = commitments_to_settle.remove(&height) { - if commitment != settled_commitment.commitment { - println!("Commitment mismatch at height {}: expected {:?}, got {:?}", height, commitment, settled_commitment.commitment); - } - } else { - println!("No block commitment found for height {}", height); - } - }, - else => { - println!("Streams ended"); - break; - } - } - } - - Ok(()) - - } - -} - -async fn parse_and_execute_block( - block_data: StreamReadFromHeightResponse, - executor: &T, -) -> Result -where - T: SuzukaExecutor, -{ - // get the block - let block_bytes = match block_data.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { - blob_response::BlobType::SequencedBlobBlock(blob) => { - blob.data - }, - _ => { anyhow::bail!("Invalid blob type in response") } - }; - - // get the block - let block : Block = serde_json::from_slice(&block_bytes)?; - println!("Received block: {:?}", block); - - // get the transactions - let mut block_transactions = Vec::new(); - for transaction in block.transactions { - let signed_transaction : SignedTransaction = serde_json::from_slice(&transaction.0)?; - let signature_verified_transaction = SignatureVerifiedTransaction::Valid( - Transaction::UserTransaction( - signed_transaction - ) - ); - block_transactions.push(signature_verified_transaction); - } - - // form the executable transactions vec - let block = ExecutableTransactions::Unsharded( - block_transactions - ); - - // hash the block bytes - let mut hasher = sha2::Sha256::new(); - hasher.update(&block_bytes); - let slice = hasher.finalize(); - let block_hash = HashValue::from_slice(slice.as_slice())?; - - // form the executable block and execute it - let executable_block = ExecutableBlock::new( - block_hash, - block - ); - let block_id = executable_block.block_id; - let block_commitment = executor.execute_block( - FinalityMode::Opt, - executable_block - ).await?; - - println!("Executed block: {:?}", block_id); - - Ok(block_commitment) + while let Some(blob) = stream.next().await { + println!("Stream hot!"); + // get the block + let block_bytes = match blob? + .blob + .ok_or(anyhow::anyhow!("No blob in response"))? + .blob_type + .ok_or(anyhow::anyhow!("No blob type in response"))? + { + blob_response::BlobType::SequencedBlobBlock(blob) => blob.data, + _ => { + anyhow::bail!("Invalid blob type in response") + }, + }; + + // get the block + let block: Block = serde_json::from_slice(&block_bytes)?; + println!("Received block: {:?}", block); + + // get the transactions + let mut block_transactions = Vec::new(); + for transaction in block.transactions { + let signed_transaction: SignedTransaction = serde_json::from_slice(&transaction.0)?; + let signature_verified_transaction = SignatureVerifiedTransaction::Valid( + Transaction::UserTransaction(signed_transaction), + ); + block_transactions.push(signature_verified_transaction); + } + + // form the executable transactions vec + let block = ExecutableTransactions::Unsharded(block_transactions); + + // hash the block bytes + let mut hasher = sha2::Sha256::new(); + hasher.update(&block_bytes); + let slice = hasher.finalize(); + let block_hash = HashValue::from_slice(slice.as_slice())?; + + // form the executable block and execute it + let executable_block = ExecutableBlock::new(block_hash, block); + let block_id = executable_block.block_id; + let commitment = + self.executor.execute_block(FinalityMode::Opt, executable_block).await?; + + println!("Executed block: {:?}", block_id); + + self.settlement_manager.post_block_commitment(commitment).await?; + } + + Ok(()) + } } -async fn process_commitments( - mut receiver: mpsc::Receiver, - settlement_client: Arc, -) -> Result<(), anyhow::Error> -where - C: McrSettlementClientOperations, -{ - while let Some(commitment) = receiver.recv().await { - println!("Got commitment: {:?}", commitment); - let max_height = settlement_client.get_max_tolerable_block_height().await?; - if commitment.height > max_height { - println!( - "Commitment height {} is greater than max tolerable height {}, skipping.", - commitment.height, max_height - ); - continue; - } - settlement_client.post_block_commitment(commitment).await?; - } - Ok(()) +async fn read_commitment_events(mut stream: CommitmentEventStream) -> anyhow::Result<()> { + while let Some(res) = stream.next().await { + let event = res?; + match event { + BlockCommitmentEvent::Accepted(commitment) => { + println!("Commitment accepted: {:?}", commitment); + }, + BlockCommitmentEvent::Rejected { height, reason } => { + println!("Commitment at height {height} rejected: {reason:?}"); + }, + } + } + Ok(()) } -impl SuzukaFullNode for SuzukaPartialNode +impl SuzukaFullNode for SuzukaPartialNode where - T: SuzukaExecutor + Send + Sync, - C: McrSettlementClientOperations + Send + Sync + 'static, + T: SuzukaExecutor + Send + Sync, { - - /// Runs the services until crash or shutdown. - async fn run_services(&self) -> Result<(), anyhow::Error> { - - self.executor.run_service().await?; - - Ok(()) + /// Runs the services until crash or shutdown. + async fn run_services(&self) -> Result<(), anyhow::Error> { + self.executor.run_service().await?; - } - - /// Runs the background tasks until crash or shutdown. - async fn run_background_tasks(&self) -> Result<(), anyhow::Error> { - - self.executor.run_background_tasks().await?; - - Ok(()) - - } - - // ! Currently this only implements opt. - /// Runs the executor until crash or shutdown. - async fn run_executor(&self) -> Result<(), anyhow::Error> { + Ok(()) + } - // wait for both tasks to finish - tokio::try_join!( - self.write_transactions_to_da(), - self.read_blocks_from_da() - )?; + /// Runs the background tasks until crash or shutdown. + async fn run_background_tasks(&self) -> Result<(), anyhow::Error> { + self.executor.run_background_tasks().await?; - Ok(()) - + Ok(()) + } - } + // ! Currently this only implements opt. + /// Runs the executor until crash or shutdown. + async fn run_executor(&self) -> Result<(), anyhow::Error> { + // wait for both tasks to finish + tokio::try_join!(self.write_transactions_to_da(), self.read_blocks_from_da())?; + Ok(()) + } } -impl SuzukaPartialNode { - - pub async fn try_from_env() -> Result { - let (tx, _) = async_channel::unbounded(); - let light_node_client = LightNodeServiceClient::connect("http://[::1]:30730").await?; - let executor = SuzukaExecutorV1::try_from_env(tx).await.context( - "Failed to get executor from environment" - )?; - let settlement_client = McrSettlementClient::new(); - Self::bound(executor, light_node_client, settlement_client) - } - -} \ No newline at end of file +impl SuzukaPartialNode { + pub async fn try_from_env( + ) -> Result<(Self, impl Future> + Send), anyhow::Error> { + let (tx, _) = async_channel::unbounded(); + let light_node_client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let executor = SuzukaExecutorV1::try_from_env(tx) + .await + .context("Failed to get executor from environment")?; + let settlement_client = McrSettlementClient::new(); + Self::bound(executor, light_node_client, settlement_client) + } +} diff --git a/protocol-units/settlement/mcr/manager/src/lib.rs b/protocol-units/settlement/mcr/manager/src/lib.rs index bd10f90e4..287b806b7 100644 --- a/protocol-units/settlement/mcr/manager/src/lib.rs +++ b/protocol-units/settlement/mcr/manager/src/lib.rs @@ -5,7 +5,7 @@ mod manager; pub use manager::Manager as McrSettlementManager; -type CommitmentEventStream = +pub type CommitmentEventStream = std::pin::Pin> + Send>>; #[async_trait::async_trait] diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 7d07293b1..2d9b3f8fe 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -3,13 +3,12 @@ use crate::{BlockCommitmentEvent, CommitmentEventStream, McrSettlementManagerOpe use mcr_settlement_client::McrSettlementClientOperations; use movement_types::{BlockCommitment, BlockCommitmentRejectionReason}; -use async_stream::try_stream; +use async_stream::stream; use async_trait::async_trait; use tokio::sync::mpsc; use tokio_stream::StreamExt; use std::collections::BTreeMap; -use std::future::Future; use std::mem; /// Public handle for the MCR settlement manager. @@ -17,29 +16,17 @@ pub struct Manager { sender: mpsc::Sender, } -struct BackgroundTask { - receiver: mpsc::Receiver, - client: C, - event_sender: mpsc::Sender, -} - impl Manager { /// Creates a new MCR settlement manager. /// /// Returns the handle with the public API, the stream to receive commitment events, /// and a future that drives the background task. - pub fn new( + pub fn new( client: C, - ) -> (Self, CommitmentEventStream, impl Future> + Send) { + ) -> (Self, CommitmentEventStream) { let (sender, receiver) = mpsc::channel(16); - let (event_sender, mut event_receiver) = mpsc::channel(16); - let event_stream = Box::pin(try_stream! { - while let Some(event) = event_receiver.recv().await { - yield event; - } - }); - let task = BackgroundTask { receiver, client, event_sender }; - (Self { sender }, event_stream, task.run()) + let event_stream = process_commitments(receiver, client); + (Self { sender }, event_stream) } } @@ -54,16 +41,20 @@ impl McrSettlementManagerOperations for Manager { } } -impl BackgroundTask { - async fn run(mut self) -> Result<(), anyhow::Error> { - let mut settlement_stream = self.client.stream_block_commitments().await?; - let mut max_height = self.client.get_max_tolerable_block_height().await?; +fn process_commitments( + mut receiver: mpsc::Receiver, + client: C, +) -> CommitmentEventStream { + // Can't mix try_stream! and select!, see https://github.com/tokio-rs/async-stream/issues/63 + Box::pin(stream! { + let mut settlement_stream = client.stream_block_commitments().await?; + let mut max_height = client.get_max_tolerable_block_height().await?; let mut ahead_of_settlement = false; let mut commitments_to_settle = BTreeMap::new(); let mut batch_acc = Vec::new(); loop { tokio::select! { - Some(block_commitment) = self.receiver.recv(), if !ahead_of_settlement => { + Some(block_commitment) = receiver.recv(), if !ahead_of_settlement => { println!("Received commitment: {:?}", block_commitment); commitments_to_settle.insert( block_commitment.height, @@ -72,12 +63,21 @@ impl BackgroundTask { if block_commitment.height > max_height { ahead_of_settlement = true; let batch = mem::replace(&mut batch_acc, Vec::new()); - self.client.post_block_commitment_batch(batch).await?; + if let Err(e) = client.post_block_commitment_batch(batch).await { + yield Err(e); + break; + } } batch_acc.push(block_commitment); } Some(res) = settlement_stream.next() => { - let settled_commitment = res?; + let settled_commitment = match res { + Ok(commitment) => commitment, + Err(e) => { + yield Err(e); + break; + } + }; println!("Received settlement: {:?}", settled_commitment); let height = settled_commitment.height; if let Some(commitment) = commitments_to_settle.remove(&height) { @@ -89,7 +89,7 @@ impl BackgroundTask { reason: BlockCommitmentRejectionReason::InvalidCommitment, } }; - self.event_sender.send(event).await?; + yield Ok(event); } else if let Some((&lh, _)) = commitments_to_settle.last_key_value() { if lh < height { // Settlement has left some commitments behind, but the client could @@ -99,7 +99,13 @@ impl BackgroundTask { } // Remove back-pressure if we can proceed settling new blocks. if ahead_of_settlement { - let new_max_height = self.client.get_max_tolerable_block_height().await?; + let new_max_height = match client.get_max_tolerable_block_height().await { + Ok(h) => h, + Err(e) => { + yield Err(e); + break; + } + }; if new_max_height > max_height { max_height = new_max_height; ahead_of_settlement = false; @@ -109,6 +115,5 @@ impl BackgroundTask { else => break } } - Ok(()) - } + }) } From 98ee88dbae3a5acca72a65da07d1ed5d3d4e95cc Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Fri, 17 May 2024 22:09:24 -0400 Subject: [PATCH 043/101] fix: bumping to docker login v3. --- .github/workflows/containers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index b7504cbb2..8fdb6654c 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_TOKEN }} From 4c2231e9ce89d055a27ee9ad230a00a6c494f574 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Fri, 17 May 2024 22:09:49 -0400 Subject: [PATCH 044/101] fix: bumping to docker login v3. --- .github/workflows/containers.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 8fdb6654c..327915fd1 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -23,5 +23,4 @@ jobs: - name: Build and Push Docker image movement run: | - ./scripts/movement/build-push-image movement - shell: bash \ No newline at end of file + ./scripts/movement/build-push-image movement \ No newline at end of file From e073e339d911783fb43a7f532adfc26709919aeb Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Fri, 17 May 2024 22:29:14 -0400 Subject: [PATCH 045/101] fix: cleanup. --- protocol-units/execution/maptos/opt-executor/src/executor.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index bd15b59d0..68e9c4179 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -229,7 +229,6 @@ impl Executor { } /// Execute a block which gets committed to the state. - /// `ExecutorState` must be set to `Commit` before calling this method. pub async fn execute_block( &self, block: ExecutableBlock, From cfef413d454d5b4d82e5e187cda2225d98584809 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Fri, 17 May 2024 22:31:40 -0400 Subject: [PATCH 046/101] fix: trying build then push. --- scripts/docker/build-push-image | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 881502b1c..1f6dbaaf5 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,2 +1,4 @@ #!/bin/bash -docker build -f $1 -t $2:$(git rev-parse HEAD) . --push \ No newline at end of file +echo "Building docker image with tag $2:$(git rev-parse HEAD)" +docker build -f $1 -t $2:$(git rev-parse HEAD) . +docker push $2:$(git rev-parse HEAD) \ No newline at end of file From fb2558e6fd54c11c274a9e2af22c96a5f0f7158c Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Fri, 17 May 2024 22:32:41 -0400 Subject: [PATCH 047/101] fix: build. --- scripts/docker/build-push-image | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 1f6dbaaf5..16a8532dc 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,4 +1,4 @@ #!/bin/bash -echo "Building docker image with tag $2:$(git rev-parse HEAD)" -docker build -f $1 -t $2:$(git rev-parse HEAD) . -docker push $2:$(git rev-parse HEAD) \ No newline at end of file +echo "Building docker image with tag $2/$3:$(git rev-parse HEAD)" +docker build -f $1 -t $2/$3:$(git rev-parse HEAD) . +docker push $2/$3:$(git rev-parse HEAD) \ No newline at end of file From dcb82bfc6359b2201bef84f1dd82463f9ce785cd Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 00:22:36 -0400 Subject: [PATCH 048/101] fix: execution concurrency bug. --- Cargo.lock | 259 +++++++++--------- Cargo.toml | 52 ++-- flake.nix | 8 + .../maptos/opt-executor/src/executor.rs | 91 ++++-- 4 files changed, 224 insertions(+), 186 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd5999e64..5434663b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "abstract-domain-derive" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -211,7 +211,7 @@ checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "aptos-abstract-gas-usage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-gas-algebra", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "aptos-accumulator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -234,7 +234,7 @@ dependencies = [ [[package]] name = "aptos-aggregator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-logger", @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "aptos-api" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-api-types", @@ -295,7 +295,7 @@ dependencies = [ [[package]] name = "aptos-api-types" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-config", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "aptos-bcs-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "hex", @@ -334,7 +334,7 @@ dependencies = [ [[package]] name = "aptos-bitvec" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "serde", "serde_bytes", @@ -343,7 +343,7 @@ dependencies = [ [[package]] name = "aptos-block-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-aggregator", @@ -379,7 +379,7 @@ dependencies = [ [[package]] name = "aptos-block-partitioner" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "aptos-bounded-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "futures", "rustversion", @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "aptos-build-info" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "shadow-rs", ] @@ -419,7 +419,7 @@ dependencies = [ [[package]] name = "aptos-cached-packages" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-framework", @@ -434,7 +434,7 @@ dependencies = [ [[package]] name = "aptos-channels" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-infallible", @@ -446,7 +446,7 @@ dependencies = [ [[package]] name = "aptos-compression" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "aptos-config" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -492,7 +492,7 @@ dependencies = [ [[package]] name = "aptos-consensus-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-bitvec", @@ -504,20 +504,18 @@ dependencies = [ "aptos-short-hex-str", "aptos-types", "bcs 0.1.4", - "futures", "itertools 0.10.5", "mirai-annotations", "once_cell", "rand 0.7.3", "rayon", "serde", - "tokio", ] [[package]] name = "aptos-crypto" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto-derive", @@ -563,7 +561,7 @@ dependencies = [ [[package]] name = "aptos-crypto-derive" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -573,7 +571,7 @@ dependencies = [ [[package]] name = "aptos-data-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-config", "aptos-crypto", @@ -604,7 +602,7 @@ dependencies = [ [[package]] name = "aptos-db" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-accumulator", @@ -652,7 +650,7 @@ dependencies = [ [[package]] name = "aptos-db-indexer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-config", @@ -679,12 +677,11 @@ dependencies = [ [[package]] name = "aptos-dkg" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", "aptos-crypto-derive", - "aptos-runtimes", "bcs 0.1.4", "bellman", "blst", @@ -712,7 +709,7 @@ dependencies = [ [[package]] name = "aptos-drop-helper" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-experimental-runtimes", "aptos-infallible", @@ -724,7 +721,7 @@ dependencies = [ [[package]] name = "aptos-event-notifications" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-channels", @@ -741,7 +738,7 @@ dependencies = [ [[package]] name = "aptos-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -775,7 +772,7 @@ dependencies = [ [[package]] name = "aptos-executor-service" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -812,7 +809,7 @@ dependencies = [ [[package]] name = "aptos-executor-test-helpers" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-cached-packages", @@ -835,7 +832,7 @@ dependencies = [ [[package]] name = "aptos-executor-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -857,7 +854,7 @@ dependencies = [ [[package]] name = "aptos-experimental-runtimes" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-runtimes", "core_affinity", @@ -865,13 +862,12 @@ dependencies = [ "num_cpus", "once_cell", "rayon", - "tokio", ] [[package]] name = "aptos-faucet-core" version = "2.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-config", @@ -905,7 +901,7 @@ dependencies = [ [[package]] name = "aptos-faucet-metrics-server" version = "2.0.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-logger", @@ -920,7 +916,7 @@ dependencies = [ [[package]] name = "aptos-framework" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-aggregator", @@ -995,7 +991,7 @@ dependencies = [ [[package]] name = "aptos-gas-algebra" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "either", "move-core-types", @@ -1004,7 +1000,7 @@ dependencies = [ [[package]] name = "aptos-gas-meter" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-gas-algebra", "aptos-gas-schedule", @@ -1020,7 +1016,7 @@ dependencies = [ [[package]] name = "aptos-gas-profiling" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-framework", @@ -1043,7 +1039,7 @@ dependencies = [ [[package]] name = "aptos-gas-schedule" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-gas-algebra", "aptos-global-constants", @@ -1058,7 +1054,7 @@ dependencies = [ [[package]] name = "aptos-genesis" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-cached-packages", @@ -1083,22 +1079,22 @@ dependencies = [ [[package]] name = "aptos-global-constants" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" [[package]] name = "aptos-id-generator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" [[package]] name = "aptos-infallible" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" [[package]] name = "aptos-jellyfish-merkle" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -1126,7 +1122,7 @@ dependencies = [ [[package]] name = "aptos-keygen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-crypto", "aptos-types", @@ -1136,7 +1132,7 @@ dependencies = [ [[package]] name = "aptos-language-e2e-tests" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-abstract-gas-usage", @@ -1183,7 +1179,7 @@ dependencies = [ [[package]] name = "aptos-ledger" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-crypto", "aptos-types", @@ -1197,7 +1193,7 @@ dependencies = [ [[package]] name = "aptos-log-derive" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -1207,7 +1203,7 @@ dependencies = [ [[package]] name = "aptos-logger" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-infallible", "aptos-log-derive", @@ -1228,7 +1224,7 @@ dependencies = [ [[package]] name = "aptos-memory-usage-tracker" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-gas-algebra", "aptos-gas-meter", @@ -1242,7 +1238,7 @@ dependencies = [ [[package]] name = "aptos-mempool" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-bounded-executor", @@ -1282,7 +1278,7 @@ dependencies = [ [[package]] name = "aptos-mempool-notifications" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-runtimes", "aptos-types", @@ -1296,7 +1292,7 @@ dependencies = [ [[package]] name = "aptos-memsocket" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-infallible", "bytes", @@ -1307,7 +1303,7 @@ dependencies = [ [[package]] name = "aptos-metrics-core" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "prometheus", @@ -1316,7 +1312,7 @@ dependencies = [ [[package]] name = "aptos-move-stdlib" version = "0.1.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-gas-schedule", @@ -1342,7 +1338,7 @@ dependencies = [ [[package]] name = "aptos-mvhashmap" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-aggregator", @@ -1365,7 +1361,7 @@ dependencies = [ [[package]] name = "aptos-native-interface" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-gas-algebra", "aptos-gas-schedule", @@ -1382,7 +1378,7 @@ dependencies = [ [[package]] name = "aptos-netcore" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-memsocket", "aptos-proxy", @@ -1399,7 +1395,7 @@ dependencies = [ [[package]] name = "aptos-network" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-bitvec", @@ -1447,7 +1443,7 @@ dependencies = [ [[package]] name = "aptos-node-resource-metrics" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-build-info", "aptos-infallible", @@ -1463,7 +1459,7 @@ dependencies = [ [[package]] name = "aptos-num-variants" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -1473,7 +1469,7 @@ dependencies = [ [[package]] name = "aptos-openapi" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "async-trait", "percent-encoding", @@ -1486,7 +1482,7 @@ dependencies = [ [[package]] name = "aptos-package-builder" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-framework", @@ -1499,7 +1495,7 @@ dependencies = [ [[package]] name = "aptos-peer-monitoring-service-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-config", "aptos-types", @@ -1512,7 +1508,7 @@ dependencies = [ [[package]] name = "aptos-proptest-helpers" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "crossbeam", "proptest", @@ -1522,7 +1518,7 @@ dependencies = [ [[package]] name = "aptos-protos" version = "1.3.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "futures-core", "pbjson", @@ -1535,7 +1531,7 @@ dependencies = [ [[package]] name = "aptos-proxy" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "ipnet", ] @@ -1543,7 +1539,7 @@ dependencies = [ [[package]] name = "aptos-push-metrics" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -1554,7 +1550,7 @@ dependencies = [ [[package]] name = "aptos-rate-limiter" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-infallible", "aptos-logger", @@ -1568,7 +1564,7 @@ dependencies = [ [[package]] name = "aptos-rest-client" version = "0.0.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-api-types", @@ -1594,7 +1590,7 @@ dependencies = [ [[package]] name = "aptos-retrier" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-logger", "tokio", @@ -1603,7 +1599,7 @@ dependencies = [ [[package]] name = "aptos-rocksdb-options" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-config", "rocksdb", @@ -1612,7 +1608,7 @@ dependencies = [ [[package]] name = "aptos-runtimes" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "rayon", "tokio", @@ -1621,7 +1617,7 @@ dependencies = [ [[package]] name = "aptos-schemadb" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-infallible", @@ -1638,7 +1634,7 @@ dependencies = [ [[package]] name = "aptos-scratchpad" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-crypto", "aptos-drop-helper", @@ -1658,7 +1654,7 @@ dependencies = [ [[package]] name = "aptos-sdk" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-api-types", @@ -1679,7 +1675,7 @@ dependencies = [ [[package]] name = "aptos-sdk-builder" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-types", @@ -1698,7 +1694,7 @@ dependencies = [ [[package]] name = "aptos-secure-net" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -1717,7 +1713,7 @@ dependencies = [ [[package]] name = "aptos-secure-storage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -1739,7 +1735,7 @@ dependencies = [ [[package]] name = "aptos-short-hex-str" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "mirai-annotations", "serde", @@ -1750,7 +1746,7 @@ dependencies = [ [[package]] name = "aptos-speculative-state-helper" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-infallible", @@ -1762,7 +1758,7 @@ dependencies = [ [[package]] name = "aptos-storage-interface" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-crypto", @@ -1794,7 +1790,7 @@ dependencies = [ [[package]] name = "aptos-storage-service-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-channels", "aptos-config", @@ -1808,7 +1804,7 @@ dependencies = [ [[package]] name = "aptos-storage-service-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-compression", "aptos-config", @@ -1824,7 +1820,7 @@ dependencies = [ [[package]] name = "aptos-table-natives" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-gas-schedule", @@ -1845,7 +1841,7 @@ dependencies = [ [[package]] name = "aptos-temppath" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "hex", "rand 0.7.3", @@ -1854,7 +1850,7 @@ dependencies = [ [[package]] name = "aptos-time-service" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-infallible", "enum_dispatch", @@ -1867,7 +1863,7 @@ dependencies = [ [[package]] name = "aptos-types" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-bitvec", @@ -1918,12 +1914,12 @@ dependencies = [ [[package]] name = "aptos-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" [[package]] name = "aptos-vault-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-crypto", "base64 0.13.1", @@ -1939,7 +1935,7 @@ dependencies = [ [[package]] name = "aptos-vm" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-aggregator", @@ -1973,7 +1969,6 @@ dependencies = [ "dashmap", "derive_more", "fail 0.5.1", - "futures", "hex", "jsonwebtoken", "move-binary-format", @@ -1996,7 +1991,7 @@ dependencies = [ [[package]] name = "aptos-vm-genesis" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-cached-packages", @@ -2018,7 +2013,7 @@ dependencies = [ [[package]] name = "aptos-vm-logging" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "aptos-crypto", "aptos-logger", @@ -2033,7 +2028,7 @@ dependencies = [ [[package]] name = "aptos-vm-types" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-aggregator", @@ -2054,7 +2049,7 @@ dependencies = [ [[package]] name = "aptos-vm-validator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "aptos-event-notifications", @@ -6490,7 +6485,7 @@ checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" [[package]] name = "move-abigen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6507,7 +6502,7 @@ dependencies = [ [[package]] name = "move-binary-format" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "backtrace", @@ -6522,12 +6517,12 @@ dependencies = [ [[package]] name = "move-borrow-graph" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" [[package]] name = "move-bytecode-source-map" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6542,7 +6537,7 @@ dependencies = [ [[package]] name = "move-bytecode-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "move-binary-format", @@ -6554,7 +6549,7 @@ dependencies = [ [[package]] name = "move-bytecode-verifier" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "fail 0.4.0", @@ -6569,7 +6564,7 @@ dependencies = [ [[package]] name = "move-bytecode-viewer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "clap 4.5.4", @@ -6586,7 +6581,7 @@ dependencies = [ [[package]] name = "move-cli" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6632,7 +6627,7 @@ dependencies = [ [[package]] name = "move-command-line-common" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "difference", @@ -6649,7 +6644,7 @@ dependencies = [ [[package]] name = "move-compiler" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6678,7 +6673,7 @@ dependencies = [ [[package]] name = "move-compiler-v2" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "abstract-domain-derive", "anyhow", @@ -6711,7 +6706,7 @@ dependencies = [ [[package]] name = "move-core-types" version = "0.0.4" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "arbitrary", @@ -6736,7 +6731,7 @@ dependencies = [ [[package]] name = "move-coverage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6756,7 +6751,7 @@ dependencies = [ [[package]] name = "move-disassembler" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "clap 4.5.4", @@ -6774,7 +6769,7 @@ dependencies = [ [[package]] name = "move-docgen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "codespan", @@ -6793,7 +6788,7 @@ dependencies = [ [[package]] name = "move-errmapgen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6807,7 +6802,7 @@ dependencies = [ [[package]] name = "move-ir-compiler" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6826,7 +6821,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "codespan-reporting", @@ -6845,7 +6840,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode-syntax" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "hex", @@ -6858,7 +6853,7 @@ dependencies = [ [[package]] name = "move-ir-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "hex", @@ -6872,7 +6867,7 @@ dependencies = [ [[package]] name = "move-model" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "codespan", @@ -6900,7 +6895,7 @@ dependencies = [ [[package]] name = "move-package" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6937,7 +6932,7 @@ dependencies = [ [[package]] name = "move-prover" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "async-trait", @@ -6976,7 +6971,7 @@ dependencies = [ [[package]] name = "move-prover-boogie-backend" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "async-trait", @@ -7006,7 +7001,7 @@ dependencies = [ [[package]] name = "move-prover-bytecode-pipeline" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "abstract-domain-derive", "anyhow", @@ -7037,7 +7032,7 @@ dependencies = [ [[package]] name = "move-resource-viewer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -7065,7 +7060,7 @@ dependencies = [ [[package]] name = "move-stackless-bytecode" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "abstract-domain-derive", "codespan", @@ -7092,7 +7087,7 @@ dependencies = [ [[package]] name = "move-stdlib" version = "0.1.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "hex", @@ -7115,7 +7110,7 @@ dependencies = [ [[package]] name = "move-symbol-pool" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "once_cell", "serde", @@ -7124,7 +7119,7 @@ dependencies = [ [[package]] name = "move-table-extension" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bcs 0.1.4", @@ -7142,7 +7137,7 @@ dependencies = [ [[package]] name = "move-unit-test" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "better_any", @@ -7173,7 +7168,7 @@ dependencies = [ [[package]] name = "move-vm-runtime" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "better_any", "bytes", @@ -7198,7 +7193,7 @@ dependencies = [ [[package]] name = "move-vm-test-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "anyhow", "bytes", @@ -7213,7 +7208,7 @@ dependencies = [ [[package]] name = "move-vm-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=7d807dcbd8796e760d272db2fd7903e6d8449730#7d807dcbd8796e760d272db2fd7903e6d8449730" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" dependencies = [ "bcs 0.1.4", "derivative", diff --git a/Cargo.toml b/Cargo.toml index 69e0f8279..2179052fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -183,33 +183,33 @@ ethers-middleware = { version = "=2.0.10", default-features = false } # Aptos dependencies # We use a forked version so that we can override dependency versions. This is required # to be avoid depenedency conflicts with other Sovereign Labs crates. -aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730", features = [ +aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731", features = [ "cloneable-private-keys", ] } -aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } -aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } +aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" } move-binary-format = { git = "https://github.com/diem/move" } @@ -232,7 +232,7 @@ secp256k1 = { version = "0.27", default-features = false, features = [ "rand-std", "recovery", ] } -aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "7d807dcbd8796e760d272db2fd7903e6d8449730" } +aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } # celestia dependencies celestia-rpc = { git = "https://github.com/eigerco/lumina" } diff --git a/flake.nix b/flake.nix index b3e9318b2..4f86ba198 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,7 @@ frameworks = pkgs.darwin.apple_sdk.frameworks; dependencies = with pkgs; [ + rocksdb foundry-bin solc llvmPackages.bintools @@ -63,6 +64,8 @@ ] ++ lib.optionals stdenv.isLinux [ udev systemd + snappy + bzip2 ]; # Specific version of toolchain @@ -91,6 +94,11 @@ # Development Shell devShells.default = mkShell { + ROCKSDB=pkgs.rocksdb; + + # for linux set SNAPPY variable + SNAPPY = if stdenv.isLinux then pkgs.snappy else null; + OPENSSL_DEV=pkgs.openssl.dev; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; buildInputs = dependencies; diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 68e9c4179..eddae8be5 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -24,11 +24,12 @@ use aptos_types::{ block_info::BlockInfo, ledger_info::{LedgerInfo, LedgerInfoWithSignatures}, transaction::Version, + block_executor::partitioner::ExecutableTransactions, }; use aptos_types::{ block_executor::{config::BlockExecutorConfigFromOnchain, partitioner::ExecutableBlock}, chain_id::ChainId, - transaction::{ChangeSet, SignedTransaction, Transaction, WriteSetPayload}, + transaction::{ChangeSet, SignedTransaction, Transaction, WriteSetPayload, signature_verified_transaction::SignatureVerifiedTransaction}, validator_signer::ValidatorSigner, }; use aptos_vm::AptosVM; @@ -229,7 +230,7 @@ impl Executor { } /// Execute a block which gets committed to the state. - pub async fn execute_block( + pub async fn execute_block_inner( &self, block: ExecutableBlock, ) -> Result { @@ -245,8 +246,6 @@ impl Executor { block_executor.execute_block(block, parent_block_id, BlockExecutorConfigFromOnchain::new_no_block_limit())? }; - println!("State compute: {:?}", state_compute); - let version = state_compute.version(); @@ -285,6 +284,49 @@ impl Executor { }) } + pub async fn execute_block( + &self, + block: ExecutableBlock, + ) -> Result { + + + let metadata_block_id = HashValue::random(); + + // pop 0th transaction + let transactions = block.transactions; + let mut transactions = match transactions { + ExecutableTransactions::Unsharded(transactions) => transactions, + _ => anyhow::bail!("Only unsharded transactions are supported"), + }; + let block_metadate = match transactions.remove(0) { // todo: this panics if index is out of bounds + SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadata)) => block_metadata, + _ => anyhow::bail!("Block metadata not found") + }; + + // execute the block metadata block + self.execute_block_inner( + ExecutableBlock::new( + metadata_block_id.clone(), + ExecutableTransactions::Unsharded( + vec![SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadate))] + ) + ) + ).await?; + + // execute the rest of the block + let commitment = self.execute_block_inner( + ExecutableBlock::new( + block.block_id.clone(), + ExecutableTransactions::Unsharded( + transactions + ) + ) + ).await?; + + Ok(commitment) + + } + fn context(&self) -> Arc { self.context.clone() } @@ -425,8 +467,8 @@ impl Executor { pub async fn get_next_epoch_and_round(&self) -> Result<(u64, u64), anyhow::Error> { let db = self.db.read().await; let epoch = db.reader.get_latest_ledger_info()?.ledger_info().next_block_epoch(); - // let round = db.reader.get_latest_ledger_info()?.ledger_info().round(); - Ok((epoch, 0)) + let round = db.reader.get_latest_ledger_info()?.ledger_info().round(); + Ok((epoch, round)) } /// Pipes a batch of transactions from the mempool to the transaction channel. @@ -481,7 +523,7 @@ mod tests { ed25519::{Ed25519PrivateKey, Ed25519Signature}, HashValue, PrivateKey, Uniform }; use aptos_types::{ - account_address::AccountAddress, block_executor::partitioner::ExecutableTransactions, block_metadata::BlockMetadata, chain_id::{self, ChainId}, transaction::{ + account_address::AccountAddress, block_executor::partitioner::ExecutableTransactions, block_metadata::BlockMetadata, chain_id::ChainId, transaction::{ signature_verified_transaction::SignatureVerifiedTransaction, RawTransaction, Script, SignedTransaction, Transaction, TransactionPayload } @@ -524,10 +566,22 @@ mod tests { async fn test_execute_block() -> Result<(), anyhow::Error> { let executor = Executor::try_from_env()?; let block_id = HashValue::random(); + let block_metadata = Transaction::BlockMetadata(BlockMetadata::new( + block_id, + 0, + 0, + executor.signer.author(), + vec![], + vec![], + chrono::Utc::now().timestamp_micros() as u64, + )); let tx = SignatureVerifiedTransaction::Valid(Transaction::UserTransaction( create_signed_transaction(0, executor.aptos_config.chain_id.clone()), )); - let txs = ExecutableTransactions::Unsharded(vec![tx]); + let txs = ExecutableTransactions::Unsharded(vec![ + SignatureVerifiedTransaction::Valid(block_metadata), + tx, + ]); let block = ExecutableBlock::new(block_id.clone(), txs); executor.execute_block(block).await?; Ok(()) @@ -597,15 +651,6 @@ mod tests { let transactions = ExecutableTransactions::Unsharded( into_signature_verified_block(vec![ block_metadata, - ]) - ); - let block = ExecutableBlock::new(block_id.clone(), transactions); - let block_commitment = executor.execute_block(block).await?; - - // Next block - let block_id = HashValue::random(); - let transactions = ExecutableTransactions::Unsharded( - into_signature_verified_block(vec![ Transaction::UserTransaction(user_account_creation_tx), Transaction::UserTransaction(mint_tx), ]) @@ -685,21 +730,11 @@ mod tests { vec![], current_time_micros, )); - // Block Metadata - let transactions = ExecutableTransactions::Unsharded( - into_signature_verified_block(vec![ - block_metadata, - ]) - ); - let block = ExecutableBlock::new(block_id.clone(), transactions); - executor.execute_block(block).await?; - - // Next block - let block_id = HashValue::random(); // Generate new accounts and create transactions for each block. let mut transactions = Vec::new(); let mut transaction_hashes = Vec::new(); + transactions.push(block_metadata.clone()); for _ in 0..2 { // Each block will contain 2 transactions. let new_account = LocalAccount::generate(&mut rng); let user_account_creation_tx = root_account From c5376dcb3d2a6c6f19eb83d5316dd496f4fb01aa Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 00:34:01 -0400 Subject: [PATCH 049/101] fix: cleanup. --- protocol-units/execution/maptos/opt-executor/src/executor.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index eddae8be5..5ff0550a3 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -289,7 +289,6 @@ impl Executor { block: ExecutableBlock, ) -> Result { - let metadata_block_id = HashValue::random(); // pop 0th transaction From 3815e9a304a170cf6e68596946b780b03be45768 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 15:25:50 -0400 Subject: [PATCH 050/101] feat: trying with scratch. --- docker/build/movement/Dockerfile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 7007b3562..52e27b7ea 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -1,5 +1,5 @@ # Nix builder -FROM nixos/nix:latest +FROM nixos/nix:latest as builder # Copy our source and setup our working dir. COPY . /tmp/build @@ -8,4 +8,16 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build" \ No newline at end of file + develop --command bash -c "cargo build" + +RUN mkdir /tmp/nix-store-closure +RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure + +# Final image is based on scratch. We copy a bunch of Nix dependencies +# but they're fully self-contained so we don't need Nix anymore. +FROM scratch + +WORKDIR /app + +# Copy /nix/store +COPY --from=builder /tmp/nix-store-closure /nix/store \ No newline at end of file From 3880d1b2284c3abafae65732c3a0c9b503d43fcc Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 16:08:19 -0400 Subject: [PATCH 051/101] fix: should not be copying result. --- docker/build/movement/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 52e27b7ea..f60c97b01 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -11,7 +11,6 @@ RUN nix \ develop --command bash -c "cargo build" RUN mkdir /tmp/nix-store-closure -RUN cp -R $(nix-store -qR result/) /tmp/nix-store-closure # Final image is based on scratch. We copy a bunch of Nix dependencies # but they're fully self-contained so we don't need Nix anymore. From b92f0a1461cde330f159474d8bc3f9cb70e728d2 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 16:59:28 -0400 Subject: [PATCH 052/101] fix: try with scratch. --- docker/build/movement/Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index f60c97b01..611d481c2 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -10,8 +10,6 @@ RUN nix \ --option filter-syscalls false \ develop --command bash -c "cargo build" -RUN mkdir /tmp/nix-store-closure - # Final image is based on scratch. We copy a bunch of Nix dependencies # but they're fully self-contained so we don't need Nix anymore. FROM scratch @@ -19,4 +17,4 @@ FROM scratch WORKDIR /app # Copy /nix/store -COPY --from=builder /tmp/nix-store-closure /nix/store \ No newline at end of file +COPY --from=builder /nix/store /nix/store \ No newline at end of file From 79557bf8c23797611d25b57e91a0a3708d9683ee Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 18:12:52 -0400 Subject: [PATCH 053/101] feat: use build stages with nixos. --- docker/build/movement/Dockerfile | 5 ++--- test | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 611d481c2..184d0f7c5 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -10,9 +10,8 @@ RUN nix \ --option filter-syscalls false \ develop --command bash -c "cargo build" -# Final image is based on scratch. We copy a bunch of Nix dependencies -# but they're fully self-contained so we don't need Nix anymore. -FROM scratch +# Final image still runs on nix os, but only contains the /nix/store +FROM nixos/nix:latest WORKDIR /app diff --git a/test b/test index 4ec66b8dd..ea78aaad4 100755 --- a/test +++ b/test @@ -1,2 +1,3 @@ #!/usr/bin/env bash -docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" \ No newline at end of file +# docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" +docker run --entrypoint "/nix/store/49wgh2fy77pfvcrbnsr0i6mkbhdkwqr7-nix-2.21.2 --version" mvlbs/movement:b92f0a1461cde330f159474d8bc3f9cb70e728d2 \ No newline at end of file From e89dcc187af8328629c33dd4ec72ec8bb9411bfd Mon Sep 17 00:00:00 2001 From: Liam Monninger <79056955+l-monninger@users.noreply.github.com> Date: Sat, 18 May 2024 18:27:55 -0400 Subject: [PATCH 054/101] fix: use build dir --- docker/build/movement/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 184d0f7c5..7884ae8f4 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -16,4 +16,5 @@ FROM nixos/nix:latest WORKDIR /app # Copy /nix/store -COPY --from=builder /nix/store /nix/store \ No newline at end of file +COPY --from=builder /nix/store /nix/store +COPY --from=builder /tmp/build /app From 2a689d6911b3a8bf00660e5822f186022ba83e1f Mon Sep 17 00:00:00 2001 From: Liam Monninger <79056955+l-monninger@users.noreply.github.com> Date: Sat, 18 May 2024 18:59:13 -0400 Subject: [PATCH 055/101] fix: compare release binaries --- docker/build/movement/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 7884ae8f4..c2b91749a 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -8,7 +8,7 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build" + develop --command bash -c "cargo build --release" # Final image still runs on nix os, but only contains the /nix/store FROM nixos/nix:latest From f5885539c42a3abb81934d59ffd400dad4525de1 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 21:27:39 -0700 Subject: [PATCH 056/101] feat: with select binaries. --- docker/build/movement/Dockerfile | 22 +++++++++++++++++++++- test | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index c2b91749a..bbc62889f 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -8,7 +8,27 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release" + develop --command bash -c "cargo build --release -p m1-da-light-node" + +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + develop --command bash -c "cargo build --release -p monza-full-node" + +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + develop --command bash -c "cargo build --release -p monza-config" + +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + develop --command bash -c "cargo build --release -p suzuka-full-node" + +RUN nix \ + --extra-experimental-features "nix-command flakes" \ + --option filter-syscalls false \ + develop --command bash -c "cargo build --release -p suzuka-config" # Final image still runs on nix os, but only contains the /nix/store FROM nixos/nix:latest diff --git a/test b/test index ea78aaad4..6e1a45ab9 100755 --- a/test +++ b/test @@ -1,3 +1,3 @@ #!/usr/bin/env bash # docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" -docker run --entrypoint "/nix/store/49wgh2fy77pfvcrbnsr0i6mkbhdkwqr7-nix-2.21.2 --version" mvlbs/movement:b92f0a1461cde330f159474d8bc3f9cb70e728d2 \ No newline at end of file +docker run --entrypoint "/nix/store/49wgh2fy77pfvcrbnsr0i6mkbhdkwqr7-nix-2.21.2 --version" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f \ No newline at end of file From 28590a68a4b0120cd4d8f829c88b6a222d815771 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 23:14:51 -0700 Subject: [PATCH 057/101] feat: explicit buildx. --- docker/build/movement/Dockerfile | 22 +--------------------- scripts/docker/build-push-image | 4 ++-- test | 3 ++- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index bbc62889f..c2b91749a 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -8,27 +8,7 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release -p m1-da-light-node" - -RUN nix \ - --extra-experimental-features "nix-command flakes" \ - --option filter-syscalls false \ - develop --command bash -c "cargo build --release -p monza-full-node" - -RUN nix \ - --extra-experimental-features "nix-command flakes" \ - --option filter-syscalls false \ - develop --command bash -c "cargo build --release -p monza-config" - -RUN nix \ - --extra-experimental-features "nix-command flakes" \ - --option filter-syscalls false \ - develop --command bash -c "cargo build --release -p suzuka-full-node" - -RUN nix \ - --extra-experimental-features "nix-command flakes" \ - --option filter-syscalls false \ - develop --command bash -c "cargo build --release -p suzuka-config" + develop --command bash -c "cargo build --release" # Final image still runs on nix os, but only contains the /nix/store FROM nixos/nix:latest diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 16a8532dc..2d34ef91f 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,4 +1,4 @@ #!/bin/bash echo "Building docker image with tag $2/$3:$(git rev-parse HEAD)" -docker build -f $1 -t $2/$3:$(git rev-parse HEAD) . -docker push $2/$3:$(git rev-parse HEAD) \ No newline at end of file +docker buildx create --use +docker buildx build --platform linux/amd64,linux/arm64 -f $1 -t $2/$3:$(git rev-parse HEAD) . --push \ No newline at end of file diff --git a/test b/test index 6e1a45ab9..b0e061661 100755 --- a/test +++ b/test @@ -1,3 +1,4 @@ #!/usr/bin/env bash # docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" -docker run --entrypoint "/nix/store/49wgh2fy77pfvcrbnsr0i6mkbhdkwqr7-nix-2.21.2 --version" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f \ No newline at end of file +# docker run --entrypoint "nix" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f develop --extra-experimental-features "nix-command flakes" --command just monza-full-node test.local -t=false +docker run --entrypoint "ls" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f -S -alh /nix \ No newline at end of file From bbc5576f081c2a5007f047a85fc87874ef0f1896 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 23:16:31 -0700 Subject: [PATCH 058/101] feat: without builder. --- docker/build/movement/Dockerfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index c2b91749a..d2da28a3e 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -10,11 +10,3 @@ RUN nix \ --option filter-syscalls false \ develop --command bash -c "cargo build --release" -# Final image still runs on nix os, but only contains the /nix/store -FROM nixos/nix:latest - -WORKDIR /app - -# Copy /nix/store -COPY --from=builder /nix/store /nix/store -COPY --from=builder /tmp/build /app From ee098364959c72ded37ec4802a5047959d0639cc Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Sat, 18 May 2024 23:17:24 -0700 Subject: [PATCH 059/101] feat: copy nix. --- docker/build/movement/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index d2da28a3e..5941b0a4a 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -10,3 +10,11 @@ RUN nix \ --option filter-syscalls false \ develop --command bash -c "cargo build --release" +# Final image still runs on nix os, but only contains the /nix/store +FROM nixos/nix:latest + +WORKDIR /app + +# Copy /nix/store +COPY --from=builder /nix /nix +COPY --from=builder /tmp/build /app From a051793dd501e5fbc8f1822405dbef6582ae7e6c Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 11:37:10 +0300 Subject: [PATCH 060/101] mcr-settlement-manager: basic test --- .../settlement/mcr/manager/src/manager.rs | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 2d9b3f8fe..239c07170 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -117,3 +117,34 @@ fn process_commitments( } }) } + +#[cfg(test)] +mod tests { + use super::*; + use mcr_settlement_client::McrSettlementClient; + use movement_types::{BlockCommitment, Commitment}; + + #[tokio::test] + async fn test_block_commitment_accepted() -> Result<(), anyhow::Error> { + let mut client = McrSettlementClient::new(); + client.block_lead_tolerance = 1; + let (manager, mut event_stream) = Manager::new(client); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + manager.post_block_commitment(commitment.clone()).await?; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment::test(), + }; + manager.post_block_commitment(commitment2).await?; + let item = event_stream.next().await; + let res = item.unwrap(); + let event = res.unwrap(); + assert_eq!(event, BlockCommitmentEvent::Accepted(commitment)); + Ok(()) + } +} From f53a83c16f478693fc4953d0ba604be695507914 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 11:54:17 +0300 Subject: [PATCH 061/101] opt-executor: gracefully handle empty block --- .../execution/maptos/opt-executor/src/executor.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index eddae8be5..946bae558 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -288,17 +288,21 @@ impl Executor { &self, block: ExecutableBlock, ) -> Result { - - let metadata_block_id = HashValue::random(); - + + // To correctly update block height, we employ a workaround to execute + // the block metadata transaction in its own block first. + // pop 0th transaction let transactions = block.transactions; let mut transactions = match transactions { ExecutableTransactions::Unsharded(transactions) => transactions, _ => anyhow::bail!("Only unsharded transactions are supported"), }; - let block_metadate = match transactions.remove(0) { // todo: this panics if index is out of bounds + if transactions.len() == 0 { + anyhow::bail!("Block must have at least the metadata transaction"); + } + let block_metadata = match transactions.remove(0) { SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadata)) => block_metadata, _ => anyhow::bail!("Block metadata not found") }; @@ -308,7 +312,7 @@ impl Executor { ExecutableBlock::new( metadata_block_id.clone(), ExecutableTransactions::Unsharded( - vec![SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadate))] + vec![SignatureVerifiedTransaction::Valid(Transaction::BlockMetadata(block_metadata))] ) ) ).await?; From b7f1eb1b89a5255ea93cb55a047ef33e4dba7d94 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 12:05:32 +0300 Subject: [PATCH 062/101] mcr-settlement-client: convert stub to mock --- .../settlement/mcr/client/Cargo.toml | 3 +- .../settlement/mcr/client/src/lib.rs | 7 +- .../mcr/client/src/{stub.rs => mock.rs} | 71 +++++++++++++------ .../settlement/mcr/manager/Cargo.toml | 3 + .../settlement/mcr/manager/src/manager.rs | 10 +-- 5 files changed, 60 insertions(+), 34 deletions(-) rename protocol-units/settlement/mcr/client/src/{stub.rs => mock.rs} (65%) diff --git a/protocol-units/settlement/mcr/client/Cargo.toml b/protocol-units/settlement/mcr/client/Cargo.toml index c0581a27b..d92bfb8a1 100644 --- a/protocol-units/settlement/mcr/client/Cargo.toml +++ b/protocol-units/settlement/mcr/client/Cargo.toml @@ -21,8 +21,7 @@ serde_json = { workspace = true } async-stream = { workspace = true } [features] -default = ["stub"] -stub = [] +mock = [] [lints] workspace = true diff --git a/protocol-units/settlement/mcr/client/src/lib.rs b/protocol-units/settlement/mcr/client/src/lib.rs index 93502f06f..4c5f7c27d 100644 --- a/protocol-units/settlement/mcr/client/src/lib.rs +++ b/protocol-units/settlement/mcr/client/src/lib.rs @@ -1,11 +1,8 @@ use movement_types::BlockCommitment; use tokio_stream::Stream; -#[cfg(feature = "stub")] -pub mod stub; - -#[cfg(feature = "stub")] -pub use stub::*; +#[cfg(feature = "mock")] +pub mod mock; type CommitmentStream = std::pin::Pin> + Send>>; diff --git a/protocol-units/settlement/mcr/client/src/stub.rs b/protocol-units/settlement/mcr/client/src/mock.rs similarity index 65% rename from protocol-units/settlement/mcr/client/src/stub.rs rename to protocol-units/settlement/mcr/client/src/mock.rs index 2060f6d52..7beed3f96 100644 --- a/protocol-units/settlement/mcr/client/src/stub.rs +++ b/protocol-units/settlement/mcr/client/src/mock.rs @@ -1,34 +1,43 @@ use crate::{CommitmentStream, McrSettlementClientOperations}; use movement_types::BlockCommitment; use std::collections::HashMap; -use std::sync::Arc; +use std::sync::{Arc, Mutex}; use tokio::sync::{mpsc, RwLock}; +use tokio_stream::wrappers::ReceiverStream; -pub struct McrSettlementClient { +#[derive(Clone)] +pub struct MockMcrSettlementClient { commitments: Arc>>, stream_sender: mpsc::Sender>, - // todo: this is logically dangerous, but it's just a stub - stream_receiver: Arc>>>, + stream_receiver: Arc>>>>, pub current_height: Arc>, pub block_lead_tolerance: u64 } -impl McrSettlementClient { +impl MockMcrSettlementClient { pub fn new() -> Self { let (stream_sender, receiver) = mpsc::channel(10); - McrSettlementClient { + MockMcrSettlementClient { commitments: Arc::new(RwLock::new(HashMap::new())), stream_sender, - stream_receiver: Arc::new(RwLock::new(receiver)), + stream_receiver: Arc::new(Mutex::new(Some(receiver))), current_height: Arc::new(RwLock::new(0)), block_lead_tolerance: 16, } } -} + /// Overrides the commitment to settle on at given height. + /// + /// To have effect, this method needs to be called before a commitment is + /// posted for this height with the `McrSettlementClientOperations` API. + pub async fn settle(&self, commitment: BlockCommitment) { + let mut commitments = self.commitments.write().await; + commitments.insert(commitment.height, commitment); + } +} #[async_trait::async_trait] -impl McrSettlementClientOperations for McrSettlementClient { +impl McrSettlementClientOperations for MockMcrSettlementClient { async fn post_block_commitment( &self, block_commitment: BlockCommitment, @@ -38,8 +47,9 @@ impl McrSettlementClientOperations for McrSettlementClient { { let mut commitments = self.commitments.write().await; - commitments.insert(block_commitment.height, block_commitment.clone()); - self.stream_sender.send(Ok(block_commitment)).await?; // Simulate sending to the stream. + let settled = commitments.entry(block_commitment.height).or_insert(block_commitment); + // Simulate sending to the stream + self.stream_sender.send(Ok(settled.clone())).await?; } { @@ -60,14 +70,12 @@ impl McrSettlementClientOperations for McrSettlementClient { } async fn stream_block_commitments(&self) -> Result { - let receiver = self.stream_receiver.clone(); - let stream = async_stream::try_stream! { - let mut receiver = receiver.write().await; - while let Some(commitment) = receiver.recv().await { - yield commitment?; - } - }; - Ok(Box::pin(stream) as CommitmentStream) + let receiver = self.stream_receiver + .lock() + .unwrap() + .take() + .expect("stream_block_commitments already called"); + Ok(Box::pin(ReceiverStream::new(receiver))) } async fn get_commitment_at_height( @@ -94,7 +102,7 @@ pub mod test { #[tokio::test] async fn test_post_block_commitment() -> Result<(), anyhow::Error> { - let client = McrSettlementClient::new(); + let client = MockMcrSettlementClient::new(); let commitment = BlockCommitment { height: 1, block_id: Default::default(), @@ -112,7 +120,7 @@ pub mod test { #[tokio::test] async fn test_post_block_commitment_batch() -> Result<(), anyhow::Error> { - let client = McrSettlementClient::new(); + let client = MockMcrSettlementClient::new(); let commitment = BlockCommitment { height: 1, block_id: Default::default(), @@ -135,7 +143,7 @@ pub mod test { #[tokio::test] async fn test_stream_block_commitments() -> Result<(), anyhow::Error> { - let client = McrSettlementClient::new(); + let client = MockMcrSettlementClient::new(); let commitment = BlockCommitment { height: 1, block_id: Default::default(), @@ -146,4 +154,23 @@ pub mod test { assert_eq!(stream.next().await.unwrap().unwrap(), commitment); Ok(()) } + + #[tokio::test] + async fn test_override_block_commitments() -> Result<(), anyhow::Error> { + let client = MockMcrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment::test(), + }; + client.settle(commitment.clone()).await; + client.post_block_commitment(BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }).await.unwrap(); + let mut stream = client.stream_block_commitments().await?; + assert_eq!(stream.next().await.unwrap().unwrap(), commitment); + Ok(()) + } } diff --git a/protocol-units/settlement/mcr/manager/Cargo.toml b/protocol-units/settlement/mcr/manager/Cargo.toml index a70d7a8f5..d6c28baea 100644 --- a/protocol-units/settlement/mcr/manager/Cargo.toml +++ b/protocol-units/settlement/mcr/manager/Cargo.toml @@ -21,6 +21,9 @@ serde_json = { workspace = true } async-stream = { workspace = true } mcr-settlement-client = { workspace = true } +[dev-dependencies] +mcr-settlement-client = { workspace = true, features = ["mock"] } + [features] default = ["stub"] stub = [] diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 239c07170..8827c101a 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -121,24 +121,24 @@ fn process_commitments( #[cfg(test)] mod tests { use super::*; - use mcr_settlement_client::McrSettlementClient; + use mcr_settlement_client::mock::MockMcrSettlementClient; use movement_types::{BlockCommitment, Commitment}; #[tokio::test] async fn test_block_commitment_accepted() -> Result<(), anyhow::Error> { - let mut client = McrSettlementClient::new(); + let mut client = MockMcrSettlementClient::new(); client.block_lead_tolerance = 1; - let (manager, mut event_stream) = Manager::new(client); + let (manager, mut event_stream) = Manager::new(client.clone()); let commitment = BlockCommitment { height: 1, block_id: Default::default(), - commitment: Commitment::test(), + commitment: Commitment([1; 32]), }; manager.post_block_commitment(commitment.clone()).await?; let commitment2 = BlockCommitment { height: 2, block_id: Default::default(), - commitment: Commitment::test(), + commitment: Commitment([2; 32]), }; manager.post_block_commitment(commitment2).await?; let item = event_stream.next().await; From 56f408faed41a58a329d23ac272299904cdc7174 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 13:25:27 +0300 Subject: [PATCH 063/101] mcr-settlement-manager: test commit rejection --- .../settlement/mcr/manager/src/manager.rs | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 8827c101a..46d6214d2 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -147,4 +147,36 @@ mod tests { assert_eq!(event, BlockCommitmentEvent::Accepted(commitment)); Ok(()) } + + #[tokio::test] + async fn test_block_commitment_rejected() -> Result<(), anyhow::Error> { + let mut client = MockMcrSettlementClient::new(); + client.block_lead_tolerance = 1; + let (manager, mut event_stream) = Manager::new(client.clone()); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + client.settle(BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([3; 32]), + }).await; + manager.post_block_commitment(commitment.clone()).await?; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment([2; 32]), + }; + manager.post_block_commitment(commitment2).await?; + let item = event_stream.next().await; + let res = item.unwrap(); + let event = res.unwrap(); + assert_eq!(event, BlockCommitmentEvent::Rejected { + height: 1, + reason: BlockCommitmentRejectionReason::InvalidCommitment, + }); + Ok(()) + } } From 0f1c2f85974d5a923d70988ed730d220b3418788 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 13:27:59 +0300 Subject: [PATCH 064/101] suzuka-full-node: use the mock MCR client --- networks/suzuka/suzuka-full-node/src/partial.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 4054dd27c..9f23a83b7 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -3,7 +3,7 @@ use m1_da_light_node_client::{ blob_response, BatchWriteRequest, BlobWrite, LightNodeServiceClient, StreamReadFromHeightRequest, }; -use mcr_settlement_client::{McrSettlementClient, McrSettlementClientOperations}; +use mcr_settlement_client::{mock::MockMcrSettlementClient, McrSettlementClientOperations}; use mcr_settlement_manager::{ CommitmentEventStream, McrSettlementManager, McrSettlementManagerOperations, }; @@ -247,7 +247,7 @@ impl SuzukaPartialNode { let executor = SuzukaExecutorV1::try_from_env(tx) .await .context("Failed to get executor from environment")?; - let settlement_client = McrSettlementClient::new(); + let settlement_client = MockMcrSettlementClient::new(); Self::bound(executor, light_node_client, settlement_client) } } From dc7de5ee9bae28e994115e3fad8ea6c181c32682 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 13:40:45 +0300 Subject: [PATCH 065/101] mcr-settlement-manager: fix up doc Correct the documentation on McrSettlementManager::new, describing the dual role of the stream handle. --- protocol-units/settlement/mcr/manager/src/manager.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 46d6214d2..0538b5f6a 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -19,8 +19,9 @@ pub struct Manager { impl Manager { /// Creates a new MCR settlement manager. /// - /// Returns the handle with the public API, the stream to receive commitment events, - /// and a future that drives the background task. + /// Returns the handle with the public API and the stream to receive commitment events. + /// The stream needs to be polled to drive the MCR settlement client and + /// process the commitments. pub fn new( client: C, ) -> (Self, CommitmentEventStream) { From 5803533ab367b8b3d44274f5000fdf2b70ee88a4 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 20 May 2024 05:26:33 -0700 Subject: [PATCH 066/101] feat: native builds. --- .github/workflows/containers.yml | 8 ++++++-- flake.nix | 8 ++++++++ scripts/docker/build-push-image | 4 ++-- test | 3 ++- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 327915fd1..8fbebb41a 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -6,7 +6,11 @@ on: jobs: containers: - runs-on: movement-runner + strategy: + matrix: + architecture: [x86_64, arm64] + + runs-on: ${{ matrix.architecture == 'x86_64' && 'movement-runner' || 'buildjet-16vcpu-ubuntu-2204-arm' }} steps: - name: Checkout repository @@ -23,4 +27,4 @@ jobs: - name: Build and Push Docker image movement run: | - ./scripts/movement/build-push-image movement \ No newline at end of file + ./scripts/movement/build-push-image movement diff --git a/flake.nix b/flake.nix index 50e3b2407..43832149d 100644 --- a/flake.nix +++ b/flake.nix @@ -109,6 +109,13 @@ # M1 DA Light Node packages.m1-da-light-node = m1-da-light-node; + # Docker image of with the shell + packages.docker-shell = pkgs.dockerTools.buildImage { + name = "docker-shell"; + tag = "latest"; + contents = dependencies; + }; + # Development Shell devShells.default = mkShell { @@ -130,6 +137,7 @@ echo "Develop with Move Anywhere" ''; }; + } ); } \ No newline at end of file diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 2d34ef91f..16a8532dc 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,4 +1,4 @@ #!/bin/bash echo "Building docker image with tag $2/$3:$(git rev-parse HEAD)" -docker buildx create --use -docker buildx build --platform linux/amd64,linux/arm64 -f $1 -t $2/$3:$(git rev-parse HEAD) . --push \ No newline at end of file +docker build -f $1 -t $2/$3:$(git rev-parse HEAD) . +docker push $2/$3:$(git rev-parse HEAD) \ No newline at end of file diff --git a/test b/test index b0e061661..cd0161295 100755 --- a/test +++ b/test @@ -1,4 +1,5 @@ #!/usr/bin/env bash # docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" # docker run --entrypoint "nix" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f develop --extra-experimental-features "nix-command flakes" --command just monza-full-node test.local -t=false -docker run --entrypoint "ls" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f -S -alh /nix \ No newline at end of file +# docker run --entrypoint "ls" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f -S -alh /nix +docker run --entrypoint "ls" docker-shell:latest /bin \ No newline at end of file From 052066956967126299e9ade4508354e793fe079d Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 15:29:26 +0300 Subject: [PATCH 067/101] suzuka-full-node: fix crate dependency Using the mock from mcr-settlement-client for the time being. --- networks/suzuka/suzuka-full-node/Cargo.toml | 2 +- networks/suzuka/suzuka-full-node/src/partial.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/networks/suzuka/suzuka-full-node/Cargo.toml b/networks/suzuka/suzuka-full-node/Cargo.toml index 492a7aeda..bf7ed4feb 100644 --- a/networks/suzuka/suzuka-full-node/Cargo.toml +++ b/networks/suzuka/suzuka-full-node/Cargo.toml @@ -14,7 +14,7 @@ rust-version = { workspace = true } [dependencies] suzuka-executor = { workspace = true } m1-da-light-node-client = { workspace = true } -mcr-settlement-client = { workspace = true } +mcr-settlement-client = { workspace = true, features = ["mock"] } mcr-settlement-manager = { workspace = true } async-channel = { workspace = true } serde_json = { workspace = true } diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 9f23a83b7..2cb297c8f 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -247,6 +247,7 @@ impl SuzukaPartialNode { let executor = SuzukaExecutorV1::try_from_env(tx) .await .context("Failed to get executor from environment")?; + // TODO: switch to real settlement client let settlement_client = MockMcrSettlementClient::new(); Self::bound(executor, light_node_client, settlement_client) } From 7cb00d17d88e74a42c201e7993b3c22505d1a833 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 20 May 2024 07:26:36 -0700 Subject: [PATCH 068/101] fix: keep all context. --- docker/build/movement/Dockerfile | 13 +--- .../docker-compose.yml | 19 ++++++ .../monza-full-node-monolith/prometheus.yml | 10 +++ flake.nix | 8 +-- .../m1-da-light-node/process-compose.yml | 2 +- .../monza-full-node/process-compose.yml | 4 +- scripts/monza/faucet | 2 +- scripts/preludes/monza-full-node/prelude | 65 ++++++++++++------- test | 5 -- 9 files changed, 76 insertions(+), 52 deletions(-) create mode 100644 docker/compose/monza-full-node-monolith/docker-compose.yml create mode 100644 docker/compose/monza-full-node-monolith/prometheus.yml delete mode 100755 test diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 5941b0a4a..0a6e6e244 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -1,5 +1,5 @@ # Nix builder -FROM nixos/nix:latest as builder +FROM nixos/nix:latest # Copy our source and setup our working dir. COPY . /tmp/build @@ -8,13 +8,4 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release" - -# Final image still runs on nix os, but only contains the /nix/store -FROM nixos/nix:latest - -WORKDIR /app - -# Copy /nix/store -COPY --from=builder /nix /nix -COPY --from=builder /tmp/build /app + develop --command bash -c "cargo build --release" \ No newline at end of file diff --git a/docker/compose/monza-full-node-monolith/docker-compose.yml b/docker/compose/monza-full-node-monolith/docker-compose.yml new file mode 100644 index 000000000..7df0dad20 --- /dev/null +++ b/docker/compose/monza-full-node-monolith/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3.8' + +services: + monza-full-node: + image: mvlbs/movement:5803533ab367b8b3d44274f5000fdf2b70ee88a4 + container_name: monza-full-node-monolith + ports: + - "30370:30370" + - "30371:30371" + - "30372:30372" + environment: + - PROFILE=release + command: ["nix", "--extra-experimental-features", "nix-command flakes", "develop", "--command", "just", "monza-full-node", "local", "-t=false"] + volumes: + - data-volume:/data + +volumes: + data-volume: + diff --git a/docker/compose/monza-full-node-monolith/prometheus.yml b/docker/compose/monza-full-node-monolith/prometheus.yml new file mode 100644 index 000000000..1055d40b1 --- /dev/null +++ b/docker/compose/monza-full-node-monolith/prometheus.yml @@ -0,0 +1,10 @@ +global: + scrape_interval: 15s + +scrape_configs: + - job_name: 'cadvisor' + static_configs: + - targets: ['cadvisor:8080'] + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:9090'] diff --git a/flake.nix b/flake.nix index 43832149d..35c6f2177 100644 --- a/flake.nix +++ b/flake.nix @@ -109,13 +109,6 @@ # M1 DA Light Node packages.m1-da-light-node = m1-da-light-node; - # Docker image of with the shell - packages.docker-shell = pkgs.dockerTools.buildImage { - name = "docker-shell"; - tag = "latest"; - contents = dependencies; - }; - # Development Shell devShells.default = mkShell { @@ -127,6 +120,7 @@ shellHook = '' #!/usr/bin/env bash export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1) + echo "Monza Aptos Path: $MONZA_APTOS_PATH" cat <<'EOF' _ _ __ _ _ ____ _ _ ____ __ _ ____ ( \/ ) / \ / )( \( __)( \/ )( __)( ( \(_ _) diff --git a/process-compose/m1-da-light-node/process-compose.yml b/process-compose/m1-da-light-node/process-compose.yml index 6074363e3..5e00d4ce3 100644 --- a/process-compose/m1-da-light-node/process-compose.yml +++ b/process-compose/m1-da-light-node/process-compose.yml @@ -20,7 +20,7 @@ processes: m1-da-light-node: command: | - ./target/debug/m1-da-light-node + ./target/$CARGO_PROFILE/m1-da-light-node depends_on: m1-da-light-node-verifier-tests: condition: process_completed_successfully diff --git a/process-compose/monza-full-node/process-compose.yml b/process-compose/monza-full-node/process-compose.yml index 8e47b976a..aa018df08 100644 --- a/process-compose/monza-full-node/process-compose.yml +++ b/process-compose/monza-full-node/process-compose.yml @@ -18,7 +18,7 @@ processes: m1-da-light-node: command: | # FIXME(nix-ci-fix): when we modify LD_PATH directly, we get a missing libstdc++ here - ./target/debug/m1-da-light-node + ./target/$CARGO_PROFILE/m1-da-light-node depends_on: celestia-light-node-synced: condition: process_completed_successfully @@ -33,7 +33,7 @@ processes: monza-full-node: command: | - ./target/debug/monza-full-node + ./target/$CARGO_PROFILE/monza-full-node depends_on: m1-da-light-node: condition: process_healthy diff --git a/scripts/monza/faucet b/scripts/monza/faucet index 0bc6caa4a..9a2af1b8e 100755 --- a/scripts/monza/faucet +++ b/scripts/monza/faucet @@ -21,7 +21,7 @@ echo " - Faucet URL: $MONZA_APTOS_FAUCET_LISTEN_ADDR" # Run the faucet service using cargo echo "Starting faucet service..." -./target/debug/aptos-faucet-service run-simple --key "$MONZA_APTOS_PRIVATE_KEY" \ +./target/$CARGO_PROFILE/aptos-faucet-service run-simple --key "$MONZA_APTOS_PRIVATE_KEY" \ --node-url "http://$MONZA_APTOS_REST_LISTEN_ADDR" --chain-id "$MONZA_CHAIN_ID" \ --listen-address "$LISTEN_ADDR" --listen-port "$LISTEN_PORT" diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/monza-full-node/prelude index eba651e01..93eff27c5 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/monza-full-node/prelude @@ -1,31 +1,46 @@ #!/usr/bin/env bash set -e + export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env +export MOVEMENT_PREBUILT=${MOVEMENT_PREBUILT:-false} +export CARGO_PROFILE=${CARGO_PROFILE:-debug} + +if [ "$CARGO_PROFILE" = "release" ]; then + CARGO_PROFILE_FLAGS="--release" +else + CARGO_PROFILE_FLAGS="" +fi + +if [ "$MOVEMENT_PREBUILT" != "true" ]; then + + # Build movement components + echo "Building monza-config..." + cargo build $CARGO_PROFILE_FLAGS --bin monza-config + echo "Built monza-config!" + + echo "Building m1-da-light-node..." + cargo build $CARGO_PROFILE_FLAGS -p m1-da-light-node --features "sequencer" + echo "Built m1-da-light-node!" + + echo "Building monza-full-node..." + cargo build $CARGO_PROFILE_FLAGS -p monza-full-node + echo "Built monza-full-node!" + + # Build aptos components + WORKING_DIR=$(pwd) + temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos + cp -R "$MONZA_APTOS_PATH" "$temp_dir" + chmod -R 755 $temp_dir + cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos + echo "Building aptos-faucet-service..." + cargo build $CARGO_PROFILE_FLAGS -p aptos-faucet-service + echo "Built aptos-faucet-service!" + cd $WORKING_DIR + +else + echo "MOVEMENT_PREBUILT is set, skipping build." +fi -# build monza -echo "Building monza-config..." -cargo build --bin monza-config -echo "Built monza-config!" - -echo "Building m1-da-light-node..." -cargo build -p m1-da-light-node --features "sequencer" -echo "Built m1-da-light-node!" - -echo "Building monza-full-node..." -cargo build -p monza-full-node -echo "Built monza-full-node!" - -# build aptos -WORKING_DIR=$(pwd) -temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos -cp -R "$MONZA_APTOS_PATH" "$temp_dir" -chmod -R 755 $temp_dir -cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos -echo "Building aptos-faucet-service..." -cargo build -p aptos-faucet-service -echo "Built aptos-faucet-service!" -cd $WORKING_DIR - -eval $(./target/debug/monza-config) \ No newline at end of file +eval $(./target/$CARGO_PROFILE/monza-config) diff --git a/test b/test deleted file mode 100755 index cd0161295..000000000 --- a/test +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -# docker run --entrypoint "bash" movement -c "echo \$MONZA_APTOS_PATH && nix develop --extra-experimental-features \"nix-command flakes\" --command \"just m1-da-light-node test.local -t=false\"" -# docker run --entrypoint "nix" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f develop --extra-experimental-features "nix-command flakes" --command just monza-full-node test.local -t=false -# docker run --entrypoint "ls" mvlbs/movement:2a689d6911b3a8bf00660e5822f186022ba83e1f -S -alh /nix -docker run --entrypoint "ls" docker-shell:latest /bin \ No newline at end of file From ea3796aaef3b1cbf8c8183b738356195ae191d3a Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 20 May 2024 10:47:57 -0700 Subject: [PATCH 069/101] feat: better usage. --- .../monza-full-node-monolith/docker-compose.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/compose/monza-full-node-monolith/docker-compose.yml b/docker/compose/monza-full-node-monolith/docker-compose.yml index 7df0dad20..f7e1f8278 100644 --- a/docker/compose/monza-full-node-monolith/docker-compose.yml +++ b/docker/compose/monza-full-node-monolith/docker-compose.yml @@ -1,15 +1,14 @@ -version: '3.8' - services: monza-full-node: - image: mvlbs/movement:5803533ab367b8b3d44274f5000fdf2b70ee88a4 + image: mvlbs/movement:7cb00d17d88e74a42c201e7993b3c22505d1a833 container_name: monza-full-node-monolith ports: - - "30370:30370" - - "30371:30371" - - "30372:30372" + - "30370:30370" # m1 da light node rpc + - "30371:30371" # aptos api + - "30372:30372" # aptos faucet environment: - - PROFILE=release + - CARGO_PROFILE=release + - MOVEMENT_PREBUILT=true command: ["nix", "--extra-experimental-features", "nix-command flakes", "develop", "--command", "just", "monza-full-node", "local", "-t=false"] volumes: - data-volume:/data From 5ef76f401ed97acd5be3ff9ce076897e71154e60 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 20 May 2024 12:15:17 -0700 Subject: [PATCH 070/101] fix: m1-da-light-node needs defaults. --- scripts/docker/build-push-image | 24 ++++++++++++++++++++--- scripts/movement/run | 1 + scripts/preludes/m1-da-light-node/prelude | 6 ++++++ scripts/preludes/monza-full-node/prelude | 7 +++++-- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/scripts/docker/build-push-image b/scripts/docker/build-push-image index 16a8532dc..1d5ae7bf5 100755 --- a/scripts/docker/build-push-image +++ b/scripts/docker/build-push-image @@ -1,4 +1,22 @@ #!/bin/bash -echo "Building docker image with tag $2/$3:$(git rev-parse HEAD)" -docker build -f $1 -t $2/$3:$(git rev-parse HEAD) . -docker push $2/$3:$(git rev-parse HEAD) \ No newline at end of file + +# Check if the correct number of arguments are passed +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Get the current commit hash +COMMIT_HASH=$(git rev-parse HEAD) + +# Get the current branch name and replace any '/' with '.' +BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) +SANITIZED_BRANCH_NAME=${BRANCH_NAME//\//.} + +# Tag and build the Docker image +echo "Building docker image with tags $2/$3:$COMMIT_HASH and $2/$3:$SANITIZED_BRANCH_NAME" +docker build -f $1 -t $2/$3:$COMMIT_HASH -t $2/$3:$SANITIZED_BRANCH_NAME . + +# Push the Docker images +docker push $2/$3:$COMMIT_HASH +docker push $2/$3:$SANITIZED_BRANCH_NAME \ No newline at end of file diff --git a/scripts/movement/run b/scripts/movement/run index d14b96e53..78967c21b 100755 --- a/scripts/movement/run +++ b/scripts/movement/run @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e set -euo pipefail export PATH=$PATH:./target/release diff --git a/scripts/preludes/m1-da-light-node/prelude b/scripts/preludes/m1-da-light-node/prelude index 4b3d9c4ad..47242421e 100755 --- a/scripts/preludes/m1-da-light-node/prelude +++ b/scripts/preludes/m1-da-light-node/prelude @@ -2,8 +2,14 @@ set -e export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" + . ./scripts/celestia/celestia-env +: ${MOVEMENT_PREBUILT:=false} +export MOVEMENT_PREBUILT +: ${CARGO_PROFILE:=debug} +export CARGO_PROFILE + echo "Building m1-da-light-node..." cargo build -p m1-da-light-node echo "Built m1-da-light-node!" \ No newline at end of file diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/monza-full-node/prelude index 93eff27c5..6a444d70c 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/monza-full-node/prelude @@ -4,8 +4,11 @@ set -e export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env -export MOVEMENT_PREBUILT=${MOVEMENT_PREBUILT:-false} -export CARGO_PROFILE=${CARGO_PROFILE:-debug} + +: ${MOVEMENT_PREBUILT:=false} +export MOVEMENT_PREBUILT +: ${CARGO_PROFILE:=debug} +export CARGO_PROFILE if [ "$CARGO_PROFILE" = "release" ]; then CARGO_PROFILE_FLAGS="--release" From b6eda06a66904bb52ebb0dcdd15f36bbaad3b677 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 20 May 2024 22:58:45 +0300 Subject: [PATCH 071/101] Change monza scripts to suzuka --- .github/workflows/checks.yml | 4 ++-- justfile | 4 ++-- .../process-compose.local.yml | 0 .../process-compose.test.yml | 10 +++++----- .../process-compose.yml | 12 +++++------ .../prelude | 20 +++++++++---------- scripts/{monza => suzuka}/faucet | 12 +++++------ 7 files changed, 31 insertions(+), 31 deletions(-) rename process-compose/{monza-full-node => suzuka-full-node}/process-compose.local.yml (100%) rename process-compose/{monza-full-node => suzuka-full-node}/process-compose.test.yml (54%) rename process-compose/{monza-full-node => suzuka-full-node}/process-compose.yml (84%) rename scripts/preludes/{monza-full-node => suzuka-full-node}/prelude (61%) rename scripts/{monza => suzuka}/faucet (61%) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 604c79c45..dc4a74bcf 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -33,5 +33,5 @@ jobs: - name: Run M1 DA Light Node tests in nix environment run: nix develop --command bash -c "just m1-da-light-node test.local -t=false" - - name: Run monza tests in nix environment - run: nix develop --command bash -c "just monza-full-node test.local -t=false" \ No newline at end of file + - name: Run suzuka tests in nix environment + run: nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file diff --git a/justfile b/justfile index abd7418cb..c5f97870c 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ m1-da-light-node FEATURES *ARGS: cargo build -p m1-da-light-node scripts/movement/run m1-da-light-node {{ FEATURES }} {{ ARGS }} -monza-full-node FEATURES *ARGS: - scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} +suzuka-full-node FEATURES *ARGS: + scripts/movement/run suzuka-full-node {{ FEATURES }} {{ ARGS }} mcr-contract-tests: cd ./protocol-units/settlement/mcr/contracts && forge test \ No newline at end of file diff --git a/process-compose/monza-full-node/process-compose.local.yml b/process-compose/suzuka-full-node/process-compose.local.yml similarity index 100% rename from process-compose/monza-full-node/process-compose.local.yml rename to process-compose/suzuka-full-node/process-compose.local.yml diff --git a/process-compose/monza-full-node/process-compose.test.yml b/process-compose/suzuka-full-node/process-compose.test.yml similarity index 54% rename from process-compose/monza-full-node/process-compose.test.yml rename to process-compose/suzuka-full-node/process-compose.test.yml index 0a999c978..c335cda56 100644 --- a/process-compose/monza-full-node/process-compose.test.yml +++ b/process-compose/suzuka-full-node/process-compose.test.yml @@ -4,14 +4,14 @@ environment: processes: - monza-client-tests: + suzuka-client-tests: command: | - # FIXME(nix-ci-fix): this is the latest we can push linking issues, here and in the Monza faucet process we will get a libssl linking issue - cargo test -p monza-client -- --test-threads=1 + # FIXME(nix-ci-fix): this is the latest we can push linking issues, here and in the Suzuka faucet process we will get a libssl linking issue + cargo test -p suzuka-client -- --test-threads=1 depends_on: - monza-full-node: + suzuka-full-node: condition: process_healthy - monza-faucet: + suzuka-faucet: condition: process_healthy availability: exit_on_end: true \ No newline at end of file diff --git a/process-compose/monza-full-node/process-compose.yml b/process-compose/suzuka-full-node/process-compose.yml similarity index 84% rename from process-compose/monza-full-node/process-compose.yml rename to process-compose/suzuka-full-node/process-compose.yml index 8e47b976a..ec2dd4879 100644 --- a/process-compose/monza-full-node/process-compose.yml +++ b/process-compose/suzuka-full-node/process-compose.yml @@ -31,9 +31,9 @@ processes: exec: command: echo "true" - monza-full-node: + suzuka-full-node: command: | - ./target/debug/monza-full-node + ./target/debug/suzuka-full-node depends_on: m1-da-light-node: condition: process_healthy @@ -43,12 +43,12 @@ processes: command: | echo "true" - monza-faucet: + suzuka-faucet: command : | - # FIXME(nix-ci-fix): this is the latest we can push linking issues, here and in the Monza client tests we will get a libssl linking issue - ./scripts/monza/faucet + # FIXME(nix-ci-fix): this is the latest we can push linking issues, here and in the Suzuka client tests we will get a libssl linking issue + ./scripts/suzuka/faucet depends_on: - monza-full-node: + suzuka-full-node: condition: process_healthy readiness_probe: initial_delay_seconds: 10 diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/suzuka-full-node/prelude similarity index 61% rename from scripts/preludes/monza-full-node/prelude rename to scripts/preludes/suzuka-full-node/prelude index 11cd19db6..15c5dd6c3 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/suzuka-full-node/prelude @@ -3,28 +3,28 @@ export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env -# build monza -echo "Building monza-config..." -cargo build --bin monza-config -echo "Built monza-config!" +# build suzuka +echo "Building suzuka-config..." +cargo build --bin suzuka-config +echo "Built suzuka-config!" echo "Building m1-da-light-node..." cargo build -p m1-da-light-node --features "sequencer" echo "Built m1-da-light-node!" -echo "Building monza-full-node..." -cargo build -p monza-full-node -echo "Built monza-full-node!" +echo "Building suzuka-full-node..." +cargo build -p suzuka-full-node +echo "Built suzuka-full-node!" # build aptos WORKING_DIR=$(pwd) -temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos +temp_dir=$MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos cp -R "$MONZA_APTOS_PATH" "$temp_dir" chmod -R 755 $temp_dir -cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos +cd $MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos echo "Building aptos-faucet-service..." cargo build -p aptos-faucet-service echo "Built aptos-faucet-service!" cd $WORKING_DIR -eval $(./target/debug/monza-config) \ No newline at end of file +eval $(./target/debug/suzuka-config) diff --git a/scripts/monza/faucet b/scripts/suzuka/faucet similarity index 61% rename from scripts/monza/faucet rename to scripts/suzuka/faucet index 65b28bc9c..4d11e5487 100755 --- a/scripts/monza/faucet +++ b/scripts/suzuka/faucet @@ -7,21 +7,21 @@ temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos cd "$temp_dir" # Split the listen addresses into an array -IFS=':' read -r -a listener_array <<< "$MONZA_APTOS_FAUCET_LISTEN_ADDR" +IFS=':' read -r -a listener_array <<< "$SUZUKA_APTOS_FAUCET_LISTEN_ADDR" # Extract the listen address and port LISTEN_ADDR="${listener_array[0]}" LISTEN_PORT="${listener_array[1]}" echo "Starting faucet service with the following configuration:" -echo " - Chain ID: $MONZA_CHAIN_ID" -echo " - Node URL: $MONZA_APTOS_REST_LISTEN_ADDR" -echo " - Faucet URL: $MONZA_APTOS_FAUCET_LISTEN_ADDR" +echo " - Chain ID: $SUZUKA_CHAIN_ID" +echo " - Node URL: $SUZUKA_APTOS_REST_LISTEN_ADDR" +echo " - Faucet URL: $SUZUKA_APTOS_FAUCET_LISTEN_ADDR" # Run the faucet service using cargo echo "Starting faucet service..." -./target/debug/aptos-faucet-service run-simple --key "$MONZA_APTOS_PRIVATE_KEY" \ - --node-url "http://$MONZA_APTOS_REST_LISTEN_ADDR" --chain-id "$MONZA_CHAIN_ID" \ +./target/debug/aptos-faucet-service run-simple --key "$SUZUKA_APTOS_PRIVATE_KEY" \ + --node-url "http://$SUZUKA_APTOS_REST_LISTEN_ADDR" --chain-id "$SUZUKA_CHAIN_ID" \ --listen-address "$LISTEN_ADDR" --listen-port "$LISTEN_PORT" # The script automatically calls cleanup when it exits due to the trap From 089bd51b74dd3f2b4f003bcc6395d2f9ae034cf3 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Mon, 20 May 2024 14:50:45 -0700 Subject: [PATCH 072/101] feat: prebuild aptos-faucet-service. --- docker/build/movement/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 0a6e6e244..9ed2db7dc 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -8,4 +8,4 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release" \ No newline at end of file + develop --command bash -c "cargo build --release && cd MONZA_APTOS_PATH cargo build --release -p aptos-faucet-service" \ No newline at end of file From c17c3989d62288e131bcf0539547df5f427a7028 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 05:03:00 -0700 Subject: [PATCH 073/101] fix: use ubuntu-latest instead of movement-runner. --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 604c79c45..09636e989 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,7 +10,7 @@ jobs: include: - os: ubuntu-22.04 arch: x86_64 - runs-on: movement-runner + runs-on: ubuntu-latest - os: macos-13-latest arch: arm64 runs-on: macos-13-xlarge From 6c280b4e09bf64b16a97d0d41f275614ca8e1be1 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 07:53:11 -0700 Subject: [PATCH 074/101] feat: reduced logging. --- flake.nix | 1 - networks/monza/monza-full-node/src/partial.rs | 31 ++++++++++++++++--- .../suzuka/suzuka-full-node/src/partial.rs | 31 ++++++++++++++++--- .../da/m1/light-node/src/v1/passthrough.rs | 31 +++++++++++++++---- .../da/m1/light-node/src/v1/sequencer.rs | 14 +++++++-- .../maptos/opt-executor/src/executor.rs | 5 ++- .../execution/monza/executor/src/v1.rs | 5 ++- .../execution/suzuka/executor/src/v1.rs | 5 ++- util/buildtime/buildtime-helpers/src/cargo.rs | 1 - util/buildtime/buildtime-helpers/src/proto.rs | 1 - 10 files changed, 101 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index b3e9318b2..694061715 100644 --- a/flake.nix +++ b/flake.nix @@ -99,7 +99,6 @@ shellHook = '' #!/bin/bash export MONZA_APTOS_PATH=$(nix path-info -r .#monza-aptos | tail -n 1) - install-foundry cat <<'EOF' _ _ __ _ _ ____ _ _ ____ __ _ ____ ( \/ ) / \ / )( \( __)( \/ )( __)( ( \(_ _) diff --git a/networks/monza/monza-full-node/src/partial.rs b/networks/monza/monza-full-node/src/partial.rs index a262d11b2..9afffb790 100644 --- a/networks/monza/monza-full-node/src/partial.rs +++ b/networks/monza/monza-full-node/src/partial.rs @@ -67,7 +67,12 @@ impl MonzaPartialNode { match transaction_result { Ok(transaction) => { - println!("Got transaction: {:?}", transaction); + + #[cfg(feature = "logging")] + { + tracing::debug!("Got transaction: {:?}", transaction) + } + let serialized_transaction = serde_json::to_vec(&transaction)?; transactions.push(BlobWrite { data: serialized_transaction @@ -91,7 +96,12 @@ impl MonzaPartialNode { blobs: transactions } ).await?; - println!("Wrote transactions to DA"); + + #[cfg(feature = "logging")] + { + tracing::debug!("Wrote transactions to DA") + } + } Ok(()) @@ -125,7 +135,11 @@ impl MonzaPartialNode { while let Some(blob) = stream.next().await { - println!("Stream hot!"); + #[cfg(feature = "logging")] + { + tracing::debug!("Got blob: {:?}", blob) + } + // get the block let block_bytes = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { blob_response::BlobType::SequencedBlobBlock(blob) => { @@ -136,7 +150,11 @@ impl MonzaPartialNode { // get the block let block : Block = serde_json::from_slice(&block_bytes)?; - println!("Received block: {:?}", block); + + #[cfg(feature = "logging")] + { + tracing::debug!("Got block: {:?}", block) + } // get the transactions let mut block_transactions = Vec::new(); @@ -172,7 +190,10 @@ impl MonzaPartialNode { executable_block ).await?; - println!("Executed block: {:?}", block_id); + #[cfg(feature = "logging")] + { + tracing::debug!("Executed block: {:?}", block_id) + } } diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 94534bcd9..fb41b112f 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -67,7 +67,12 @@ impl SuzukaPartialNode { match transaction_result { Ok(transaction) => { - println!("Got transaction: {:?}", transaction); + + #[cfg(feature = "logging")] + { + tracing::debug!("Got transaction: {:?}", transaction) + } + let serialized_transaction = serde_json::to_vec(&transaction)?; transactions.push(BlobWrite { data: serialized_transaction @@ -91,7 +96,12 @@ impl SuzukaPartialNode { blobs: transactions } ).await?; - println!("Wrote transactions to DA"); + + #[cfg(feature = "logging")] + { + tracing::debug!("Wrote transactions to DA") + } + } Ok(()) @@ -125,7 +135,11 @@ impl SuzukaPartialNode { while let Some(blob) = stream.next().await { - println!("Stream hot!"); + #[cfg(feature = "logging")] + { + tracing::debug!("Got blob: {:?}", blob) + } + // get the block let block_bytes = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { blob_response::BlobType::SequencedBlobBlock(blob) => { @@ -136,7 +150,11 @@ impl SuzukaPartialNode { // get the block let block : Block = serde_json::from_slice(&block_bytes)?; - println!("Received block: {:?}", block); + + #[cfg(feature = "logging")] + { + tracing::debug!("Got block: {:?}", block) + } // get the transactions let mut block_transactions = Vec::new(); @@ -172,7 +190,10 @@ impl SuzukaPartialNode { executable_block ).await?; - println!("Executed block: {:?}", block_id); + #[cfg(feature = "logging")] + { + tracing::debug!("Executed block: {:?}", block_id) + } } diff --git a/protocol-units/da/m1/light-node/src/v1/passthrough.rs b/protocol-units/da/m1/light-node/src/v1/passthrough.rs index 3f698402f..8bea1a8c9 100644 --- a/protocol-units/da/m1/light-node/src/v1/passthrough.rs +++ b/protocol-units/da/m1/light-node/src/v1/passthrough.rs @@ -91,8 +91,9 @@ impl LightNodeV1 { .blob_get_all(height, &[self.celestia_namespace]) .await; + #[cfg(feature = "logging")] if blobs.is_err() { - println!("Error getting blobs: {:?}", blobs.as_ref().err().unwrap()); + tracing::debug!("Error getting blobs: {:?}", blobs.as_ref().err().unwrap()); } let blobs = blobs.unwrap_or_default(); @@ -100,7 +101,10 @@ impl LightNodeV1 { let mut verified_blobs = Vec::new(); for blob in blobs { - println!("Verifying blob"); + #[cfg(feature = "logging")] + { + tracing::debug!("Verifying blob"); + } let blob_data = blob.data.clone(); @@ -111,8 +115,9 @@ impl LightNodeV1 { height, ).await; + #[cfg(feature = "logging")] if verified.is_err() { - println!("Error verifying blob: {:?}", verified.as_ref().err().unwrap()); + tracing::debug!("Error verifying blob: {:?}", verified.as_ref().err().unwrap()); } let verified = verified.unwrap_or(true); @@ -172,7 +177,11 @@ impl LightNodeV1 { let header = header_res?; let height = header.height().into(); - println!("Stream got header: {:?}", header.height()); + + #[cfg(feature = "logging")] + { + tracing::debug!("Stream got header: {:?}", header.height()); + } // back fetch the blobs if first_flag && (height > start_height) { @@ -180,7 +189,12 @@ impl LightNodeV1 { let mut blob_stream = me.stream_blobs_in_range(start_height, Some(height)).await?; while let Some(blob) = blob_stream.next().await { - println!("Stream got blob: {:?}", blob); + + #[cfg(feature = "logging")] + { + tracing::debug!("Stream got blob: {:?}", blob); + } + yield blob?; } @@ -189,7 +203,12 @@ impl LightNodeV1 { let blobs = me.get_blobs_at_height(height).await?; for blob in blobs { - println!("Stream got blob: {:?}", blob); + + #[cfg(feature = "logging")] + { + tracing::debug!("Stream got blob: {:?}", blob); + } + yield blob; } } diff --git a/protocol-units/da/m1/light-node/src/v1/sequencer.rs b/protocol-units/da/m1/light-node/src/v1/sequencer.rs index ce9e9dffd..46f7c5f9a 100644 --- a/protocol-units/da/m1/light-node/src/v1/sequencer.rs +++ b/protocol-units/da/m1/light-node/src/v1/sequencer.rs @@ -69,7 +69,12 @@ impl LightNodeV1 { )?; let height = self.pass_through.submit_celestia_blob(block_blob).await?; - println!("Submitted block: {:?} {:?}", block.id(), height); + + #[cfg(feature = "logging")] + { + tracing::debug!("Submitted block: {:?} {:?}", block.id(), height); + } + }, None => { // no transactions to include @@ -226,7 +231,12 @@ impl LightNodeService for LightNodeV1 { // publish the transactions for transaction in transactions { - println!("Publishing transaction: {:?}", transaction.id()); + + #[cfg(feature = "logging")] + { + tracing::debug!("Publishing transaction: {:?}", transaction.id()); + } + self.memseq.publish(transaction).await.map_err( |e| tonic::Status::internal(e.to_string()) )?; diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index d60126e8a..319ea3ffc 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -266,7 +266,10 @@ impl Executor { block_executor.execute_block(block, parent_block_id, BlockExecutorConfigFromOnchain::new_no_block_limit())? }; - println!("State compute: {:?}", state_compute); + #[cfg(feature = "logging")] + { + tracing::debug!("State compute: {:?}", state_compute) + } let latest_version = { let reader = self.db.read().await.reader.clone(); diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 63210b81c..46348f524 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -49,7 +49,10 @@ impl MonzaExecutor for MonzaExecutorV1 { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { - println!("Executing opt block: {:?}", block.block_id); + #[cfg(feature = "logging")] + { + tracing::debug!("Executing opt block: {:?}", block.block_id) + } self.executor.execute_block(block).await }, FinalityMode::Fin => unimplemented!(), diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index a1c85b964..186b8a690 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -55,7 +55,10 @@ impl SuzukaExecutor for SuzukaExecutorV1 { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { - println!("Executing opt block: {:?}", block.block_id); + #[cfg(feature = "logging")] + { + tracing::debug!("Executing block: {:?}", block.block_id) + } self.executor.execute_block(block).await }, FinalityMode::Fin => unimplemented!(), diff --git a/util/buildtime/buildtime-helpers/src/cargo.rs b/util/buildtime/buildtime-helpers/src/cargo.rs index e8649cc3b..899776ecf 100644 --- a/util/buildtime/buildtime-helpers/src/cargo.rs +++ b/util/buildtime/buildtime-helpers/src/cargo.rs @@ -29,7 +29,6 @@ pub mod test { // Get the cargo workspace let workspace = cargo_workspace()?; - println!("cargo_workspace: {:?}", workspace); // Check that a Cargo.toml file exists in the workspace assert_eq!(workspace.join("Cargo.toml").exists(), true); diff --git a/util/buildtime/buildtime-helpers/src/proto.rs b/util/buildtime/buildtime-helpers/src/proto.rs index 1f72c1265..090abc145 100644 --- a/util/buildtime/buildtime-helpers/src/proto.rs +++ b/util/buildtime/buildtime-helpers/src/proto.rs @@ -17,7 +17,6 @@ pub mod test { // Get the proto directory let proto = proto()?; - println!("proto: {:?}", proto); // check that it exists assert_eq!(proto.exists(), true); From 898e12c892485b9f2a0e66d8c61319189f347190 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 08:33:16 -0700 Subject: [PATCH 075/101] fix: reduced logging. --- .../suzuka/suzuka-full-node/src/partial.rs | 20 +------------------ .../monza-full-node/process-compose.yml | 2 +- .../suzuka-full-node/process-compose.yml | 2 +- .../maptos/opt-executor/src/executor.rs | 4 +--- scripts/celestia/celestia-local-appd | 3 ++- scripts/celestia/celestia-local-bridge | 4 +++- scripts/monza/faucet | 8 ++++---- scripts/preludes/monza-full-node/prelude | 3 +++ scripts/preludes/suzuka-full-node/prelude | 2 ++ 9 files changed, 18 insertions(+), 30 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 71e29f8ca..1ed35d54b 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -206,14 +206,10 @@ where let commitment = self.executor.execute_block(FinalityMode::Opt, executable_block).await?; -<<<<<<< HEAD #[cfg(feature = "logging")] { tracing::debug!("Executed block: {:?}", block_id) } -======= - println!("Executed block: {:?}", block_id); ->>>>>>> b6eda06a66904bb52ebb0dcdd15f36bbaad3b677 self.settlement_manager.post_block_commitment(commitment).await?; } @@ -266,23 +262,10 @@ where } impl SuzukaPartialNode { -<<<<<<< HEAD - - pub async fn try_from_env() -> Result { - let (tx, _) = async_channel::unbounded(); - let light_node_client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; - let executor = SuzukaExecutorV1::try_from_env(tx).await.context( - "Failed to get executor from environment" - )?; - Self::bound(executor, light_node_client) - } - -} -======= pub async fn try_from_env( ) -> Result<(Self, impl Future> + Send), anyhow::Error> { let (tx, _) = async_channel::unbounded(); - let light_node_client = LightNodeServiceClient::connect("http://[::1]:30730").await?; + let light_node_client = LightNodeServiceClient::connect("http://0.0.0.0:30730").await?; let executor = SuzukaExecutorV1::try_from_env(tx) .await .context("Failed to get executor from environment")?; @@ -291,4 +274,3 @@ impl SuzukaPartialNode { Self::bound(executor, light_node_client, settlement_client) } } ->>>>>>> b6eda06a66904bb52ebb0dcdd15f36bbaad3b677 diff --git a/process-compose/monza-full-node/process-compose.yml b/process-compose/monza-full-node/process-compose.yml index 36b75d492..3563dcf7a 100644 --- a/process-compose/monza-full-node/process-compose.yml +++ b/process-compose/monza-full-node/process-compose.yml @@ -32,7 +32,7 @@ processes: suzuka-full-node: command: | - ./target/debug/suzuka-full-node + ./target/$CARGO_PROFILE/monza-full-node depends_on: m1-da-light-node: condition: process_healthy diff --git a/process-compose/suzuka-full-node/process-compose.yml b/process-compose/suzuka-full-node/process-compose.yml index 9cef08411..cc403a707 100644 --- a/process-compose/suzuka-full-node/process-compose.yml +++ b/process-compose/suzuka-full-node/process-compose.yml @@ -32,7 +32,7 @@ processes: suzuka-full-node: command: | - ./target/debug/suzuka-full-node + ./target/$CARGO_PROFILE/suzuka-full-node depends_on: m1-da-light-node: condition: process_healthy diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index c5898189a..721292ccf 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -246,14 +246,12 @@ impl Executor { block_executor.execute_block(block, parent_block_id, BlockExecutorConfigFromOnchain::new_no_block_limit())? }; -<<<<<<< HEAD #[cfg(feature = "logging")] { tracing::debug!("State compute: {:?}", state_compute) } -======= + let version = state_compute.version(); ->>>>>>> b6eda06a66904bb52ebb0dcdd15f36bbaad3b677 let (epoch, round) = self.get_next_epoch_and_round().await?; diff --git a/scripts/celestia/celestia-local-appd b/scripts/celestia/celestia-local-appd index 486e0b902..acf22b98c 100755 --- a/scripts/celestia/celestia-local-appd +++ b/scripts/celestia/celestia-local-appd @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +LOG_LEVEL=$(echo "$CELESTIA_LOG_LEVEL" | awk '{print tolower($0)}') APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" -celestia-appd start --grpc.enable --home $APP_PATH \ No newline at end of file +celestia-appd start --grpc.enable --home $APP_PATH --log_level $LOG_LEVEL \ No newline at end of file diff --git a/scripts/celestia/celestia-local-bridge b/scripts/celestia/celestia-local-bridge index ecd9a9b54..1416143a7 100755 --- a/scripts/celestia/celestia-local-bridge +++ b/scripts/celestia/celestia-local-bridge @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +LOG_LEVEL=$(echo "$CELESTIA_LOG_LEVEL" | awk '{print tolower($0)}') APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" @@ -33,4 +34,5 @@ celestia bridge start \ --core.ip 0.0.0.0 \ --keyring.accname validator \ --gateway.addr 0.0.0.0 \ - --rpc.addr 0.0.0.0 \ \ No newline at end of file + --rpc.addr 0.0.0.0 \ + --log.level $CELESTIA_LOG_LEVEL \ No newline at end of file diff --git a/scripts/monza/faucet b/scripts/monza/faucet index d5cde4be4..9a2af1b8e 100755 --- a/scripts/monza/faucet +++ b/scripts/monza/faucet @@ -8,16 +8,16 @@ temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos cd "$temp_dir" # Split the listen addresses into an array -IFS=':' read -r -a listener_array <<< "$SUZUKA_APTOS_FAUCET_LISTEN_ADDR" +IFS=':' read -r -a listener_array <<< "$MONZA_APTOS_FAUCET_LISTEN_ADDR" # Extract the listen address and port LISTEN_ADDR="${listener_array[0]}" LISTEN_PORT="${listener_array[1]}" echo "Starting faucet service with the following configuration:" -echo " - Chain ID: $SUZUKA_CHAIN_ID" -echo " - Node URL: $SUZUKA_APTOS_REST_LISTEN_ADDR" -echo " - Faucet URL: $SUZUKA_APTOS_FAUCET_LISTEN_ADDR" +echo " - Chain ID: $MONZA_CHAIN_ID" +echo " - Node URL: $MONZA_APTOS_REST_LISTEN_ADDR" +echo " - Faucet URL: $MONZA_APTOS_FAUCET_LISTEN_ADDR" # Run the faucet service using cargo echo "Starting faucet service..." diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/monza-full-node/prelude index 6a444d70c..ac2188908 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/monza-full-node/prelude @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -e +: ${CELESTIA_LOG_LEVEL:=INFO} +export CELESTIA_LOG_LEVEL + export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env diff --git a/scripts/preludes/suzuka-full-node/prelude b/scripts/preludes/suzuka-full-node/prelude index ae930e994..43a205813 100755 --- a/scripts/preludes/suzuka-full-node/prelude +++ b/scripts/preludes/suzuka-full-node/prelude @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -e +export CELESTIA_LOG_LEVEL=debug + export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env From 55f6e54a629a8768ab85e86feeabd70a702c48fb Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 08:35:54 -0700 Subject: [PATCH 076/101] fix: monza should not be called suzuka. --- .../suzuka/suzuka-full-node/src/partial.rs | 21 ++++++++++++++++--- .../monza-full-node/process-compose.yml | 6 +++--- .../execution/suzuka/executor/src/v1.rs | 2 -- .../settlement/mcr/manager/src/manager.rs | 3 +-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 1ed35d54b..00f00877e 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -154,7 +154,12 @@ where }.into_inner(); while let Some(blob) = stream.next().await { - println!("Stream hot!"); + + #[cfg(feature = "logging")] + { + tracing::debug!("Got blob: {:?}", blob) + } + // get the block let block_bytes = match blob? .blob @@ -223,10 +228,20 @@ async fn read_commitment_events(mut stream: CommitmentEventStream) -> anyhow::Re let event = res?; match event { BlockCommitmentEvent::Accepted(commitment) => { - println!("Commitment accepted: {:?}", commitment); + + #[cfg(feature = "logging")] + { + tracing::debug!("Commitment accepted: {:?}", commitment) + } + }, BlockCommitmentEvent::Rejected { height, reason } => { - println!("Commitment at height {height} rejected: {reason:?}"); + + #[cfg(feature = "logging")] + { + tracing::debug!("Commitment rejected: {:?} {:?}", height, reason) + } + }, } } diff --git a/process-compose/monza-full-node/process-compose.yml b/process-compose/monza-full-node/process-compose.yml index 3563dcf7a..f8bbf4aab 100644 --- a/process-compose/monza-full-node/process-compose.yml +++ b/process-compose/monza-full-node/process-compose.yml @@ -30,7 +30,7 @@ processes: exec: command: echo "true" - suzuka-full-node: + monza-full-node: command: | ./target/$CARGO_PROFILE/monza-full-node depends_on: @@ -42,11 +42,11 @@ processes: command: | echo "true" - suzuka-faucet: + monza-faucet: command : | ./scripts/monza/faucet depends_on: - suzuka-full-node: + monza-full-node: condition: process_healthy readiness_probe: initial_delay_seconds: 10 diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index 3ec9d339f..b2a8f7cdf 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -231,8 +231,6 @@ mod opt_tests { let block = ExecutableBlock::new(block_id.clone(), txs); let commitment = executor.execute_block(FinalityMode::Opt, block).await?; - println!("Commitment: {:?}", commitment); - // TODO: test the commitment services_handle.abort(); diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 0538b5f6a..5d17e7bd5 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -56,7 +56,6 @@ fn process_commitments( loop { tokio::select! { Some(block_commitment) = receiver.recv(), if !ahead_of_settlement => { - println!("Received commitment: {:?}", block_commitment); commitments_to_settle.insert( block_commitment.height, block_commitment.commitment.clone(), @@ -79,7 +78,7 @@ fn process_commitments( break; } }; - println!("Received settlement: {:?}", settled_commitment); + let height = settled_commitment.height; if let Some(commitment) = commitments_to_settle.remove(&height) { let event = if commitment == settled_commitment.commitment { From 47423a4af98a7b608d660836ca42f353bf6e3839 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 11:02:53 -0700 Subject: [PATCH 077/101] fix: quieter logging. --- .github/workflows/checks.yml | 9 +- Cargo.lock | 255 +++++++++--------- Cargo.toml | 52 ++-- networks/monza/monza-full-node/src/partial.rs | 12 +- .../da/m1/light_node/v1beta1.proto | 1 + protocol-units/da/m1/light-node/Cargo.toml | 1 + .../da/m1/light-node/src/v1/passthrough.rs | 6 +- .../da/m1/light-node/src/v1/sequencer.rs | 3 +- .../execution/monza/executor/src/lib.rs | 10 +- .../execution/monza/executor/src/v1.rs | 25 ++ scripts/celestia/celestia-env | 3 + scripts/celestia/celestia-local-bridge | 1 - scripts/preludes/monza-full-node/prelude | 4 - 13 files changed, 215 insertions(+), 167 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 07e9f1bf4..12650198a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -30,8 +30,13 @@ jobs: - name: Run Cargo Check in nix environment run: nix develop --command bash -c "cargo check" + - name: Run Cargo Check in nix environment + run: nix develop --command bash -c "cargo build --release" + - name: Run M1 DA Light Node tests in nix environment - run: nix develop --command bash -c "just m1-da-light-node test.local -t=false" + # adjust the log level while debugging + run: CELESTIA_LOG_LEVEL=DPANIC CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just m1-da-light-node test.local -t=false" - name: Run suzuka tests in nix environment - run: nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file + # adjust the log level while debugging + run: CELESTIA_LOG_LEVEL=DPANIC CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index da5db5894..592df0e0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] name = "abstract-domain-derive" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -211,7 +211,7 @@ checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "aptos-abstract-gas-usage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-gas-algebra", @@ -224,7 +224,7 @@ dependencies = [ [[package]] name = "aptos-accumulator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -234,7 +234,7 @@ dependencies = [ [[package]] name = "aptos-aggregator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-logger", @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "aptos-api" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-api-types", @@ -295,7 +295,7 @@ dependencies = [ [[package]] name = "aptos-api-types" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-config", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "aptos-bcs-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "hex", @@ -334,7 +334,7 @@ dependencies = [ [[package]] name = "aptos-bitvec" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "serde", "serde_bytes", @@ -343,7 +343,7 @@ dependencies = [ [[package]] name = "aptos-block-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-aggregator", @@ -379,7 +379,7 @@ dependencies = [ [[package]] name = "aptos-block-partitioner" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "aptos-bounded-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "futures", "rustversion", @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "aptos-build-info" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "shadow-rs", ] @@ -419,7 +419,7 @@ dependencies = [ [[package]] name = "aptos-cached-packages" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-framework", @@ -434,7 +434,7 @@ dependencies = [ [[package]] name = "aptos-channels" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-infallible", @@ -446,7 +446,7 @@ dependencies = [ [[package]] name = "aptos-compression" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -458,7 +458,7 @@ dependencies = [ [[package]] name = "aptos-config" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -492,7 +492,7 @@ dependencies = [ [[package]] name = "aptos-consensus-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-bitvec", @@ -515,7 +515,7 @@ dependencies = [ [[package]] name = "aptos-crypto" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto-derive", @@ -561,7 +561,7 @@ dependencies = [ [[package]] name = "aptos-crypto-derive" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -571,7 +571,7 @@ dependencies = [ [[package]] name = "aptos-data-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-config", "aptos-crypto", @@ -602,7 +602,7 @@ dependencies = [ [[package]] name = "aptos-db" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-accumulator", @@ -650,7 +650,7 @@ dependencies = [ [[package]] name = "aptos-db-indexer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-config", @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "aptos-dkg" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -709,7 +709,7 @@ dependencies = [ [[package]] name = "aptos-drop-helper" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-experimental-runtimes", "aptos-infallible", @@ -721,7 +721,7 @@ dependencies = [ [[package]] name = "aptos-event-notifications" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-channels", @@ -738,7 +738,7 @@ dependencies = [ [[package]] name = "aptos-executor" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -772,7 +772,7 @@ dependencies = [ [[package]] name = "aptos-executor-service" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -809,7 +809,7 @@ dependencies = [ [[package]] name = "aptos-executor-test-helpers" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-cached-packages", @@ -832,7 +832,7 @@ dependencies = [ [[package]] name = "aptos-executor-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-block-partitioner", @@ -854,7 +854,7 @@ dependencies = [ [[package]] name = "aptos-experimental-runtimes" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-runtimes", "core_affinity", @@ -867,7 +867,7 @@ dependencies = [ [[package]] name = "aptos-faucet-core" version = "2.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-config", @@ -901,7 +901,7 @@ dependencies = [ [[package]] name = "aptos-faucet-metrics-server" version = "2.0.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-logger", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "aptos-framework" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-aggregator", @@ -991,7 +991,7 @@ dependencies = [ [[package]] name = "aptos-gas-algebra" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "either", "move-core-types", @@ -1000,7 +1000,7 @@ dependencies = [ [[package]] name = "aptos-gas-meter" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-gas-algebra", "aptos-gas-schedule", @@ -1016,7 +1016,7 @@ dependencies = [ [[package]] name = "aptos-gas-profiling" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-framework", @@ -1039,7 +1039,7 @@ dependencies = [ [[package]] name = "aptos-gas-schedule" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-gas-algebra", "aptos-global-constants", @@ -1054,7 +1054,7 @@ dependencies = [ [[package]] name = "aptos-genesis" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-cached-packages", @@ -1079,22 +1079,22 @@ dependencies = [ [[package]] name = "aptos-global-constants" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" [[package]] name = "aptos-id-generator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" [[package]] name = "aptos-infallible" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" [[package]] name = "aptos-jellyfish-merkle" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -1122,7 +1122,7 @@ dependencies = [ [[package]] name = "aptos-keygen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-crypto", "aptos-types", @@ -1132,7 +1132,7 @@ dependencies = [ [[package]] name = "aptos-language-e2e-tests" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-abstract-gas-usage", @@ -1179,7 +1179,7 @@ dependencies = [ [[package]] name = "aptos-ledger" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-crypto", "aptos-types", @@ -1193,7 +1193,7 @@ dependencies = [ [[package]] name = "aptos-log-derive" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -1203,7 +1203,7 @@ dependencies = [ [[package]] name = "aptos-logger" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-infallible", "aptos-log-derive", @@ -1224,7 +1224,7 @@ dependencies = [ [[package]] name = "aptos-memory-usage-tracker" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-gas-algebra", "aptos-gas-meter", @@ -1238,7 +1238,7 @@ dependencies = [ [[package]] name = "aptos-mempool" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-bounded-executor", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "aptos-mempool-notifications" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-runtimes", "aptos-types", @@ -1292,7 +1292,7 @@ dependencies = [ [[package]] name = "aptos-memsocket" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-infallible", "bytes", @@ -1303,7 +1303,7 @@ dependencies = [ [[package]] name = "aptos-metrics-core" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "prometheus", @@ -1312,7 +1312,7 @@ dependencies = [ [[package]] name = "aptos-move-stdlib" version = "0.1.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-gas-schedule", @@ -1338,7 +1338,7 @@ dependencies = [ [[package]] name = "aptos-mvhashmap" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-aggregator", @@ -1361,7 +1361,7 @@ dependencies = [ [[package]] name = "aptos-native-interface" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-gas-algebra", "aptos-gas-schedule", @@ -1378,7 +1378,7 @@ dependencies = [ [[package]] name = "aptos-netcore" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-memsocket", "aptos-proxy", @@ -1395,7 +1395,7 @@ dependencies = [ [[package]] name = "aptos-network" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-bitvec", @@ -1443,7 +1443,7 @@ dependencies = [ [[package]] name = "aptos-node-resource-metrics" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-build-info", "aptos-infallible", @@ -1459,7 +1459,7 @@ dependencies = [ [[package]] name = "aptos-num-variants" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "proc-macro2 1.0.81", "quote 1.0.36", @@ -1469,7 +1469,7 @@ dependencies = [ [[package]] name = "aptos-openapi" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "async-trait", "percent-encoding", @@ -1482,7 +1482,7 @@ dependencies = [ [[package]] name = "aptos-package-builder" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-framework", @@ -1495,7 +1495,7 @@ dependencies = [ [[package]] name = "aptos-peer-monitoring-service-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-config", "aptos-types", @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "aptos-proptest-helpers" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "crossbeam", "proptest", @@ -1518,7 +1518,7 @@ dependencies = [ [[package]] name = "aptos-protos" version = "1.3.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "futures-core", "pbjson", @@ -1531,7 +1531,7 @@ dependencies = [ [[package]] name = "aptos-proxy" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "ipnet", ] @@ -1539,7 +1539,7 @@ dependencies = [ [[package]] name = "aptos-push-metrics" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -1550,7 +1550,7 @@ dependencies = [ [[package]] name = "aptos-rate-limiter" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-infallible", "aptos-logger", @@ -1564,7 +1564,7 @@ dependencies = [ [[package]] name = "aptos-rest-client" version = "0.0.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-api-types", @@ -1590,7 +1590,7 @@ dependencies = [ [[package]] name = "aptos-retrier" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-logger", "tokio", @@ -1599,7 +1599,7 @@ dependencies = [ [[package]] name = "aptos-rocksdb-options" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-config", "rocksdb", @@ -1608,7 +1608,7 @@ dependencies = [ [[package]] name = "aptos-runtimes" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "rayon", "tokio", @@ -1617,7 +1617,7 @@ dependencies = [ [[package]] name = "aptos-schemadb" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-infallible", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "aptos-scratchpad" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-crypto", "aptos-drop-helper", @@ -1654,7 +1654,7 @@ dependencies = [ [[package]] name = "aptos-sdk" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-api-types", @@ -1675,7 +1675,7 @@ dependencies = [ [[package]] name = "aptos-sdk-builder" version = "0.2.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-types", @@ -1694,7 +1694,7 @@ dependencies = [ [[package]] name = "aptos-secure-net" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-logger", "aptos-metrics-core", @@ -1713,7 +1713,7 @@ dependencies = [ [[package]] name = "aptos-secure-storage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -1735,7 +1735,7 @@ dependencies = [ [[package]] name = "aptos-short-hex-str" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "mirai-annotations", "serde", @@ -1746,7 +1746,7 @@ dependencies = [ [[package]] name = "aptos-speculative-state-helper" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-infallible", @@ -1758,7 +1758,7 @@ dependencies = [ [[package]] name = "aptos-storage-interface" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-crypto", @@ -1790,7 +1790,7 @@ dependencies = [ [[package]] name = "aptos-storage-service-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-channels", "aptos-config", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "aptos-storage-service-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-compression", "aptos-config", @@ -1820,7 +1820,7 @@ dependencies = [ [[package]] name = "aptos-table-natives" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-gas-schedule", @@ -1841,7 +1841,7 @@ dependencies = [ [[package]] name = "aptos-temppath" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "hex", "rand 0.7.3", @@ -1850,7 +1850,7 @@ dependencies = [ [[package]] name = "aptos-time-service" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-infallible", "enum_dispatch", @@ -1863,7 +1863,7 @@ dependencies = [ [[package]] name = "aptos-types" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-bitvec", @@ -1914,12 +1914,12 @@ dependencies = [ [[package]] name = "aptos-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" [[package]] name = "aptos-vault-client" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-crypto", "base64 0.13.1", @@ -1935,7 +1935,7 @@ dependencies = [ [[package]] name = "aptos-vm" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-aggregator", @@ -1991,7 +1991,7 @@ dependencies = [ [[package]] name = "aptos-vm-genesis" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-cached-packages", @@ -2013,7 +2013,7 @@ dependencies = [ [[package]] name = "aptos-vm-logging" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "aptos-crypto", "aptos-logger", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "aptos-vm-types" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-aggregator", @@ -2049,7 +2049,7 @@ dependencies = [ [[package]] name = "aptos-vm-validator" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "aptos-event-notifications", @@ -6022,6 +6022,7 @@ dependencies = [ "async-stream", "celestia-rpc", "celestia-types", + "chrono", "env_logger 0.11.3", "hex", "m1-da-light-node-grpc", @@ -6486,7 +6487,7 @@ checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" [[package]] name = "move-abigen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6503,7 +6504,7 @@ dependencies = [ [[package]] name = "move-binary-format" version = "0.0.3" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "backtrace", @@ -6518,12 +6519,12 @@ dependencies = [ [[package]] name = "move-borrow-graph" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" [[package]] name = "move-bytecode-source-map" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6538,7 +6539,7 @@ dependencies = [ [[package]] name = "move-bytecode-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "move-binary-format", @@ -6550,7 +6551,7 @@ dependencies = [ [[package]] name = "move-bytecode-verifier" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "fail 0.4.0", @@ -6565,7 +6566,7 @@ dependencies = [ [[package]] name = "move-bytecode-viewer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "clap 4.5.4", @@ -6582,7 +6583,7 @@ dependencies = [ [[package]] name = "move-cli" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6628,7 +6629,7 @@ dependencies = [ [[package]] name = "move-command-line-common" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "difference", @@ -6645,7 +6646,7 @@ dependencies = [ [[package]] name = "move-compiler" version = "0.0.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6674,7 +6675,7 @@ dependencies = [ [[package]] name = "move-compiler-v2" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "abstract-domain-derive", "anyhow", @@ -6707,7 +6708,7 @@ dependencies = [ [[package]] name = "move-core-types" version = "0.0.4" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "arbitrary", @@ -6732,7 +6733,7 @@ dependencies = [ [[package]] name = "move-coverage" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6752,7 +6753,7 @@ dependencies = [ [[package]] name = "move-disassembler" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "clap 4.5.4", @@ -6770,7 +6771,7 @@ dependencies = [ [[package]] name = "move-docgen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "codespan", @@ -6789,7 +6790,7 @@ dependencies = [ [[package]] name = "move-errmapgen" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6803,7 +6804,7 @@ dependencies = [ [[package]] name = "move-ir-compiler" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6822,7 +6823,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "codespan-reporting", @@ -6841,7 +6842,7 @@ dependencies = [ [[package]] name = "move-ir-to-bytecode-syntax" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "hex", @@ -6854,7 +6855,7 @@ dependencies = [ [[package]] name = "move-ir-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "hex", @@ -6868,7 +6869,7 @@ dependencies = [ [[package]] name = "move-model" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "codespan", @@ -6896,7 +6897,7 @@ dependencies = [ [[package]] name = "move-package" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -6933,7 +6934,7 @@ dependencies = [ [[package]] name = "move-prover" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "async-trait", @@ -6972,7 +6973,7 @@ dependencies = [ [[package]] name = "move-prover-boogie-backend" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "async-trait", @@ -7002,7 +7003,7 @@ dependencies = [ [[package]] name = "move-prover-bytecode-pipeline" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "abstract-domain-derive", "anyhow", @@ -7033,7 +7034,7 @@ dependencies = [ [[package]] name = "move-resource-viewer" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -7061,7 +7062,7 @@ dependencies = [ [[package]] name = "move-stackless-bytecode" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "abstract-domain-derive", "codespan", @@ -7088,7 +7089,7 @@ dependencies = [ [[package]] name = "move-stdlib" version = "0.1.1" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "hex", @@ -7111,7 +7112,7 @@ dependencies = [ [[package]] name = "move-symbol-pool" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "once_cell", "serde", @@ -7120,7 +7121,7 @@ dependencies = [ [[package]] name = "move-table-extension" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bcs 0.1.4", @@ -7138,7 +7139,7 @@ dependencies = [ [[package]] name = "move-unit-test" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "better_any", @@ -7169,7 +7170,7 @@ dependencies = [ [[package]] name = "move-vm-runtime" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "better_any", "bytes", @@ -7194,7 +7195,7 @@ dependencies = [ [[package]] name = "move-vm-test-utils" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "anyhow", "bytes", @@ -7209,7 +7210,7 @@ dependencies = [ [[package]] name = "move-vm-types" version = "0.1.0" -source = "git+https://github.com/movementlabsxyz/aptos-core?rev=99cf0d3c2811d90c93e6c04f98e2cd0316c79731#99cf0d3c2811d90c93e6c04f98e2cd0316c79731" +source = "git+https://github.com/movementlabsxyz/aptos-core?rev=e9b42128f8ed51e90d06beec72d32797693ab66c#e9b42128f8ed51e90d06beec72d32797693ab66c" dependencies = [ "bcs 0.1.4", "derivative", diff --git a/Cargo.toml b/Cargo.toml index df430182e..b20b2318a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -182,33 +182,33 @@ ethers-middleware = { version = "=2.0.10", default-features = false } # Aptos dependencies # We use a forked version so that we can override dependency versions. This is required # to be avoid depenedency conflicts with other Sovereign Labs crates. -aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731", features = [ +aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c", features = [ "cloneable-private-keys", ] } -aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } -aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } +aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } bcs = { git = "https://github.com/aptos-labs/bcs.git", rev = "d31fab9d81748e2594be5cd5cdf845786a30562d" } move-binary-format = { git = "https://github.com/diem/move" } @@ -231,7 +231,7 @@ secp256k1 = { version = "0.27", default-features = false, features = [ "rand-std", "recovery", ] } -aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "99cf0d3c2811d90c93e6c04f98e2cd0316c79731" } +aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "e9b42128f8ed51e90d06beec72d32797693ab66c" } # celestia dependencies celestia-rpc = { git = "https://github.com/eigerco/lumina" } diff --git a/networks/monza/monza-full-node/src/partial.rs b/networks/monza/monza-full-node/src/partial.rs index ec8ad83ab..ec5324645 100644 --- a/networks/monza/monza-full-node/src/partial.rs +++ b/networks/monza/monza-full-node/src/partial.rs @@ -140,9 +140,9 @@ impl MonzaPartialNode { } // get the block - let block_bytes = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { + let (block_bytes, block_timestamp) = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { blob_response::BlobType::SequencedBlobBlock(blob) => { - blob.data + (blob.data, blob.timestamp) }, _ => { anyhow::bail!("Invalid blob type in response") } }; @@ -157,6 +157,14 @@ impl MonzaPartialNode { // get the transactions let mut block_transactions = Vec::new(); + let block_metadata = self.executor.build_block_metadata(block_timestamp).await?; + let block_metadata_transaction = SignatureVerifiedTransaction::Valid( + Transaction::BlockMetadata( + block_metadata + ) + ); + block_transactions.push(block_metadata_transaction); + for transaction in block.transactions { let signed_transaction : SignedTransaction = serde_json::from_slice(&transaction.0)?; let signature_verified_transaction = SignatureVerifiedTransaction::Valid( diff --git a/proto/movementlabs/protocol_units/da/m1/light_node/v1beta1.proto b/proto/movementlabs/protocol_units/da/m1/light_node/v1beta1.proto index 122ffa4f0..759253046 100644 --- a/proto/movementlabs/protocol_units/da/m1/light_node/v1beta1.proto +++ b/proto/movementlabs/protocol_units/da/m1/light_node/v1beta1.proto @@ -8,6 +8,7 @@ message Blob { bytes data = 2; uint64 height = 3; // bytes signature = 4; // at some point a signature will be added here + uint64 timestamp = 5; } enum VerificationMode { diff --git a/protocol-units/da/m1/light-node/Cargo.toml b/protocol-units/da/m1/light-node/Cargo.toml index 8c567950e..0a4cd7ce6 100644 --- a/protocol-units/da/m1/light-node/Cargo.toml +++ b/protocol-units/da/m1/light-node/Cargo.toml @@ -29,6 +29,7 @@ async-stream = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } tempfile = { workspace = true } +chrono = { workspace = true } # sequencer diff --git a/protocol-units/da/m1/light-node/src/v1/passthrough.rs b/protocol-units/da/m1/light-node/src/v1/passthrough.rs index 8bea1a8c9..ab44d78b5 100644 --- a/protocol-units/da/m1/light-node/src/v1/passthrough.rs +++ b/protocol-units/da/m1/light-node/src/v1/passthrough.rs @@ -218,12 +218,16 @@ impl LightNodeV1 { } pub fn celestia_blob_to_blob(blob: CelestiaBlob, height: u64) -> Result { + + let timestamp = chrono::Utc::now().timestamp() as u64; + Ok(Blob { data: blob.data, blob_id: serde_json::to_string(&blob.commitment).map_err( |e| anyhow::anyhow!("Failed to serialize commitment: {}", e) )?, - height + height, + timestamp, }) } diff --git a/protocol-units/da/m1/light-node/src/v1/sequencer.rs b/protocol-units/da/m1/light-node/src/v1/sequencer.rs index 46f7c5f9a..a71dbb56a 100644 --- a/protocol-units/da/m1/light-node/src/v1/sequencer.rs +++ b/protocol-units/da/m1/light-node/src/v1/sequencer.rs @@ -123,7 +123,8 @@ impl LightNodeV1 { Blob { data, blob_id : "".to_string(), - height + height, + timestamp : 0, } )) }) diff --git a/protocol-units/execution/monza/executor/src/lib.rs b/protocol-units/execution/monza/executor/src/lib.rs index da89d498c..bd1ed2cde 100644 --- a/protocol-units/execution/monza/executor/src/lib.rs +++ b/protocol-units/execution/monza/executor/src/lib.rs @@ -4,13 +4,14 @@ pub use aptos_types::{ transaction::signature_verified_transaction::SignatureVerifiedTransaction, block_executor::partitioner::ExecutableBlock, block_executor::partitioner::ExecutableTransactions, - transaction::{SignedTransaction, Transaction} + transaction::{SignedTransaction, Transaction}, + block_metadata::BlockMetadata }; pub use aptos_crypto::hash::HashValue; -use aptos_api::runtime::Apis; +pub use aptos_api::runtime::Apis; pub use maptos_execution_util::FinalityMode; -use movement_types::BlockCommitment; +pub use movement_types::BlockCommitment; use async_channel::Sender; @@ -41,5 +42,8 @@ pub trait MonzaExecutor { /// Get block head height. async fn get_block_head_height(&self) -> Result; + + /// Build block metadata for a timestamp + async fn build_block_metadata(&self, timestamp: u64) -> Result; } diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 06ab21944..cc6d8a6a6 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -82,6 +82,31 @@ impl MonzaExecutor for MonzaExecutorV1 { // ideally, this should read from the ledger Ok(1) } + + /// Build block metadata for a timestamp + async fn build_block_metadata(&self, timestamp: u64) -> Result { + + let (epoch, round) = self.executor.get_next_epoch_and_round().await?; + + // Generate a random block ID. + let block_id = HashValue::random(); + // Clone the signer from the executor for signing the metadata. + let signer = self.executor.signer.clone(); + // Get the current time in microseconds for the block timestamp. + let current_time_micros = chrono::Utc::now().timestamp_micros() as u64; + + // Create a block metadata transaction. + Ok(BlockMetadata::new( + block_id, + epoch, + round, + signer.author(), + vec![], + vec![], + current_time_micros, + )) + + } } #[cfg(test)] diff --git a/scripts/celestia/celestia-env b/scripts/celestia/celestia-env index 7643a192f..7702541a0 100755 --- a/scripts/celestia/celestia-env +++ b/scripts/celestia/celestia-env @@ -8,6 +8,9 @@ export CELESTIA_CHAIN_ID="$(openssl rand -hex 10)" export APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" export NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" +: ${CELESTIA_LOG_LEVEL:="INFO"} +export CELESTIA_LOG_LEVEL + contains() { local value="$1" shift # Shift the arguments to leave the rest of the array diff --git a/scripts/celestia/celestia-local-bridge b/scripts/celestia/celestia-local-bridge index 1416143a7..f3cde5be9 100755 --- a/scripts/celestia/celestia-local-bridge +++ b/scripts/celestia/celestia-local-bridge @@ -1,6 +1,5 @@ #!/usr/bin/env bash set -e -LOG_LEVEL=$(echo "$CELESTIA_LOG_LEVEL" | awk '{print tolower($0)}') APP_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/.celestia-app" NODE_PATH="$MOVEMENT_BASE_STORAGE_PATH/celestia/${CELESTIA_CHAIN_ID}/bridge" diff --git a/scripts/preludes/monza-full-node/prelude b/scripts/preludes/monza-full-node/prelude index ac2188908..97aeb9ca1 100755 --- a/scripts/preludes/monza-full-node/prelude +++ b/scripts/preludes/monza-full-node/prelude @@ -1,9 +1,5 @@ #!/usr/bin/env bash set -e - -: ${CELESTIA_LOG_LEVEL:=INFO} -export CELESTIA_LOG_LEVEL - export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" . ./scripts/celestia/celestia-env From 0ff96c09254f5648717cffa1fbd7a6ab63d5fb04 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 11:47:05 -0700 Subject: [PATCH 078/101] fix: timestamp. --- protocol-units/execution/monza/executor/src/v1.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 9839e5d98..5096be98b 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -89,8 +89,6 @@ impl MonzaExecutor for MonzaExecutorV1 { let (epoch, round) = self.executor.get_next_epoch_and_round().await?; // Clone the signer from the executor for signing the metadata. let signer = self.executor.signer.clone(); - // Get the current time in microseconds for the block timestamp. - let current_time_micros = chrono::Utc::now().timestamp_micros() as u64; // Create a block metadata transaction. Ok(BlockMetadata::new( @@ -100,7 +98,7 @@ impl MonzaExecutor for MonzaExecutorV1 { signer.author(), vec![], vec![], - current_time_micros, + timestamp, )) } From 2af0c7af3055aad617e1abd21bb31938535ea3d0 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Tue, 21 May 2024 11:59:56 -0700 Subject: [PATCH 079/101] fix: bad mergee. --- .../suzuka/suzuka-full-node/src/partial.rs | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 00f00877e..836d2310a 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -154,24 +154,6 @@ where }.into_inner(); while let Some(blob) = stream.next().await { - - #[cfg(feature = "logging")] - { - tracing::debug!("Got blob: {:?}", blob) - } - - // get the block - let block_bytes = match blob? - .blob - .ok_or(anyhow::anyhow!("No blob in response"))? - .blob_type - .ok_or(anyhow::anyhow!("No blob type in response"))? - { - blob_response::BlobType::SequencedBlobBlock(blob) => blob.data, - _ => { - anyhow::bail!("Invalid blob type in response") - }, - }; #[cfg(feature = "logging")] { @@ -186,6 +168,13 @@ where _ => { anyhow::bail!("Invalid blob type in response") } }; + let block : Block = serde_json::from_slice(&block_bytes)?; + + #[cfg(feature = "logging")] + { + tracing::debug!("Got block: {:?}", block) + } + // get the transactions let mut block_transactions = Vec::new(); for transaction in block.transactions { From 6446569fa7bdacb26dab87d1498a7ff5f0b98c84 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 22 May 2024 12:10:05 +0300 Subject: [PATCH 080/101] CI: run suzuka-full-node tests --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5269ae056..99830d29a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -39,4 +39,4 @@ jobs: - name: Run suzuka tests in nix environment # adjust the log level while debugging - run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just monza-full-node test.local -t=false" \ No newline at end of file + run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file From 03e626e47fa3cd788a0d99138b23449ed8c82859 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Wed, 22 May 2024 04:56:05 -0700 Subject: [PATCH 081/101] fix: prebuild. --- .github/workflows/checks.yml | 2 +- .idea/workspace.xml | 78 ------------------- .../DeployMCR.s.sol/1569/run-1716348078.json | 52 +++++++++++++ .../DeployMCR.s.sol/1569/run-latest.json | 52 +++++++++++++ scripts/build/prebuild | 16 ++++ 5 files changed, 121 insertions(+), 79 deletions(-) delete mode 100644 .idea/workspace.xml create mode 100644 protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json create mode 100644 protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json create mode 100755 scripts/build/prebuild diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 99830d29a..4503a1afd 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -31,7 +31,7 @@ jobs: run: nix develop --command bash -c "cargo check" - name: Run Cargo Check in nix environment - run: nix develop --command bash -c "cargo build --release" + run: nix develop --command bash -c "./scripts/build/prebuild" - name: Run M1 DA Light Node tests in nix environment # adjust the log level while debugging diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index f0c7d6e98..000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - { - "associatedIndex": 3 -} - - - - { - "keyToString": { - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.rust.reset.selective.auto.import": "true", - "git-widget-placeholder": "monza", - "last_opened_file_path": "/Users/l-monninger/dev/sdk", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true", - "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "", - "org.rust.first.attach.projects": "true", - "vue.rearranger.settings.migration": "true" - } -} - - - - - - - 1712319327485 - - - - - - \ No newline at end of file diff --git a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json new file mode 100644 index 000000000..be54c2071 --- /dev/null +++ b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json @@ -0,0 +1,52 @@ +{ + "transactions": [ + { + "hash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", + "transactionType": "CREATE", + "contractName": "MCR", + "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "function": null, + "arguments": [ + "10", + "128", + "100000000000000000000", + "0" + ], + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x1a0f1a", + "value": "0x0", + "input": "0x6080604052348015600f57600080fd5b50604051611607380380611607833981016040819052602c916047565b6002939093556003919091556000908155600155600455607c565b60008060008060808587031215605c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b61157c8061008b6000396000f3fe6080604052600436106102045760003560e01c80636b588ac711610118578063e1ffa44c116100a0578063ee96da051161006f578063ee96da0514610661578063efe97d05146106af578063f89fe60b146106c4578063f934ed75146106e4578063fc2788ad1461070757600080fd5b8063e1ffa44c1461058a578063e6a386e4146105f0578063e90d4c0614610605578063ee377d901461064c57600080fd5b806384df6455116100e757806384df6455146104bb578063b97dd9e2146104fd578063c76c27bf14610512578063ce2a96b41461054a578063e1b2b2221461056a57600080fd5b80636b588ac71461046557806372710d181461047b57806374e8e5641461049057806376671808146104a557600080fd5b806320e0e4451161019b5780633a4b66f11161016a5780633a4b66f1146103fd57806342e0aeb2146104055780634ff0876a1461041a5780635d3ea8f11461043057806367d144ab1461044557600080fd5b806320e0e445146103915780632a3fa95c146103be5780632e17de78146103d3578063365f490b146103f557600080fd5b8063108cf69b116101d7578063108cf69b146102cc57806311fe3345146103045780631c4e4e27146103245780631cfa25161461037b57600080fd5b8063048317c814610209578063056f4aa6146102325780630a0b81cc146102485780630dd563661461028a575b600080fd5b34801561021557600080fd5b5061021f60005481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60015481565b34801561025457600080fd5b50610268610263366004611274565b61073f565b6040805182518152602080840151908201529181015190820152606001610229565b34801561029657600080fd5b5061021f6102a53660046112a0565b60009081526008602090815260408083206001600160a01b03949094168352929052205490565b3480156102d857600080fd5b5061021f6102e7366004611274565b600860209081526000928352604080842090915290825290205481565b34801561031057600080fd5b5061021f61031f3660046112ca565b6107a3565b34801561033057600080fd5b5061036061033f3660046112e5565b600d6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610229565b34801561038757600080fd5b5061021f60035481565b34801561039d57600080fd5b5061021f6103ac3660046112e5565b600a6020526000908152604090205481565b3480156103ca57600080fd5b5060035461021f565b3480156103df57600080fd5b506103f36103ee3660046112e5565b6107b2565b005b6103f3610914565b6103f3610abe565b34801561041157600080fd5b5060005461021f565b34801561042657600080fd5b5061021f60025481565b34801561043c57600080fd5b5060025461021f565b34801561045157600080fd5b5061021f6104603660046112ca565b610bb6565b34801561047157600080fd5b5061021f60045481565b34801561048757600080fd5b5061021f610bc5565b34801561049c57600080fd5b5061021f610bd8565b3480156104b157600080fd5b5061021f60055481565b3480156104c757600080fd5b5061021f6104d63660046112a0565b60009081526009602090815260408083206001600160a01b03949094168352929052205490565b34801561050957600080fd5b5060055461021f565b34801561051e57600080fd5b5061021f61052d366004611274565b600960209081526000928352604080842090915290825290205481565b34801561055657600080fd5b5061021f6105653660046112e5565b610bea565b34801561057657600080fd5b506103f36105853660046113a1565b610c50565b34801561059657600080fd5b506102686105a53660046112e5565b604080516060808201835260008083526020808401829052928401819052938452600d8252928290208251938401835280548452600181015491840191909152600201549082015290565b3480156105fc57600080fd5b5060015461021f565b34801561061157600080fd5b50610360610620366004611274565b600b60209081526000928352604080842090915290825290208054600182015460029092015490919083565b34801561065857600080fd5b5061021f610c8a565b34801561066d57600080fd5b5061026861067c366004611451565b60408051606080820183526000808352602080840182905292840152825190810183529485528401929092529082015290565b3480156106bb57600080fd5b5061021f610c9a565b3480156106d057600080fd5b506103f36106df36600461147d565b610cab565b3480156106f057600080fd5b506000546001546040519111158152602001610229565b34801561071357600080fd5b5061021f610722366004611499565b600c60209081526000928352604080842090915290825290205481565b604080516060808201835260008083526020808401829052928401819052858152600b83528381206001600160a01b038616825283528390208351918201845280548252600181015492820192909252600290910154918101919091525b92915050565b600061079d826102a560055490565b600054600154101561080b5760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e0060448201526064015b60405180910390fd5b806008600061081960055490565b815260208082019290925260409081016000908120338252909252902054101561087b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a1039ba30b5b29760691b6044820152606401610802565b8060096000610888610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108c891906114d1565b909155503390507f04fba62a80e1849b9aee6f029587f10dc735742856c310f041883b34f4107ab9826108f9610c9a565b6040805192835260208301919091520160405180910390a250565b600054600154106109675760405162461bcd60e51b815260206004820152601b60248201527f47656e6573697320636572656d6f6e792068617320656e6465642e00000000006044820152606401610802565b610972600633610cb5565b503360009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812080543492906109b19084906114d1565b9250508190555034600160008282546109ca91906114d1565b9091555050604080513481526000602082015233917f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a910160405180910390a260005460015410610abc57610a1d610c8a565b60055560005b610a2d6006610cd1565b811015610aba576000610a41600683610cdb565b6001600160a01b03811660009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812054919250600890610a8860055490565b8152602080820192909252604090810160009081206001600160a01b0390951681529390915290912055600101610a23565b505b565b6000546001541015610b125760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e006044820152606401610802565b610b1d600633610cb5565b503460086000610b2b610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b031681526020019081526020016000206000828254610b6b91906114d1565b909155503390507f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a34610b9c610c9a565b6040805192835260208301919091520160405180910390a2565b600061079d826104d660055490565b6000610bd361056560055490565b905090565b6000600354600454610bd391906114d1565b600080805b610bf96006610cd1565b811015610c4957610c35610c0e600683610cdb565b60008681526008602090815260408083206001600160a01b03949094168352929052205490565b610c3f90836114d1565b9150600101610bef565b5092915050565b60005b8151811015610c8657610c7e828281518110610c7157610c716114e4565b6020026020010151610cab565b600101610c53565b5050565b600060025442610bd391906114fa565b60006005546001610bd391906114d1565b610aba3382610ce7565b6000610cca836001600160a01b038416610ee1565b9392505050565b600061079d825490565b6000610cca8383610f30565b80516000908152600b602090815260408083206001600160a01b038616845290915290205415610d7f5760405162461bcd60e51b815260206004820152603960248201527f56616c696461746f722068617320616c726561647920636f6d6d69747465642060448201527f746f206120626c6f636b206174207468697320686569676874000000000000006064820152608401610802565b600354600454610d8f91906114d1565b815110610e185760405162461bcd60e51b815260206004820152604b60248201527f56616c696461746f722068617320636f6d6d697474656420746f206120626c6f60448201527f636b20746f6f20666172206168656164206f6620746865206c6173742061636360648201526a657074656420626c6f636b60a81b608482015260a401610802565b80516000908152600a60205260408120549003610e4957610e37610c8a565b81516000908152600a60205260409020555b80516000908152600b602090815260408083206001600160a01b03861684528252918290208351815590830151600182015590820151600290910155610e8e826107a3565b81516000908152600c6020908152604080832082860151845290915281208054909190610ebc9084906114d1565b90915550505b610ed96004546001610ed491906114d1565b610f5a565b610ec2575050565b6000818152600183016020526040812054610f285750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561079d565b50600061079d565b6000826000018281548110610f4757610f476114e4565b9060005260206000200154905092915050565b6000818152600a60205260408120545b80610f7460055490565b1015610f9057610f8b610f8660055490565b61105f565b610f6a565b60005b610f9d6006610cd1565b811015611055576000610fb1600683610cdb565b6000868152600b602090815260408083206001600160a01b03851684528252808320815160608101835281548082526001830154828601908152600290930154828501528552600c84528285209151855292529091205491925090600361101786610bea565b61102290600261151c565b61102c91906114fa565b81111561104a5761103d82866110b1565b5060019695505050505050565b505050600101610f93565b5060009392505050565b60005b61106c6006610cd1565b811015611095576000611080600683610cdb565b905061108c8184611133565b50600101611062565b506001600560008282546110a991906114d1565b909155505050565b81516000908152600d6020908152604091829020845180825582860151600183018190558487015160029093018390556004829055845190815292830152917f5b0d1f14085ff88796df21c2944d34c115838925a7bee30850fcacaaf902a379910160405180910390a280611124610c8a565b1115610c8657610c868161105f565b600960006111428360016114d1565b8152602080820192909252604090810160009081206001600160a01b0386168083529084528282205485835260088552838320918352935220546111869190611533565b600860006111958460016114d1565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546111d591906114d1565b90915550506001600160a01b0382166108fc600960006111f68560016114d1565b81526020019081526020016000206000856001600160a01b03166001600160a01b03168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015611253573d6000803e3d6000fd5b505050565b80356001600160a01b038116811461126f57600080fd5b919050565b6000806040838503121561128757600080fd5b8235915061129760208401611258565b90509250929050565b600080604083850312156112b357600080fd5b6112bc83611258565b946020939093013593505050565b6000602082840312156112dc57600080fd5b610cca82611258565b6000602082840312156112f757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561133d5761133d6112fe565b604052919050565b60006060828403121561135757600080fd5b6040516060810181811067ffffffffffffffff8211171561137a5761137a6112fe565b80604052508091508235815260208301356020820152604083013560408201525092915050565b600060208083850312156113b457600080fd5b823567ffffffffffffffff808211156113cc57600080fd5b818501915085601f8301126113e057600080fd5b8135818111156113f2576113f26112fe565b611400848260051b01611314565b8181528481019250606091820284018501918883111561141f57600080fd5b938501935b82851015611445576114368986611345565b84529384019392850192611424565b50979650505050505050565b60008060006060848603121561146657600080fd5b505081359360208301359350604090920135919050565b60006060828403121561148f57600080fd5b610cca8383611345565b600080604083850312156114ac57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561079d5761079d6114bb565b634e487b7160e01b600052603260045260246000fd5b60008261151757634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761079d5761079d6114bb565b8181038181111561079d5761079d6114bb56fea2646970667358221220c9542e0185c9b0ec6eb1d431d6380d142087b991f911e0e830486ae7143e052a64736f6c63430008190033000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0", + "chainId": "0x621" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x140d08", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", + "transactionIndex": "0x0", + "blockHash": "0xea37b267f88d3ca5d2fa600066f04e1647c21cbfa15fd3206c8d8df413e9309c", + "blockNumber": "0x1", + "gasUsed": "0x140d08", + "effectiveGasPrice": "0x3b9aca00", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "root": "0xdbc0724b8d01dec5d65693164bc15a0f49c3029052b228b6b5391ae692368844" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1716348078, + "chain": 1569, + "commit": "fa704b72" +} \ No newline at end of file diff --git a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json new file mode 100644 index 000000000..be54c2071 --- /dev/null +++ b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json @@ -0,0 +1,52 @@ +{ + "transactions": [ + { + "hash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", + "transactionType": "CREATE", + "contractName": "MCR", + "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "function": null, + "arguments": [ + "10", + "128", + "100000000000000000000", + "0" + ], + "transaction": { + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "gas": "0x1a0f1a", + "value": "0x0", + "input": "0x6080604052348015600f57600080fd5b50604051611607380380611607833981016040819052602c916047565b6002939093556003919091556000908155600155600455607c565b60008060008060808587031215605c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b61157c8061008b6000396000f3fe6080604052600436106102045760003560e01c80636b588ac711610118578063e1ffa44c116100a0578063ee96da051161006f578063ee96da0514610661578063efe97d05146106af578063f89fe60b146106c4578063f934ed75146106e4578063fc2788ad1461070757600080fd5b8063e1ffa44c1461058a578063e6a386e4146105f0578063e90d4c0614610605578063ee377d901461064c57600080fd5b806384df6455116100e757806384df6455146104bb578063b97dd9e2146104fd578063c76c27bf14610512578063ce2a96b41461054a578063e1b2b2221461056a57600080fd5b80636b588ac71461046557806372710d181461047b57806374e8e5641461049057806376671808146104a557600080fd5b806320e0e4451161019b5780633a4b66f11161016a5780633a4b66f1146103fd57806342e0aeb2146104055780634ff0876a1461041a5780635d3ea8f11461043057806367d144ab1461044557600080fd5b806320e0e445146103915780632a3fa95c146103be5780632e17de78146103d3578063365f490b146103f557600080fd5b8063108cf69b116101d7578063108cf69b146102cc57806311fe3345146103045780631c4e4e27146103245780631cfa25161461037b57600080fd5b8063048317c814610209578063056f4aa6146102325780630a0b81cc146102485780630dd563661461028a575b600080fd5b34801561021557600080fd5b5061021f60005481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60015481565b34801561025457600080fd5b50610268610263366004611274565b61073f565b6040805182518152602080840151908201529181015190820152606001610229565b34801561029657600080fd5b5061021f6102a53660046112a0565b60009081526008602090815260408083206001600160a01b03949094168352929052205490565b3480156102d857600080fd5b5061021f6102e7366004611274565b600860209081526000928352604080842090915290825290205481565b34801561031057600080fd5b5061021f61031f3660046112ca565b6107a3565b34801561033057600080fd5b5061036061033f3660046112e5565b600d6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610229565b34801561038757600080fd5b5061021f60035481565b34801561039d57600080fd5b5061021f6103ac3660046112e5565b600a6020526000908152604090205481565b3480156103ca57600080fd5b5060035461021f565b3480156103df57600080fd5b506103f36103ee3660046112e5565b6107b2565b005b6103f3610914565b6103f3610abe565b34801561041157600080fd5b5060005461021f565b34801561042657600080fd5b5061021f60025481565b34801561043c57600080fd5b5060025461021f565b34801561045157600080fd5b5061021f6104603660046112ca565b610bb6565b34801561047157600080fd5b5061021f60045481565b34801561048757600080fd5b5061021f610bc5565b34801561049c57600080fd5b5061021f610bd8565b3480156104b157600080fd5b5061021f60055481565b3480156104c757600080fd5b5061021f6104d63660046112a0565b60009081526009602090815260408083206001600160a01b03949094168352929052205490565b34801561050957600080fd5b5060055461021f565b34801561051e57600080fd5b5061021f61052d366004611274565b600960209081526000928352604080842090915290825290205481565b34801561055657600080fd5b5061021f6105653660046112e5565b610bea565b34801561057657600080fd5b506103f36105853660046113a1565b610c50565b34801561059657600080fd5b506102686105a53660046112e5565b604080516060808201835260008083526020808401829052928401819052938452600d8252928290208251938401835280548452600181015491840191909152600201549082015290565b3480156105fc57600080fd5b5060015461021f565b34801561061157600080fd5b50610360610620366004611274565b600b60209081526000928352604080842090915290825290208054600182015460029092015490919083565b34801561065857600080fd5b5061021f610c8a565b34801561066d57600080fd5b5061026861067c366004611451565b60408051606080820183526000808352602080840182905292840152825190810183529485528401929092529082015290565b3480156106bb57600080fd5b5061021f610c9a565b3480156106d057600080fd5b506103f36106df36600461147d565b610cab565b3480156106f057600080fd5b506000546001546040519111158152602001610229565b34801561071357600080fd5b5061021f610722366004611499565b600c60209081526000928352604080842090915290825290205481565b604080516060808201835260008083526020808401829052928401819052858152600b83528381206001600160a01b038616825283528390208351918201845280548252600181015492820192909252600290910154918101919091525b92915050565b600061079d826102a560055490565b600054600154101561080b5760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e0060448201526064015b60405180910390fd5b806008600061081960055490565b815260208082019290925260409081016000908120338252909252902054101561087b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a1039ba30b5b29760691b6044820152606401610802565b8060096000610888610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108c891906114d1565b909155503390507f04fba62a80e1849b9aee6f029587f10dc735742856c310f041883b34f4107ab9826108f9610c9a565b6040805192835260208301919091520160405180910390a250565b600054600154106109675760405162461bcd60e51b815260206004820152601b60248201527f47656e6573697320636572656d6f6e792068617320656e6465642e00000000006044820152606401610802565b610972600633610cb5565b503360009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812080543492906109b19084906114d1565b9250508190555034600160008282546109ca91906114d1565b9091555050604080513481526000602082015233917f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a910160405180910390a260005460015410610abc57610a1d610c8a565b60055560005b610a2d6006610cd1565b811015610aba576000610a41600683610cdb565b6001600160a01b03811660009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812054919250600890610a8860055490565b8152602080820192909252604090810160009081206001600160a01b0390951681529390915290912055600101610a23565b505b565b6000546001541015610b125760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e006044820152606401610802565b610b1d600633610cb5565b503460086000610b2b610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b031681526020019081526020016000206000828254610b6b91906114d1565b909155503390507f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a34610b9c610c9a565b6040805192835260208301919091520160405180910390a2565b600061079d826104d660055490565b6000610bd361056560055490565b905090565b6000600354600454610bd391906114d1565b600080805b610bf96006610cd1565b811015610c4957610c35610c0e600683610cdb565b60008681526008602090815260408083206001600160a01b03949094168352929052205490565b610c3f90836114d1565b9150600101610bef565b5092915050565b60005b8151811015610c8657610c7e828281518110610c7157610c716114e4565b6020026020010151610cab565b600101610c53565b5050565b600060025442610bd391906114fa565b60006005546001610bd391906114d1565b610aba3382610ce7565b6000610cca836001600160a01b038416610ee1565b9392505050565b600061079d825490565b6000610cca8383610f30565b80516000908152600b602090815260408083206001600160a01b038616845290915290205415610d7f5760405162461bcd60e51b815260206004820152603960248201527f56616c696461746f722068617320616c726561647920636f6d6d69747465642060448201527f746f206120626c6f636b206174207468697320686569676874000000000000006064820152608401610802565b600354600454610d8f91906114d1565b815110610e185760405162461bcd60e51b815260206004820152604b60248201527f56616c696461746f722068617320636f6d6d697474656420746f206120626c6f60448201527f636b20746f6f20666172206168656164206f6620746865206c6173742061636360648201526a657074656420626c6f636b60a81b608482015260a401610802565b80516000908152600a60205260408120549003610e4957610e37610c8a565b81516000908152600a60205260409020555b80516000908152600b602090815260408083206001600160a01b03861684528252918290208351815590830151600182015590820151600290910155610e8e826107a3565b81516000908152600c6020908152604080832082860151845290915281208054909190610ebc9084906114d1565b90915550505b610ed96004546001610ed491906114d1565b610f5a565b610ec2575050565b6000818152600183016020526040812054610f285750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561079d565b50600061079d565b6000826000018281548110610f4757610f476114e4565b9060005260206000200154905092915050565b6000818152600a60205260408120545b80610f7460055490565b1015610f9057610f8b610f8660055490565b61105f565b610f6a565b60005b610f9d6006610cd1565b811015611055576000610fb1600683610cdb565b6000868152600b602090815260408083206001600160a01b03851684528252808320815160608101835281548082526001830154828601908152600290930154828501528552600c84528285209151855292529091205491925090600361101786610bea565b61102290600261151c565b61102c91906114fa565b81111561104a5761103d82866110b1565b5060019695505050505050565b505050600101610f93565b5060009392505050565b60005b61106c6006610cd1565b811015611095576000611080600683610cdb565b905061108c8184611133565b50600101611062565b506001600560008282546110a991906114d1565b909155505050565b81516000908152600d6020908152604091829020845180825582860151600183018190558487015160029093018390556004829055845190815292830152917f5b0d1f14085ff88796df21c2944d34c115838925a7bee30850fcacaaf902a379910160405180910390a280611124610c8a565b1115610c8657610c868161105f565b600960006111428360016114d1565b8152602080820192909252604090810160009081206001600160a01b0386168083529084528282205485835260088552838320918352935220546111869190611533565b600860006111958460016114d1565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546111d591906114d1565b90915550506001600160a01b0382166108fc600960006111f68560016114d1565b81526020019081526020016000206000856001600160a01b03166001600160a01b03168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015611253573d6000803e3d6000fd5b505050565b80356001600160a01b038116811461126f57600080fd5b919050565b6000806040838503121561128757600080fd5b8235915061129760208401611258565b90509250929050565b600080604083850312156112b357600080fd5b6112bc83611258565b946020939093013593505050565b6000602082840312156112dc57600080fd5b610cca82611258565b6000602082840312156112f757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561133d5761133d6112fe565b604052919050565b60006060828403121561135757600080fd5b6040516060810181811067ffffffffffffffff8211171561137a5761137a6112fe565b80604052508091508235815260208301356020820152604083013560408201525092915050565b600060208083850312156113b457600080fd5b823567ffffffffffffffff808211156113cc57600080fd5b818501915085601f8301126113e057600080fd5b8135818111156113f2576113f26112fe565b611400848260051b01611314565b8181528481019250606091820284018501918883111561141f57600080fd5b938501935b82851015611445576114368986611345565b84529384019392850192611424565b50979650505050505050565b60008060006060848603121561146657600080fd5b505081359360208301359350604090920135919050565b60006060828403121561148f57600080fd5b610cca8383611345565b600080604083850312156114ac57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561079d5761079d6114bb565b634e487b7160e01b600052603260045260246000fd5b60008261151757634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761079d5761079d6114bb565b8181038181111561079d5761079d6114bb56fea2646970667358221220c9542e0185c9b0ec6eb1d431d6380d142087b991f911e0e830486ae7143e052a64736f6c63430008190033000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0", + "chainId": "0x621" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x140d08", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", + "transactionIndex": "0x0", + "blockHash": "0xea37b267f88d3ca5d2fa600066f04e1647c21cbfa15fd3206c8d8df413e9309c", + "blockNumber": "0x1", + "gasUsed": "0x140d08", + "effectiveGasPrice": "0x3b9aca00", + "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "to": null, + "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", + "root": "0xdbc0724b8d01dec5d65693164bc15a0f49c3029052b228b6b5391ae692368844" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1716348078, + "chain": 1569, + "commit": "fa704b72" +} \ No newline at end of file diff --git a/scripts/build/prebuild b/scripts/build/prebuild new file mode 100755 index 000000000..617f2adf8 --- /dev/null +++ b/scripts/build/prebuild @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +MOVEMENT_BASE_STORAGE_PATH=./.movement +cargo build --release + +# Build aptos components +temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos +cp -R "$MONZA_APTOS_PATH" "$temp_dir" +WORKING_DIR=$(pwd) +temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos +cp -R "$MONZA_APTOS_PATH" "$temp_dir" +chmod -R 755 $temp_dir +cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos +echo "Building aptos-faucet-service..." +cargo build $CARGO_PROFILE_FLAGS -p aptos-faucet-service +echo "Built aptos-faucet-service!" +cd $WORKING_DIR \ No newline at end of file From 489d7c8df32d227a397cb4571b45f1ff39b815b5 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 22 May 2024 18:17:18 +0300 Subject: [PATCH 082/101] Fix up naming in suzuka scripts again --- scripts/preludes/suzuka-full-node/prelude | 16 ++++++++-------- scripts/suzuka/faucet | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/preludes/suzuka-full-node/prelude b/scripts/preludes/suzuka-full-node/prelude index 43a205813..a29f59fe0 100755 --- a/scripts/preludes/suzuka-full-node/prelude +++ b/scripts/preludes/suzuka-full-node/prelude @@ -21,24 +21,24 @@ fi if [ "$MOVEMENT_PREBUILT" != "true" ]; then # Build movement components - echo "Building monza-config..." + echo "Building suzuka-config..." cargo build $CARGO_PROFILE_FLAGS --bin suzuka-config - echo "Built monza-config!" + echo "Built suzuka-config!" echo "Building m1-da-light-node..." cargo build $CARGO_PROFILE_FLAGS -p m1-da-light-node --features "sequencer" echo "Built m1-da-light-node!" - echo "Building monza-full-node..." + echo "Building suzuka-full-node..." cargo build $CARGO_PROFILE_FLAGS -p suzuka-full-node - echo "Built monza-full-node!" + echo "Built suzuka-full-node!" # Build aptos components WORKING_DIR=$(pwd) - temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos - cp -R "$MONZA_APTOS_PATH" "$temp_dir" + temp_dir=$MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos + cp -R "$SUZUKA_APTOS_PATH" "$temp_dir" chmod -R 755 $temp_dir - cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos + cd $MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos echo "Building aptos-faucet-service..." cargo build $CARGO_PROFILE_FLAGS -p aptos-faucet-service echo "Built aptos-faucet-service!" @@ -48,4 +48,4 @@ else echo "MOVEMENT_PREBUILT is set, skipping build." fi -eval $(./target/$CARGO_PROFILE/monza-config) +eval $(./target/$CARGO_PROFILE/suzuka-config) diff --git a/scripts/suzuka/faucet b/scripts/suzuka/faucet index d5cde4be4..f4fa34f28 100755 --- a/scripts/suzuka/faucet +++ b/scripts/suzuka/faucet @@ -2,7 +2,7 @@ set -e # Copy the directory from the Nix store to a temporary location -temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos +temp_dir=$MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos # Change to the temporary directory cd "$temp_dir" @@ -21,8 +21,8 @@ echo " - Faucet URL: $SUZUKA_APTOS_FAUCET_LISTEN_ADDR" # Run the faucet service using cargo echo "Starting faucet service..." -./target/$CARGO_PROFILE/aptos-faucet-service run-simple --key "$MONZA_APTOS_PRIVATE_KEY" \ - --node-url "http://$MONZA_APTOS_REST_LISTEN_ADDR" --chain-id "$MONZA_CHAIN_ID" \ +./target/$CARGO_PROFILE/aptos-faucet-service run-simple --key "$SUZUKA_APTOS_PRIVATE_KEY" \ + --node-url "http://$SUZUKA_APTOS_REST_LISTEN_ADDR" --chain-id "$SUZUKA_CHAIN_ID" \ --listen-address "$LISTEN_ADDR" --listen-port "$LISTEN_PORT" # The script automatically calls cleanup when it exits due to the trap From bdc0388af1ad7a7cc2af1e81b5abd7b802846334 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 22 May 2024 21:50:37 +0300 Subject: [PATCH 083/101] CI: disable MOVEMENT_PREBUILT --- .github/workflows/checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 4503a1afd..b389acb7a 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -35,8 +35,8 @@ jobs: - name: Run M1 DA Light Node tests in nix environment # adjust the log level while debugging - run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just m1-da-light-node test.local -t=false" + run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just m1-da-light-node test.local -t=false" - name: Run suzuka tests in nix environment # adjust the log level while debugging - run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=true nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file + run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file From 8a332bee6fe2efb3496c16dc9c7d9827c17fa8b8 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Wed, 22 May 2024 22:49:32 +0300 Subject: [PATCH 084/101] CI: don't run prebuild script --- .github/workflows/checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b389acb7a..b31eca477 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -30,8 +30,8 @@ jobs: - name: Run Cargo Check in nix environment run: nix develop --command bash -c "cargo check" - - name: Run Cargo Check in nix environment - run: nix develop --command bash -c "./scripts/build/prebuild" + # - name: Prebuild binaries in nix environment + # run: nix develop --command bash -c "./scripts/build/prebuild" - name: Run M1 DA Light Node tests in nix environment # adjust the log level while debugging From 76fce4643c80ad8177610edb20dba902af6ce277 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 23 May 2024 11:42:12 +0300 Subject: [PATCH 085/101] scripts: fix up m1-da-light-node build --- justfile | 1 - scripts/preludes/m1-da-light-node/prelude | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index be9daeb6e..36b296ae8 100644 --- a/justfile +++ b/justfile @@ -1,5 +1,4 @@ m1-da-light-node FEATURES *ARGS: - cargo build -p m1-da-light-node ./scripts/movement/run m1-da-light-node {{ FEATURES }} {{ ARGS }} monza-full-node FEATURES *ARGS: ./scripts/movement/run monza-full-node {{ FEATURES }} {{ ARGS }} diff --git a/scripts/preludes/m1-da-light-node/prelude b/scripts/preludes/m1-da-light-node/prelude index 47242421e..12ce5473a 100755 --- a/scripts/preludes/m1-da-light-node/prelude +++ b/scripts/preludes/m1-da-light-node/prelude @@ -10,6 +10,12 @@ export MOVEMENT_PREBUILT : ${CARGO_PROFILE:=debug} export CARGO_PROFILE +if [ "$CARGO_PROFILE" = "release" ]; then + CARGO_PROFILE_FLAGS="--release" +else + CARGO_PROFILE_FLAGS="" +fi + echo "Building m1-da-light-node..." -cargo build -p m1-da-light-node -echo "Built m1-da-light-node!" \ No newline at end of file +cargo build $CARGO_PROFILE_FLAGS -p m1-da-light-node +echo "Built m1-da-light-node!" From 2719489ae94c52e9852b2a6ad0029b5d05e082b0 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 23 May 2024 13:33:00 +0300 Subject: [PATCH 086/101] scripts: restore monza-aptos naming Add a comment to rename since suzuka needs this Nix-provided stuff as well. --- flake.nix | 1 + scripts/preludes/suzuka-full-node/prelude | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3eb0f9464..dcbd520c5 100644 --- a/flake.nix +++ b/flake.nix @@ -98,6 +98,7 @@ celestia-app = import ./nix/celestia-app.nix { inherit pkgs; }; # monza-aptos + # FIXME: rename, should not be specific to Monza monza-aptos = import ./nix/monza-aptos.nix { inherit pkgs; }; # m1-da-light-node diff --git a/scripts/preludes/suzuka-full-node/prelude b/scripts/preludes/suzuka-full-node/prelude index a29f59fe0..e6bac66bd 100755 --- a/scripts/preludes/suzuka-full-node/prelude +++ b/scripts/preludes/suzuka-full-node/prelude @@ -35,10 +35,10 @@ if [ "$MOVEMENT_PREBUILT" != "true" ]; then # Build aptos components WORKING_DIR=$(pwd) - temp_dir=$MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos - cp -R "$SUZUKA_APTOS_PATH" "$temp_dir" + temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos + cp -R "$MONZA_APTOS_PATH" "$temp_dir" chmod -R 755 $temp_dir - cd $MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos + cd $MOVEMENT_BASE_STORAGE_PATH/monza-aptos echo "Building aptos-faucet-service..." cargo build $CARGO_PROFILE_FLAGS -p aptos-faucet-service echo "Built aptos-faucet-service!" From 9ca5b08235ffab1a0408658c77d108d1e1c7072f Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 23 May 2024 15:04:04 +0300 Subject: [PATCH 087/101] CI: print available filesystem space --- .github/workflows/checks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b31eca477..ae50c715e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -37,6 +37,9 @@ jobs: # adjust the log level while debugging run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just m1-da-light-node test.local -t=false" + - name: Print available filesystem space + run: df -h + - name: Run suzuka tests in nix environment # adjust the log level while debugging run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file From e8d9dcacae81fc81285ee018af5668baffd8f10f Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 23 May 2024 05:40:08 -0700 Subject: [PATCH 088/101] fix: movement-runner down to debug. --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ae50c715e..3b0b348f6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -10,7 +10,7 @@ jobs: include: - os: ubuntu-22.04 arch: x86_64 - runs-on: ubuntu-latest + runs-on: movement-runner - os: macos-13-latest arch: arm64 runs-on: macos-13-xlarge From a0c76813d632b1f9d766199b5c7287249443304d Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 23 May 2024 06:22:33 -0700 Subject: [PATCH 089/101] fix: bad prebuild of aptos-faucet-service. --- .github/workflows/checks.yml | 4 ++-- docker/build/movement/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3b0b348f6..3d45d8492 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -35,11 +35,11 @@ jobs: - name: Run M1 DA Light Node tests in nix environment # adjust the log level while debugging - run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just m1-da-light-node test.local -t=false" + run: CELESTIA_LOG_LEVEL=FATAL MOVEMENT_PREBUILT=false nix develop --command bash -c "just m1-da-light-node test.local -t=false" - name: Print available filesystem space run: df -h - name: Run suzuka tests in nix environment # adjust the log level while debugging - run: CELESTIA_LOG_LEVEL=FATAL CARGO_PROFILE=release MOVEMENT_PREBUILT=false nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file + run: CELESTIA_LOG_LEVEL=FATAL MOVEMENT_PREBUILT=false nix develop --command bash -c "just suzuka-full-node test.local -t=false" \ No newline at end of file diff --git a/docker/build/movement/Dockerfile b/docker/build/movement/Dockerfile index 9ed2db7dc..f0ba694fd 100644 --- a/docker/build/movement/Dockerfile +++ b/docker/build/movement/Dockerfile @@ -8,4 +8,4 @@ WORKDIR /tmp/build RUN nix \ --extra-experimental-features "nix-command flakes" \ --option filter-syscalls false \ - develop --command bash -c "cargo build --release && cd MONZA_APTOS_PATH cargo build --release -p aptos-faucet-service" \ No newline at end of file + develop --command bash -c "cargo build --release && cd $MONZA_APTOS_PATH && cargo build --release -p aptos-faucet-service" \ No newline at end of file From abd1bb7861d6c71fa2ea38c0eec197fcb262c667 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 23 May 2024 06:46:29 -0700 Subject: [PATCH 090/101] fix: drop containers from ci for now. --- .github/workflows/containers.yml | 2 +- scripts/preludes/suzuka-full-node/prelude | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 8fbebb41a..aecbffd5c 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -5,7 +5,7 @@ on: jobs: containers: - + if: false # Remove this line to enable the job strategy: matrix: architecture: [x86_64, arm64] diff --git a/scripts/preludes/suzuka-full-node/prelude b/scripts/preludes/suzuka-full-node/prelude index e6bac66bd..efa3f26d3 100755 --- a/scripts/preludes/suzuka-full-node/prelude +++ b/scripts/preludes/suzuka-full-node/prelude @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -export CELESTIA_LOG_LEVEL=debug +# export CELESTIA_LOG_LEVEL=debug export MOVE_ROCKS_CHAIN_ID="$(openssl rand -hex 10)" export MOVE_ROCKS_PATH="$MOVEMENT_BASE_STORAGE_PATH/move-rocks/${MOVE_ROCKS_CHAIN_ID}/.move-rocks" From 2c2a2ec0f7bef207975e8c66d9ba7e41c3a2b639 Mon Sep 17 00:00:00 2001 From: Liam Monninger Date: Thu, 23 May 2024 09:31:24 -0700 Subject: [PATCH 091/101] fix: missing block metadata. --- .../suzuka/suzuka-full-node/src/partial.rs | 21 +++++++++++++++---- .../execution/suzuka/executor/src/lib.rs | 6 +++++- .../execution/suzuka/executor/src/v1.rs | 20 ++++++++++++++++++ scripts/suzuka/faucet | 14 ++++++------- 4 files changed, 49 insertions(+), 12 deletions(-) diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 836d2310a..860ba5fab 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -161,9 +161,9 @@ where } // get the block - let block_bytes = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { + let (block_bytes, block_timestamp, block_id) = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { blob_response::BlobType::SequencedBlobBlock(blob) => { - blob.data + (blob.data, blob.timestamp, blob.blob_id) }, _ => { anyhow::bail!("Invalid blob type in response") } }; @@ -177,10 +177,23 @@ where // get the transactions let mut block_transactions = Vec::new(); + let block_metadata = self.executor.build_block_metadata( + HashValue::sha3_256_of(block_id.as_bytes()), + block_timestamp + ).await?; + let block_metadata_transaction = SignatureVerifiedTransaction::Valid( + Transaction::BlockMetadata( + block_metadata + ) + ); + block_transactions.push(block_metadata_transaction); + for transaction in block.transactions { - let signed_transaction: SignedTransaction = serde_json::from_slice(&transaction.0)?; + let signed_transaction : SignedTransaction = serde_json::from_slice(&transaction.0)?; let signature_verified_transaction = SignatureVerifiedTransaction::Valid( - Transaction::UserTransaction(signed_transaction), + Transaction::UserTransaction( + signed_transaction + ) ); block_transactions.push(signature_verified_transaction); } diff --git a/protocol-units/execution/suzuka/executor/src/lib.rs b/protocol-units/execution/suzuka/executor/src/lib.rs index f3e3ed2b5..f747f637c 100644 --- a/protocol-units/execution/suzuka/executor/src/lib.rs +++ b/protocol-units/execution/suzuka/executor/src/lib.rs @@ -4,7 +4,8 @@ pub use aptos_types::{ transaction::signature_verified_transaction::SignatureVerifiedTransaction, block_executor::partitioner::ExecutableBlock, block_executor::partitioner::ExecutableTransactions, - transaction::{SignedTransaction, Transaction} + transaction::{SignedTransaction, Transaction}, + block_metadata::BlockMetadata, }; pub use aptos_crypto::hash::HashValue; use aptos_api::runtime::Apis; @@ -41,5 +42,8 @@ pub trait SuzukaExecutor { /// Get block head height. async fn get_block_head_height(&self) -> Result; + + /// Build block metadata for a timestamp + async fn build_block_metadata(&self, block_id : HashValue, timestamp: u64) -> Result; } diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index b2a8f7cdf..379b23730 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -90,6 +90,26 @@ impl SuzukaExecutor for SuzukaExecutorV1 { Ok(1) } + /// Build block metadata for a timestamp + async fn build_block_metadata(&self, block_id : HashValue, timestamp: u64) -> Result { + + let (epoch, round) = self.executor.get_next_epoch_and_round().await?; + // Clone the signer from the executor for signing the metadata. + let signer = self.executor.signer.clone(); + + // Create a block metadata transaction. + Ok(BlockMetadata::new( + block_id, + epoch, + round, + signer.author(), + vec![], + vec![], + timestamp, + )) + + } + } #[cfg(test)] diff --git a/scripts/suzuka/faucet b/scripts/suzuka/faucet index f4fa34f28..9a2af1b8e 100755 --- a/scripts/suzuka/faucet +++ b/scripts/suzuka/faucet @@ -2,27 +2,27 @@ set -e # Copy the directory from the Nix store to a temporary location -temp_dir=$MOVEMENT_BASE_STORAGE_PATH/suzuka-aptos +temp_dir=$MOVEMENT_BASE_STORAGE_PATH/monza-aptos # Change to the temporary directory cd "$temp_dir" # Split the listen addresses into an array -IFS=':' read -r -a listener_array <<< "$SUZUKA_APTOS_FAUCET_LISTEN_ADDR" +IFS=':' read -r -a listener_array <<< "$MONZA_APTOS_FAUCET_LISTEN_ADDR" # Extract the listen address and port LISTEN_ADDR="${listener_array[0]}" LISTEN_PORT="${listener_array[1]}" echo "Starting faucet service with the following configuration:" -echo " - Chain ID: $SUZUKA_CHAIN_ID" -echo " - Node URL: $SUZUKA_APTOS_REST_LISTEN_ADDR" -echo " - Faucet URL: $SUZUKA_APTOS_FAUCET_LISTEN_ADDR" +echo " - Chain ID: $MONZA_CHAIN_ID" +echo " - Node URL: $MONZA_APTOS_REST_LISTEN_ADDR" +echo " - Faucet URL: $MONZA_APTOS_FAUCET_LISTEN_ADDR" # Run the faucet service using cargo echo "Starting faucet service..." -./target/$CARGO_PROFILE/aptos-faucet-service run-simple --key "$SUZUKA_APTOS_PRIVATE_KEY" \ - --node-url "http://$SUZUKA_APTOS_REST_LISTEN_ADDR" --chain-id "$SUZUKA_CHAIN_ID" \ +./target/$CARGO_PROFILE/aptos-faucet-service run-simple --key "$MONZA_APTOS_PRIVATE_KEY" \ + --node-url "http://$MONZA_APTOS_REST_LISTEN_ADDR" --chain-id "$MONZA_CHAIN_ID" \ --listen-address "$LISTEN_ADDR" --listen-port "$LISTEN_PORT" # The script automatically calls cleanup when it exits due to the trap From 6dc612f3fb3486b56dd040aaeced9d3e7c2c661d Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 23 May 2024 21:51:11 +0300 Subject: [PATCH 092/101] opt-executor: refactor execute_block_inner No need to compute the commitment for the metadata workaround block. --- .../maptos/opt-executor/src/executor.rs | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 6aef2e644..e97f6c502 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -229,11 +229,10 @@ impl Executor { } - /// Execute a block which gets committed to the state. - pub async fn execute_block_inner( + async fn execute_block_inner( &self, block: ExecutableBlock, - ) -> Result { + ) -> Result { let block_id = block.block_id.clone(); let parent_block_id = { @@ -269,26 +268,11 @@ impl Executor { vec![block_id], ledger_info_with_sigs, )?; - } - - let proof = { - let reader = self.db.read().await.reader.clone(); - reader.get_state_proof(version)? - }; - - // Context has a reach-around to the db so the block height should - // have been updated to the most recently committed block. - // Race conditions, anyone? - let block_height = self.context.get_latest_ledger_info_wrapped()?.block_height; - - let commitment = Commitment::digest_state_proof(&proof); - Ok(BlockCommitment { - block_id: Id(block_id.to_vec()), - commitment, - height: block_height.into(), - }) + } + Ok(version) } + /// Execute a block which gets committed to the state. pub async fn execute_block( &self, block: ExecutableBlock, @@ -328,7 +312,7 @@ impl Executor { ).await?; // execute the rest of the block - let commitment = self.execute_block_inner( + let version = self.execute_block_inner( ExecutableBlock::new( block.block_id.clone(), ExecutableTransactions::Unsharded( @@ -337,8 +321,22 @@ impl Executor { ) ).await?; - Ok(commitment) + let proof = { + let reader = self.db.read().await.reader.clone(); + reader.get_state_proof(version)? + }; + + // Context has a reach-around to the db so the block height should + // have been updated to the most recently committed block. + // Race conditions, anyone? + let block_height = self.context.get_latest_ledger_info_wrapped()?.block_height; + let commitment = Commitment::digest_state_proof(&proof); + Ok(BlockCommitment { + block_id: Id(block_id.to_vec()), + commitment, + height: block_height.into(), + }) } fn context(&self) -> Arc { From 146c51d95dfd30e499f3c91eb806a8429f383074 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Thu, 23 May 2024 22:13:13 +0300 Subject: [PATCH 093/101] Implement get_block_head_height in executors --- .../execution/maptos/opt-executor/src/executor.rs | 6 +++++- protocol-units/execution/monza/executor/src/v1.rs | 3 +-- protocol-units/execution/suzuka/executor/src/v1.rs | 3 +-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index e97f6c502..dd123c4bc 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -329,7 +329,7 @@ impl Executor { // Context has a reach-around to the db so the block height should // have been updated to the most recently committed block. // Race conditions, anyone? - let block_height = self.context.get_latest_ledger_info_wrapped()?.block_height; + let block_height = self.get_block_head_height(); let commitment = Commitment::digest_state_proof(&proof); Ok(BlockCommitment { @@ -339,6 +339,10 @@ impl Executor { }) } + pub fn get_block_head_height(&self) -> Result { + self.context.get_latest_ledger_info_wrapped()?.block_height + } + fn context(&self) -> Arc { self.context.clone() } diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 5096be98b..04be8a7e5 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -79,8 +79,7 @@ impl MonzaExecutor for MonzaExecutorV1 { /// Get block head height. async fn get_block_head_height(&self) -> Result { - // ideally, this should read from the ledger - Ok(1) + self.executor.get_block_head_height() } /// Build block metadata for a timestamp diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index 379b23730..becbb785e 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -86,8 +86,7 @@ impl SuzukaExecutor for SuzukaExecutorV1 { /// Get block head height. async fn get_block_head_height(&self) -> Result { - // ideally, this should read from the ledger - Ok(1) + self.executor.get_block_head_height() } /// Build block metadata for a timestamp From f0abc03703bccc76c26d083e51280a23aa7e9339 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 24 May 2024 12:04:40 +0300 Subject: [PATCH 094/101] opt-executor: fix up compile --- .../execution/maptos/opt-executor/src/executor.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index dd123c4bc..3d9fa5bef 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -329,18 +329,19 @@ impl Executor { // Context has a reach-around to the db so the block height should // have been updated to the most recently committed block. // Race conditions, anyone? - let block_height = self.get_block_head_height(); + let block_height = self.get_block_head_height()?; let commitment = Commitment::digest_state_proof(&proof); Ok(BlockCommitment { - block_id: Id(block_id.to_vec()), + block_id: Id(block.block_id.to_vec()), commitment, height: block_height.into(), }) } pub fn get_block_head_height(&self) -> Result { - self.context.get_latest_ledger_info_wrapped()?.block_height + let ledger_info = self.context.get_latest_ledger_info_wrapped()?; + Ok(ledger_info.block_height.into()) } fn context(&self) -> Arc { From 47e90a53ff8a873333c9e0dfd2d194f38945e91c Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 24 May 2024 18:32:11 +0300 Subject: [PATCH 095/101] streamline logging Don't use the "logging" feature to gate individual tracing macro expansions, tracing is designed to not need this. Remove dependencies on env_logger and tracing-log, these crates are no longer in use. --- Cargo.lock | 35 +------------ Cargo.toml | 2 - networks/monza/monza-full-node/Cargo.toml | 5 +- networks/monza/monza-full-node/src/partial.rs | 39 +++++---------- networks/suzuka/suzuka-full-node/Cargo.toml | 5 +- .../suzuka/suzuka-full-node/src/partial.rs | 42 ++++------------ protocol-units/da/m1/light-node/Cargo.toml | 5 +- protocol-units/da/m1/light-node/src/main.rs | 2 + .../da/m1/light-node/src/v1/passthrough.rs | 49 ++++++++----------- .../da/m1/light-node/src/v1/sequencer.rs | 38 +++++--------- .../execution/maptos/opt-executor/Cargo.toml | 5 +- .../maptos/opt-executor/src/executor.rs | 21 +++----- .../execution/monza/executor/src/v1.rs | 10 ++-- .../execution/suzuka/executor/src/v1.rs | 10 ++-- 14 files changed, 80 insertions(+), 188 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 592df0e0c..d011386be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4295,16 +4295,6 @@ dependencies = [ "syn 2.0.60", ] -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - [[package]] name = "env_logger" version = "0.10.2" @@ -4314,19 +4304,6 @@ dependencies = [ "log", ] -[[package]] -name = "env_logger" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - [[package]] name = "equivalent" version = "1.0.1" @@ -5145,12 +5122,6 @@ dependencies = [ "libm", ] -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.28" @@ -5435,7 +5406,7 @@ dependencies = [ "crossbeam-channel", "crossbeam-utils", "dashmap", - "env_logger 0.10.2", + "env_logger", "indexmap 2.2.6", "is-terminal", "itoa", @@ -6023,7 +5994,6 @@ dependencies = [ "celestia-rpc", "celestia-types", "chrono", - "env_logger 0.11.3", "hex", "m1-da-light-node-grpc", "m1-da-light-node-util", @@ -6164,7 +6134,6 @@ dependencies = [ "clap 4.5.4", "derive_more", "dirs 3.0.2", - "env_logger 0.11.3", "fail 0.5.1", "futures", "hex", @@ -6465,7 +6434,6 @@ version = "0.3.0" dependencies = [ "anyhow", "async-channel", - "env_logger 0.11.3", "m1-da-light-node-client", "monza-executor", "movement-types", @@ -10172,7 +10140,6 @@ version = "0.3.0" dependencies = [ "anyhow", "async-channel", - "env_logger 0.11.3", "m1-da-light-node-client", "mcr-settlement-client", "mcr-settlement-manager", diff --git a/Cargo.toml b/Cargo.toml index b20b2318a..fe20ae287 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -100,8 +100,6 @@ hex = { version = "0.4.3", default-features = false, features = [ ] } async-trait = "0.1.71" tracing = "0.1.40" -tracing-log = "0.2.0" -env_logger = "0.11.0" tokio = { version = "1.35.1", features = ["full"] } tokio-stream = "0.1.15" async-stream = "0.3.0" diff --git a/networks/monza/monza-full-node/Cargo.toml b/networks/monza/monza-full-node/Cargo.toml index 37cf44077..cfe3821b2 100644 --- a/networks/monza/monza-full-node/Cargo.toml +++ b/networks/monza/monza-full-node/Cargo.toml @@ -19,12 +19,11 @@ serde_json = { workspace = true } anyhow = { workspace = true } tokio = { workspace = true } tokio-stream = { workspace = true } +tracing = { workspace = true } sha2 = { workspace = true } tonic = { workspace = true } movement-types = { workspace = true } -env_logger = { workspace = true, optional = true } -tracing = { workspace = true, optional = true } tracing-subscriber = { workspace = true, optional = true } [features] @@ -32,8 +31,6 @@ default = [ "logging" ] logging = [ - "env_logger", - "tracing", "tracing-subscriber" ] diff --git a/networks/monza/monza-full-node/src/partial.rs b/networks/monza/monza-full-node/src/partial.rs index 176daf1d3..b65297904 100644 --- a/networks/monza/monza-full-node/src/partial.rs +++ b/networks/monza/monza-full-node/src/partial.rs @@ -1,6 +1,13 @@ use std::{sync::Arc, time::Duration}; use anyhow::Context; +use async_channel::{Sender, Receiver}; +use sha2::Digest; +use tokio_stream::StreamExt; +use tokio::sync::RwLock; +use tracing::debug; + +use movement_types::Block; use monza_executor::{ MonzaExecutor, ExecutableBlock, @@ -12,14 +19,9 @@ use monza_executor::{ ExecutableTransactions, v1::MonzaExecutorV1, }; +// FIXME: glob imports are bad style use m1_da_light_node_client::*; -use async_channel::{Sender, Receiver}; -use sha2::Digest; use crate::*; -use tokio_stream::StreamExt; -use tokio::sync::RwLock; -use movement_types::Block; - #[derive(Clone)] pub struct MonzaPartialNode { @@ -67,10 +69,7 @@ impl MonzaPartialNode { match transaction_result { Ok(transaction) => { - #[cfg(feature = "logging")] - { - tracing::debug!("Got transaction: {:?}", transaction) - } + debug!("Got transaction: {:?}", transaction); let serialized_transaction = serde_json::to_vec(&transaction)?; transactions.push(BlobWrite { @@ -96,10 +95,7 @@ impl MonzaPartialNode { } ).await?; - #[cfg(feature = "logging")] - { - tracing::debug!("Wrote transactions to DA") - } + tracing::debug!("Wrote transactions to DA"); } @@ -134,10 +130,7 @@ impl MonzaPartialNode { while let Some(blob) = stream.next().await { - #[cfg(feature = "logging")] - { - tracing::debug!("Got blob: {:?}", blob) - } + debug!("Got blob: {:?}", blob); // get the block let (block_bytes, block_timestamp, block_id) = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { @@ -150,10 +143,7 @@ impl MonzaPartialNode { // get the block let block : Block = serde_json::from_slice(&block_bytes)?; - #[cfg(feature = "logging")] - { - tracing::debug!("Got block: {:?}", block) - } + debug!("Got block: {:?}", block); // get the transactions let mut block_transactions = Vec::new(); @@ -200,10 +190,7 @@ impl MonzaPartialNode { executable_block ).await?; - #[cfg(feature = "logging")] - { - tracing::debug!("Executed block: {:?}", block_id) - } + debug!("Executed block: {:?}", block_id); } diff --git a/networks/suzuka/suzuka-full-node/Cargo.toml b/networks/suzuka/suzuka-full-node/Cargo.toml index bf7ed4feb..a36883226 100644 --- a/networks/suzuka/suzuka-full-node/Cargo.toml +++ b/networks/suzuka/suzuka-full-node/Cargo.toml @@ -23,10 +23,9 @@ tokio = { workspace = true } tokio-stream = { workspace = true } sha2 = { workspace = true } tonic = { workspace = true } +tracing = { workspace = true } movement-types = { workspace = true } -env_logger = { workspace = true, optional = true } -tracing = { workspace = true, optional = true } tracing-subscriber = { workspace = true, optional = true } [features] @@ -34,8 +33,6 @@ default = [ "logging" ] logging = [ - "env_logger", - "tracing", "tracing-subscriber" ] diff --git a/networks/suzuka/suzuka-full-node/src/partial.rs b/networks/suzuka/suzuka-full-node/src/partial.rs index 860ba5fab..c999fefd2 100644 --- a/networks/suzuka/suzuka-full-node/src/partial.rs +++ b/networks/suzuka/suzuka-full-node/src/partial.rs @@ -18,6 +18,7 @@ use async_channel::{Receiver, Sender}; use sha2::Digest; use tokio::sync::RwLock; use tokio_stream::StreamExt; +use tracing::debug; use std::future::Future; use std::sync::Arc; @@ -88,10 +89,7 @@ where match transaction_result { Ok(transaction) => { - #[cfg(feature = "logging")] - { - tracing::debug!("Got transaction: {:?}", transaction) - } + debug!("Got transaction: {:?}", transaction); let serialized_transaction = serde_json::to_vec(&transaction)?; transactions.push(BlobWrite { @@ -116,11 +114,8 @@ where blobs: transactions } ).await?; - - #[cfg(feature = "logging")] - { - tracing::debug!("Wrote transactions to DA") - } + + debug!("Wrote transactions to DA"); } @@ -155,10 +150,7 @@ where while let Some(blob) = stream.next().await { - #[cfg(feature = "logging")] - { - tracing::debug!("Got blob: {:?}", blob) - } + debug!("Got blob: {:?}", blob); // get the block let (block_bytes, block_timestamp, block_id) = match blob?.blob.ok_or(anyhow::anyhow!("No blob in response"))?.blob_type.ok_or(anyhow::anyhow!("No blob type in response"))? { @@ -170,10 +162,7 @@ where let block : Block = serde_json::from_slice(&block_bytes)?; - #[cfg(feature = "logging")] - { - tracing::debug!("Got block: {:?}", block) - } + debug!("Got block: {:?}", block); // get the transactions let mut block_transactions = Vec::new(); @@ -213,10 +202,7 @@ where let commitment = self.executor.execute_block(FinalityMode::Opt, executable_block).await?; - #[cfg(feature = "logging")] - { - tracing::debug!("Executed block: {:?}", block_id) - } + debug!("Executed block: {:?}", block_id); self.settlement_manager.post_block_commitment(commitment).await?; } @@ -230,20 +216,10 @@ async fn read_commitment_events(mut stream: CommitmentEventStream) -> anyhow::Re let event = res?; match event { BlockCommitmentEvent::Accepted(commitment) => { - - #[cfg(feature = "logging")] - { - tracing::debug!("Commitment accepted: {:?}", commitment) - } - + debug!("Commitment accepted: {:?}", commitment); }, BlockCommitmentEvent::Rejected { height, reason } => { - - #[cfg(feature = "logging")] - { - tracing::debug!("Commitment rejected: {:?} {:?}", height, reason) - } - + debug!("Commitment rejected: {:?} {:?}", height, reason); }, } } diff --git a/protocol-units/da/m1/light-node/Cargo.toml b/protocol-units/da/m1/light-node/Cargo.toml index 0a4cd7ce6..093a35378 100644 --- a/protocol-units/da/m1/light-node/Cargo.toml +++ b/protocol-units/da/m1/light-node/Cargo.toml @@ -29,14 +29,13 @@ async-stream = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } tempfile = { workspace = true } +tracing = { workspace = true } chrono = { workspace = true } # sequencer memseq = { workspace = true, optional = true } -env_logger = { workspace = true, optional = true } -tracing = { workspace = true, optional = true } tracing-subscriber = { workspace = true, optional = true } [features] @@ -45,8 +44,6 @@ default = [ "logging" ] logging = [ - "env_logger", - "tracing", "tracing-subscriber" ] sequencer = [ diff --git a/protocol-units/da/m1/light-node/src/main.rs b/protocol-units/da/m1/light-node/src/main.rs index e7a9fe43c..cc26d4e8a 100644 --- a/protocol-units/da/m1/light-node/src/main.rs +++ b/protocol-units/da/m1/light-node/src/main.rs @@ -6,6 +6,8 @@ use m1_da_light_node::v1::{ #[tokio::main] async fn main() -> Result<(), Box> { + // TODO: set up tracing-subscriber if the "logging" feature is enabled + let light_node = LightNodeV1::try_from_env().await?; light_node.run().await?; diff --git a/protocol-units/da/m1/light-node/src/v1/passthrough.rs b/protocol-units/da/m1/light-node/src/v1/passthrough.rs index ab44d78b5..32d1c9151 100644 --- a/protocol-units/da/m1/light-node/src/v1/passthrough.rs +++ b/protocol-units/da/m1/light-node/src/v1/passthrough.rs @@ -1,15 +1,21 @@ -use m1_da_light_node_grpc::{blob_response, light_node_service_server::LightNodeService}; -use m1_da_light_node_grpc::*; +use std::sync::Arc; + use tokio_stream::{StreamExt, Stream}; +use tokio::sync::RwLock; +use tracing::debug; + use celestia_rpc::{BlobClient, Client, HeaderClient}; use celestia_types::{blob::GasPrice, nmt::Namespace, Blob as CelestiaBlob}; -use std::sync::Arc; -use tokio::sync::RwLock; + +// FIXME: glob imports are bad style +use m1_da_light_node_grpc::*; +use m1_da_light_node_grpc::light_node_service_server::LightNodeService; use m1_da_light_node_util::Config; use m1_da_light_node_verifier::{ Verifier, v1::V1Verifier }; + use crate::v1::LightNodeV1Operations; @@ -91,9 +97,8 @@ impl LightNodeV1 { .blob_get_all(height, &[self.celestia_namespace]) .await; - #[cfg(feature = "logging")] - if blobs.is_err() { - tracing::debug!("Error getting blobs: {:?}", blobs.as_ref().err().unwrap()); + if let Err(e) = &blobs { + debug!("Error getting blobs: {:?}", e); } let blobs = blobs.unwrap_or_default(); @@ -101,10 +106,7 @@ impl LightNodeV1 { let mut verified_blobs = Vec::new(); for blob in blobs { - #[cfg(feature = "logging")] - { - tracing::debug!("Verifying blob"); - } + debug!("Verifying blob"); let blob_data = blob.data.clone(); @@ -115,11 +117,11 @@ impl LightNodeV1 { height, ).await; - #[cfg(feature = "logging")] - if verified.is_err() { - tracing::debug!("Error verifying blob: {:?}", verified.as_ref().err().unwrap()); + if let Err(e) = &verified { + debug!("Error verifying blob: {:?}", e); } + // FIXME: really? let verified = verified.unwrap_or(true); if verified { @@ -178,10 +180,7 @@ impl LightNodeV1 { let header = header_res?; let height = header.height().into(); - #[cfg(feature = "logging")] - { - tracing::debug!("Stream got header: {:?}", header.height()); - } + debug!("Stream got header: {:?}", header.height()); // back fetch the blobs if first_flag && (height > start_height) { @@ -189,11 +188,8 @@ impl LightNodeV1 { let mut blob_stream = me.stream_blobs_in_range(start_height, Some(height)).await?; while let Some(blob) = blob_stream.next().await { - - #[cfg(feature = "logging")] - { - tracing::debug!("Stream got blob: {:?}", blob); - } + + debug!("Stream got blob: {:?}", blob); yield blob?; } @@ -203,11 +199,8 @@ impl LightNodeV1 { let blobs = me.get_blobs_at_height(height).await?; for blob in blobs { - - #[cfg(feature = "logging")] - { - tracing::debug!("Stream got blob: {:?}", blob); - } + + debug!("Stream got blob: {:?}", blob); yield blob; } diff --git a/protocol-units/da/m1/light-node/src/v1/sequencer.rs b/protocol-units/da/m1/light-node/src/v1/sequencer.rs index a71dbb56a..e2485cab8 100644 --- a/protocol-units/da/m1/light-node/src/v1/sequencer.rs +++ b/protocol-units/da/m1/light-node/src/v1/sequencer.rs @@ -1,12 +1,17 @@ +use tokio_stream::Stream; +use tracing::{info, debug}; + use celestia_rpc::HeaderClient; + use m1_da_light_node_grpc::light_node_service_server::LightNodeService; +// FIXME: glob imports are bad style use m1_da_light_node_grpc::*; -use tokio_stream::Stream; +use memseq::{Transaction, Sequencer}; + use crate::v1::{ LightNodeV1Operations, passthrough::LightNodeV1 as LightNodeV1PassThrough }; -use memseq::{Transaction, Sequencer}; #[derive(Clone)] pub struct LightNodeV1 { @@ -18,24 +23,13 @@ impl LightNodeV1Operations for LightNodeV1 { async fn try_from_env() -> Result { - #[cfg(feature = "logging")] - { - - tracing::info!("Initializing LightNodeV1 in sequencer mode from environment."); - - } + info!("Initializing LightNodeV1 in sequencer mode from environment."); let pass_through = LightNodeV1PassThrough::try_from_env().await?; - #[cfg(feature = "logging")] - { - tracing::info!("Initialized pass through for LightNodeV1 in sequencer mode."); - } + info!("Initialized pass through for LightNodeV1 in sequencer mode."); let memseq = memseq::Memseq::try_move_rocks_from_env()?; - #[cfg(feature = "logging")] - { - tracing::info!("Initialized Memseq with Move Rocks for LightNodeV1 in sequencer mode."); - } + info!("Initialized Memseq with Move Rocks for LightNodeV1 in sequencer mode."); Ok(Self { pass_through, @@ -70,10 +64,7 @@ impl LightNodeV1 { let height = self.pass_through.submit_celestia_blob(block_blob).await?; - #[cfg(feature = "logging")] - { - tracing::debug!("Submitted block: {:?} {:?}", block.id(), height); - } + debug!("Submitted block: {:?} {:?}", block.id(), height); }, None => { @@ -232,11 +223,8 @@ impl LightNodeService for LightNodeV1 { // publish the transactions for transaction in transactions { - - #[cfg(feature = "logging")] - { - tracing::debug!("Publishing transaction: {:?}", transaction.id()); - } + + debug!("Publishing transaction: {:?}", transaction.id()); self.memseq.publish(transaction).await.map_err( |e| tonic::Status::internal(e.to_string()) diff --git a/protocol-units/execution/maptos/opt-executor/Cargo.toml b/protocol-units/execution/maptos/opt-executor/Cargo.toml index be2705a0c..bb1ca55b3 100644 --- a/protocol-units/execution/maptos/opt-executor/Cargo.toml +++ b/protocol-units/execution/maptos/opt-executor/Cargo.toml @@ -30,6 +30,7 @@ poem-openapi = { workspace = true } derive_more = { workspace = true, default-features = true } lazy_static = "1.4.0" tokio = { workspace = true } +tracing = { workspace = true } rand = { workspace = true } rand_core = { workspace = true } bcs = { workspace = true} @@ -68,8 +69,6 @@ tempfile = { workspace = true } async-trait = { workspace = true } # optional logging dependencies -env_logger = { workspace = true, optional = true } -tracing = { workspace = true, optional = true } tracing-subscriber = { workspace = true, optional = true } [features] @@ -77,7 +76,5 @@ default = [ "logging" ] logging = [ - "env_logger", - "tracing", "tracing-subscriber" ] \ No newline at end of file diff --git a/protocol-units/execution/maptos/opt-executor/src/executor.rs b/protocol-units/execution/maptos/opt-executor/src/executor.rs index 3d9fa5bef..34a470a04 100644 --- a/protocol-units/execution/maptos/opt-executor/src/executor.rs +++ b/protocol-units/execution/maptos/opt-executor/src/executor.rs @@ -43,6 +43,7 @@ use futures::channel::mpsc as futures_mpsc; use futures::StreamExt; use poem::{listener::TcpListener, Route, Server}; use tokio::sync::RwLock; +use tracing::{debug, info}; use std::{path::PathBuf, sync::Arc}; @@ -245,11 +246,8 @@ impl Executor { block_executor.execute_block(block, parent_block_id, BlockExecutorConfigFromOnchain::new_no_block_limit())? }; - #[cfg(feature = "logging")] - { - tracing::debug!("State compute: {:?}", state_compute) - } - + debug!("State compute: {:?}", state_compute); + let version = state_compute.version(); @@ -354,15 +352,10 @@ impl Executor { pub async fn run_service(&self) -> Result<(), anyhow::Error> { - #[cfg(feature = "logging")] - { - // log out to tracing - tracing::info!( - "Starting maptos-opt-executor services at: {:?}", - self.aptos_config.aptos_rest_listen_url - ); - - } + info!( + "Starting maptos-opt-executor services at: {:?}", + self.aptos_config.aptos_rest_listen_url + ); let api_service = get_api_service(self.context()).server( format!("http://{:?}", self.aptos_config.aptos_rest_listen_url) diff --git a/protocol-units/execution/monza/executor/src/v1.rs b/protocol-units/execution/monza/executor/src/v1.rs index 04be8a7e5..07bf5f4a1 100644 --- a/protocol-units/execution/monza/executor/src/v1.rs +++ b/protocol-units/execution/monza/executor/src/v1.rs @@ -1,9 +1,12 @@ +// FIXME: glob imports are bad style use crate::*; use aptos_types::transaction::SignedTransaction; -use async_channel::Sender; use maptos_opt_executor::Executor; use movement_types::BlockCommitment; +use async_channel::Sender; +use tracing::debug; + #[derive(Clone)] pub struct MonzaExecutorV1 { // this rwlock may be somewhat redundant @@ -50,10 +53,7 @@ impl MonzaExecutor for MonzaExecutorV1 { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { - #[cfg(feature = "logging")] - { - tracing::debug!("Executing opt block: {:?}", block.block_id) - } + debug!("Executing opt block: {:?}", block.block_id); self.executor.execute_block(block).await }, FinalityMode::Fin => unimplemented!(), diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index becbb785e..3062e778a 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -1,9 +1,12 @@ +// FIXME: glob imports are bad style use crate::*; use maptos_opt_executor::Executor; -use async_channel::Sender; use aptos_types::transaction::SignedTransaction; use movement_types::BlockCommitment; +use async_channel::Sender; +use tracing::debug; + #[derive(Clone)] pub struct SuzukaExecutorV1 { // this rwlock may be somewhat redundant @@ -56,10 +59,7 @@ impl SuzukaExecutor for SuzukaExecutorV1 { match mode { FinalityMode::Dyn => unimplemented!(), FinalityMode::Opt => { - #[cfg(feature = "logging")] - { - tracing::debug!("Executing block: {:?}", block.block_id) - } + debug!("Executing block: {:?}", block.block_id); self.executor.execute_block(block).await }, FinalityMode::Fin => unimplemented!(), From 06ce28dcc9c98c3f89730886eb156b8bef6e03eb Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Fri, 24 May 2024 18:40:12 +0300 Subject: [PATCH 096/101] chore: remove and ignore MCR contract logs --- .../mcr/contracts/broadcast/.gitignore | 1 + .../DeployMCR.s.sol/1569/run-1716348078.json | 52 ------------------- .../DeployMCR.s.sol/1569/run-latest.json | 52 ------------------- 3 files changed, 1 insertion(+), 104 deletions(-) create mode 100644 protocol-units/settlement/mcr/contracts/broadcast/.gitignore delete mode 100644 protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json delete mode 100644 protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json diff --git a/protocol-units/settlement/mcr/contracts/broadcast/.gitignore b/protocol-units/settlement/mcr/contracts/broadcast/.gitignore new file mode 100644 index 000000000..ef17dd661 --- /dev/null +++ b/protocol-units/settlement/mcr/contracts/broadcast/.gitignore @@ -0,0 +1 @@ +*.sol diff --git a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json deleted file mode 100644 index be54c2071..000000000 --- a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-1716348078.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", - "transactionType": "CREATE", - "contractName": "MCR", - "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "function": null, - "arguments": [ - "10", - "128", - "100000000000000000000", - "0" - ], - "transaction": { - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "gas": "0x1a0f1a", - "value": "0x0", - "input": "0x6080604052348015600f57600080fd5b50604051611607380380611607833981016040819052602c916047565b6002939093556003919091556000908155600155600455607c565b60008060008060808587031215605c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b61157c8061008b6000396000f3fe6080604052600436106102045760003560e01c80636b588ac711610118578063e1ffa44c116100a0578063ee96da051161006f578063ee96da0514610661578063efe97d05146106af578063f89fe60b146106c4578063f934ed75146106e4578063fc2788ad1461070757600080fd5b8063e1ffa44c1461058a578063e6a386e4146105f0578063e90d4c0614610605578063ee377d901461064c57600080fd5b806384df6455116100e757806384df6455146104bb578063b97dd9e2146104fd578063c76c27bf14610512578063ce2a96b41461054a578063e1b2b2221461056a57600080fd5b80636b588ac71461046557806372710d181461047b57806374e8e5641461049057806376671808146104a557600080fd5b806320e0e4451161019b5780633a4b66f11161016a5780633a4b66f1146103fd57806342e0aeb2146104055780634ff0876a1461041a5780635d3ea8f11461043057806367d144ab1461044557600080fd5b806320e0e445146103915780632a3fa95c146103be5780632e17de78146103d3578063365f490b146103f557600080fd5b8063108cf69b116101d7578063108cf69b146102cc57806311fe3345146103045780631c4e4e27146103245780631cfa25161461037b57600080fd5b8063048317c814610209578063056f4aa6146102325780630a0b81cc146102485780630dd563661461028a575b600080fd5b34801561021557600080fd5b5061021f60005481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60015481565b34801561025457600080fd5b50610268610263366004611274565b61073f565b6040805182518152602080840151908201529181015190820152606001610229565b34801561029657600080fd5b5061021f6102a53660046112a0565b60009081526008602090815260408083206001600160a01b03949094168352929052205490565b3480156102d857600080fd5b5061021f6102e7366004611274565b600860209081526000928352604080842090915290825290205481565b34801561031057600080fd5b5061021f61031f3660046112ca565b6107a3565b34801561033057600080fd5b5061036061033f3660046112e5565b600d6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610229565b34801561038757600080fd5b5061021f60035481565b34801561039d57600080fd5b5061021f6103ac3660046112e5565b600a6020526000908152604090205481565b3480156103ca57600080fd5b5060035461021f565b3480156103df57600080fd5b506103f36103ee3660046112e5565b6107b2565b005b6103f3610914565b6103f3610abe565b34801561041157600080fd5b5060005461021f565b34801561042657600080fd5b5061021f60025481565b34801561043c57600080fd5b5060025461021f565b34801561045157600080fd5b5061021f6104603660046112ca565b610bb6565b34801561047157600080fd5b5061021f60045481565b34801561048757600080fd5b5061021f610bc5565b34801561049c57600080fd5b5061021f610bd8565b3480156104b157600080fd5b5061021f60055481565b3480156104c757600080fd5b5061021f6104d63660046112a0565b60009081526009602090815260408083206001600160a01b03949094168352929052205490565b34801561050957600080fd5b5060055461021f565b34801561051e57600080fd5b5061021f61052d366004611274565b600960209081526000928352604080842090915290825290205481565b34801561055657600080fd5b5061021f6105653660046112e5565b610bea565b34801561057657600080fd5b506103f36105853660046113a1565b610c50565b34801561059657600080fd5b506102686105a53660046112e5565b604080516060808201835260008083526020808401829052928401819052938452600d8252928290208251938401835280548452600181015491840191909152600201549082015290565b3480156105fc57600080fd5b5060015461021f565b34801561061157600080fd5b50610360610620366004611274565b600b60209081526000928352604080842090915290825290208054600182015460029092015490919083565b34801561065857600080fd5b5061021f610c8a565b34801561066d57600080fd5b5061026861067c366004611451565b60408051606080820183526000808352602080840182905292840152825190810183529485528401929092529082015290565b3480156106bb57600080fd5b5061021f610c9a565b3480156106d057600080fd5b506103f36106df36600461147d565b610cab565b3480156106f057600080fd5b506000546001546040519111158152602001610229565b34801561071357600080fd5b5061021f610722366004611499565b600c60209081526000928352604080842090915290825290205481565b604080516060808201835260008083526020808401829052928401819052858152600b83528381206001600160a01b038616825283528390208351918201845280548252600181015492820192909252600290910154918101919091525b92915050565b600061079d826102a560055490565b600054600154101561080b5760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e0060448201526064015b60405180910390fd5b806008600061081960055490565b815260208082019290925260409081016000908120338252909252902054101561087b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a1039ba30b5b29760691b6044820152606401610802565b8060096000610888610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108c891906114d1565b909155503390507f04fba62a80e1849b9aee6f029587f10dc735742856c310f041883b34f4107ab9826108f9610c9a565b6040805192835260208301919091520160405180910390a250565b600054600154106109675760405162461bcd60e51b815260206004820152601b60248201527f47656e6573697320636572656d6f6e792068617320656e6465642e00000000006044820152606401610802565b610972600633610cb5565b503360009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812080543492906109b19084906114d1565b9250508190555034600160008282546109ca91906114d1565b9091555050604080513481526000602082015233917f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a910160405180910390a260005460015410610abc57610a1d610c8a565b60055560005b610a2d6006610cd1565b811015610aba576000610a41600683610cdb565b6001600160a01b03811660009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812054919250600890610a8860055490565b8152602080820192909252604090810160009081206001600160a01b0390951681529390915290912055600101610a23565b505b565b6000546001541015610b125760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e006044820152606401610802565b610b1d600633610cb5565b503460086000610b2b610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b031681526020019081526020016000206000828254610b6b91906114d1565b909155503390507f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a34610b9c610c9a565b6040805192835260208301919091520160405180910390a2565b600061079d826104d660055490565b6000610bd361056560055490565b905090565b6000600354600454610bd391906114d1565b600080805b610bf96006610cd1565b811015610c4957610c35610c0e600683610cdb565b60008681526008602090815260408083206001600160a01b03949094168352929052205490565b610c3f90836114d1565b9150600101610bef565b5092915050565b60005b8151811015610c8657610c7e828281518110610c7157610c716114e4565b6020026020010151610cab565b600101610c53565b5050565b600060025442610bd391906114fa565b60006005546001610bd391906114d1565b610aba3382610ce7565b6000610cca836001600160a01b038416610ee1565b9392505050565b600061079d825490565b6000610cca8383610f30565b80516000908152600b602090815260408083206001600160a01b038616845290915290205415610d7f5760405162461bcd60e51b815260206004820152603960248201527f56616c696461746f722068617320616c726561647920636f6d6d69747465642060448201527f746f206120626c6f636b206174207468697320686569676874000000000000006064820152608401610802565b600354600454610d8f91906114d1565b815110610e185760405162461bcd60e51b815260206004820152604b60248201527f56616c696461746f722068617320636f6d6d697474656420746f206120626c6f60448201527f636b20746f6f20666172206168656164206f6620746865206c6173742061636360648201526a657074656420626c6f636b60a81b608482015260a401610802565b80516000908152600a60205260408120549003610e4957610e37610c8a565b81516000908152600a60205260409020555b80516000908152600b602090815260408083206001600160a01b03861684528252918290208351815590830151600182015590820151600290910155610e8e826107a3565b81516000908152600c6020908152604080832082860151845290915281208054909190610ebc9084906114d1565b90915550505b610ed96004546001610ed491906114d1565b610f5a565b610ec2575050565b6000818152600183016020526040812054610f285750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561079d565b50600061079d565b6000826000018281548110610f4757610f476114e4565b9060005260206000200154905092915050565b6000818152600a60205260408120545b80610f7460055490565b1015610f9057610f8b610f8660055490565b61105f565b610f6a565b60005b610f9d6006610cd1565b811015611055576000610fb1600683610cdb565b6000868152600b602090815260408083206001600160a01b03851684528252808320815160608101835281548082526001830154828601908152600290930154828501528552600c84528285209151855292529091205491925090600361101786610bea565b61102290600261151c565b61102c91906114fa565b81111561104a5761103d82866110b1565b5060019695505050505050565b505050600101610f93565b5060009392505050565b60005b61106c6006610cd1565b811015611095576000611080600683610cdb565b905061108c8184611133565b50600101611062565b506001600560008282546110a991906114d1565b909155505050565b81516000908152600d6020908152604091829020845180825582860151600183018190558487015160029093018390556004829055845190815292830152917f5b0d1f14085ff88796df21c2944d34c115838925a7bee30850fcacaaf902a379910160405180910390a280611124610c8a565b1115610c8657610c868161105f565b600960006111428360016114d1565b8152602080820192909252604090810160009081206001600160a01b0386168083529084528282205485835260088552838320918352935220546111869190611533565b600860006111958460016114d1565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546111d591906114d1565b90915550506001600160a01b0382166108fc600960006111f68560016114d1565b81526020019081526020016000206000856001600160a01b03166001600160a01b03168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015611253573d6000803e3d6000fd5b505050565b80356001600160a01b038116811461126f57600080fd5b919050565b6000806040838503121561128757600080fd5b8235915061129760208401611258565b90509250929050565b600080604083850312156112b357600080fd5b6112bc83611258565b946020939093013593505050565b6000602082840312156112dc57600080fd5b610cca82611258565b6000602082840312156112f757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561133d5761133d6112fe565b604052919050565b60006060828403121561135757600080fd5b6040516060810181811067ffffffffffffffff8211171561137a5761137a6112fe565b80604052508091508235815260208301356020820152604083013560408201525092915050565b600060208083850312156113b457600080fd5b823567ffffffffffffffff808211156113cc57600080fd5b818501915085601f8301126113e057600080fd5b8135818111156113f2576113f26112fe565b611400848260051b01611314565b8181528481019250606091820284018501918883111561141f57600080fd5b938501935b82851015611445576114368986611345565b84529384019392850192611424565b50979650505050505050565b60008060006060848603121561146657600080fd5b505081359360208301359350604090920135919050565b60006060828403121561148f57600080fd5b610cca8383611345565b600080604083850312156114ac57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561079d5761079d6114bb565b634e487b7160e01b600052603260045260246000fd5b60008261151757634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761079d5761079d6114bb565b8181038181111561079d5761079d6114bb56fea2646970667358221220c9542e0185c9b0ec6eb1d431d6380d142087b991f911e0e830486ae7143e052a64736f6c63430008190033000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0", - "chainId": "0x621" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x140d08", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", - "transactionIndex": "0x0", - "blockHash": "0xea37b267f88d3ca5d2fa600066f04e1647c21cbfa15fd3206c8d8df413e9309c", - "blockNumber": "0x1", - "gasUsed": "0x140d08", - "effectiveGasPrice": "0x3b9aca00", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": null, - "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "root": "0xdbc0724b8d01dec5d65693164bc15a0f49c3029052b228b6b5391ae692368844" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1716348078, - "chain": 1569, - "commit": "fa704b72" -} \ No newline at end of file diff --git a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json b/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json deleted file mode 100644 index be54c2071..000000000 --- a/protocol-units/settlement/mcr/contracts/broadcast/DeployMCR.s.sol/1569/run-latest.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "transactions": [ - { - "hash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", - "transactionType": "CREATE", - "contractName": "MCR", - "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "function": null, - "arguments": [ - "10", - "128", - "100000000000000000000", - "0" - ], - "transaction": { - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "gas": "0x1a0f1a", - "value": "0x0", - "input": "0x6080604052348015600f57600080fd5b50604051611607380380611607833981016040819052602c916047565b6002939093556003919091556000908155600155600455607c565b60008060008060808587031215605c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b61157c8061008b6000396000f3fe6080604052600436106102045760003560e01c80636b588ac711610118578063e1ffa44c116100a0578063ee96da051161006f578063ee96da0514610661578063efe97d05146106af578063f89fe60b146106c4578063f934ed75146106e4578063fc2788ad1461070757600080fd5b8063e1ffa44c1461058a578063e6a386e4146105f0578063e90d4c0614610605578063ee377d901461064c57600080fd5b806384df6455116100e757806384df6455146104bb578063b97dd9e2146104fd578063c76c27bf14610512578063ce2a96b41461054a578063e1b2b2221461056a57600080fd5b80636b588ac71461046557806372710d181461047b57806374e8e5641461049057806376671808146104a557600080fd5b806320e0e4451161019b5780633a4b66f11161016a5780633a4b66f1146103fd57806342e0aeb2146104055780634ff0876a1461041a5780635d3ea8f11461043057806367d144ab1461044557600080fd5b806320e0e445146103915780632a3fa95c146103be5780632e17de78146103d3578063365f490b146103f557600080fd5b8063108cf69b116101d7578063108cf69b146102cc57806311fe3345146103045780631c4e4e27146103245780631cfa25161461037b57600080fd5b8063048317c814610209578063056f4aa6146102325780630a0b81cc146102485780630dd563661461028a575b600080fd5b34801561021557600080fd5b5061021f60005481565b6040519081526020015b60405180910390f35b34801561023e57600080fd5b5061021f60015481565b34801561025457600080fd5b50610268610263366004611274565b61073f565b6040805182518152602080840151908201529181015190820152606001610229565b34801561029657600080fd5b5061021f6102a53660046112a0565b60009081526008602090815260408083206001600160a01b03949094168352929052205490565b3480156102d857600080fd5b5061021f6102e7366004611274565b600860209081526000928352604080842090915290825290205481565b34801561031057600080fd5b5061021f61031f3660046112ca565b6107a3565b34801561033057600080fd5b5061036061033f3660046112e5565b600d6020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610229565b34801561038757600080fd5b5061021f60035481565b34801561039d57600080fd5b5061021f6103ac3660046112e5565b600a6020526000908152604090205481565b3480156103ca57600080fd5b5060035461021f565b3480156103df57600080fd5b506103f36103ee3660046112e5565b6107b2565b005b6103f3610914565b6103f3610abe565b34801561041157600080fd5b5060005461021f565b34801561042657600080fd5b5061021f60025481565b34801561043c57600080fd5b5060025461021f565b34801561045157600080fd5b5061021f6104603660046112ca565b610bb6565b34801561047157600080fd5b5061021f60045481565b34801561048757600080fd5b5061021f610bc5565b34801561049c57600080fd5b5061021f610bd8565b3480156104b157600080fd5b5061021f60055481565b3480156104c757600080fd5b5061021f6104d63660046112a0565b60009081526009602090815260408083206001600160a01b03949094168352929052205490565b34801561050957600080fd5b5060055461021f565b34801561051e57600080fd5b5061021f61052d366004611274565b600960209081526000928352604080842090915290825290205481565b34801561055657600080fd5b5061021f6105653660046112e5565b610bea565b34801561057657600080fd5b506103f36105853660046113a1565b610c50565b34801561059657600080fd5b506102686105a53660046112e5565b604080516060808201835260008083526020808401829052928401819052938452600d8252928290208251938401835280548452600181015491840191909152600201549082015290565b3480156105fc57600080fd5b5060015461021f565b34801561061157600080fd5b50610360610620366004611274565b600b60209081526000928352604080842090915290825290208054600182015460029092015490919083565b34801561065857600080fd5b5061021f610c8a565b34801561066d57600080fd5b5061026861067c366004611451565b60408051606080820183526000808352602080840182905292840152825190810183529485528401929092529082015290565b3480156106bb57600080fd5b5061021f610c9a565b3480156106d057600080fd5b506103f36106df36600461147d565b610cab565b3480156106f057600080fd5b506000546001546040519111158152602001610229565b34801561071357600080fd5b5061021f610722366004611499565b600c60209081526000928352604080842090915290825290205481565b604080516060808201835260008083526020808401829052928401819052858152600b83528381206001600160a01b038616825283528390208351918201845280548252600181015492820192909252600290910154918101919091525b92915050565b600061079d826102a560055490565b600054600154101561080b5760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e0060448201526064015b60405180910390fd5b806008600061081960055490565b815260208082019290925260409081016000908120338252909252902054101561087b5760405162461bcd60e51b815260206004820152601360248201527224b739bab33334b1b4b2b73a1039ba30b5b29760691b6044820152606401610802565b8060096000610888610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b0316815260200190815260200160002060008282546108c891906114d1565b909155503390507f04fba62a80e1849b9aee6f029587f10dc735742856c310f041883b34f4107ab9826108f9610c9a565b6040805192835260208301919091520160405180910390a250565b600054600154106109675760405162461bcd60e51b815260206004820152601b60248201527f47656e6573697320636572656d6f6e792068617320656e6465642e00000000006044820152606401610802565b610972600633610cb5565b503360009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812080543492906109b19084906114d1565b9250508190555034600160008282546109ca91906114d1565b9091555050604080513481526000602082015233917f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a910160405180910390a260005460015410610abc57610a1d610c8a565b60055560005b610a2d6006610cd1565b811015610aba576000610a41600683610cdb565b6001600160a01b03811660009081527f5eff886ea0ce6ca488a3d6e336d6c0f75f46d19b42c06ce5ee98e42c96d256c76020526040812054919250600890610a8860055490565b8152602080820192909252604090810160009081206001600160a01b0390951681529390915290912055600101610a23565b505b565b6000546001541015610b125760405162461bcd60e51b815260206004820152601f60248201527f47656e6573697320636572656d6f6e7920686173206e6f7420656e6465642e006044820152606401610802565b610b1d600633610cb5565b503460086000610b2b610c9a565b81526020019081526020016000206000336001600160a01b03166001600160a01b031681526020019081526020016000206000828254610b6b91906114d1565b909155503390507f7df7881b496facd9ed493d6f1b0fc5092ad3a605083889c92e64ef36602dbb6a34610b9c610c9a565b6040805192835260208301919091520160405180910390a2565b600061079d826104d660055490565b6000610bd361056560055490565b905090565b6000600354600454610bd391906114d1565b600080805b610bf96006610cd1565b811015610c4957610c35610c0e600683610cdb565b60008681526008602090815260408083206001600160a01b03949094168352929052205490565b610c3f90836114d1565b9150600101610bef565b5092915050565b60005b8151811015610c8657610c7e828281518110610c7157610c716114e4565b6020026020010151610cab565b600101610c53565b5050565b600060025442610bd391906114fa565b60006005546001610bd391906114d1565b610aba3382610ce7565b6000610cca836001600160a01b038416610ee1565b9392505050565b600061079d825490565b6000610cca8383610f30565b80516000908152600b602090815260408083206001600160a01b038616845290915290205415610d7f5760405162461bcd60e51b815260206004820152603960248201527f56616c696461746f722068617320616c726561647920636f6d6d69747465642060448201527f746f206120626c6f636b206174207468697320686569676874000000000000006064820152608401610802565b600354600454610d8f91906114d1565b815110610e185760405162461bcd60e51b815260206004820152604b60248201527f56616c696461746f722068617320636f6d6d697474656420746f206120626c6f60448201527f636b20746f6f20666172206168656164206f6620746865206c6173742061636360648201526a657074656420626c6f636b60a81b608482015260a401610802565b80516000908152600a60205260408120549003610e4957610e37610c8a565b81516000908152600a60205260409020555b80516000908152600b602090815260408083206001600160a01b03861684528252918290208351815590830151600182015590820151600290910155610e8e826107a3565b81516000908152600c6020908152604080832082860151845290915281208054909190610ebc9084906114d1565b90915550505b610ed96004546001610ed491906114d1565b610f5a565b610ec2575050565b6000818152600183016020526040812054610f285750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561079d565b50600061079d565b6000826000018281548110610f4757610f476114e4565b9060005260206000200154905092915050565b6000818152600a60205260408120545b80610f7460055490565b1015610f9057610f8b610f8660055490565b61105f565b610f6a565b60005b610f9d6006610cd1565b811015611055576000610fb1600683610cdb565b6000868152600b602090815260408083206001600160a01b03851684528252808320815160608101835281548082526001830154828601908152600290930154828501528552600c84528285209151855292529091205491925090600361101786610bea565b61102290600261151c565b61102c91906114fa565b81111561104a5761103d82866110b1565b5060019695505050505050565b505050600101610f93565b5060009392505050565b60005b61106c6006610cd1565b811015611095576000611080600683610cdb565b905061108c8184611133565b50600101611062565b506001600560008282546110a991906114d1565b909155505050565b81516000908152600d6020908152604091829020845180825582860151600183018190558487015160029093018390556004829055845190815292830152917f5b0d1f14085ff88796df21c2944d34c115838925a7bee30850fcacaaf902a379910160405180910390a280611124610c8a565b1115610c8657610c868161105f565b600960006111428360016114d1565b8152602080820192909252604090810160009081206001600160a01b0386168083529084528282205485835260088552838320918352935220546111869190611533565b600860006111958460016114d1565b81526020019081526020016000206000846001600160a01b03166001600160a01b0316815260200190815260200160002060008282546111d591906114d1565b90915550506001600160a01b0382166108fc600960006111f68560016114d1565b81526020019081526020016000206000856001600160a01b03166001600160a01b03168152602001908152602001600020549081150290604051600060405180830381858888f19350505050158015611253573d6000803e3d6000fd5b505050565b80356001600160a01b038116811461126f57600080fd5b919050565b6000806040838503121561128757600080fd5b8235915061129760208401611258565b90509250929050565b600080604083850312156112b357600080fd5b6112bc83611258565b946020939093013593505050565b6000602082840312156112dc57600080fd5b610cca82611258565b6000602082840312156112f757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561133d5761133d6112fe565b604052919050565b60006060828403121561135757600080fd5b6040516060810181811067ffffffffffffffff8211171561137a5761137a6112fe565b80604052508091508235815260208301356020820152604083013560408201525092915050565b600060208083850312156113b457600080fd5b823567ffffffffffffffff808211156113cc57600080fd5b818501915085601f8301126113e057600080fd5b8135818111156113f2576113f26112fe565b611400848260051b01611314565b8181528481019250606091820284018501918883111561141f57600080fd5b938501935b82851015611445576114368986611345565b84529384019392850192611424565b50979650505050505050565b60008060006060848603121561146657600080fd5b505081359360208301359350604090920135919050565b60006060828403121561148f57600080fd5b610cca8383611345565b600080604083850312156114ac57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082018082111561079d5761079d6114bb565b634e487b7160e01b600052603260045260246000fd5b60008261151757634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761079d5761079d6114bb565b8181038181111561079d5761079d6114bb56fea2646970667358221220c9542e0185c9b0ec6eb1d431d6380d142087b991f911e0e830486ae7143e052a64736f6c63430008190033000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0", - "chainId": "0x621" - }, - "additionalContracts": [], - "isFixedGasLimit": false - } - ], - "receipts": [ - { - "status": "0x1", - "cumulativeGasUsed": "0x140d08", - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "type": "0x2", - "transactionHash": "0x8de4db345bfe425ddb357f5d720e9979d63372ae7d5fabc9d485780a97e29f6b", - "transactionIndex": "0x0", - "blockHash": "0xea37b267f88d3ca5d2fa600066f04e1647c21cbfa15fd3206c8d8df413e9309c", - "blockNumber": "0x1", - "gasUsed": "0x140d08", - "effectiveGasPrice": "0x3b9aca00", - "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", - "to": null, - "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "root": "0xdbc0724b8d01dec5d65693164bc15a0f49c3029052b228b6b5391ae692368844" - } - ], - "libraries": [], - "pending": [], - "returns": {}, - "timestamp": 1716348078, - "chain": 1569, - "commit": "fa704b72" -} \ No newline at end of file From fae30bec917049a87ce0a577ff679f550f005f07 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Sat, 25 May 2024 01:16:33 +0300 Subject: [PATCH 097/101] suzuka-executor: sanity-test block commitment Test some properties of the BlockCommitment returned by a test from the execute_block method. There's no easy way to verify the commitment hash itself. --- .../execution/suzuka/executor/Cargo.toml | 4 +++- .../execution/suzuka/executor/src/v1.rs | 20 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/protocol-units/execution/suzuka/executor/Cargo.toml b/protocol-units/execution/suzuka/executor/Cargo.toml index 196025731..901c66c54 100644 --- a/protocol-units/execution/suzuka/executor/Cargo.toml +++ b/protocol-units/execution/suzuka/executor/Cargo.toml @@ -14,7 +14,6 @@ path = "src/lib.rs" [dependencies] anyhow = { workspace = true } -chrono = { workspace = true } fail = { workspace = true } log = { workspace = true } thiserror = { workspace = true } @@ -67,3 +66,6 @@ movement-types = { workspace = true } dirs = "5.0.1" tempfile = "3.10.1" async-trait = "0.1.80" + +[dev-dependencies] +chrono = { workspace = true } diff --git a/protocol-units/execution/suzuka/executor/src/v1.rs b/protocol-units/execution/suzuka/executor/src/v1.rs index 3062e778a..aac999891 100644 --- a/protocol-units/execution/suzuka/executor/src/v1.rs +++ b/protocol-units/execution/suzuka/executor/src/v1.rs @@ -132,11 +132,6 @@ mod opt_tests { accept_type::AcceptType, transactions::SubmitTransactionPost }; - use futures::SinkExt; - use aptos_mempool::{ - MempoolClientRequest, MempoolClientSender, - }; - use futures::channel::oneshot; fn create_signed_transaction(gas_unit_price: u64) -> SignedTransaction { let private_key = Ed25519PrivateKey::generate_for_testing(); @@ -243,14 +238,19 @@ mod opt_tests { // Now execute the block let block_id = HashValue::random(); - let tx = SignatureVerifiedTransaction::Valid(Transaction::UserTransaction( - received_transaction - )); - let txs = ExecutableTransactions::Unsharded(vec![tx]); + let block_metadata = executor.build_block_metadata( + block_id.clone(), + chrono::Utc::now().timestamp_micros() as u64, + ).await.unwrap(); + let txs = ExecutableTransactions::Unsharded([ + Transaction::BlockMetadata(block_metadata), + Transaction::UserTransaction(received_transaction), + ].into_iter().map(SignatureVerifiedTransaction::Valid).collect()); let block = ExecutableBlock::new(block_id.clone(), txs); let commitment = executor.execute_block(FinalityMode::Opt, block).await?; - // TODO: test the commitment + assert_eq!(commitment.block_id.to_vec(), block_id.to_vec()); + assert_eq!(commitment.height, 1); services_handle.abort(); background_handle.abort(); From 63726a0c0d6d028d5d8eb11fb77493f193d0fd2c Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 27 May 2024 12:48:16 +0300 Subject: [PATCH 098/101] mcr-settlement-client: rename settle method Rename to override_block_commitment for clarity. --- protocol-units/settlement/mcr/client/src/mock.rs | 4 ++-- protocol-units/settlement/mcr/manager/src/manager.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/protocol-units/settlement/mcr/client/src/mock.rs b/protocol-units/settlement/mcr/client/src/mock.rs index 7beed3f96..b44e4049f 100644 --- a/protocol-units/settlement/mcr/client/src/mock.rs +++ b/protocol-units/settlement/mcr/client/src/mock.rs @@ -30,7 +30,7 @@ impl MockMcrSettlementClient { /// /// To have effect, this method needs to be called before a commitment is /// posted for this height with the `McrSettlementClientOperations` API. - pub async fn settle(&self, commitment: BlockCommitment) { + pub async fn override_block_commitment(&self, commitment: BlockCommitment) { let mut commitments = self.commitments.write().await; commitments.insert(commitment.height, commitment); } @@ -163,7 +163,7 @@ pub mod test { block_id: Default::default(), commitment: Commitment::test(), }; - client.settle(commitment.clone()).await; + client.override_block_commitment(commitment.clone()).await; client.post_block_commitment(BlockCommitment { height: 1, block_id: Default::default(), diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index 5d17e7bd5..c722fe83b 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -158,7 +158,7 @@ mod tests { block_id: Default::default(), commitment: Commitment([1; 32]), }; - client.settle(BlockCommitment { + client.override_block_commitment(BlockCommitment { height: 1, block_id: Default::default(), commitment: Commitment([3; 32]), From b4999b3b77b390b4139c66b35a6ac47e409365b7 Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 27 May 2024 13:36:43 +0300 Subject: [PATCH 099/101] mcr-settlement-client: pause and resume for mock To test dynamic behavior of the McrSettlementManager, add methods to pause and resume streaming of commitments. --- Cargo.lock | 1 + .../settlement/mcr/client/Cargo.toml | 3 + .../settlement/mcr/client/src/mock.rs | 106 ++++++++++++++++-- 3 files changed, 100 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d011386be..6ee5fe5df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6183,6 +6183,7 @@ dependencies = [ "anyhow", "async-stream", "async-trait", + "futures", "movement-types", "serde_json", "tokio", diff --git a/protocol-units/settlement/mcr/client/Cargo.toml b/protocol-units/settlement/mcr/client/Cargo.toml index d92bfb8a1..197884a59 100644 --- a/protocol-units/settlement/mcr/client/Cargo.toml +++ b/protocol-units/settlement/mcr/client/Cargo.toml @@ -20,6 +20,9 @@ movement-types = { workspace = true } serde_json = { workspace = true } async-stream = { workspace = true } +[dev-dependencies] +futures = { workspace = true } + [features] mock = [] diff --git a/protocol-units/settlement/mcr/client/src/mock.rs b/protocol-units/settlement/mcr/client/src/mock.rs index b44e4049f..8942de4bd 100644 --- a/protocol-units/settlement/mcr/client/src/mock.rs +++ b/protocol-units/settlement/mcr/client/src/mock.rs @@ -1,28 +1,30 @@ use crate::{CommitmentStream, McrSettlementClientOperations}; use movement_types::BlockCommitment; -use std::collections::HashMap; +use std::collections::BTreeMap; use std::sync::{Arc, Mutex}; use tokio::sync::{mpsc, RwLock}; use tokio_stream::wrappers::ReceiverStream; #[derive(Clone)] pub struct MockMcrSettlementClient { - commitments: Arc>>, + commitments: Arc>>, stream_sender: mpsc::Sender>, stream_receiver: Arc>>>>, pub current_height: Arc>, - pub block_lead_tolerance: u64 + pub block_lead_tolerance: u64, + paused_at_height: Arc>>, } impl MockMcrSettlementClient { pub fn new() -> Self { let (stream_sender, receiver) = mpsc::channel(10); MockMcrSettlementClient { - commitments: Arc::new(RwLock::new(HashMap::new())), + commitments: Arc::new(RwLock::new(BTreeMap::new())), stream_sender, stream_receiver: Arc::new(Mutex::new(Some(receiver))), current_height: Arc::new(RwLock::new(0)), block_lead_tolerance: 16, + paused_at_height: Arc::new(RwLock::new(None)), } } @@ -34,6 +36,31 @@ impl MockMcrSettlementClient { let mut commitments = self.commitments.write().await; commitments.insert(commitment.height, commitment); } + + /// Stop streaming commitments after the given height. + /// + /// Any posted commitments will be accumulated. + pub async fn pause_after(&self, height: u64) { + let mut paused_at_height = self.paused_at_height.write().await; + *paused_at_height = Some(height); + } + + /// Stream any commitments that have been posted following the height + /// at which `pause` was called, and resume streaming any newly posted + /// commitments + pub async fn resume(&self) { + let resume_height = { + let mut paused_at_height = self.paused_at_height.write().await; + paused_at_height.take().expect("not paused") + }; + { + let commitments = self.commitments.read().await; + for (_, commitment) in commitments.range(resume_height + 1..) { + println!("resume sends commitment for height {}", commitment.height); + self.stream_sender.send(Ok(commitment.clone())).await.unwrap(); + } + } + } } #[async_trait::async_trait] @@ -45,11 +72,18 @@ impl McrSettlementClientOperations for MockMcrSettlementClient { let height = block_commitment.height; - { + let settled = { let mut commitments = self.commitments.write().await; - let settled = commitments.entry(block_commitment.height).or_insert(block_commitment); - // Simulate sending to the stream - self.stream_sender.send(Ok(settled.clone())).await?; + commitments.entry(block_commitment.height).or_insert(block_commitment).clone() + }; + { + let paused_at_height = self.paused_at_height.read().await; + match *paused_at_height { + Some(ph) if ph < height => {} + _ => { + self.stream_sender.send(Ok(settled)).await?; + } + } } { @@ -82,7 +116,7 @@ impl McrSettlementClientOperations for MockMcrSettlementClient { &self, height: u64, ) -> Result, anyhow::Error> { - let guard = self.commitments.write().await; + let guard = self.commitments.read().await; Ok(guard.get(&height).cloned()) } @@ -97,7 +131,10 @@ pub mod test { use super::*; use movement_types::Commitment; + + use futures::future; use tokio_stream::StreamExt; + use tokio::select; #[tokio::test] async fn test_post_block_commitment() -> Result<(), anyhow::Error> { @@ -170,7 +207,56 @@ pub mod test { commitment: Commitment([1; 32]), }).await.unwrap(); let mut stream = client.stream_block_commitments().await?; - assert_eq!(stream.next().await.unwrap().unwrap(), commitment); + assert_eq!(stream.next().await.expect("stream has ended")?, commitment); + Ok(()) + } + + #[tokio::test] + async fn test_pause() -> Result<(), anyhow::Error> { + let client = MockMcrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + client.pause_after(1).await; + client.post_block_commitment(commitment.clone()).await?; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + client.post_block_commitment(commitment2).await?; + let mut stream = client.stream_block_commitments().await?; + assert_eq!(stream.next().await.expect("stream has ended")?, commitment); + select! { + biased; + _ = stream.next() => panic!("stream should be paused"), + _ = future::ready(()) => {} + } + Ok(()) + } + + #[tokio::test] + async fn test_resume() -> Result<(), anyhow::Error> { + let client = MockMcrSettlementClient::new(); + let commitment = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + client.pause_after(1).await; + client.post_block_commitment(commitment.clone()).await?; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + client.post_block_commitment(commitment2.clone()).await?; + let mut stream = client.stream_block_commitments().await?; + assert_eq!(stream.next().await.expect("stream has ended")?, commitment); + client.resume().await; + assert_eq!(stream.next().await.expect("stream has ended")?, commitment2); Ok(()) } } From df9cb3849a06beb674e9d93160089fc84431260c Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 27 May 2024 17:04:44 +0300 Subject: [PATCH 100/101] mcr-settlement-manager: test back pressure Test dynamic behavior: when the client is not ready to process more incoming blocks, the manager should pause with blocks as well. Then when the client is ready to accept more, resume. --- .../settlement/mcr/manager/src/manager.rs | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/protocol-units/settlement/mcr/manager/src/manager.rs b/protocol-units/settlement/mcr/manager/src/manager.rs index c722fe83b..72a8e14aa 100644 --- a/protocol-units/settlement/mcr/manager/src/manager.rs +++ b/protocol-units/settlement/mcr/manager/src/manager.rs @@ -179,4 +179,63 @@ mod tests { }); Ok(()) } + + #[tokio::test] + async fn test_back_pressure() -> Result<(), anyhow::Error> { + let mut client = MockMcrSettlementClient::new(); + client.block_lead_tolerance = 2; + client.pause_after(2).await; + let (manager, mut event_stream) = Manager::new(client.clone()); + + let commitment1 = BlockCommitment { + height: 1, + block_id: Default::default(), + commitment: Commitment([1; 32]), + }; + manager.post_block_commitment(commitment1.clone()).await?; + let commitment2 = BlockCommitment { + height: 2, + block_id: Default::default(), + commitment: Commitment([2; 32]), + }; + manager.post_block_commitment(commitment2.clone()).await?; + let commitment3 = BlockCommitment { + height: 3, + block_id: Default::default(), + commitment: Commitment([3; 32]), + }; + manager.post_block_commitment(commitment3.clone()).await?; + + let event = event_stream.next().await.expect("stream has ended")?; + assert_eq!(event, BlockCommitmentEvent::Accepted(commitment1.clone())); + let event = event_stream.next().await.expect("stream has ended")?; + assert_eq!(event, BlockCommitmentEvent::Accepted(commitment2.clone())); + + // The batch of first two should have been posted, + // the third commitment is batched in the manager. + assert_eq!(client.get_commitment_at_height(1).await?, Some(commitment1.clone())); + assert_eq!(client.get_commitment_at_height(2).await?, Some(commitment2.clone())); + assert_eq!(client.get_commitment_at_height(3).await?, None); + + // Unblock the client, allowing processing of commitments to resume. + client.resume().await; + + let commitment4 = BlockCommitment { + height: 4, + block_id: Default::default(), + commitment: Commitment([4; 32]), + }; + manager.post_block_commitment(commitment4).await?; + let commitment5 = BlockCommitment { + height: 5, + block_id: Default::default(), + commitment: Commitment([5; 32]), + }; + manager.post_block_commitment(commitment5).await?; + + let event = event_stream.next().await.expect("stream has ended")?; + assert_eq!(event, BlockCommitmentEvent::Accepted(commitment3.clone())); + + Ok(()) + } } From e5feea008cb326bf77a70694419ff6a458fe24ce Mon Sep 17 00:00:00 2001 From: Mikhail Zabaluev Date: Mon, 27 May 2024 19:48:41 +0300 Subject: [PATCH 101/101] m1-da-light-node: expanded FIXME comment Included Liam's remarks on treating verifier errors as successful verification. --- protocol-units/da/m1/light-node/src/v1/passthrough.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/protocol-units/da/m1/light-node/src/v1/passthrough.rs b/protocol-units/da/m1/light-node/src/v1/passthrough.rs index 32d1c9151..c33117541 100644 --- a/protocol-units/da/m1/light-node/src/v1/passthrough.rs +++ b/protocol-units/da/m1/light-node/src/v1/passthrough.rs @@ -121,7 +121,10 @@ impl LightNodeV1 { debug!("Error verifying blob: {:?}", e); } - // FIXME: really? + // FIXME: check the implications of treating errors as verification success. + // @l-monninger: under the assumption we are running a light node in the same + // trusted setup and have not experience a highly intrusive(?), the vulnerability here + // is fairly low. The light node should take care of verification on its own. let verified = verified.unwrap_or(true); if verified {