From d9543bee40fce49d20afb37e571a1ea9e870e14d Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 14 Sep 2024 12:58:57 -0400 Subject: [PATCH] Move ethereum-serai under the processor It isn't generally usable and should be directly integrated at this point. --- .github/workflows/networks-tests.yml | 1 - .github/workflows/tests.yml | 1 + Cargo.toml | 2 +- deny.toml | 2 +- processor/ethereum/Cargo.toml | 2 +- .../ethereum/ethereum-serai}/.gitignore | 0 .../ethereum/ethereum-serai}/Cargo.toml | 8 ++++---- .../ethereum/ethereum-serai}/LICENSE | 0 .../ethereum/ethereum-serai}/README.md | 0 .../ethereum/ethereum-serai}/build.rs | 0 .../ethereum/ethereum-serai}/contracts/Deployer.sol | 0 .../ethereum/ethereum-serai}/contracts/IERC20.sol | 0 .../ethereum/ethereum-serai}/contracts/Router.sol | 0 .../ethereum/ethereum-serai}/contracts/Sandbox.sol | 0 .../ethereum/ethereum-serai}/contracts/Schnorr.sol | 0 .../ethereum/ethereum-serai}/src/abi/mod.rs | 0 .../ethereum/ethereum-serai}/src/crypto.rs | 0 .../ethereum/ethereum-serai}/src/deployer.rs | 0 .../ethereum/ethereum-serai}/src/erc20.rs | 0 .../ethereum/ethereum-serai}/src/lib.rs | 0 .../ethereum/ethereum-serai}/src/machine.rs | 0 .../ethereum/ethereum-serai}/src/router.rs | 0 .../ethereum/ethereum-serai}/src/tests/abi/mod.rs | 0 .../ethereum-serai}/src/tests/contracts/ERC20.sol | 0 .../ethereum-serai}/src/tests/contracts/Schnorr.sol | 0 .../ethereum/ethereum-serai}/src/tests/crypto.rs | 0 .../ethereum/ethereum-serai}/src/tests/mod.rs | 0 .../ethereum/ethereum-serai}/src/tests/router.rs | 0 .../ethereum/ethereum-serai}/src/tests/schnorr.rs | 0 tests/processor/Cargo.toml | 2 +- 30 files changed, 9 insertions(+), 9 deletions(-) rename {networks/ethereum => processor/ethereum/ethereum-serai}/.gitignore (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/Cargo.toml (75%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/LICENSE (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/README.md (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/build.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/contracts/Deployer.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/contracts/IERC20.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/contracts/Router.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/contracts/Sandbox.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/contracts/Schnorr.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/abi/mod.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/crypto.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/deployer.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/erc20.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/lib.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/machine.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/router.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/abi/mod.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/contracts/ERC20.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/contracts/Schnorr.sol (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/crypto.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/mod.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/router.rs (100%) rename {networks/ethereum => processor/ethereum/ethereum-serai}/src/tests/schnorr.rs (100%) diff --git a/.github/workflows/networks-tests.yml b/.github/workflows/networks-tests.yml index f346b986..7fde517b 100644 --- a/.github/workflows/networks-tests.yml +++ b/.github/workflows/networks-tests.yml @@ -31,7 +31,6 @@ jobs: GITHUB_CI=true RUST_BACKTRACE=1 cargo test --all-features \ -p bitcoin-serai \ -p alloy-simple-request-transport \ - -p ethereum-serai \ -p serai-ethereum-relayer \ -p monero-io \ -p monero-generators \ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e1c54349..4e1c167a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -52,6 +52,7 @@ jobs: -p serai-processor-signers \ -p serai-processor-bin \ -p serai-bitcoin-processor \ + -p ethereum-serai \ -p serai-ethereum-processor \ -p serai-monero-processor \ -p tendermint-machine \ diff --git a/Cargo.toml b/Cargo.toml index adaa63db..09e51255 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,6 @@ members = [ "networks/bitcoin", "networks/ethereum/alloy-simple-request-transport", - "networks/ethereum", "networks/ethereum/relayer", "networks/monero/io", @@ -86,6 +85,7 @@ members = [ "processor/bin", "processor/bitcoin", + "processor/ethereum/ethereum-serai", "processor/ethereum", "processor/monero", diff --git a/deny.toml b/deny.toml index 0e013f5e..183122e8 100644 --- a/deny.toml +++ b/deny.toml @@ -40,7 +40,6 @@ allow = [ exceptions = [ { allow = ["AGPL-3.0"], name = "serai-env" }, - { allow = ["AGPL-3.0"], name = "ethereum-serai" }, { allow = ["AGPL-3.0"], name = "serai-ethereum-relayer" }, { allow = ["AGPL-3.0"], name = "serai-message-queue" }, @@ -59,6 +58,7 @@ exceptions = [ { allow = ["AGPL-3.0"], name = "serai-processor-signers" }, { allow = ["AGPL-3.0"], name = "serai-bitcoin-processor" }, + { allow = ["AGPL-3.0"], name = "ethereum-serai" }, { allow = ["AGPL-3.0"], name = "serai-ethereum-processor" }, { allow = ["AGPL-3.0"], name = "serai-monero-processor" }, diff --git a/processor/ethereum/Cargo.toml b/processor/ethereum/Cargo.toml index 12f56d72..dfed2f9d 100644 --- a/processor/ethereum/Cargo.toml +++ b/processor/ethereum/Cargo.toml @@ -29,7 +29,7 @@ dkg = { path = "../../crypto/dkg", default-features = false, features = ["std", frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false } k256 = { version = "^0.13.1", default-features = false, features = ["std"] } -ethereum-serai = { path = "../../networks/ethereum", default-features = false, optional = true } +ethereum-serai = { path = "./ethereum-serai", default-features = false, optional = true } serai-client = { path = "../../substrate/client", default-features = false, features = ["ethereum"] } diff --git a/networks/ethereum/.gitignore b/processor/ethereum/ethereum-serai/.gitignore similarity index 100% rename from networks/ethereum/.gitignore rename to processor/ethereum/ethereum-serai/.gitignore diff --git a/networks/ethereum/Cargo.toml b/processor/ethereum/ethereum-serai/Cargo.toml similarity index 75% rename from networks/ethereum/Cargo.toml rename to processor/ethereum/ethereum-serai/Cargo.toml index a91b83c5..ed4520d1 100644 --- a/networks/ethereum/Cargo.toml +++ b/processor/ethereum/ethereum-serai/Cargo.toml @@ -21,11 +21,11 @@ thiserror = { version = "1", default-features = false } rand_core = { version = "0.6", default-features = false, features = ["std"] } -transcript = { package = "flexible-transcript", path = "../../crypto/transcript", default-features = false, features = ["recommended"] } +transcript = { package = "flexible-transcript", path = "../../../crypto/transcript", default-features = false, features = ["recommended"] } group = { version = "0.13", default-features = false } k256 = { version = "^0.13.1", default-features = false, features = ["std", "ecdsa", "arithmetic"] } -frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false, features = ["secp256k1"] } +frost = { package = "modular-frost", path = "../../../crypto/frost", default-features = false, features = ["secp256k1"] } alloy-core = { version = "0.8", default-features = false } alloy-sol-types = { version = "0.8", default-features = false, features = ["json"] } @@ -33,13 +33,13 @@ alloy-consensus = { version = "0.3", default-features = false, features = ["k256 alloy-network = { version = "0.3", default-features = false } alloy-rpc-types-eth = { version = "0.3", default-features = false } alloy-rpc-client = { version = "0.3", default-features = false } -alloy-simple-request-transport = { path = "./alloy-simple-request-transport", default-features = false } +alloy-simple-request-transport = { path = "../../../networks/ethereum/alloy-simple-request-transport", default-features = false } alloy-provider = { version = "0.3", default-features = false } alloy-node-bindings = { version = "0.3", default-features = false, optional = true } [dev-dependencies] -frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false, features = ["tests"] } +frost = { package = "modular-frost", path = "../../../crypto/frost", default-features = false, features = ["tests"] } tokio = { version = "1", features = ["macros"] } diff --git a/networks/ethereum/LICENSE b/processor/ethereum/ethereum-serai/LICENSE similarity index 100% rename from networks/ethereum/LICENSE rename to processor/ethereum/ethereum-serai/LICENSE diff --git a/networks/ethereum/README.md b/processor/ethereum/ethereum-serai/README.md similarity index 100% rename from networks/ethereum/README.md rename to processor/ethereum/ethereum-serai/README.md diff --git a/networks/ethereum/build.rs b/processor/ethereum/ethereum-serai/build.rs similarity index 100% rename from networks/ethereum/build.rs rename to processor/ethereum/ethereum-serai/build.rs diff --git a/networks/ethereum/contracts/Deployer.sol b/processor/ethereum/ethereum-serai/contracts/Deployer.sol similarity index 100% rename from networks/ethereum/contracts/Deployer.sol rename to processor/ethereum/ethereum-serai/contracts/Deployer.sol diff --git a/networks/ethereum/contracts/IERC20.sol b/processor/ethereum/ethereum-serai/contracts/IERC20.sol similarity index 100% rename from networks/ethereum/contracts/IERC20.sol rename to processor/ethereum/ethereum-serai/contracts/IERC20.sol diff --git a/networks/ethereum/contracts/Router.sol b/processor/ethereum/ethereum-serai/contracts/Router.sol similarity index 100% rename from networks/ethereum/contracts/Router.sol rename to processor/ethereum/ethereum-serai/contracts/Router.sol diff --git a/networks/ethereum/contracts/Sandbox.sol b/processor/ethereum/ethereum-serai/contracts/Sandbox.sol similarity index 100% rename from networks/ethereum/contracts/Sandbox.sol rename to processor/ethereum/ethereum-serai/contracts/Sandbox.sol diff --git a/networks/ethereum/contracts/Schnorr.sol b/processor/ethereum/ethereum-serai/contracts/Schnorr.sol similarity index 100% rename from networks/ethereum/contracts/Schnorr.sol rename to processor/ethereum/ethereum-serai/contracts/Schnorr.sol diff --git a/networks/ethereum/src/abi/mod.rs b/processor/ethereum/ethereum-serai/src/abi/mod.rs similarity index 100% rename from networks/ethereum/src/abi/mod.rs rename to processor/ethereum/ethereum-serai/src/abi/mod.rs diff --git a/networks/ethereum/src/crypto.rs b/processor/ethereum/ethereum-serai/src/crypto.rs similarity index 100% rename from networks/ethereum/src/crypto.rs rename to processor/ethereum/ethereum-serai/src/crypto.rs diff --git a/networks/ethereum/src/deployer.rs b/processor/ethereum/ethereum-serai/src/deployer.rs similarity index 100% rename from networks/ethereum/src/deployer.rs rename to processor/ethereum/ethereum-serai/src/deployer.rs diff --git a/networks/ethereum/src/erc20.rs b/processor/ethereum/ethereum-serai/src/erc20.rs similarity index 100% rename from networks/ethereum/src/erc20.rs rename to processor/ethereum/ethereum-serai/src/erc20.rs diff --git a/networks/ethereum/src/lib.rs b/processor/ethereum/ethereum-serai/src/lib.rs similarity index 100% rename from networks/ethereum/src/lib.rs rename to processor/ethereum/ethereum-serai/src/lib.rs diff --git a/networks/ethereum/src/machine.rs b/processor/ethereum/ethereum-serai/src/machine.rs similarity index 100% rename from networks/ethereum/src/machine.rs rename to processor/ethereum/ethereum-serai/src/machine.rs diff --git a/networks/ethereum/src/router.rs b/processor/ethereum/ethereum-serai/src/router.rs similarity index 100% rename from networks/ethereum/src/router.rs rename to processor/ethereum/ethereum-serai/src/router.rs diff --git a/networks/ethereum/src/tests/abi/mod.rs b/processor/ethereum/ethereum-serai/src/tests/abi/mod.rs similarity index 100% rename from networks/ethereum/src/tests/abi/mod.rs rename to processor/ethereum/ethereum-serai/src/tests/abi/mod.rs diff --git a/networks/ethereum/src/tests/contracts/ERC20.sol b/processor/ethereum/ethereum-serai/src/tests/contracts/ERC20.sol similarity index 100% rename from networks/ethereum/src/tests/contracts/ERC20.sol rename to processor/ethereum/ethereum-serai/src/tests/contracts/ERC20.sol diff --git a/networks/ethereum/src/tests/contracts/Schnorr.sol b/processor/ethereum/ethereum-serai/src/tests/contracts/Schnorr.sol similarity index 100% rename from networks/ethereum/src/tests/contracts/Schnorr.sol rename to processor/ethereum/ethereum-serai/src/tests/contracts/Schnorr.sol diff --git a/networks/ethereum/src/tests/crypto.rs b/processor/ethereum/ethereum-serai/src/tests/crypto.rs similarity index 100% rename from networks/ethereum/src/tests/crypto.rs rename to processor/ethereum/ethereum-serai/src/tests/crypto.rs diff --git a/networks/ethereum/src/tests/mod.rs b/processor/ethereum/ethereum-serai/src/tests/mod.rs similarity index 100% rename from networks/ethereum/src/tests/mod.rs rename to processor/ethereum/ethereum-serai/src/tests/mod.rs diff --git a/networks/ethereum/src/tests/router.rs b/processor/ethereum/ethereum-serai/src/tests/router.rs similarity index 100% rename from networks/ethereum/src/tests/router.rs rename to processor/ethereum/ethereum-serai/src/tests/router.rs diff --git a/networks/ethereum/src/tests/schnorr.rs b/processor/ethereum/ethereum-serai/src/tests/schnorr.rs similarity index 100% rename from networks/ethereum/src/tests/schnorr.rs rename to processor/ethereum/ethereum-serai/src/tests/schnorr.rs diff --git a/tests/processor/Cargo.toml b/tests/processor/Cargo.toml index 13299b93..e37dc2a9 100644 --- a/tests/processor/Cargo.toml +++ b/tests/processor/Cargo.toml @@ -29,7 +29,7 @@ dkg = { path = "../../crypto/dkg", default-features = false, features = ["std"] bitcoin-serai = { path = "../../networks/bitcoin" } k256 = "0.13" -ethereum-serai = { path = "../../networks/ethereum" } +ethereum-serai = { path = "../../processor/ethereum/ethereum-serai" } monero-simple-request-rpc = { path = "../../networks/monero/rpc/simple-request" } monero-wallet = { path = "../../networks/monero/wallet" }