Skip to content

Commit

Permalink
rename evm-common to evm-state-machine
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Dec 8, 2024
1 parent 91ff054 commit 40c1739
Show file tree
Hide file tree
Showing 30 changed files with 48 additions and 52 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

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

13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"
members = [
# runtime
"parachain/runtimes/gargantua",
# "parachain/runtimes/messier",
"parachain/runtimes/nexus",

# node
Expand All @@ -27,19 +26,16 @@ members = [
"modules/ismp/pallets/token-gateway-inspector",
"modules/ismp/pallets/hyperbridge",
"modules/ismp/pallets/state-coprocessor",
"modules/ismp/testsuite",
"modules/ismp/clients/sync-committee",
"modules/ismp/clients/casper-ffg",
"modules/ismp/clients/parachain/client",
"modules/ismp/clients/parachain/inherent",
"modules/ismp/clients/parachain/runtime-api",
"modules/ismp/state-machines/substrate",
"modules/ismp/state-machines/hyperbridge",
"modules/ismp/clients/arbitrum",
"modules/ismp/clients/optimism",
"modules/ismp/clients/sync-committee/evm-common",
"modules/ismp/clients/bsc",
"modules/ismp/clients/grandpa",
"modules/ismp/testsuite",

# cryptography
"modules/consensus/sync-committee/prover",
Expand All @@ -58,6 +54,9 @@ members = [
"modules/trees/mmr/primitives",
"modules/trees/mmr/gadget",
"modules/trees/mmr/pallet/runtime-api",
"modules/ismp/state-machines/evm",
"modules/ismp/state-machines/substrate",
"modules/ismp/state-machines/hyperbridge",

# evm stuff
"evm/integration-tests",
Expand All @@ -84,8 +83,6 @@ members = [
"tesseract/telemetry",
"tesseract/config",
"tesseract/fisherman",

# integration tests
"tesseract/integration-test",
]

Expand Down Expand Up @@ -295,11 +292,11 @@ ismp-parachain = { version = "1.15.1", path = "./modules/ismp/clients/parachain/
ismp-parachain-inherent = { version = "1.15.1", path = "./modules/ismp/clients/parachain/inherent" }
ismp-parachain-runtime-api = { version = "1.15.1", path = "./modules/ismp/clients/parachain/runtime-api", default-features = false }
ismp-sync-committee = { path = "./modules/ismp/clients/sync-committee", default-features = false }
evm-common = { path = "./modules/ismp/clients/sync-committee/evm-common", default-features = false }
arbitrum-verifier = { path = "./modules/ismp/clients/arbitrum", default-features = false }
op-verifier = { path = "./modules/ismp/clients/optimism", default-features = false }

# state machine clients
evm-state-machine = { path = "./modules/ismp/state-machines/evm", default-features = false }
substrate-state-machine = { version = "1.15.1", path = "modules/ismp/state-machines/substrate", default-features = false }
hyperbridge-client-machine = { path = "modules/ismp/state-machines/hyperbridge", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion modules/hyperclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ primitive-types = { workspace = true, features = ["serde"] }
ethers = { workspace = true }
ismp = { workspace = true, default-features = true }
pallet-ismp = { workspace = true, features = ["disable-panic-handler"] }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }
sp-core = { workspace = true, features = ["serde"]}
substrate-state-machine = { workspace = true }
ismp-solidity-abi = { workspace = true }
Expand Down
5 changes: 3 additions & 2 deletions modules/hyperclient/src/providers/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{providers::interface::Client, types::BoxStream};
use codec::{Decode, Encode};
use ethereum_triedb::StorageProof;
use ethers::prelude::Middleware;
use evm_common::{
use evm_state_machine::{
presets::{
REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT,
RESPONSE_RECEIPTS_SLOT,
Expand All @@ -29,7 +29,7 @@ use sp_mmr_primitives::utils::NodesUtils;
use super::interface::Query;
use crate::{
providers::interface::WithMetadata,
types::{EventMetadata, EvmStateProof, SubstrateStateProof},
types::{EventMetadata, SubstrateStateProof},
};
use anyhow::{anyhow, Context, Error};
use core::time::Duration;
Expand All @@ -38,6 +38,7 @@ use ethers::{
providers::{Http, Provider},
utils::keccak256,
};
use evm_state_machine::types::EvmStateProof;
use futures::{stream, StreamExt};
use ismp::{
consensus::{ConsensusStateId, StateCommitment, StateMachineHeight, StateMachineId},
Expand Down
1 change: 0 additions & 1 deletion modules/hyperclient/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::{
use anyhow::anyhow;
use core::{fmt, pin::Pin};
use ethers::types::H160;
pub use evm_common::types::EvmStateProof;
use futures::Stream;
use hex_fmt::HexFmt;
use ismp::{consensus::ConsensusStateId, host::StateMachine};
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/clients/arbitrum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ publish = false
ismp = { workspace = true }
ethereum-triedb = { workspace = true }
geth-primitives = { workspace = true }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }

# crates.io
alloy-rlp = { workspace = true }
Expand Down Expand Up @@ -40,5 +40,5 @@ std = [
"ethabi/std",
"hex/std",
"geth-primitives/std",
"evm-common/std"
"evm-state-machine/std"
]
2 changes: 1 addition & 1 deletion modules/ismp/clients/arbitrum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod tests;
use alloc::format;
use alloy_rlp::Decodable;
use ethabi::ethereum_types::{H160, H256, U256};
use evm_common::{derive_map_key, get_contract_account, get_value_from_proof, prelude::*};
use evm_state_machine::{derive_map_key, get_contract_account, get_value_from_proof, prelude::*};
use geth_primitives::{CodecHeader, Header};
use ismp::{
consensus::{
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/arbitrum/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ethers::prelude::*;
use hex_literal::hex;

use crate::NODES_SLOT;
use evm_common::derive_map_key;
use evm_state_machine::derive_map_key;
use ismp_testsuite::mocks::Host;
use sp_core::{H160, H256};

Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/clients/bsc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ismp = { workspace = true }
bsc-verifier = { workspace = true }
sync-committee-primitives = { workspace = true }
geth-primitives = { workspace = true }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }
pallet-ismp-host-executive = { workspace = true }

[features]
Expand All @@ -32,6 +32,6 @@ std = [
"bsc-verifier/std",
"ismp/std",
"sync-committee-primitives/std",
"evm-common/std",
"evm-state-machine/std",
"pallet-ismp-host-executive/std"
]
2 changes: 1 addition & 1 deletion modules/ismp/clients/bsc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use bsc_verifier::{
verify_bsc_header, NextValidators, VerificationResult,
};
use codec::{Decode, Encode};
use evm_common::EvmStateMachine;
use evm_state_machine::EvmStateMachine;
use geth_primitives::Header;
use ismp::{
consensus::{
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/clients/optimism/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ publish = false
ismp = { workspace = true }
ethereum-triedb = { workspace = true }
geth-primitives = { workspace = true }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }

# crates.io
alloy-rlp = { workspace = true }
Expand All @@ -35,5 +35,5 @@ std = [
"ethabi/std",
"hex/std",
"geth-primitives/std",
"evm-common/std"
"evm-state-machine/std"
]
2 changes: 1 addition & 1 deletion modules/ismp/clients/optimism/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern crate alloc;
use alloc::format;
use alloy_rlp::Decodable;
use ethabi::ethereum_types::{H160, H256, U128, U256};
use evm_common::{
use evm_state_machine::{
derive_array_item_key, derive_map_key, get_contract_account, get_value_from_proof, prelude::*,
};
use geth_primitives::{CodecHeader, Header};
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/clients/sync-committee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sync-committee-verifier = { workspace = true, default-features = false }
ethereum-triedb = { workspace = true, default-features = false }
pallet-ismp = { workspace = true, default-features = false }
geth-primitives = { workspace = true, default-features = false }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }
arbitrum-verifier = { workspace = true }
op-verifier = { workspace = true }
pallet-ismp-host-executive = { workspace = true }
Expand Down Expand Up @@ -52,7 +52,7 @@ std = [
"sp-core/std",
"pallet-ismp/std",
"geth-primitives/std",
"evm-common/std",
"evm-state-machine/std",
"arbitrum-verifier/std",
"op-verifier/std"
]
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/clients/sync-committee/src/beacon_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
use alloc::{collections::BTreeMap, format, string::ToString};
use arbitrum_verifier::verify_arbitrum_payload;
use codec::{Decode, Encode};
use evm_common::construct_intermediate_state;
use evm_state_machine::construct_intermediate_state;

use crate::{
pallet::{self, SupportedStatemachines},
types::{BeaconClientUpdate, ConsensusState, L2Consensus},
};
use evm_common::EvmStateMachine;
use evm_state_machine::EvmStateMachine;
use ismp::{
consensus::{
ConsensusClient, ConsensusClientId, ConsensusStateId, StateMachineClient,
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/pallets/relayer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sp-runtime = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
pallet-ismp = { workspace = true }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }
pallet-ismp-host-executive = { workspace = true }
pallet-hyperbridge = { workspace = true }

Expand Down Expand Up @@ -62,7 +62,7 @@ std = [
"alloy-primitives/std",
"alloy-rlp/std",
"ethabi/std",
"evm-common/std",
"evm-state-machine/std",
"pallet-ismp-host-executive/std"
]

Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/pallets/relayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use alloc::{collections::BTreeMap, vec, vec::Vec};
use alloy_primitives::Address;
use codec::Encode;
use ethabi::ethereum_types::H256;
use evm_common::{
use evm_state_machine::{
presets::{
REQUEST_COMMITMENTS_SLOT, REQUEST_RECEIPTS_SLOT, RESPONSE_COMMITMENTS_SLOT,
RESPONSE_RECEIPTS_SLOT,
Expand Down
4 changes: 2 additions & 2 deletions modules/ismp/pallets/state-coprocessor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ log = { workspace = true }
ismp = { workspace = true }
pallet-ismp = { workspace = true }
mmr-primitives = { workspace = true }
evm-common = { workspace = true }
evm-state-machine = { workspace = true }
pallet-ismp-relayer = { workspace = true }

alloy-rlp = { workspace = true }
Expand All @@ -44,7 +44,7 @@ std = [
"ismp/std",
"pallet-ismp/std",
"mmr-primitives/std",
"evm-common/std",
"evm-state-machine/std",
"pallet-ismp-relayer/std",
"alloy-primitives/std"
]
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/pallets/state-coprocessor/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use super::{Config, Pallet};
use alloc::{string::ToString, vec, vec::Vec};
use codec::{Decode, Encode};
use evm_common::{derive_unhashed_map_key, presets::REQUEST_COMMITMENTS_SLOT};
use evm_state_machine::{derive_unhashed_map_key, presets::REQUEST_COMMITMENTS_SLOT};
use ismp::{
events::RequestResponseHandled,
handlers::validate_state_machine,
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/pallets/testsuite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ hash-db = { workspace = true }
xcm-simulator-example = { workspace = true }
xcm-simulator = { workspace = true }
pallet-assets = { workspace = true, default-features = true }
evm-common = { workspace = true, default-features = true}
evm-state-machine = { workspace = true, default-features = true}

ismp = { workspace = true, default-features = true }
ismp-testsuite = { workspace = true, default-features = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use alloy_primitives::hex;
use codec::{Decode, Encode};
use ethereum_triedb::{keccak::KeccakHasher, MemoryDB, StorageProof};
use evm_common::types::EvmStateProof;
use evm_state_machine::types::EvmStateProof;
use frame_support::crypto::ecdsa::ECDSAExt;
use ismp::{
consensus::{StateCommitment, StateMachineHeight, StateMachineId},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[package]
name = "evm-common"
name = "evm-state-machine"
version = "0.1.1"
edition = "2021"
description = "Contains methods and types commonly used in evm state verification"
authors = ["Polytope Labs <[email protected]>"]
publish = false


[dependencies]
# polytope labs
ismp = { workspace = true }
Expand Down
File renamed without changes.
Loading

0 comments on commit 40c1739

Please sign in to comment.