From e7d40a9dbd1259246ef03d8b6cf214cd4c3ea87e Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Mon, 15 Jul 2024 18:30:21 +0300 Subject: [PATCH] refactor: rename everything (#166) * grand rename * reinit modules --- .github/workflows/CI.yaml | 32 +- .github/workflows/PR.yml | 32 +- .gitignore | 2 +- .gitmodules | 16 +- Cargo.lock | 562 +++++++++--------- Cargo.toml | 38 +- Makefile | 20 +- {hypercore => ethexe}/chain_spec.toml | 0 {hypercore => ethexe}/cli/Cargo.toml | 28 +- {hypercore => ethexe}/cli/src/args.rs | 25 +- {hypercore => ethexe}/cli/src/chain_spec.rs | 2 +- {hypercore => ethexe}/cli/src/config.rs | 14 +- {hypercore => ethexe}/cli/src/main.rs | 2 +- {hypercore => ethexe}/cli/src/metrics.rs | 24 +- {hypercore => ethexe}/cli/src/params/mod.rs | 0 .../cli/src/params/network_params.rs | 2 +- .../cli/src/params/prometheus_params.rs | 0 {hypercore => ethexe}/cli/src/service.rs | 121 ++-- {hypercore => ethexe}/common/Cargo.toml | 2 +- {hypercore => ethexe}/common/src/db.rs | 2 +- {hypercore => ethexe}/common/src/events.rs | 2 +- {hypercore => ethexe}/common/src/lib.rs | 2 +- {hypercore => ethexe}/contracts/.env.example | 0 {hypercore => ethexe}/contracts/.gitignore | 0 .../contracts/.vscode/settings.json | 0 {hypercore => ethexe}/contracts/README.md | 0 {hypercore => ethexe}/contracts/foundry.toml | 0 {hypercore => ethexe}/contracts/lib/forge-std | 0 ethexe/contracts/lib/openzeppelin-contracts | 1 + .../lib/openzeppelin-contracts-upgradeable | 1 + .../lib/openzeppelin-foundry-upgrades | 0 .../contracts/script/Router.s.sol | 0 .../contracts/src/IMinimalProgram.sol | 0 .../contracts/src/IProgram.sol | 0 .../contracts/src/IRouter.sol | 0 .../contracts/src/IWrappedVara.sol | 0 .../contracts/src/MinimalProgram.sol | 0 .../contracts/src/Program.sol | 0 .../contracts/src/Router.sol | 0 .../contracts/src/WrappedVara.sol | 0 .../contracts/test/Router.t.sol | 0 {hypercore => ethexe}/db/Cargo.toml | 6 +- {hypercore => ethexe}/db/src/database.rs | 18 +- {hypercore => ethexe}/db/src/lib.rs | 4 +- {hypercore => ethexe}/db/src/mem.rs | 0 {hypercore => ethexe}/db/src/rocks.rs | 0 .../docker/docker-compose.yml | 4 +- .../docker/hypercore_builder.Dockerfile | 20 +- .../hypercore_builder.Dockerfile.dockerignore | 0 {hypercore => ethexe}/ethereum/Cargo.toml | 6 +- .../ethereum/MinimalProgram.json | 0 {hypercore => ethexe}/ethereum/Program.json | 0 {hypercore => ethexe}/ethereum/Router.json | 0 .../ethereum/TransparentUpgradeableProxy.json | 0 .../ethereum/WrappedVara.json | 0 {hypercore => ethexe}/ethereum/src/abi.rs | 2 +- {hypercore => ethexe}/ethereum/src/eip1167.rs | 0 {hypercore => ethexe}/ethereum/src/event.rs | 2 +- {hypercore => ethexe}/ethereum/src/lib.rs | 45 +- {hypercore => ethexe}/network/Cargo.toml | 4 +- .../network/src/behaviour.rs | 0 {hypercore => ethexe}/network/src/config.rs | 0 {hypercore => ethexe}/network/src/error.rs | 0 {hypercore => ethexe}/network/src/lib.rs | 2 +- .../network/src/peer_info.rs | 2 +- {hypercore => ethexe}/network/src/service.rs | 6 +- .../network/src/transport.rs | 0 {hypercore => ethexe}/network/src/utils.rs | 2 +- {hypercore => ethexe}/observer/Cargo.toml | 10 +- {hypercore => ethexe}/observer/src/blobs.rs | 0 {hypercore => ethexe}/observer/src/event.rs | 2 +- {hypercore => ethexe}/observer/src/lib.rs | 2 +- .../observer/src/observer.rs | 12 +- {hypercore => ethexe}/observer/src/query.rs | 8 +- {hypercore => ethexe}/processor/Cargo.toml | 10 +- .../processor/src/host/api/allocator.rs | 0 .../processor/src/host/api/database.rs | 0 .../processor/src/host/api/lazy_pages.rs | 12 +- .../processor/src/host/api/logging.rs | 0 .../processor/src/host/api/mod.rs | 0 .../processor/src/host/api/sandbox.rs | 0 .../processor/src/host/context.rs | 0 .../processor/src/host/mod.rs | 0 .../processor/src/host/runtime.rs | 2 +- .../processor/src/host/threads.rs | 14 +- {hypercore => ethexe}/processor/src/lib.rs | 12 +- {hypercore => ethexe}/processor/src/run.rs | 8 +- {hypercore => ethexe}/processor/src/tests.rs | 12 +- {hypercore => ethexe}/rpc/Cargo.toml | 6 +- {hypercore => ethexe}/rpc/src/lib.rs | 2 +- {hypercore => ethexe}/runtime/Cargo.toml | 4 +- {hypercore => ethexe}/runtime/build.rs | 0 .../runtime/common/Cargo.toml | 2 +- .../runtime/common/src/journal.rs | 0 .../runtime/common/src/lib.rs | 0 .../runtime/common/src/state.rs | 2 +- {hypercore => ethexe}/runtime/src/lib.rs | 0 .../runtime/src/wasm/api/instrument.rs | 0 .../runtime/src/wasm/api/mod.rs | 0 .../runtime/src/wasm/api/run.rs | 4 +- .../runtime/src/wasm/interface/allocator.rs | 0 .../runtime/src/wasm/interface/database.rs | 0 .../runtime/src/wasm/interface/logging.rs | 0 .../runtime/src/wasm/interface/mod.rs | 0 .../runtime/src/wasm/storage.rs | 8 +- {hypercore => ethexe}/sequencer/Cargo.toml | 12 +- {hypercore => ethexe}/sequencer/src/agro.rs | 10 +- {hypercore => ethexe}/sequencer/src/lib.rs | 10 +- {hypercore => ethexe}/signer/Cargo.toml | 4 +- {hypercore => ethexe}/signer/src/lib.rs | 2 +- {hypercore => ethexe}/utils/Cargo.toml | 2 +- .../utils/prometheus/Cargo.toml | 2 +- .../utils/prometheus/src/lib.rs | 0 .../utils/prometheus/src/sourced.rs | 0 {hypercore => ethexe}/utils/src/lib.rs | 2 +- {hypercore => ethexe}/utils/src/metrics.rs | 4 +- {hypercore => ethexe}/utils/src/mpsc.rs | 0 {hypercore => ethexe}/validator/Cargo.toml | 10 +- {hypercore => ethexe}/validator/src/lib.rs | 8 +- .../contracts/lib/openzeppelin-contracts | 1 - .../lib/openzeppelin-contracts-upgradeable | 1 - 121 files changed, 621 insertions(+), 632 deletions(-) rename {hypercore => ethexe}/chain_spec.toml (100%) rename {hypercore => ethexe}/cli/Cargo.toml (65%) rename {hypercore => ethexe}/cli/src/args.rs (94%) rename {hypercore => ethexe}/cli/src/chain_spec.rs (94%) rename {hypercore => ethexe}/cli/src/config.rs (94%) rename {hypercore => ethexe}/cli/src/main.rs (97%) rename {hypercore => ethexe}/cli/src/metrics.rs (90%) rename {hypercore => ethexe}/cli/src/params/mod.rs (100%) rename {hypercore => ethexe}/cli/src/params/network_params.rs (99%) rename {hypercore => ethexe}/cli/src/params/prometheus_params.rs (100%) rename {hypercore => ethexe}/cli/src/service.rs (82%) rename {hypercore => ethexe}/common/Cargo.toml (94%) rename {hypercore => ethexe}/common/src/db.rs (98%) rename {hypercore => ethexe}/common/src/events.rs (99%) rename {hypercore => ethexe}/common/src/lib.rs (97%) rename {hypercore => ethexe}/contracts/.env.example (100%) rename {hypercore => ethexe}/contracts/.gitignore (100%) rename {hypercore => ethexe}/contracts/.vscode/settings.json (100%) rename {hypercore => ethexe}/contracts/README.md (100%) rename {hypercore => ethexe}/contracts/foundry.toml (100%) rename {hypercore => ethexe}/contracts/lib/forge-std (100%) create mode 160000 ethexe/contracts/lib/openzeppelin-contracts create mode 160000 ethexe/contracts/lib/openzeppelin-contracts-upgradeable rename {hypercore => ethexe}/contracts/lib/openzeppelin-foundry-upgrades (100%) rename {hypercore => ethexe}/contracts/script/Router.s.sol (100%) rename {hypercore => ethexe}/contracts/src/IMinimalProgram.sol (100%) rename {hypercore => ethexe}/contracts/src/IProgram.sol (100%) rename {hypercore => ethexe}/contracts/src/IRouter.sol (100%) rename {hypercore => ethexe}/contracts/src/IWrappedVara.sol (100%) rename {hypercore => ethexe}/contracts/src/MinimalProgram.sol (100%) rename {hypercore => ethexe}/contracts/src/Program.sol (100%) rename {hypercore => ethexe}/contracts/src/Router.sol (100%) rename {hypercore => ethexe}/contracts/src/WrappedVara.sol (100%) rename {hypercore => ethexe}/contracts/test/Router.t.sol (100%) rename {hypercore => ethexe}/db/Cargo.toml (84%) rename {hypercore => ethexe}/db/src/database.rs (99%) rename {hypercore => ethexe}/db/src/lib.rs (98%) rename {hypercore => ethexe}/db/src/mem.rs (100%) rename {hypercore => ethexe}/db/src/rocks.rs (100%) rename {hypercore => ethexe}/docker/docker-compose.yml (96%) rename {hypercore => ethexe}/docker/hypercore_builder.Dockerfile (70%) rename {hypercore => ethexe}/docker/hypercore_builder.Dockerfile.dockerignore (100%) rename {hypercore => ethexe}/ethereum/Cargo.toml (87%) rename {hypercore => ethexe}/ethereum/MinimalProgram.json (100%) rename {hypercore => ethexe}/ethereum/Program.json (100%) rename {hypercore => ethexe}/ethereum/Router.json (100%) rename {hypercore => ethexe}/ethereum/TransparentUpgradeableProxy.json (100%) rename {hypercore => ethexe}/ethereum/WrappedVara.json (100%) rename {hypercore => ethexe}/ethereum/src/abi.rs (96%) rename {hypercore => ethexe}/ethereum/src/eip1167.rs (100%) rename {hypercore => ethexe}/ethereum/src/event.rs (99%) rename {hypercore => ethexe}/ethereum/src/lib.rs (93%) rename {hypercore => ethexe}/network/Cargo.toml (94%) rename {hypercore => ethexe}/network/src/behaviour.rs (100%) rename {hypercore => ethexe}/network/src/config.rs (100%) rename {hypercore => ethexe}/network/src/error.rs (100%) rename {hypercore => ethexe}/network/src/lib.rs (97%) rename {hypercore => ethexe}/network/src/peer_info.rs (99%) rename {hypercore => ethexe}/network/src/service.rs (98%) rename {hypercore => ethexe}/network/src/transport.rs (100%) rename {hypercore => ethexe}/network/src/utils.rs (98%) rename {hypercore => ethexe}/observer/Cargo.toml (84%) rename {hypercore => ethexe}/observer/src/blobs.rs (100%) rename {hypercore => ethexe}/observer/src/event.rs (92%) rename {hypercore => ethexe}/observer/src/lib.rs (96%) rename {hypercore => ethexe}/observer/src/observer.rs (97%) rename {hypercore => ethexe}/observer/src/query.rs (98%) rename {hypercore => ethexe}/processor/Cargo.toml (81%) rename {hypercore => ethexe}/processor/src/host/api/allocator.rs (100%) rename {hypercore => ethexe}/processor/src/host/api/database.rs (100%) rename {hypercore => ethexe}/processor/src/host/api/lazy_pages.rs (94%) rename {hypercore => ethexe}/processor/src/host/api/logging.rs (100%) rename {hypercore => ethexe}/processor/src/host/api/mod.rs (100%) rename {hypercore => ethexe}/processor/src/host/api/sandbox.rs (100%) rename {hypercore => ethexe}/processor/src/host/context.rs (100%) rename {hypercore => ethexe}/processor/src/host/mod.rs (100%) rename {hypercore => ethexe}/processor/src/host/runtime.rs (97%) rename {hypercore => ethexe}/processor/src/host/threads.rs (96%) rename {hypercore => ethexe}/processor/src/lib.rs (97%) rename {hypercore => ethexe}/processor/src/run.rs (97%) rename {hypercore => ethexe}/processor/src/tests.rs (97%) rename {hypercore => ethexe}/rpc/Cargo.toml (87%) rename {hypercore => ethexe}/rpc/src/lib.rs (98%) rename {hypercore => ethexe}/runtime/Cargo.toml (91%) rename {hypercore => ethexe}/runtime/build.rs (100%) rename {hypercore => ethexe}/runtime/common/Cargo.toml (93%) rename {hypercore => ethexe}/runtime/common/src/journal.rs (100%) rename {hypercore => ethexe}/runtime/common/src/lib.rs (100%) rename {hypercore => ethexe}/runtime/common/src/state.rs (99%) rename {hypercore => ethexe}/runtime/src/lib.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/api/instrument.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/api/mod.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/api/run.rs (92%) rename {hypercore => ethexe}/runtime/src/wasm/interface/allocator.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/interface/database.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/interface/logging.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/interface/mod.rs (100%) rename {hypercore => ethexe}/runtime/src/wasm/storage.rs (99%) rename {hypercore => ethexe}/sequencer/Cargo.toml (71%) rename {hypercore => ethexe}/sequencer/src/agro.rs (97%) rename {hypercore => ethexe}/sequencer/src/lib.rs (97%) rename {hypercore => ethexe}/signer/Cargo.toml (92%) rename {hypercore => ethexe}/signer/src/lib.rs (99%) rename {hypercore => ethexe}/utils/Cargo.toml (95%) rename {hypercore => ethexe}/utils/prometheus/Cargo.toml (95%) rename {hypercore => ethexe}/utils/prometheus/src/lib.rs (100%) rename {hypercore => ethexe}/utils/prometheus/src/sourced.rs (100%) rename {hypercore => ethexe}/utils/src/lib.rs (97%) rename {hypercore => ethexe}/utils/src/metrics.rs (95%) rename {hypercore => ethexe}/utils/src/mpsc.rs (100%) rename {hypercore => ethexe}/validator/Cargo.toml (74%) rename {hypercore => ethexe}/validator/src/lib.rs (94%) delete mode 160000 hypercore/contracts/lib/openzeppelin-contracts delete mode 160000 hypercore/contracts/lib/openzeppelin-contracts-upgradeable diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c4e2bdd378d..96e97a179c9 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -41,9 +41,9 @@ jobs: ./scripts/gear.sh show forge --version - - name: "Check: hypercore contracts" + - name: "Check: ethexe contracts" run: | - cd hypercore/contracts + cd ethexe/contracts forge fmt --check forge build --sizes forge test -vvv @@ -51,23 +51,23 @@ jobs: - name: "Check: workspace formatting" run: ./scripts/gear.sh format gear --check - - name: "Check: hypercore clippy allowing unused code" - run: cargo clippy -p "hypercore-*" --all-targets --locked -- --no-deps -D warnings + - name: "Check: ethexe clippy allowing unused code" + run: cargo clippy -p "ethexe-*" --all-targets --locked -- --no-deps -D warnings - - name: "Build: Hypercore" - run: cargo build --release -p hypercore-cli + - name: "Build: ethexe" + run: cargo build --release -p ethexe-cli - - name: "Test: Hypercore CLI" - run: cargo test --release -p hypercore-cli + - name: "Test: ethexe CLI" + run: cargo test --release -p ethexe-cli - - name: "Test: Hypercore Network" - run: cargo test --release -p hypercore-network + - name: "Test: ethexe Network" + run: cargo test --release -p ethexe-network - - name: "Test: Hypercore Db" - run: cargo test --release -p hypercore-db + - name: "Test: ethexe Db" + run: cargo test --release -p ethexe-db - - name: "Test: Hypercore Observer" - run: cargo test --release -p hypercore-observer + - name: "Test: ethexe Observer" + run: cargo test --release -p ethexe-observer - - name: "Test: Hypercore processor" - run: cargo test --release -p hypercore-processor + - name: "Test: ethexe processor" + run: cargo test --release -p ethexe-processor diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 90d113a7101..40b1aeee78b 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -62,9 +62,9 @@ jobs: ./scripts/gear.sh show forge --version - - name: "Check: hypercore contracts" + - name: "Check: ethexe contracts" run: | - cd hypercore/contracts + cd ethexe/contracts forge fmt --check forge build --sizes forge test -vvv @@ -72,23 +72,23 @@ jobs: - name: "Check: workspace formatting" run: ./scripts/gear.sh format gear --check - - name: "Check: hypercore clippy allowing unused code" - run: cargo clippy -p "hypercore-*" --all-targets --locked -- --no-deps -D warnings + - name: "Check: ethexe clippy allowing unused code" + run: cargo clippy -p "ethexe-*" --all-targets --locked -- --no-deps -D warnings - - name: "Build: Hypercore" - run: cargo build --release -p hypercore-cli + - name: "Build: ethexe" + run: cargo build --release -p ethexe-cli - - name: "Test: Hypercore CLI" - run: cargo test --release -p hypercore-cli + - name: "Test: ethexe CLI" + run: cargo test --release -p ethexe-cli - - name: "Test: Hypercore Network" - run: cargo test --release -p hypercore-network + - name: "Test: ethexe Network" + run: cargo test --release -p ethexe-network - - name: "Test: Hypercore Db" - run: cargo test --release -p hypercore-db + - name: "Test: ethexe Db" + run: cargo test --release -p ethexe-db - - name: "Test: Hypercore Observer" - run: cargo test --release -p hypercore-observer + - name: "Test: ethexe Observer" + run: cargo test --release -p ethexe-observer - - name: "Test: Hypercore processor" - run: cargo test --release -p hypercore-processor + - name: "Test: ethexe processor" + run: cargo test --release -p ethexe-processor diff --git a/.gitignore b/.gitignore index 64726035830..00e4c721460 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ utils/**/fuzz/corpus/* utils/**/fuzz/coverage/* utils/**/fuzz/artifacts/* utils/**/fuzz/fuzz/* -.hypercore.toml +.ethexe.toml diff --git a/.gitmodules b/.gitmodules index 26ccaaf1da3..c389af1310c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ -[submodule "hypercore/contracts/lib/forge-std"] - path = hypercore/contracts/lib/forge-std +[submodule "ethexe/contracts/lib/forge-std"] + path = ethexe/contracts/lib/forge-std url = https://github.com/foundry-rs/forge-std -[submodule "hypercore/contracts/lib/openzeppelin-contracts"] - path = hypercore/contracts/lib/openzeppelin-contracts +[submodule "ethexe/contracts/lib/openzeppelin-contracts"] + path = ethexe/contracts/lib/openzeppelin-contracts url = https://github.com/OpenZeppelin/openzeppelin-contracts -[submodule "hypercore/contracts/lib/openzeppelin-foundry-upgrades"] - path = hypercore/contracts/lib/openzeppelin-foundry-upgrades +[submodule "ethexe/contracts/lib/openzeppelin-foundry-upgrades"] + path = ethexe/contracts/lib/openzeppelin-foundry-upgrades url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades -[submodule "hypercore/contracts/lib/openzeppelin-contracts-upgradeable"] - path = hypercore/contracts/lib/openzeppelin-contracts-upgradeable +[submodule "ethexe/contracts/lib/openzeppelin-contracts-upgradeable"] + path = ethexe/contracts/lib/openzeppelin-contracts-upgradeable url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable diff --git a/Cargo.lock b/Cargo.lock index 3241831ac92..4c2d43066a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4721,6 +4721,287 @@ dependencies = [ "yansi", ] +[[package]] +name = "ethexe-cli" +version = "1.4.2" +dependencies = [ + "anyhow", + "clap 4.5.9", + "directories", + "env_logger", + "ethexe-common", + "ethexe-db", + "ethexe-ethereum", + "ethexe-network", + "ethexe-observer", + "ethexe-processor", + "ethexe-prometheus-endpoint", + "ethexe-rpc", + "ethexe-sequencer", + "ethexe-signer", + "ethexe-utils", + "ethexe-validator", + "futures", + "futures-timer", + "gprimitives", + "hex", + "log", + "parity-scale-codec", + "rand 0.8.5", + "serde", + "static_init", + "tempfile", + "tokio", + "toml 0.8.14", +] + +[[package]] +name = "ethexe-common" +version = "1.4.2" +dependencies = [ + "anyhow", + "derive_more", + "gear-core", + "gprimitives", + "hex", + "parity-scale-codec", + "serde", +] + +[[package]] +name = "ethexe-db" +version = "1.4.2" +dependencies = [ + "anyhow", + "dashmap", + "ethexe-common", + "ethexe-runtime-common", + "gear-core", + "gprimitives", + "log", + "parity-scale-codec", + "rocksdb", + "scopeguard", + "serde", + "tempfile", +] + +[[package]] +name = "ethexe-ethereum" +version = "1.4.2" +dependencies = [ + "alloy", + "anyhow", + "async-trait", + "ethexe-common", + "ethexe-signer", + "futures", + "gear-core", + "gear-core-errors", + "gear-wasm-instrument", + "gprimitives", + "log", + "parity-scale-codec", +] + +[[package]] +name = "ethexe-network" +version = "1.4.2" +dependencies = [ + "anyhow", + "array-bytes 6.2.3", + "either", + "ethexe-utils", + "fnv", + "futures", + "futures-timer", + "libp2p 0.52.4", + "linked_hash_set", + "log", + "parking_lot 0.12.3", + "smallvec", + "tempfile", + "thiserror", + "tokio", + "tracing", + "tracing-subscriber 0.3.18", + "void", + "zeroize", +] + +[[package]] +name = "ethexe-observer" +version = "1.4.2" +dependencies = [ + "alloy", + "anyhow", + "async-stream", + "async-trait", + "ethexe-common", + "ethexe-db", + "ethexe-ethereum", + "ethexe-signer", + "futures", + "gear-core", + "gprimitives", + "log", + "parity-scale-codec", + "reqwest 0.11.27", + "tokio", + "wabt", +] + +[[package]] +name = "ethexe-processor" +version = "1.4.2" +dependencies = [ + "anyhow", + "demo-async", + "demo-ping", + "env_logger", + "ethexe-common", + "ethexe-db", + "ethexe-runtime", + "ethexe-runtime-common", + "gear-core", + "gear-core-processor", + "gear-lazy-pages", + "gear-runtime-interface", + "gprimitives", + "log", + "parity-scale-codec", + "parity-wasm", + "rand 0.8.5", + "sp-allocator", + "sp-wasm-interface", + "tokio", + "wabt", + "wasmtime", +] + +[[package]] +name = "ethexe-prometheus-endpoint" +version = "1.4.2" +dependencies = [ + "hyper 0.14.27", + "log", + "prometheus", + "thiserror", + "tokio", +] + +[[package]] +name = "ethexe-rpc" +version = "1.4.2" +dependencies = [ + "anyhow", + "ethexe-common", + "ethexe-db", + "futures", + "gprimitives", + "hex", + "hyper 1.4.1", + "jsonrpsee 0.24.0", + "log", + "parity-scale-codec", + "tokio", + "tower", +] + +[[package]] +name = "ethexe-runtime" +version = "1.4.2" +dependencies = [ + "ethexe-runtime-common", + "gear-core", + "gear-core-processor", + "gear-lazy-pages-interface", + "gear-wasm-instrument", + "gprimitives", + "log", + "parity-scale-codec", + "substrate-wasm-builder", +] + +[[package]] +name = "ethexe-runtime-common" +version = "1.4.2" +dependencies = [ + "gear-core", + "gear-core-errors", + "gear-core-processor", + "gear-lazy-pages-common", + "gprimitives", + "gsys", + "log", + "parity-scale-codec", +] + +[[package]] +name = "ethexe-sequencer" +version = "1.4.2" +dependencies = [ + "anyhow", + "ethexe-common", + "ethexe-ethereum", + "ethexe-observer", + "ethexe-processor", + "ethexe-signer", + "futures", + "gear-core", + "gprimitives", + "log", + "parity-scale-codec", + "tokio", +] + +[[package]] +name = "ethexe-signer" +version = "1.4.2" +dependencies = [ + "anyhow", + "derive_more", + "ethers", + "ethexe-common", + "gprimitives", + "hex", + "parity-scale-codec", + "secp256k1 0.29.0", + "sha3", +] + +[[package]] +name = "ethexe-utils" +version = "1.4.2" +dependencies = [ + "async-channel", + "futures", + "futures-timer", + "lazy_static", + "log", + "parking_lot 0.12.3", + "prometheus", + "sp-arithmetic", + "tokio-test", +] + +[[package]] +name = "ethexe-validator" +version = "1.4.2" +dependencies = [ + "anyhow", + "ethexe-common", + "ethexe-network", + "ethexe-sequencer", + "ethexe-signer", + "futures", + "gprimitives", + "log", + "parity-scale-codec", + "static_init", + "tempfile", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -7245,287 +7526,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hypercore-cli" -version = "1.4.2" -dependencies = [ - "anyhow", - "clap 4.5.9", - "directories", - "env_logger", - "futures", - "futures-timer", - "gprimitives", - "hex", - "hypercore-common", - "hypercore-db", - "hypercore-ethereum", - "hypercore-network", - "hypercore-observer", - "hypercore-processor", - "hypercore-prometheus-endpoint", - "hypercore-rpc", - "hypercore-sequencer", - "hypercore-signer", - "hypercore-utils", - "hypercore-validator", - "log", - "parity-scale-codec", - "rand 0.8.5", - "serde", - "static_init", - "tempfile", - "tokio", - "toml 0.8.14", -] - -[[package]] -name = "hypercore-common" -version = "1.4.2" -dependencies = [ - "anyhow", - "derive_more", - "gear-core", - "gprimitives", - "hex", - "parity-scale-codec", - "serde", -] - -[[package]] -name = "hypercore-db" -version = "1.4.2" -dependencies = [ - "anyhow", - "dashmap", - "gear-core", - "gprimitives", - "hypercore-common", - "hypercore-runtime-common", - "log", - "parity-scale-codec", - "rocksdb", - "scopeguard", - "serde", - "tempfile", -] - -[[package]] -name = "hypercore-ethereum" -version = "1.4.2" -dependencies = [ - "alloy", - "anyhow", - "async-trait", - "futures", - "gear-core", - "gear-core-errors", - "gear-wasm-instrument", - "gprimitives", - "hypercore-common", - "hypercore-signer", - "log", - "parity-scale-codec", -] - -[[package]] -name = "hypercore-network" -version = "1.4.2" -dependencies = [ - "anyhow", - "array-bytes 6.2.3", - "either", - "fnv", - "futures", - "futures-timer", - "hypercore-utils", - "libp2p 0.52.4", - "linked_hash_set", - "log", - "parking_lot 0.12.3", - "smallvec", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber 0.3.18", - "void", - "zeroize", -] - -[[package]] -name = "hypercore-observer" -version = "1.4.2" -dependencies = [ - "alloy", - "anyhow", - "async-stream", - "async-trait", - "futures", - "gear-core", - "gprimitives", - "hypercore-common", - "hypercore-db", - "hypercore-ethereum", - "hypercore-signer", - "log", - "parity-scale-codec", - "reqwest 0.11.27", - "tokio", - "wabt", -] - -[[package]] -name = "hypercore-processor" -version = "1.4.2" -dependencies = [ - "anyhow", - "demo-async", - "demo-ping", - "env_logger", - "gear-core", - "gear-core-processor", - "gear-lazy-pages", - "gear-runtime-interface", - "gprimitives", - "hypercore-common", - "hypercore-db", - "hypercore-runtime", - "hypercore-runtime-common", - "log", - "parity-scale-codec", - "parity-wasm", - "rand 0.8.5", - "sp-allocator", - "sp-wasm-interface", - "tokio", - "wabt", - "wasmtime", -] - -[[package]] -name = "hypercore-prometheus-endpoint" -version = "1.4.2" -dependencies = [ - "hyper 0.14.27", - "log", - "prometheus", - "thiserror", - "tokio", -] - -[[package]] -name = "hypercore-rpc" -version = "1.4.2" -dependencies = [ - "anyhow", - "futures", - "gprimitives", - "hex", - "hyper 1.4.1", - "hypercore-common", - "hypercore-db", - "jsonrpsee 0.24.0", - "log", - "parity-scale-codec", - "tokio", - "tower", -] - -[[package]] -name = "hypercore-runtime" -version = "1.4.2" -dependencies = [ - "gear-core", - "gear-core-processor", - "gear-lazy-pages-interface", - "gear-wasm-instrument", - "gprimitives", - "hypercore-runtime-common", - "log", - "parity-scale-codec", - "substrate-wasm-builder", -] - -[[package]] -name = "hypercore-runtime-common" -version = "1.4.2" -dependencies = [ - "gear-core", - "gear-core-errors", - "gear-core-processor", - "gear-lazy-pages-common", - "gprimitives", - "gsys", - "log", - "parity-scale-codec", -] - -[[package]] -name = "hypercore-sequencer" -version = "1.4.2" -dependencies = [ - "anyhow", - "futures", - "gear-core", - "gprimitives", - "hypercore-common", - "hypercore-ethereum", - "hypercore-observer", - "hypercore-processor", - "hypercore-signer", - "log", - "parity-scale-codec", - "tokio", -] - -[[package]] -name = "hypercore-signer" -version = "1.4.2" -dependencies = [ - "anyhow", - "derive_more", - "ethers", - "gprimitives", - "hex", - "hypercore-common", - "parity-scale-codec", - "secp256k1 0.29.0", - "sha3", -] - -[[package]] -name = "hypercore-utils" -version = "1.4.2" -dependencies = [ - "async-channel", - "futures", - "futures-timer", - "lazy_static", - "log", - "parking_lot 0.12.3", - "prometheus", - "sp-arithmetic", - "tokio-test", -] - -[[package]] -name = "hypercore-validator" -version = "1.4.2" -dependencies = [ - "anyhow", - "futures", - "gprimitives", - "hypercore-common", - "hypercore-network", - "hypercore-sequencer", - "hypercore-signer", - "log", - "parity-scale-codec", - "static_init", - "tempfile", -] - [[package]] name = "iana-time-zone" version = "0.1.57" diff --git a/Cargo.toml b/Cargo.toml index eb9d92c207f..206c0e8bc0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ resolver = "2" default-members = ["node/cli"] -exclude = ["hypercore/contracts", "hypercore/docker"] +exclude = ["ethexe/contracts", "ethexe/docker"] members = [ "common", @@ -106,8 +106,8 @@ members = [ "utils/*", "utils/runtime-fuzzer/fuzz", "utils/lazy-pages-fuzzer/fuzz", - "hypercore/*", - "hypercore/runtime/common", + "ethexe/*", + "ethexe/runtime/common", ] [workspace.dependencies] @@ -279,22 +279,22 @@ testing = { package = "gear-node-testing", path = "node/testing" } vara-runtime = { path = "runtime/vara", default-features = false } wasm-smith = { version = "0.12.21", git = "https://github.com/gear-tech/wasm-tools.git", branch = "gear-stable" } -# Hypercore deps -hypercore-cli = { path = "hypercore/cli", default-features = false } -hypercore-observer = { path = "hypercore/observer", default-features = false } -hypercore-db = { path = "hypercore/db", default-features = false } -hypercore-network = { path = "hypercore/network", default-features = false } -hypercore-processor = { path = "hypercore/processor", default-features = false } -hypercore-runtime = { path = "hypercore/runtime", default-features = false } -hypercore-signer = { path = "hypercore/signer", default-features = false } -hypercore-sequencer = { path = "hypercore/sequencer", default-features = false } -hypercore-ethereum = { path = "hypercore/ethereum", default-features = false } -hypercore-runtime-common = { path = "hypercore/runtime/common", default-features = false } -hypercore-prometheus-endpoint = { path = "hypercore/utils/prometheus", default-features = false } -hypercore-utils = { path = "hypercore/utils", default-features = false } -hypercore-validator = { path = "hypercore/validator", default-features = false } -hypercore-rpc = { path = "hypercore/rpc", default-features = false } -hypercore-common = { path = "hypercore/common" } +# ethexe deps +ethexe-cli = { path = "ethexe/cli", default-features = false } +ethexe-observer = { path = "ethexe/observer", default-features = false } +ethexe-db = { path = "ethexe/db", default-features = false } +ethexe-network = { path = "ethexe/network", default-features = false } +ethexe-processor = { path = "ethexe/processor", default-features = false } +ethexe-runtime = { path = "ethexe/runtime", default-features = false } +ethexe-signer = { path = "ethexe/signer", default-features = false } +ethexe-sequencer = { path = "ethexe/sequencer", default-features = false } +ethexe-ethereum = { path = "ethexe/ethereum", default-features = false } +ethexe-runtime-common = { path = "ethexe/runtime/common", default-features = false } +ethexe-prometheus-endpoint = { path = "ethexe/utils/prometheus", default-features = false } +ethexe-utils = { path = "ethexe/utils", default-features = false } +ethexe-validator = { path = "ethexe/validator", default-features = false } +ethexe-rpc = { path = "ethexe/rpc", default-features = false } +ethexe-common = { path = "ethexe/common" } # Common executors between `sandbox-host` and `calc-stack-height` sandbox-wasmer = { package = "wasmer", version = "2.2", features = [ diff --git a/Makefile b/Makefile index 6ebb2d5524b..0dcc8a43ec1 100644 --- a/Makefile +++ b/Makefile @@ -2,20 +2,20 @@ .PHONY: gpu-pre-commit gpu-pre-commit: @ echo " > Formatting eGPU" && cargo +nightly fmt --all -- --config imports_granularity=Crate,edition=2021 - @ echo " >> Clippy checking eGPU" && cargo clippy -p "hypercore-*" --all-targets --all-features -- --no-deps -D warnings + @ echo " >> Clippy checking eGPU" && cargo clippy -p "ethexe-*" --all-targets --all-features -- --no-deps -D warnings # Bulding contracts .PHONY: gpu-contracts-pre-commit gpu-contracts-pre-commit: - @ echo " > Cleaning contracts" && forge clean --root hypercore/contracts - @ echo " > Formatting contracts" && forge fmt --root hypercore/contracts - @ echo " > Building contracts" && forge build --root hypercore/contracts - @ echo " > Testing contracts" && forge test --root hypercore/contracts -vvv - @ echo " > Copying Router arfitact" && cp ./hypercore/contracts/out/Router.sol/Router.json ./hypercore/ethereum - @ echo " > Copying Program arfitact" && cp ./hypercore/contracts/out/Program.sol/Program.json ./hypercore/ethereum - @ echo " > Copying MinimalProgram arfitact" && cp ./hypercore/contracts/out/MinimalProgram.sol/MinimalProgram.json ./hypercore/ethereum - @ echo " > Copying WrappedVara arfitact" && cp ./hypercore/contracts/out/WrappedVara.sol/WrappedVara.json ./hypercore/ethereum - @ echo " > Copying TransparentUpgradeableProxy arfitact" && cp ./hypercore/contracts/out/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json ./hypercore/ethereum + @ echo " > Cleaning contracts" && forge clean --root ethexe/contracts + @ echo " > Formatting contracts" && forge fmt --root ethexe/contracts + @ echo " > Building contracts" && forge build --root ethexe/contracts + @ echo " > Testing contracts" && forge test --root ethexe/contracts -vvv + @ echo " > Copying Router arfitact" && cp ./ethexe/contracts/out/Router.sol/Router.json ./ethexe/ethereum + @ echo " > Copying Program arfitact" && cp ./ethexe/contracts/out/Program.sol/Program.json ./ethexe/ethereum + @ echo " > Copying MinimalProgram arfitact" && cp ./ethexe/contracts/out/MinimalProgram.sol/MinimalProgram.json ./ethexe/ethereum + @ echo " > Copying WrappedVara arfitact" && cp ./ethexe/contracts/out/WrappedVara.sol/WrappedVara.json ./ethexe/ethereum + @ echo " > Copying TransparentUpgradeableProxy arfitact" && cp ./ethexe/contracts/out/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json ./ethexe/ethereum # Common section .PHONY: show diff --git a/hypercore/chain_spec.toml b/ethexe/chain_spec.toml similarity index 100% rename from hypercore/chain_spec.toml rename to ethexe/chain_spec.toml diff --git a/hypercore/cli/Cargo.toml b/ethexe/cli/Cargo.toml similarity index 65% rename from hypercore/cli/Cargo.toml rename to ethexe/cli/Cargo.toml index 2eb03efe74d..7d5c7af963f 100644 --- a/hypercore/cli/Cargo.toml +++ b/ethexe/cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-cli" +name = "ethexe-cli" version.workspace = true authors.workspace = true edition.workspace = true @@ -8,24 +8,24 @@ homepage.workspace = true repository.workspace = true [[bin]] -name = "ethgpu" +name = "ethexe" path = "src/main.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-db.workspace = true -hypercore-network.workspace = true -hypercore-observer.workspace = true -hypercore-processor.workspace = true -hypercore-signer.workspace = true -hypercore-sequencer.workspace = true -hypercore-ethereum.workspace = true -hypercore-validator.workspace = true -hypercore-common.workspace = true -hypercore-prometheus-endpoint.workspace = true -hypercore-rpc.workspace = true -hypercore-utils.workspace = true +ethexe-db.workspace = true +ethexe-network.workspace = true +ethexe-observer.workspace = true +ethexe-processor.workspace = true +ethexe-signer.workspace = true +ethexe-sequencer.workspace = true +ethexe-ethereum.workspace = true +ethexe-validator.workspace = true +ethexe-common.workspace = true +ethexe-prometheus-endpoint.workspace = true +ethexe-rpc.workspace = true +ethexe-utils.workspace = true gprimitives.workspace = true clap = { workspace = true, features = ["derive"] } diff --git a/hypercore/cli/src/args.rs b/ethexe/cli/src/args.rs similarity index 94% rename from hypercore/cli/src/args.rs rename to ethexe/cli/src/args.rs index 491c0add4ee..573f67cd631 100644 --- a/hypercore/cli/src/args.rs +++ b/ethexe/cli/src/args.rs @@ -24,9 +24,9 @@ use crate::{ }; use anyhow::{anyhow, bail, Result}; use clap::{Parser, Subcommand}; +use ethexe_ethereum::Ethereum; +use ethexe_signer::Address; use gprimitives::{ActorId, CodeId}; -use hypercore_ethereum::Ethereum; -use hypercore_signer::Address; use serde::Deserialize; use std::{fs, path::PathBuf}; @@ -150,7 +150,7 @@ pub struct CreateProgramArgs { impl ExtraCommands { pub async fn run(&self, config: &config::Config) -> anyhow::Result<()> { - let signer = hypercore_signer::Signer::new(config.key_path.clone())?; + let signer = ethexe_signer::Signer::new(config.key_path.clone())?; // TODO: for better UI, we must split commands processing for ones that require ethereum and ones that don't let maybe_sender_address = config @@ -236,7 +236,7 @@ impl ExtraCommands { }) .collect(); - let Some((sender_address, hypercore_ethereum)) = + let Some((sender_address, ethexe_ethereum)) = maybe_sender_address.zip(maybe_ethereum) else { bail!("please provide signer address"); @@ -244,10 +244,7 @@ impl ExtraCommands { println!("Adding validators for Router from {sender_address}..."); - let tx = hypercore_ethereum - .router() - .add_validators(validators) - .await?; + let tx = ethexe_ethereum.router().add_validators(validators).await?; println!("Completed in transaction {tx:?}"); } @@ -267,7 +264,7 @@ impl ExtraCommands { }) .collect(); - let Some((sender_address, hypercore_ethereum)) = + let Some((sender_address, ethexe_ethereum)) = maybe_sender_address.zip(maybe_ethereum) else { bail!("please provide signer address"); @@ -275,7 +272,7 @@ impl ExtraCommands { println!("Removing validators for Router from {sender_address}..."); - let tx = hypercore_ethereum + let tx = ethexe_ethereum .router() .remove_validators(validators) .await?; @@ -285,7 +282,7 @@ impl ExtraCommands { ExtraCommands::UploadCode(ref upload_code_args) => { let path = &upload_code_args.path; - let Some((sender_address, hypercore_ethereum)) = + let Some((sender_address, ethexe_ethereum)) = maybe_sender_address.zip(maybe_ethereum) else { bail!("please provide signer address"); @@ -296,7 +293,7 @@ impl ExtraCommands { path.display(), ); - let router = hypercore_ethereum.router(); + let router = ethexe_ethereum.router(); let code = fs::read(path)?; let (tx, code_id) = router.upload_code_with_sidecar(&code).await?; @@ -324,7 +321,7 @@ impl ExtraCommands { let gas_limit = create_program_args.gas_limit; let value = create_program_args.value; - let Some((sender_address, hypercore_ethereum)) = + let Some((sender_address, ethexe_ethereum)) = maybe_sender_address.zip(maybe_ethereum) else { bail!("please provide signer address"); @@ -332,7 +329,7 @@ impl ExtraCommands { println!("Creating program on Ethereum from code id {code_id} and address {sender_address}...",); - let router = hypercore_ethereum.router(); + let router = ethexe_ethereum.router(); let (tx, actor_id) = router .create_program(code_id, salt, init_payload, gas_limit, value) diff --git a/hypercore/cli/src/chain_spec.rs b/ethexe/cli/src/chain_spec.rs similarity index 94% rename from hypercore/cli/src/chain_spec.rs rename to ethexe/cli/src/chain_spec.rs index 64cf5a3882c..0914f56da30 100644 --- a/hypercore/cli/src/chain_spec.rs +++ b/ethexe/cli/src/chain_spec.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use hypercore_network::config::Multiaddr; +use ethexe_network::config::Multiaddr; use serde::Deserialize; use std::{fs, path::Path}; diff --git a/hypercore/cli/src/config.rs b/ethexe/cli/src/config.rs similarity index 94% rename from hypercore/cli/src/config.rs rename to ethexe/cli/src/config.rs index 3ebfef03cd8..28b90e7b6ec 100644 --- a/hypercore/cli/src/config.rs +++ b/ethexe/cli/src/config.rs @@ -22,9 +22,9 @@ use crate::args::Args; use anyhow::{Context as _, Result}; use directories::ProjectDirs; -use hypercore_network::NetworkConfiguration; -use hypercore_prometheus_endpoint::Registry; -use hypercore_signer::PublicKey; +use ethexe_network::NetworkConfiguration; +use ethexe_prometheus_endpoint::Registry; +use ethexe_signer::PublicKey; use std::{iter, net::SocketAddr, path::PathBuf}; use tempfile::TempDir; @@ -120,7 +120,7 @@ impl TryFrom for Config { match &*temp { Some(p) => p.path().into(), None => { - let temp_dir = tempfile::Builder::new().prefix("hypercore").tempdir()?; + let temp_dir = tempfile::Builder::new().prefix("ethexe").tempdir()?; let path = PathBuf::from(temp_dir.path()); *temp = Some(temp_dir); @@ -131,7 +131,7 @@ impl TryFrom for Config { match args.base_path { Some(r) => r, None => { - let proj_dirs = ProjectDirs::from("com", "Gear", "Hypercore") + let proj_dirs = ProjectDirs::from("com", "Gear", "ethexe") .with_context(|| "Invalid home directory path")?; proj_dirs.data_dir().to_path_buf() } @@ -148,7 +148,7 @@ impl TryFrom for Config { Some(base_path.join("net")), "test", Default::default(), - hypercore_network::DEFAULT_LISTEN_PORT, + ethexe_network::DEFAULT_LISTEN_PORT, ); net_config.boot_nodes.extend(chain_spec.bootnodes); @@ -162,7 +162,7 @@ impl TryFrom for Config { net_config, prometheus_config: args .prometheus_params - .prometheus_config(DEFAULT_PROMETHEUS_PORT, "hypercore-dev".to_string()), + .prometheus_config(DEFAULT_PROMETHEUS_PORT, "ethexe-dev".to_string()), database_path: base_path.join("db"), network_path: base_path.join("net"), key_path: base_path.join("key"), diff --git a/hypercore/cli/src/main.rs b/ethexe/cli/src/main.rs similarity index 97% rename from hypercore/cli/src/main.rs rename to ethexe/cli/src/main.rs index 78de4c4e845..dd490947668 100644 --- a/hypercore/cli/src/main.rs +++ b/ethexe/cli/src/main.rs @@ -31,7 +31,7 @@ use std::{env, fs}; #[tokio::main] async fn main() -> anyhow::Result<()> { - let optional_config_path = env::current_dir()?.join(".hypercore.toml"); + let optional_config_path = env::current_dir()?.join(".ethexe.toml"); let args = { let cli_args = Args::parse(); if fs::metadata(&optional_config_path).is_ok() { diff --git a/hypercore/cli/src/metrics.rs b/ethexe/cli/src/metrics.rs similarity index 90% rename from hypercore/cli/src/metrics.rs rename to ethexe/cli/src/metrics.rs index ffd8c5ae75e..217320a14ba 100644 --- a/hypercore/cli/src/metrics.rs +++ b/ethexe/cli/src/metrics.rs @@ -19,11 +19,11 @@ use std::time::SystemTime; use crate::config::Config; +use ethexe_observer::ObserverStatus; +use ethexe_prometheus_endpoint::{register, Gauge, Opts, PrometheusError, Registry, U64}; +use ethexe_sequencer::SequencerStatus; +use ethexe_utils::metrics::register_globals; use futures_timer::Delay; -use hypercore_observer::ObserverStatus; -use hypercore_prometheus_endpoint::{register, Gauge, Opts, PrometheusError, Registry, U64}; -use hypercore_sequencer::SequencerStatus; -use hypercore_utils::metrics::register_globals; use std::time::{Duration, Instant}; use tokio::sync::watch; @@ -42,7 +42,7 @@ impl PrometheusMetrics { register( Gauge::::with_opts( Opts::new( - "hypercore_build_info", + "ethexe_build_info", "A metric with a constant '1' value labeled by name, version", ) .const_label("name", name), @@ -58,7 +58,7 @@ impl PrometheusMetrics { .unwrap_or_default(); register( Gauge::::new( - "hypercore_process_start_time_seconds", + "ethexe_process_start_time_seconds", "Number of seconds between the UNIX epoch and the moment the process started", )?, registry, @@ -69,7 +69,7 @@ impl PrometheusMetrics { // generic internals eth_block_height: register( Gauge::::new( - "hypercore_eth_block_height", + "ethexe_eth_block_height", "Block height info of the ethereum observer", )?, registry, @@ -77,7 +77,7 @@ impl PrometheusMetrics { pending_upload_code: register( Gauge::::new( - "hypercore_pending_upload_code", + "ethexe_pending_upload_code", "Pending upload code events of the ethereum observer", )?, registry, @@ -85,7 +85,7 @@ impl PrometheusMetrics { last_router_state: register( Gauge::::new( - "hypercore_last_router_state", + "ethexe_last_router_state", "Block height of the latest state of the router contract", )?, registry, @@ -93,7 +93,7 @@ impl PrometheusMetrics { aggregated_commitments: register( Gauge::::new( - "hypercore_aggregated_commitments", + "ethexe_aggregated_commitments", "Number of commitments aggregated in sequencer", )?, registry, @@ -101,7 +101,7 @@ impl PrometheusMetrics { submitted_code_commitments: register( Gauge::::new( - "hypercore_submitted_code_commitments", + "ethexe_submitted_code_commitments", "Number of submitted code commitments in sequencer", )?, registry, @@ -109,7 +109,7 @@ impl PrometheusMetrics { submitted_block_commitments: register( Gauge::::new( - "hypercore_submitted_block_commitments", + "ethexe_submitted_block_commitments", "Number of submitted block commitments in sequencer", )?, registry, diff --git a/hypercore/cli/src/params/mod.rs b/ethexe/cli/src/params/mod.rs similarity index 100% rename from hypercore/cli/src/params/mod.rs rename to ethexe/cli/src/params/mod.rs diff --git a/hypercore/cli/src/params/network_params.rs b/ethexe/cli/src/params/network_params.rs similarity index 99% rename from hypercore/cli/src/params/network_params.rs rename to ethexe/cli/src/params/network_params.rs index 01b54f4d501..7299360c3ea 100644 --- a/hypercore/cli/src/params/network_params.rs +++ b/ethexe/cli/src/params/network_params.rs @@ -17,7 +17,7 @@ // along with this program. If not, see . use clap::Args; -use hypercore_network::{ +use ethexe_network::{ config::{Multiaddr, NetworkConfiguration, NodeKeyConfig, SetConfig, TransportConfig}, multiaddr::Protocol, }; diff --git a/hypercore/cli/src/params/prometheus_params.rs b/ethexe/cli/src/params/prometheus_params.rs similarity index 100% rename from hypercore/cli/src/params/prometheus_params.rs rename to ethexe/cli/src/params/prometheus_params.rs diff --git a/hypercore/cli/src/service.rs b/ethexe/cli/src/service.rs similarity index 82% rename from hypercore/cli/src/service.rs rename to ethexe/cli/src/service.rs index cf7c76f6fcf..780120a0cbe 100644 --- a/hypercore/cli/src/service.rs +++ b/ethexe/cli/src/service.rs @@ -16,37 +16,37 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Main service in hypercore node. +//! Main service in ethexe node. use crate::{ config::{Config, PrometheusConfig, SequencerConfig, ValidatorConfig}, metrics::MetricsService, }; use anyhow::{anyhow, Ok, Result}; +use ethexe_common::{events::BlockEvent, BlockCommitment, CodeCommitment, StateTransition}; +use ethexe_db::{BlockHeader, BlockMetaStorage, CodeUploadInfo, CodesStorage, Database}; +use ethexe_network::service::NetworkGossip; +use ethexe_observer::{BlockData, CodeLoadedData}; +use ethexe_processor::LocalOutcome; +use ethexe_validator::Commitment; use futures::{future, stream::StreamExt, FutureExt}; use gprimitives::H256; -use hypercore_common::{events::BlockEvent, BlockCommitment, CodeCommitment, StateTransition}; -use hypercore_db::{BlockHeader, BlockMetaStorage, CodeUploadInfo, CodesStorage, Database}; -use hypercore_network::service::NetworkGossip; -use hypercore_observer::{BlockData, CodeLoadedData}; -use hypercore_processor::LocalOutcome; -use hypercore_validator::Commitment; use parity_scale_codec::Decode; use std::sync::Arc; use tokio::time; -/// Hypercore service. +/// ethexe service. pub struct Service { db: Database, - network: hypercore_network::NetworkWorker, - observer: hypercore_observer::Observer, - query: hypercore_observer::Query, - processor: hypercore_processor::Processor, - signer: hypercore_signer::Signer, - sequencer: Option, - validator: Option, + network: ethexe_network::NetworkWorker, + observer: ethexe_observer::Observer, + query: ethexe_observer::Query, + processor: ethexe_processor::Processor, + signer: ethexe_signer::Signer, + sequencer: Option, + validator: Option, metrics_service: Option, - rpc: hypercore_rpc::RpcService, + rpc: ethexe_rpc::RpcService, } async fn maybe_sleep(maybe_timer: &mut Option) { @@ -59,11 +59,11 @@ async fn maybe_sleep(maybe_timer: &mut Option) { impl Service { pub async fn new(config: &Config) -> Result { - let rocks_db = hypercore_db::RocksDatabase::open(config.database_path.clone())?; - let db = hypercore_db::Database::from_one(&rocks_db); - let network = hypercore_network::NetworkWorker::new(config.net_config.clone())?; + let rocks_db = ethexe_db::RocksDatabase::open(config.database_path.clone())?; + let db = ethexe_db::Database::from_one(&rocks_db); + let network = ethexe_network::NetworkWorker::new(config.net_config.clone())?; let blob_reader = Arc::new( - hypercore_observer::ConsensusLayerBlobReader::new( + ethexe_observer::ConsensusLayerBlobReader::new( &config.ethereum_rpc, &config.ethereum_beacon_rpc, ) @@ -71,7 +71,7 @@ impl Service { ); let ethereum_router_address = config.ethereum_router_address.parse()?; - let observer = hypercore_observer::Observer::new( + let observer = ethexe_observer::Observer::new( &config.ethereum_rpc, ethereum_router_address, blob_reader.clone(), @@ -79,12 +79,12 @@ impl Service { .await?; let router_query = - hypercore_ethereum::RouterQuery::new(&config.ethereum_rpc, ethereum_router_address) + ethexe_ethereum::RouterQuery::new(&config.ethereum_rpc, ethereum_router_address) .await?; let genesis_block_hash = router_query.genesis_block_hash().await?; log::info!("👶 Genesis block hash: {genesis_block_hash}"); - let query = hypercore_observer::Query::new( + let query = ethexe_observer::Query::new( Box::new(db.clone()), &config.ethereum_rpc, ethereum_router_address, @@ -94,13 +94,13 @@ impl Service { ) .await?; - let processor = hypercore_processor::Processor::new(db.clone())?; - let signer = hypercore_signer::Signer::new(config.key_path.clone())?; + let processor = ethexe_processor::Processor::new(db.clone())?; + let signer = ethexe_signer::Signer::new(config.key_path.clone())?; let sequencer = match config.sequencer { SequencerConfig::Enabled(ref sign_tx_public) => Some( - hypercore_sequencer::Sequencer::new( - &hypercore_sequencer::Config { + ethexe_sequencer::Sequencer::new( + ðexe_sequencer::Config { ethereum_rpc: config.ethereum_rpc.clone(), sign_tx_public: *sign_tx_public, router_address: config.ethereum_router_address.parse()?, @@ -113,32 +113,29 @@ impl Service { }; // Prometheus metrics. - let metrics_service = if let Some(PrometheusConfig { port, registry }) = - config.prometheus_config.clone() - { - // Set static metrics. - let metrics = MetricsService::with_prometheus(®istry, config)?; - tokio::spawn(hypercore_prometheus_endpoint::init_prometheus(port, registry).map(drop)); - - Some(metrics) - } else { - None - }; + let metrics_service = + if let Some(PrometheusConfig { port, registry }) = config.prometheus_config.clone() { + // Set static metrics. + let metrics = MetricsService::with_prometheus(®istry, config)?; + tokio::spawn(ethexe_prometheus_endpoint::init_prometheus(port, registry).map(drop)); + + Some(metrics) + } else { + None + }; let validator = match config.validator { - ValidatorConfig::Enabled(ref sign_tx_public) => { - Some(hypercore_validator::Validator::new( - &hypercore_validator::Config { - pub_key: *sign_tx_public, - router_address: config.ethereum_router_address.parse()?, - }, - signer.clone(), - )) - } + ValidatorConfig::Enabled(ref sign_tx_public) => Some(ethexe_validator::Validator::new( + ðexe_validator::Config { + pub_key: *sign_tx_public, + router_address: config.ethereum_router_address.parse()?, + }, + signer.clone(), + )), ValidatorConfig::Disabled => None, }; - let rpc = hypercore_rpc::RpcService::new(config.rpc_port, db.clone()); + let rpc = ethexe_rpc::RpcService::new(config.rpc_port, db.clone()); Ok(Self { db, @@ -158,8 +155,8 @@ impl Service { // This is a temporary solution to download absent codes from already processed blocks. async fn process_upload_codes( db: &Database, - query: &mut hypercore_observer::Query, - processor: &mut hypercore_processor::Processor, + query: &mut ethexe_observer::Query, + processor: &mut ethexe_processor::Processor, block_hash: H256, ) -> Result<()> { let events = query.get_block_events(block_hash).await?; @@ -197,8 +194,8 @@ impl Service { async fn process_one_block( db: &Database, - query: &mut hypercore_observer::Query, - processor: &mut hypercore_processor::Processor, + query: &mut ethexe_observer::Query, + processor: &mut ethexe_processor::Processor, block_hash: H256, ) -> Result> { if let Some(transitions) = db.block_outcome(block_hash) { @@ -245,8 +242,8 @@ impl Service { async fn process_block_event( db: &Database, - query: &mut hypercore_observer::Query, - processor: &mut hypercore_processor::Processor, + query: &mut ethexe_observer::Query, + processor: &mut ethexe_processor::Processor, block_data: BlockData, ) -> Result> { db.set_block_events(block_data.block_hash, block_data.events.clone()); @@ -286,22 +283,22 @@ impl Service { async fn process_observer_event( db: &Database, - query: &mut hypercore_observer::Query, - processor: &mut hypercore_processor::Processor, - maybe_sequencer: &mut Option, - observer_event: hypercore_observer::Event, + query: &mut ethexe_observer::Query, + processor: &mut ethexe_processor::Processor, + maybe_sequencer: &mut Option, + observer_event: ethexe_observer::Event, ) -> Result> { if let Some(sequencer) = maybe_sequencer { sequencer.process_observer_event(&observer_event)?; } let commitments = match observer_event { - hypercore_observer::Event::Block(block_data) => { + ethexe_observer::Event::Block(block_data) => { let commitments = Self::process_block_event(db, query, processor, block_data).await?; commitments.into_iter().map(Commitment::Block).collect() } - hypercore_observer::Event::CodeLoaded(CodeLoadedData { code_id, code, .. }) => { + ethexe_observer::Event::CodeLoaded(CodeLoadedData { code_id, code, .. }) => { let outcomes = processor.process_upload_code(code_id, code.as_slice())?; outcomes .into_iter() @@ -381,7 +378,7 @@ impl Service { break; }; - let is_block_event = matches!(observer_event, hypercore_observer::Event::Block(_)); + let is_block_event = matches!(observer_event, ethexe_observer::Event::Block(_)); let commitments = Self::process_observer_event( &db, @@ -474,7 +471,7 @@ mod tests { max_commitment_depth: 1000, key_path: "/tmp/key".into(), network_path: "/tmp/net".into(), - net_config: hypercore_network::NetworkConfiguration::new_local(), + net_config: ethexe_network::NetworkConfiguration::new_local(), prometheus_config: Some(PrometheusConfig::new_with_default_registry( SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 9635), "dev".to_string(), diff --git a/hypercore/common/Cargo.toml b/ethexe/common/Cargo.toml similarity index 94% rename from hypercore/common/Cargo.toml rename to ethexe/common/Cargo.toml index ed181dc78a6..47100419cb0 100644 --- a/hypercore/common/Cargo.toml +++ b/ethexe/common/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-common" +name = "ethexe-common" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/hypercore/common/src/db.rs b/ethexe/common/src/db.rs similarity index 98% rename from hypercore/common/src/db.rs rename to ethexe/common/src/db.rs index 4aa4a15bcb7..3022da517fd 100644 --- a/hypercore/common/src/db.rs +++ b/ethexe/common/src/db.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Hypercore common db types and traits. +//! ethexe common db types and traits. use crate::{events::BlockEvent, StateTransition}; use alloc::{ diff --git a/hypercore/common/src/events.rs b/ethexe/common/src/events.rs similarity index 99% rename from hypercore/common/src/events.rs rename to ethexe/common/src/events.rs index be84d6b6a12..643d79bc687 100644 --- a/hypercore/common/src/events.rs +++ b/ethexe/common/src/events.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Hypercore events. +//! ethexe events. use alloc::vec::Vec; use gear_core::{ diff --git a/hypercore/common/src/lib.rs b/ethexe/common/src/lib.rs similarity index 97% rename from hypercore/common/src/lib.rs rename to ethexe/common/src/lib.rs index 618f5570542..0c676e74c1b 100644 --- a/hypercore/common/src/lib.rs +++ b/ethexe/common/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Hypercore common types and traits. +//! ethexe common types and traits. #![no_std] diff --git a/hypercore/contracts/.env.example b/ethexe/contracts/.env.example similarity index 100% rename from hypercore/contracts/.env.example rename to ethexe/contracts/.env.example diff --git a/hypercore/contracts/.gitignore b/ethexe/contracts/.gitignore similarity index 100% rename from hypercore/contracts/.gitignore rename to ethexe/contracts/.gitignore diff --git a/hypercore/contracts/.vscode/settings.json b/ethexe/contracts/.vscode/settings.json similarity index 100% rename from hypercore/contracts/.vscode/settings.json rename to ethexe/contracts/.vscode/settings.json diff --git a/hypercore/contracts/README.md b/ethexe/contracts/README.md similarity index 100% rename from hypercore/contracts/README.md rename to ethexe/contracts/README.md diff --git a/hypercore/contracts/foundry.toml b/ethexe/contracts/foundry.toml similarity index 100% rename from hypercore/contracts/foundry.toml rename to ethexe/contracts/foundry.toml diff --git a/hypercore/contracts/lib/forge-std b/ethexe/contracts/lib/forge-std similarity index 100% rename from hypercore/contracts/lib/forge-std rename to ethexe/contracts/lib/forge-std diff --git a/ethexe/contracts/lib/openzeppelin-contracts b/ethexe/contracts/lib/openzeppelin-contracts new file mode 160000 index 00000000000..4b33d326fa8 --- /dev/null +++ b/ethexe/contracts/lib/openzeppelin-contracts @@ -0,0 +1 @@ +Subproject commit 4b33d326fa818082649830b2dc8dab84419852d6 diff --git a/ethexe/contracts/lib/openzeppelin-contracts-upgradeable b/ethexe/contracts/lib/openzeppelin-contracts-upgradeable new file mode 160000 index 00000000000..2bb98f7ae31 --- /dev/null +++ b/ethexe/contracts/lib/openzeppelin-contracts-upgradeable @@ -0,0 +1 @@ +Subproject commit 2bb98f7ae310af7bc2554de59f8ed164f11c383e diff --git a/hypercore/contracts/lib/openzeppelin-foundry-upgrades b/ethexe/contracts/lib/openzeppelin-foundry-upgrades similarity index 100% rename from hypercore/contracts/lib/openzeppelin-foundry-upgrades rename to ethexe/contracts/lib/openzeppelin-foundry-upgrades diff --git a/hypercore/contracts/script/Router.s.sol b/ethexe/contracts/script/Router.s.sol similarity index 100% rename from hypercore/contracts/script/Router.s.sol rename to ethexe/contracts/script/Router.s.sol diff --git a/hypercore/contracts/src/IMinimalProgram.sol b/ethexe/contracts/src/IMinimalProgram.sol similarity index 100% rename from hypercore/contracts/src/IMinimalProgram.sol rename to ethexe/contracts/src/IMinimalProgram.sol diff --git a/hypercore/contracts/src/IProgram.sol b/ethexe/contracts/src/IProgram.sol similarity index 100% rename from hypercore/contracts/src/IProgram.sol rename to ethexe/contracts/src/IProgram.sol diff --git a/hypercore/contracts/src/IRouter.sol b/ethexe/contracts/src/IRouter.sol similarity index 100% rename from hypercore/contracts/src/IRouter.sol rename to ethexe/contracts/src/IRouter.sol diff --git a/hypercore/contracts/src/IWrappedVara.sol b/ethexe/contracts/src/IWrappedVara.sol similarity index 100% rename from hypercore/contracts/src/IWrappedVara.sol rename to ethexe/contracts/src/IWrappedVara.sol diff --git a/hypercore/contracts/src/MinimalProgram.sol b/ethexe/contracts/src/MinimalProgram.sol similarity index 100% rename from hypercore/contracts/src/MinimalProgram.sol rename to ethexe/contracts/src/MinimalProgram.sol diff --git a/hypercore/contracts/src/Program.sol b/ethexe/contracts/src/Program.sol similarity index 100% rename from hypercore/contracts/src/Program.sol rename to ethexe/contracts/src/Program.sol diff --git a/hypercore/contracts/src/Router.sol b/ethexe/contracts/src/Router.sol similarity index 100% rename from hypercore/contracts/src/Router.sol rename to ethexe/contracts/src/Router.sol diff --git a/hypercore/contracts/src/WrappedVara.sol b/ethexe/contracts/src/WrappedVara.sol similarity index 100% rename from hypercore/contracts/src/WrappedVara.sol rename to ethexe/contracts/src/WrappedVara.sol diff --git a/hypercore/contracts/test/Router.t.sol b/ethexe/contracts/test/Router.t.sol similarity index 100% rename from hypercore/contracts/test/Router.t.sol rename to ethexe/contracts/test/Router.t.sol diff --git a/hypercore/db/Cargo.toml b/ethexe/db/Cargo.toml similarity index 84% rename from hypercore/db/Cargo.toml rename to ethexe/db/Cargo.toml index e9b3e737049..8d3868f0d0f 100644 --- a/hypercore/db/Cargo.toml +++ b/ethexe/db/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-db" +name = "ethexe-db" version.workspace = true authors.workspace = true edition.workspace = true @@ -10,8 +10,8 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-common.workspace = true -hypercore-runtime-common = { workspace = true, features = ["std"] } +ethexe-common.workspace = true +ethexe-runtime-common = { workspace = true, features = ["std"] } gear-core.workspace = true gprimitives.workspace = true diff --git a/hypercore/db/src/database.rs b/ethexe/db/src/database.rs similarity index 99% rename from hypercore/db/src/database.rs rename to ethexe/db/src/database.rs index 81402af7be8..3cdabbe80e2 100644 --- a/hypercore/db/src/database.rs +++ b/ethexe/db/src/database.rs @@ -16,11 +16,19 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Database for hypercore. +//! Database for ethexe. use std::collections::{BTreeMap, VecDeque}; use crate::{CASDatabase, KVDatabase}; +use ethexe_common::{ + db::{BlockHeader, BlockMetaStorage, CodeUploadInfo, CodesStorage}, + events::BlockEvent, + StateTransition, +}; +use ethexe_runtime_common::state::{ + Allocations, MemoryPages, MessageQueue, ProgramState, Storage, Waitlist, +}; use gear_core::{ code::InstrumentedCode, ids::{ActorId, CodeId, ProgramId}, @@ -29,14 +37,6 @@ use gear_core::{ reservation::GasReservationMap, }; use gprimitives::H256; -use hypercore_common::{ - db::{BlockHeader, BlockMetaStorage, CodeUploadInfo, CodesStorage}, - events::BlockEvent, - StateTransition, -}; -use hypercore_runtime_common::state::{ - Allocations, MemoryPages, MessageQueue, ProgramState, Storage, Waitlist, -}; use parity_scale_codec::{Decode, Encode}; const LOG_TARGET: &str = "hyper-db"; diff --git a/hypercore/db/src/lib.rs b/ethexe/db/src/lib.rs similarity index 98% rename from hypercore/db/src/lib.rs rename to ethexe/db/src/lib.rs index 0051af18b76..20c03a1b67f 100644 --- a/hypercore/db/src/lib.rs +++ b/ethexe/db/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Database library for hypercore. +//! Database library for ethexe. use gear_core::ids; use gprimitives::H256; @@ -26,7 +26,7 @@ mod mem; mod rocks; pub use database::Database; -pub use hypercore_common::db::*; +pub use ethexe_common::db::*; pub use mem::MemDb; pub use rocks::RocksDatabase; diff --git a/hypercore/db/src/mem.rs b/ethexe/db/src/mem.rs similarity index 100% rename from hypercore/db/src/mem.rs rename to ethexe/db/src/mem.rs diff --git a/hypercore/db/src/rocks.rs b/ethexe/db/src/rocks.rs similarity index 100% rename from hypercore/db/src/rocks.rs rename to ethexe/db/src/rocks.rs diff --git a/hypercore/docker/docker-compose.yml b/ethexe/docker/docker-compose.yml similarity index 96% rename from hypercore/docker/docker-compose.yml rename to ethexe/docker/docker-compose.yml index 605ccb17017..54d0a6965f5 100644 --- a/hypercore/docker/docker-compose.yml +++ b/ethexe/docker/docker-compose.yml @@ -10,7 +10,7 @@ services: environment: VALIDATOR_KEY: ${VALIDATOR_KEY} VALIDATOR_PUB_KEY: ${VALIDATOR_PUB_KEY} - RUST_LOG: hypercore=debug + RUST_LOG: ethexe=debug volumes: - "gear-data-validator:/data" command: bash -c "ethgpu @@ -37,7 +37,7 @@ services: environment: SEQUENCER_KEY: ${SEQUENCER_KEY} SEQUENCER_PUB_KEY: ${SEQUENCER_PUB_KEY} - RUST_LOG: hypercore=debug + RUST_LOG: ethexe=debug links: - "node_validator:validator" command: bash -c "ethgpu -d /data insert-key ${SEQUENCER_KEY} diff --git a/hypercore/docker/hypercore_builder.Dockerfile b/ethexe/docker/hypercore_builder.Dockerfile similarity index 70% rename from hypercore/docker/hypercore_builder.Dockerfile rename to ethexe/docker/hypercore_builder.Dockerfile index 9e519b53e36..8da86119287 100644 --- a/hypercore/docker/hypercore_builder.Dockerfile +++ b/ethexe/docker/hypercore_builder.Dockerfile @@ -1,10 +1,10 @@ FROM --platform=linux/amd64 amazonlinux:2023 as builder -LABEL description="This is the build stage for Hypercore. Here we create the binary." +LABEL description="This is the build stage for ethexe. Here we create the binary." ARG PROFILE=release -WORKDIR /hypercore +WORKDIR /ethexe -COPY . /hypercore +COPY . /ethexe # Install dependencies RUN yum update -y && yum install -y clang gcc git gzip make tar wget unzip openssl-devel @@ -25,21 +25,21 @@ RUN rustup toolchain install nightly-2024-01-25 RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2024-01-25 # Build -RUN cargo build -p hypercore-cli --profile $PROFILE +RUN cargo build -p ethexe-cli --profile $PROFILE # ===== SECOND STAGE ====== FROM --platform=linux/amd64 ubuntu:22.04 MAINTAINER GEAR -LABEL description="This is the 2nd stage: a very small image where we copy the Hypercore binary." +LABEL description="This is the 2nd stage: a very small image where we copy the ethexe binary." ARG PROFILE=release -COPY --from=builder /hypercore/target/$PROFILE/ethgpu /usr/local/bin +COPY --from=builder /ethexe/target/$PROFILE/ethgpu /usr/local/bin RUN apt-get update && apt-get install -y openssl ca-certificates -RUN useradd -m -u 1000 -U -s /bin/sh -d /hypercore hypercore && \ - mkdir -p /hypercore/.local/share && \ +RUN useradd -m -u 1000 -U -s /bin/sh -d /ethexe ethexe && \ + mkdir -p /ethexe/.local/share && \ mkdir /data && \ - chown -R hypercore:hypercore /data && \ - ln -s /data /hypercore/.local/share/hypercore && \ + chown -R ethexe:ethexe /data && \ + ln -s /data /ethexe/.local/share/ethexe && \ # Sanity checks ldd /usr/local/bin/ethgpu && \ /usr/local/bin/ethgpu --version diff --git a/hypercore/docker/hypercore_builder.Dockerfile.dockerignore b/ethexe/docker/hypercore_builder.Dockerfile.dockerignore similarity index 100% rename from hypercore/docker/hypercore_builder.Dockerfile.dockerignore rename to ethexe/docker/hypercore_builder.Dockerfile.dockerignore diff --git a/hypercore/ethereum/Cargo.toml b/ethexe/ethereum/Cargo.toml similarity index 87% rename from hypercore/ethereum/Cargo.toml rename to ethexe/ethereum/Cargo.toml index 7146a108852..6becf28b402 100644 --- a/hypercore/ethereum/Cargo.toml +++ b/ethexe/ethereum/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-ethereum" +name = "ethexe-ethereum" version.workspace = true authors.workspace = true edition.workspace = true @@ -8,8 +8,8 @@ homepage.workspace = true repository.workspace = true [dependencies] -hypercore-signer.workspace = true -hypercore-common.workspace = true +ethexe-signer.workspace = true +ethexe-common.workspace = true gear-core.workspace = true gear-core-errors.workspace = true gear-wasm-instrument.workspace = true diff --git a/hypercore/ethereum/MinimalProgram.json b/ethexe/ethereum/MinimalProgram.json similarity index 100% rename from hypercore/ethereum/MinimalProgram.json rename to ethexe/ethereum/MinimalProgram.json diff --git a/hypercore/ethereum/Program.json b/ethexe/ethereum/Program.json similarity index 100% rename from hypercore/ethereum/Program.json rename to ethexe/ethereum/Program.json diff --git a/hypercore/ethereum/Router.json b/ethexe/ethereum/Router.json similarity index 100% rename from hypercore/ethereum/Router.json rename to ethexe/ethereum/Router.json diff --git a/hypercore/ethereum/TransparentUpgradeableProxy.json b/ethexe/ethereum/TransparentUpgradeableProxy.json similarity index 100% rename from hypercore/ethereum/TransparentUpgradeableProxy.json rename to ethexe/ethereum/TransparentUpgradeableProxy.json diff --git a/hypercore/ethereum/WrappedVara.json b/ethexe/ethereum/WrappedVara.json similarity index 100% rename from hypercore/ethereum/WrappedVara.json rename to ethexe/ethereum/WrappedVara.json diff --git a/hypercore/ethereum/src/abi.rs b/ethexe/ethereum/src/abi.rs similarity index 96% rename from hypercore/ethereum/src/abi.rs rename to ethexe/ethereum/src/abi.rs index 416d1bb6e63..1158a4cd755 100644 --- a/hypercore/ethereum/src/abi.rs +++ b/ethexe/ethereum/src/abi.rs @@ -2,7 +2,7 @@ use alloy::{ primitives::{Address, Bytes, FixedBytes, B256}, sol, }; -use hypercore_common::{BlockCommitment, CodeCommitment, OutgoingMessage, StateTransition}; +use ethexe_common::{BlockCommitment, CodeCommitment, OutgoingMessage, StateTransition}; sol!( #[sol(rpc)] diff --git a/hypercore/ethereum/src/eip1167.rs b/ethexe/ethereum/src/eip1167.rs similarity index 100% rename from hypercore/ethereum/src/eip1167.rs rename to ethexe/ethereum/src/eip1167.rs diff --git a/hypercore/ethereum/src/event.rs b/ethexe/ethereum/src/event.rs similarity index 99% rename from hypercore/ethereum/src/event.rs rename to ethexe/ethereum/src/event.rs index d1a20710724..11dea07e415 100644 --- a/hypercore/ethereum/src/event.rs +++ b/ethexe/ethereum/src/event.rs @@ -1,9 +1,9 @@ use alloy::{primitives::LogData, rpc::types::eth::Log, sol_types::SolEvent}; use anyhow::{anyhow, Result}; +use ethexe_common::events::*; use gear_core::message::ReplyDetails; use gear_core_errors::ReplyCode; use gprimitives::{ActorId, CodeId, MessageId, H256}; -use hypercore_common::events::*; use crate::IRouter; diff --git a/hypercore/ethereum/src/lib.rs b/ethexe/ethereum/src/lib.rs similarity index 93% rename from hypercore/ethereum/src/lib.rs rename to ethexe/ethereum/src/lib.rs index 907536ff3f7..f59ccc0809e 100644 --- a/hypercore/ethereum/src/lib.rs +++ b/ethexe/ethereum/src/lib.rs @@ -23,15 +23,14 @@ use alloy::{ }; use anyhow::{anyhow, bail, Result}; use async_trait::async_trait; +use ethexe_common::{events::CodeApproved, BlockCommitment, CodeCommitment}; +use ethexe_signer::{ + Address as ethexeAddress, PublicKey, Signature as ethexeSignature, Signer as ethexeSigner, +}; use futures::StreamExt; use gear_core::code::{Code, CodeAndId}; use gear_wasm_instrument::gas_metering::Schedule; use gprimitives::{ActorId, CodeId, MessageId, H256}; -use hypercore_common::{events::CodeApproved, BlockCommitment, CodeCommitment}; -use hypercore_signer::{ - Address as HypercoreAddress, PublicKey, Signature as HypercoreSignature, - Signer as HypercoreSigner, -}; use std::sync::Arc; mod abi; @@ -54,13 +53,13 @@ type QueryRouterInstance = #[derive(Debug, Clone)] struct Sender { - signer: HypercoreSigner, + signer: ethexeSigner, sender: PublicKey, chain_id: Option, } impl Sender { - pub fn new(signer: HypercoreSigner, sender_address: HypercoreAddress) -> Result { + pub fn new(signer: ethexeSigner, sender_address: ethexeAddress) -> Result { let sender = signer .get_key_by_addr(sender_address)? .ok_or_else(|| anyhow!("no key found for {sender_address}"))?; @@ -126,8 +125,8 @@ impl Router { Self(AlloyRouterInstance::new(address, provider)) } - pub fn address(&self) -> HypercoreAddress { - HypercoreAddress(*self.0.address().0) + pub fn address(&self) -> ethexeAddress { + ethexeAddress(*self.0.address().0) } pub async fn add_validators(&self, validators: Vec) -> Result { @@ -248,7 +247,7 @@ impl Router { pub async fn commit_codes( &self, commitments: Vec, - signatures: Vec, + signatures: Vec, ) -> Result { let builder = self.0.commitCodes( commitments.into_iter().map(Into::into).collect(), @@ -265,7 +264,7 @@ impl Router { pub async fn commit_blocks( &self, commitments: Vec, - signatures: Vec, + signatures: Vec, ) -> Result { let builder = self .0 @@ -286,7 +285,7 @@ impl Router { pub struct RouterQuery(QueryRouterInstance); impl RouterQuery { - pub async fn new(rpc_url: &str, router_address: HypercoreAddress) -> Result { + pub async fn new(rpc_url: &str, router_address: ethexeAddress) -> Result { let provider = Arc::new(ProviderBuilder::new().on_builtin(rpc_url).await?); Ok(Self(QueryRouterInstance::new( Address::new(router_address.0), @@ -320,8 +319,8 @@ impl Program { Self(AlloyProgramInstance::new(address, provider)) } - pub fn address(&self) -> HypercoreAddress { - HypercoreAddress(*self.0.address().0) + pub fn address(&self) -> ethexeAddress { + ethexeAddress(*self.0.address().0) } pub async fn send_message( @@ -369,8 +368,8 @@ impl Program { async fn create_provider( rpc_url: &str, - signer: HypercoreSigner, - sender_address: HypercoreAddress, + signer: ethexeSigner, + sender_address: ethexeAddress, ) -> Result> { Ok(Arc::new( ProviderBuilder::new() @@ -389,9 +388,9 @@ pub struct Ethereum { impl Ethereum { pub async fn new( rpc_url: &str, - router_address: HypercoreAddress, - signer: HypercoreSigner, - sender_address: HypercoreAddress, + router_address: ethexeAddress, + signer: ethexeSigner, + sender_address: ethexeAddress, ) -> Result { Ok(Self { router_address: Address::new(router_address.0), @@ -401,9 +400,9 @@ impl Ethereum { pub async fn deploy( rpc_url: &str, - validators: Vec, - signer: HypercoreSigner, - sender_address: HypercoreAddress, + validators: Vec, + signer: ethexeSigner, + sender_address: ethexeAddress, ) -> Result { const VALUE_PER_GAS: u128 = 6; @@ -489,7 +488,7 @@ impl Ethereum { Router::new(self.router_address, self.provider.clone()) } - pub fn program(&self, program_address: HypercoreAddress) -> Program { + pub fn program(&self, program_address: ethexeAddress) -> Program { Program::new(Address::new(program_address.0), self.provider.clone()) } } diff --git a/hypercore/network/Cargo.toml b/ethexe/network/Cargo.toml similarity index 94% rename from hypercore/network/Cargo.toml rename to ethexe/network/Cargo.toml index 3dc86f304a7..64bd870508b 100644 --- a/hypercore/network/Cargo.toml +++ b/ethexe/network/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-network" +name = "ethexe-network" version.workspace = true authors.workspace = true edition.workspace = true @@ -10,7 +10,7 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-utils.workspace = true +ethexe-utils.workspace = true anyhow.workspace = true tracing.workspace = true diff --git a/hypercore/network/src/behaviour.rs b/ethexe/network/src/behaviour.rs similarity index 100% rename from hypercore/network/src/behaviour.rs rename to ethexe/network/src/behaviour.rs diff --git a/hypercore/network/src/config.rs b/ethexe/network/src/config.rs similarity index 100% rename from hypercore/network/src/config.rs rename to ethexe/network/src/config.rs diff --git a/hypercore/network/src/error.rs b/ethexe/network/src/error.rs similarity index 100% rename from hypercore/network/src/error.rs rename to ethexe/network/src/error.rs diff --git a/hypercore/network/src/lib.rs b/ethexe/network/src/lib.rs similarity index 97% rename from hypercore/network/src/lib.rs rename to ethexe/network/src/lib.rs index 4485f4113e9..1694781accb 100644 --- a/hypercore/network/src/lib.rs +++ b/ethexe/network/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Network library for Hypercore. +//! Network library for ethexe. mod behaviour; diff --git a/hypercore/network/src/peer_info.rs b/ethexe/network/src/peer_info.rs similarity index 99% rename from hypercore/network/src/peer_info.rs rename to ethexe/network/src/peer_info.rs index 8183f4ce7c4..702037dbcbd 100644 --- a/hypercore/network/src/peer_info.rs +++ b/ethexe/network/src/peer_info.rs @@ -126,7 +126,7 @@ impl PeerInfoBehaviour { external_addresses: Arc>>, ) -> Self { let identify = { - let cfg = IdentifyConfig::new("/hypercore/1.0".to_string(), local_public_key) + let cfg = IdentifyConfig::new("/ethexe/1.0".to_string(), local_public_key) .with_agent_version(user_agent) // We don't need any peer information cached. .with_cache_size(0); diff --git a/hypercore/network/src/service.rs b/ethexe/network/src/service.rs similarity index 98% rename from hypercore/network/src/service.rs rename to ethexe/network/src/service.rs index 7ddf61e7529..6f4fbbf745d 100644 --- a/hypercore/network/src/service.rs +++ b/ethexe/network/src/service.rs @@ -21,7 +21,7 @@ use crate::{ transport, Error, NetworkConfiguration, TransportConfig, }; -use hypercore_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; +use ethexe_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; use anyhow::Result; use either::Either; @@ -52,7 +52,7 @@ use void::Void; pub type SwarmEventError = Either, Void>, Void>; #[allow(unused)] -/// hypercore network service. Handles network IO and manages connectivity. +/// ethexe network service. Handles network IO and manages connectivity. pub struct NetworkService { /// The local external addresses. external_addresses: Arc>>, @@ -126,7 +126,7 @@ pub struct MessageEntry { pub sender: Option, } -/// Network for Hypercore nodes. +/// Network for ethexe nodes. pub struct NetworkWorker { /// Updated by the `NetworkWorker` and loaded by the `NetworkService`. listen_addresses: Arc>>, diff --git a/hypercore/network/src/transport.rs b/ethexe/network/src/transport.rs similarity index 100% rename from hypercore/network/src/transport.rs rename to ethexe/network/src/transport.rs diff --git a/hypercore/network/src/utils.rs b/ethexe/network/src/utils.rs similarity index 98% rename from hypercore/network/src/utils.rs rename to ethexe/network/src/utils.rs index 9094d0ce168..51a01532f9a 100644 --- a/hypercore/network/src/utils.rs +++ b/ethexe/network/src/utils.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! `hypercore-network` utilities +//! `ethexe-network` utilities use futures::{stream::unfold, FutureExt, Stream, StreamExt}; use futures_timer::Delay; diff --git a/hypercore/observer/Cargo.toml b/ethexe/observer/Cargo.toml similarity index 84% rename from hypercore/observer/Cargo.toml rename to ethexe/observer/Cargo.toml index 19877c5666e..4419eb5abcf 100644 --- a/hypercore/observer/Cargo.toml +++ b/ethexe/observer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-observer" +name = "ethexe-observer" version.workspace = true authors.workspace = true edition.workspace = true @@ -8,10 +8,10 @@ homepage.workspace = true repository.workspace = true [dependencies] -hypercore-common.workspace = true -hypercore-signer.workspace = true -hypercore-ethereum.workspace = true -hypercore-db.workspace = true +ethexe-common.workspace = true +ethexe-signer.workspace = true +ethexe-ethereum.workspace = true +ethexe-db.workspace = true gear-core.workspace = true gprimitives.workspace = true diff --git a/hypercore/observer/src/blobs.rs b/ethexe/observer/src/blobs.rs similarity index 100% rename from hypercore/observer/src/blobs.rs rename to ethexe/observer/src/blobs.rs diff --git a/hypercore/observer/src/event.rs b/ethexe/observer/src/event.rs similarity index 92% rename from hypercore/observer/src/event.rs rename to ethexe/observer/src/event.rs index ea24f4cf55a..82ac630ba0a 100644 --- a/hypercore/observer/src/event.rs +++ b/ethexe/observer/src/event.rs @@ -1,5 +1,5 @@ +use ethexe_common::events::BlockEvent; use gprimitives::{ActorId, CodeId, H256}; -use hypercore_common::events::BlockEvent; use parity_scale_codec::{Decode, Encode}; #[derive(Debug, Clone, Encode, Decode)] diff --git a/hypercore/observer/src/lib.rs b/ethexe/observer/src/lib.rs similarity index 96% rename from hypercore/observer/src/lib.rs rename to ethexe/observer/src/lib.rs index 1fb09061464..32a2c62644f 100644 --- a/hypercore/observer/src/lib.rs +++ b/ethexe/observer/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Ethereum state observer for Hypercore. +//! Ethereum state observer for ethexe. mod blobs; mod event; diff --git a/hypercore/observer/src/observer.rs b/ethexe/observer/src/observer.rs similarity index 97% rename from hypercore/observer/src/observer.rs rename to ethexe/observer/src/observer.rs index 5d8310d312b..4448ab7e209 100644 --- a/hypercore/observer/src/observer.rs +++ b/ethexe/observer/src/observer.rs @@ -6,12 +6,12 @@ use alloy::{ transports::BoxTransport, }; use anyhow::{anyhow, Result}; +use ethexe_common::events::BlockEvent; +use ethexe_ethereum::event::*; +use ethexe_signer::Address as ethexeAddress; use futures::{stream::FuturesUnordered, Stream, StreamExt}; use gear_core::ids::prelude::*; use gprimitives::{ActorId, CodeId, H256}; -use hypercore_common::events::BlockEvent; -use hypercore_ethereum::event::*; -use hypercore_signer::Address as HypercoreAddress; use std::sync::Arc; use tokio::sync::watch; @@ -35,7 +35,7 @@ pub struct ObserverStatus { impl Observer { pub async fn new( ethereum_rpc: &str, - router_address: HypercoreAddress, + router_address: ethexeAddress, blob_reader: Arc, ) -> Result { let (status_sender, _status_receiver) = watch::channel(ObserverStatus::default()); @@ -211,8 +211,8 @@ mod tests { use super::*; use crate::MockBlobReader; use alloy::node_bindings::Anvil; - use hypercore_ethereum::Ethereum; - use hypercore_signer::Signer; + use ethexe_ethereum::Ethereum; + use ethexe_signer::Signer; use tokio::task; fn wat2wasm_with_validate(s: &str, validate: bool) -> Vec { diff --git a/hypercore/observer/src/query.rs b/ethexe/observer/src/query.rs similarity index 98% rename from hypercore/observer/src/query.rs rename to ethexe/observer/src/query.rs index e43e2e7d775..d233389dcd0 100644 --- a/hypercore/observer/src/query.rs +++ b/ethexe/observer/src/query.rs @@ -13,12 +13,12 @@ use alloy::{ rpc::types::eth::BlockTransactionsKind, }; use anyhow::{anyhow, Result}; -use gprimitives::{ActorId, CodeId, H256}; -use hypercore_common::{ +use ethexe_common::{ db::{BlockHeader, BlockMetaStorage}, events::BlockEvent, }; -use hypercore_signer::Address as HypercoreAddress; +use ethexe_signer::Address as ethexeAddress; +use gprimitives::{ActorId, CodeId, H256}; pub struct Query { database: Box, @@ -33,7 +33,7 @@ impl Query { pub async fn new( database: Box, ethereum_rpc: &str, - router_address: HypercoreAddress, + router_address: ethexeAddress, genesis_block_hash: H256, blob_reader: Arc, max_commitment_depth: u32, diff --git a/hypercore/processor/Cargo.toml b/ethexe/processor/Cargo.toml similarity index 81% rename from hypercore/processor/Cargo.toml rename to ethexe/processor/Cargo.toml index f825bfea675..e2baf8b4e92 100644 --- a/hypercore/processor/Cargo.toml +++ b/ethexe/processor/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-processor" +name = "ethexe-processor" version.workspace = true authors.workspace = true edition.workspace = true @@ -9,10 +9,10 @@ repository.workspace = true [dependencies] -hypercore-common.workspace = true -hypercore-db.workspace = true -hypercore-runtime-common = { workspace = true, features = ["std"] } -hypercore-runtime = { workspace = true, features = ["std"] } +ethexe-common.workspace = true +ethexe-db.workspace = true +ethexe-runtime-common = { workspace = true, features = ["std"] } +ethexe-runtime = { workspace = true, features = ["std"] } gear-core.workspace = true gprimitives.workspace = true gear-runtime-interface = { workspace = true, features = ["std"] } diff --git a/hypercore/processor/src/host/api/allocator.rs b/ethexe/processor/src/host/api/allocator.rs similarity index 100% rename from hypercore/processor/src/host/api/allocator.rs rename to ethexe/processor/src/host/api/allocator.rs diff --git a/hypercore/processor/src/host/api/database.rs b/ethexe/processor/src/host/api/database.rs similarity index 100% rename from hypercore/processor/src/host/api/database.rs rename to ethexe/processor/src/host/api/database.rs diff --git a/hypercore/processor/src/host/api/lazy_pages.rs b/ethexe/processor/src/host/api/lazy_pages.rs similarity index 94% rename from hypercore/processor/src/host/api/lazy_pages.rs rename to ethexe/processor/src/host/api/lazy_pages.rs index 0a6ec881100..d6f8b122edd 100644 --- a/hypercore/processor/src/host/api/lazy_pages.rs +++ b/ethexe/processor/src/host/api/lazy_pages.rs @@ -18,7 +18,7 @@ // TODO (breathx): remove cloning of slices from wasm memory (unsafe casts). -use crate::host::{api::MemoryWrap, threads::HypercoreHostLazyPages}; +use crate::host::{api::MemoryWrap, threads::EthexeHostLazyPages}; use anyhow::Result; use gear_lazy_pages::LazyPagesVersion; use gear_runtime_interface::{lazy_pages_detail, LazyPagesInitContext}; @@ -84,13 +84,9 @@ fn init_lazy_pages(caller: Caller<'_, StoreData>, ctx: i64) -> i32 { let ctx: LazyPagesInitContext = memory.decode_by_val(&caller, ctx); - gear_lazy_pages::init( - LazyPagesVersion::Version1, - ctx.into(), - HypercoreHostLazyPages, - ) - .map_err(|err| log::error!("Cannot initialize lazy-pages: {}", err)) - .is_ok() as i32 + gear_lazy_pages::init(LazyPagesVersion::Version1, ctx.into(), EthexeHostLazyPages) + .map_err(|err| log::error!("Cannot initialize lazy-pages: {}", err)) + .is_ok() as i32 } fn init_lazy_pages_for_program(caller: Caller<'_, StoreData>, ctx: i64) { diff --git a/hypercore/processor/src/host/api/logging.rs b/ethexe/processor/src/host/api/logging.rs similarity index 100% rename from hypercore/processor/src/host/api/logging.rs rename to ethexe/processor/src/host/api/logging.rs diff --git a/hypercore/processor/src/host/api/mod.rs b/ethexe/processor/src/host/api/mod.rs similarity index 100% rename from hypercore/processor/src/host/api/mod.rs rename to ethexe/processor/src/host/api/mod.rs diff --git a/hypercore/processor/src/host/api/sandbox.rs b/ethexe/processor/src/host/api/sandbox.rs similarity index 100% rename from hypercore/processor/src/host/api/sandbox.rs rename to ethexe/processor/src/host/api/sandbox.rs diff --git a/hypercore/processor/src/host/context.rs b/ethexe/processor/src/host/context.rs similarity index 100% rename from hypercore/processor/src/host/context.rs rename to ethexe/processor/src/host/context.rs diff --git a/hypercore/processor/src/host/mod.rs b/ethexe/processor/src/host/mod.rs similarity index 100% rename from hypercore/processor/src/host/mod.rs rename to ethexe/processor/src/host/mod.rs diff --git a/hypercore/processor/src/host/runtime.rs b/ethexe/processor/src/host/runtime.rs similarity index 97% rename from hypercore/processor/src/host/runtime.rs rename to ethexe/processor/src/host/runtime.rs index 343157189ac..ac728768261 100644 --- a/hypercore/processor/src/host/runtime.rs +++ b/ethexe/processor/src/host/runtime.rs @@ -38,7 +38,7 @@ impl From for Runtime { impl Runtime { pub fn new() -> Self { - Self::Raw(hypercore_runtime::WASM_BINARY_BLOATY.unwrap().into()) + Self::Raw(ethexe_runtime::WASM_BINARY_BLOATY.unwrap().into()) } pub fn from_code(code: Vec) -> Self { diff --git a/hypercore/processor/src/host/threads.rs b/ethexe/processor/src/host/threads.rs similarity index 96% rename from hypercore/processor/src/host/threads.rs rename to ethexe/processor/src/host/threads.rs index b89d9e4f29c..c9bf25ff777 100644 --- a/hypercore/processor/src/host/threads.rs +++ b/ethexe/processor/src/host/threads.rs @@ -20,14 +20,14 @@ use crate::Database; use core::fmt; -use gear_core::{ids::ProgramId, pages::GearPage}; -use gear_lazy_pages::LazyPagesStorage; -use gprimitives::H256; -use hypercore_db::BlockMetaStorage; -use hypercore_runtime_common::{ +use ethexe_db::BlockMetaStorage; +use ethexe_runtime_common::{ state::{ActiveProgram, MaybeHash, Program, ProgramState, Storage}, BlockInfo, }; +use gear_core::{ids::ProgramId, pages::GearPage}; +use gear_lazy_pages::LazyPagesStorage; +use gprimitives::H256; use parity_scale_codec::{Decode, DecodeAll}; use std::{cell::RefCell, collections::BTreeMap}; @@ -136,9 +136,9 @@ pub fn with_params(f: impl FnOnce(&mut ThreadParams) -> T) -> T { } #[derive(Debug)] -pub struct HypercoreHostLazyPages; +pub struct EthexeHostLazyPages; -impl LazyPagesStorage for HypercoreHostLazyPages { +impl LazyPagesStorage for EthexeHostLazyPages { fn load_page(&mut self, key: &[u8], buffer: &mut [u8]) -> Option { with_params(|params| { let page = PageKey::page_from_buf(key); diff --git a/hypercore/processor/src/lib.rs b/ethexe/processor/src/lib.rs similarity index 97% rename from hypercore/processor/src/lib.rs rename to ethexe/processor/src/lib.rs index 1f3f1a08c4a..72d88c92d0a 100644 --- a/hypercore/processor/src/lib.rs +++ b/ethexe/processor/src/lib.rs @@ -20,6 +20,11 @@ use anyhow::Result; use core_processor::common::JournalNote; +use ethexe_common::{events::BlockEvent, StateTransition}; +use ethexe_db::{BlockMetaStorage, CodesStorage, Database}; +use ethexe_runtime_common::state::{ + self, ActiveProgram, Dispatch, MaybeHash, ProgramState, Storage, +}; use gear_core::{ ids::{prelude::CodeIdExt, ActorId, MessageId, ProgramId}, message::{DispatchKind, Payload}, @@ -27,11 +32,6 @@ use gear_core::{ }; use gprimitives::{CodeId, H256}; use host::InstanceCreator; -use hypercore_common::{events::BlockEvent, StateTransition}; -use hypercore_db::{BlockMetaStorage, CodesStorage, Database}; -use hypercore_runtime_common::state::{ - self, ActiveProgram, Dispatch, MaybeHash, ProgramState, Storage, -}; use parity_scale_codec::{Decode, Encode}; use std::collections::{BTreeMap, VecDeque}; @@ -221,7 +221,7 @@ impl Processor { let maybe_instrumented_code = self .db - .instrumented_code(hypercore_runtime::VERSION, original_code_id); + .instrumented_code(ethexe_runtime::VERSION, original_code_id); let mut executor = self.creator.instantiate()?; diff --git a/hypercore/processor/src/run.rs b/ethexe/processor/src/run.rs similarity index 97% rename from hypercore/processor/src/run.rs rename to ethexe/processor/src/run.rs index b045030c1b8..fefdb0e3fae 100644 --- a/hypercore/processor/src/run.rs +++ b/ethexe/processor/src/run.rs @@ -21,14 +21,14 @@ use crate::{ LocalOutcome, }; use core_processor::common::JournalNote; +use ethexe_common::{OutgoingMessage, StateTransition}; +use ethexe_db::CodesStorage; +use ethexe_runtime_common::Handler; use gear_core::{ ids::{ActorId, ProgramId}, message::Message, }; use gprimitives::H256; -use hypercore_common::{OutgoingMessage, StateTransition}; -use hypercore_db::CodesStorage; -use hypercore_runtime_common::Handler; use std::collections::BTreeMap; use tokio::sync::{mpsc, oneshot}; @@ -186,7 +186,7 @@ async fn run_task(executor: &mut InstanceWrapper, task: Task) { let instrumented_code = executor .db() - .instrumented_code(hypercore_runtime::VERSION, code_id); + .instrumented_code(ethexe_runtime::VERSION, code_id); let journal = executor .run(program_id, code_id, state_hash, instrumented_code) diff --git a/hypercore/processor/src/tests.rs b/ethexe/processor/src/tests.rs similarity index 97% rename from hypercore/processor/src/tests.rs rename to ethexe/processor/src/tests.rs index a8417bd575b..53f49d4f48a 100644 --- a/hypercore/processor/src/tests.rs +++ b/ethexe/processor/src/tests.rs @@ -17,10 +17,10 @@ // along with this program. If not, see . use crate::*; +use ethexe_common::events::{BlockEvent, CreateProgram, SendMessage}; +use ethexe_db::{BlockHeader, BlockMetaStorage, CodesStorage, MemDb}; use gear_core::{ids::prelude::CodeIdExt, message::DispatchKind}; use gprimitives::{ActorId, MessageId}; -use hypercore_common::events::{BlockEvent, CreateProgram, SendMessage}; -use hypercore_db::{BlockHeader, BlockMetaStorage, CodesStorage, MemDb}; use std::collections::BTreeMap; use utils::*; use wabt::wat2wasm; @@ -121,7 +121,7 @@ fn handle_new_code_valid() { assert!(processor.db.original_code(code_id).is_none()); assert!(processor .db - .instrumented_code(hypercore_runtime::VERSION, code_id) + .instrumented_code(ethexe_runtime::VERSION, code_id) .is_none()); let calculated_id = processor @@ -141,7 +141,7 @@ fn handle_new_code_valid() { assert!( processor .db - .instrumented_code(hypercore_runtime::VERSION, code_id) + .instrumented_code(ethexe_runtime::VERSION, code_id) .expect("failed to read original code") .code() .len() @@ -164,7 +164,7 @@ fn handle_new_code_invalid() { assert!(processor.db.original_code(code_id).is_none()); assert!(processor .db - .instrumented_code(hypercore_runtime::VERSION, code_id) + .instrumented_code(ethexe_runtime::VERSION, code_id) .is_none()); assert!(processor @@ -175,7 +175,7 @@ fn handle_new_code_invalid() { assert!(processor.db.original_code(code_id).is_none()); assert!(processor .db - .instrumented_code(hypercore_runtime::VERSION, code_id) + .instrumented_code(ethexe_runtime::VERSION, code_id) .is_none()); } diff --git a/hypercore/rpc/Cargo.toml b/ethexe/rpc/Cargo.toml similarity index 87% rename from hypercore/rpc/Cargo.toml rename to ethexe/rpc/Cargo.toml index c54e39ff146..40c566ceb11 100644 --- a/hypercore/rpc/Cargo.toml +++ b/ethexe/rpc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-rpc" +name = "ethexe-rpc" version.workspace = true authors.workspace = true edition.workspace = true @@ -14,11 +14,11 @@ tokio = { workspace = true } anyhow.workspace = true futures.workspace = true gprimitives.workspace = true -hypercore-db.workspace = true +ethexe-db.workspace = true jsonrpsee = { version = "0.24", features = ["server", "macros"] } tower = { version = "0.4.13", features = ["full"] } hyper = { version = "1.4.1", features = ["server"] } log.workspace = true parity-scale-codec.workspace = true hex.workspace = true -hypercore-common.workspace = true +ethexe-common.workspace = true diff --git a/hypercore/rpc/src/lib.rs b/ethexe/rpc/src/lib.rs similarity index 98% rename from hypercore/rpc/src/lib.rs rename to ethexe/rpc/src/lib.rs index 4188489eb70..0fa3282a04e 100644 --- a/hypercore/rpc/src/lib.rs +++ b/ethexe/rpc/src/lib.rs @@ -1,6 +1,6 @@ +use ethexe_db::{BlockHeader, BlockMetaStorage, Database}; use futures::FutureExt; use gprimitives::H256; -use hypercore_db::{BlockHeader, BlockMetaStorage, Database}; use jsonrpsee::{ core::{async_trait, RpcResult}, proc_macros::rpc, diff --git a/hypercore/runtime/Cargo.toml b/ethexe/runtime/Cargo.toml similarity index 91% rename from hypercore/runtime/Cargo.toml rename to ethexe/runtime/Cargo.toml index aba9aa75dc8..ef604b591b3 100644 --- a/hypercore/runtime/Cargo.toml +++ b/ethexe/runtime/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-runtime" +name = "ethexe-runtime" version.workspace = true authors.workspace = true edition.workspace = true @@ -9,7 +9,7 @@ repository.workspace = true [dependencies] ## Gear deps. -hypercore-runtime-common.workspace = true +ethexe-runtime-common.workspace = true core-processor.workspace = true gear-core.workspace = true gear-lazy-pages-interface.workspace = true diff --git a/hypercore/runtime/build.rs b/ethexe/runtime/build.rs similarity index 100% rename from hypercore/runtime/build.rs rename to ethexe/runtime/build.rs diff --git a/hypercore/runtime/common/Cargo.toml b/ethexe/runtime/common/Cargo.toml similarity index 93% rename from hypercore/runtime/common/Cargo.toml rename to ethexe/runtime/common/Cargo.toml index e7e3c28a029..9efd4d8b8c7 100644 --- a/hypercore/runtime/common/Cargo.toml +++ b/ethexe/runtime/common/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-runtime-common" +name = "ethexe-runtime-common" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/hypercore/runtime/common/src/journal.rs b/ethexe/runtime/common/src/journal.rs similarity index 100% rename from hypercore/runtime/common/src/journal.rs rename to ethexe/runtime/common/src/journal.rs diff --git a/hypercore/runtime/common/src/lib.rs b/ethexe/runtime/common/src/lib.rs similarity index 100% rename from hypercore/runtime/common/src/lib.rs rename to ethexe/runtime/common/src/lib.rs diff --git a/hypercore/runtime/common/src/state.rs b/ethexe/runtime/common/src/state.rs similarity index 99% rename from hypercore/runtime/common/src/state.rs rename to ethexe/runtime/common/src/state.rs index 7a0e81c1dd3..5bd1cdc217d 100644 --- a/hypercore/runtime/common/src/state.rs +++ b/ethexe/runtime/common/src/state.rs @@ -98,7 +98,7 @@ pub enum Program { Terminated(ProgramId), } -/// Hypercore program state. +/// ethexe program state. #[derive(Clone, Debug, Decode, Encode)] pub struct ProgramState { /// Active, exited or terminated program state. diff --git a/hypercore/runtime/src/lib.rs b/ethexe/runtime/src/lib.rs similarity index 100% rename from hypercore/runtime/src/lib.rs rename to ethexe/runtime/src/lib.rs diff --git a/hypercore/runtime/src/wasm/api/instrument.rs b/ethexe/runtime/src/wasm/api/instrument.rs similarity index 100% rename from hypercore/runtime/src/wasm/api/instrument.rs rename to ethexe/runtime/src/wasm/api/instrument.rs diff --git a/hypercore/runtime/src/wasm/api/mod.rs b/ethexe/runtime/src/wasm/api/mod.rs similarity index 100% rename from hypercore/runtime/src/wasm/api/mod.rs rename to ethexe/runtime/src/wasm/api/mod.rs diff --git a/hypercore/runtime/src/wasm/api/run.rs b/ethexe/runtime/src/wasm/api/run.rs similarity index 92% rename from hypercore/runtime/src/wasm/api/run.rs rename to ethexe/runtime/src/wasm/api/run.rs index 371d2c84d77..9efe65882c7 100644 --- a/hypercore/runtime/src/wasm/api/run.rs +++ b/ethexe/runtime/src/wasm/api/run.rs @@ -22,9 +22,9 @@ use crate::wasm::{ }; use alloc::vec::Vec; use core_processor::{common::JournalNote, configs::BlockInfo}; +use ethexe_runtime_common::{process_next_message, state::Storage, RuntimeInterface}; use gear_core::{code::InstrumentedCode, ids::ProgramId}; use gprimitives::{CodeId, H256}; -use hypercore_runtime_common::{process_next_message, state::Storage, RuntimeInterface}; pub fn wake_messages(program_id: ProgramId, state_hash: H256) -> H256 { log::info!("You're calling 'wake_messages(..)'"); @@ -41,7 +41,7 @@ pub fn wake_messages(program_id: ProgramId, state_hash: H256) -> H256 { let program_state = ri.storage().read_state(state_hash).unwrap(); - hypercore_runtime_common::wake_messages(program_id, program_state, &ri).unwrap_or(state_hash) + ethexe_runtime_common::wake_messages(program_id, program_state, &ri).unwrap_or(state_hash) } pub fn run( diff --git a/hypercore/runtime/src/wasm/interface/allocator.rs b/ethexe/runtime/src/wasm/interface/allocator.rs similarity index 100% rename from hypercore/runtime/src/wasm/interface/allocator.rs rename to ethexe/runtime/src/wasm/interface/allocator.rs diff --git a/hypercore/runtime/src/wasm/interface/database.rs b/ethexe/runtime/src/wasm/interface/database.rs similarity index 100% rename from hypercore/runtime/src/wasm/interface/database.rs rename to ethexe/runtime/src/wasm/interface/database.rs diff --git a/hypercore/runtime/src/wasm/interface/logging.rs b/ethexe/runtime/src/wasm/interface/logging.rs similarity index 100% rename from hypercore/runtime/src/wasm/interface/logging.rs rename to ethexe/runtime/src/wasm/interface/logging.rs diff --git a/hypercore/runtime/src/wasm/interface/mod.rs b/ethexe/runtime/src/wasm/interface/mod.rs similarity index 100% rename from hypercore/runtime/src/wasm/interface/mod.rs rename to ethexe/runtime/src/wasm/interface/mod.rs diff --git a/hypercore/runtime/src/wasm/storage.rs b/ethexe/runtime/src/wasm/storage.rs similarity index 99% rename from hypercore/runtime/src/wasm/storage.rs rename to ethexe/runtime/src/wasm/storage.rs index b4937fe131b..20c56d905c3 100644 --- a/hypercore/runtime/src/wasm/storage.rs +++ b/ethexe/runtime/src/wasm/storage.rs @@ -19,15 +19,15 @@ use super::interface::database_ri; use alloc::{collections::BTreeMap, vec::Vec}; use core_processor::configs::BlockInfo; +use ethexe_runtime_common::{ + state::{Allocations, MemoryPages, MessageQueue, ProgramState, Storage, Waitlist}, + RuntimeInterface, +}; use gear_core::{ memory::PageBuf, message::Payload, pages::GearPage, reservation::GasReservationMap, }; use gear_lazy_pages_interface::{LazyPagesInterface, LazyPagesRuntimeInterface}; use gprimitives::H256; -use hypercore_runtime_common::{ - state::{Allocations, MemoryPages, MessageQueue, ProgramState, Storage, Waitlist}, - RuntimeInterface, -}; #[derive(Debug, Clone)] pub struct RuntimeInterfaceStorage; diff --git a/hypercore/sequencer/Cargo.toml b/ethexe/sequencer/Cargo.toml similarity index 71% rename from hypercore/sequencer/Cargo.toml rename to ethexe/sequencer/Cargo.toml index 83b2454f109..2a1bdd6d6a4 100644 --- a/hypercore/sequencer/Cargo.toml +++ b/ethexe/sequencer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-sequencer" +name = "ethexe-sequencer" version.workspace = true authors.workspace = true edition.workspace = true @@ -10,11 +10,11 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-signer.workspace = true -hypercore-observer.workspace = true -hypercore-processor.workspace = true -hypercore-ethereum.workspace = true -hypercore-common.workspace = true +ethexe-signer.workspace = true +ethexe-observer.workspace = true +ethexe-processor.workspace = true +ethexe-ethereum.workspace = true +ethexe-common.workspace = true gear-core.workspace = true gprimitives = { workspace = true, features = ["codec"] } diff --git a/hypercore/sequencer/src/agro.rs b/ethexe/sequencer/src/agro.rs similarity index 97% rename from hypercore/sequencer/src/agro.rs rename to ethexe/sequencer/src/agro.rs index 1ea76fe5aca..2b7b0b41ef4 100644 --- a/hypercore/sequencer/src/agro.rs +++ b/ethexe/sequencer/src/agro.rs @@ -19,9 +19,9 @@ //! Abstract commitment aggregator. use anyhow::Result; +use ethexe_common::{BlockCommitment, CodeCommitment, OutgoingMessage, StateTransition}; +use ethexe_signer::{hash, Address, PublicKey, Signature, Signer}; use gprimitives::{MessageId, H256}; -use hypercore_common::{BlockCommitment, CodeCommitment, OutgoingMessage, StateTransition}; -use hypercore_signer::{hash, Address, PublicKey, Signature, Signer}; use parity_scale_codec::{Decode, Encode}; use std::{ collections::{HashMap, HashSet}, @@ -50,7 +50,7 @@ pub struct AggregatedQueue { last: H256, } -// TODO: REMOVE THIS IMPL. SeqHash makes sense only for `hypercore_ethereum` types. +// TODO: REMOVE THIS IMPL. SeqHash makes sense only for `ethexe_ethereum` types. // identity hashing impl SeqHash for CodeCommitment { fn hash(&self) -> H256 { @@ -58,7 +58,7 @@ impl SeqHash for CodeCommitment { } } -// TODO: REMOVE THIS IMPL. SeqHash makes sense only for `hypercore_ethereum` types. +// TODO: REMOVE THIS IMPL. SeqHash makes sense only for `ethexe_ethereum` types. impl SeqHash for StateTransition { fn hash(&self) -> H256 { let mut outgoing_bytes = @@ -328,8 +328,8 @@ impl Aggregator { mod tests { use super::*; + use ethexe_signer::{Address, Signature}; use gear_core::ids::ActorId; - use hypercore_signer::{Address, Signature}; #[derive(Clone, Debug)] pub struct MyComm([u8; 2]); diff --git a/hypercore/sequencer/src/lib.rs b/ethexe/sequencer/src/lib.rs similarity index 97% rename from hypercore/sequencer/src/lib.rs rename to ethexe/sequencer/src/lib.rs index 48d3bb32f69..56567b38686 100644 --- a/hypercore/sequencer/src/lib.rs +++ b/ethexe/sequencer/src/lib.rs @@ -16,16 +16,16 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Sequencer for hypercore. +//! Sequencer for ethexe. mod agro; use agro::{Aggregator, MultisignedCommitments}; use anyhow::Result; -use hypercore_common::{BlockCommitment, CodeCommitment}; -use hypercore_ethereum::Ethereum; -use hypercore_observer::Event; -use hypercore_signer::{Address, PublicKey, Signer}; +use ethexe_common::{BlockCommitment, CodeCommitment}; +use ethexe_ethereum::Ethereum; +use ethexe_observer::Event; +use ethexe_signer::{Address, PublicKey, Signer}; use std::mem; use tokio::sync::watch; diff --git a/hypercore/signer/Cargo.toml b/ethexe/signer/Cargo.toml similarity index 92% rename from hypercore/signer/Cargo.toml rename to ethexe/signer/Cargo.toml index 93c07910946..5de814f625a 100644 --- a/hypercore/signer/Cargo.toml +++ b/ethexe/signer/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-signer" +name = "ethexe-signer" version.workspace = true authors.workspace = true edition.workspace = true @@ -10,7 +10,7 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-common.workspace = true +ethexe-common.workspace = true gprimitives = { workspace = true, features = ["codec"] } anyhow.workspace = true diff --git a/hypercore/signer/src/lib.rs b/ethexe/signer/src/lib.rs similarity index 99% rename from hypercore/signer/src/lib.rs rename to ethexe/signer/src/lib.rs index 52912282385..e388a4bad24 100644 --- a/hypercore/signer/src/lib.rs +++ b/ethexe/signer/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Signer library for hypercore. +//! Signer library for ethexe. use anyhow::{anyhow, Context as _, Result}; use parity_scale_codec::{Decode, Encode}; diff --git a/hypercore/utils/Cargo.toml b/ethexe/utils/Cargo.toml similarity index 95% rename from hypercore/utils/Cargo.toml rename to ethexe/utils/Cargo.toml index 61cc9409722..214ca999967 100644 --- a/hypercore/utils/Cargo.toml +++ b/ethexe/utils/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-utils" +name = "ethexe-utils" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/hypercore/utils/prometheus/Cargo.toml b/ethexe/utils/prometheus/Cargo.toml similarity index 95% rename from hypercore/utils/prometheus/Cargo.toml rename to ethexe/utils/prometheus/Cargo.toml index 7452f5bca0d..8962fc9ace5 100644 --- a/hypercore/utils/prometheus/Cargo.toml +++ b/ethexe/utils/prometheus/Cargo.toml @@ -1,6 +1,6 @@ [package] description = "Endpoint to expose Prometheus metrics" -name = "hypercore-prometheus-endpoint" +name = "ethexe-prometheus-endpoint" version.workspace = true authors.workspace = true edition.workspace = true diff --git a/hypercore/utils/prometheus/src/lib.rs b/ethexe/utils/prometheus/src/lib.rs similarity index 100% rename from hypercore/utils/prometheus/src/lib.rs rename to ethexe/utils/prometheus/src/lib.rs diff --git a/hypercore/utils/prometheus/src/sourced.rs b/ethexe/utils/prometheus/src/sourced.rs similarity index 100% rename from hypercore/utils/prometheus/src/sourced.rs rename to ethexe/utils/prometheus/src/sourced.rs diff --git a/hypercore/utils/src/lib.rs b/ethexe/utils/src/lib.rs similarity index 97% rename from hypercore/utils/src/lib.rs rename to ethexe/utils/src/lib.rs index fe868063ee0..7a7353a2901 100644 --- a/hypercore/utils/src/lib.rs +++ b/ethexe/utils/src/lib.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -//! Utilities Primitives for Hypercore +//! Utilities Primitives for ethexe //! //! This crate provides `mpsc::tracing_unbounded` function that returns wrapper types to //! `async_channel::Sender` and `async_channel::Receiver`, which register every diff --git a/hypercore/utils/src/metrics.rs b/ethexe/utils/src/metrics.rs similarity index 95% rename from hypercore/utils/src/metrics.rs rename to ethexe/utils/src/metrics.rs index b5d6d1d583d..142efc7d106 100644 --- a/hypercore/utils/src/metrics.rs +++ b/ethexe/utils/src/metrics.rs @@ -29,14 +29,14 @@ use prometheus::{ lazy_static! { pub static ref UNBOUNDED_CHANNELS_COUNTER: GenericCounterVec = GenericCounterVec::new( Opts::new( - "hypercore_unbounded_channel_len", + "ethexe_unbounded_channel_len", "Items sent/received/dropped on each mpsc::unbounded instance" ), &["entity", "action"], // name of channel, send|received|dropped ).expect("Creating of statics doesn't fail. qed"); pub static ref UNBOUNDED_CHANNELS_SIZE: GenericGaugeVec = GenericGaugeVec::new( Opts::new( - "hypercore_unbounded_channel_size", + "ethexe_unbounded_channel_size", "Size (number of messages to be processed) of each mpsc::unbounded instance", ), &["entity"], // name of channel diff --git a/hypercore/utils/src/mpsc.rs b/ethexe/utils/src/mpsc.rs similarity index 100% rename from hypercore/utils/src/mpsc.rs rename to ethexe/utils/src/mpsc.rs diff --git a/hypercore/validator/Cargo.toml b/ethexe/validator/Cargo.toml similarity index 74% rename from hypercore/validator/Cargo.toml rename to ethexe/validator/Cargo.toml index e3884d7bf5b..d541bc536de 100644 --- a/hypercore/validator/Cargo.toml +++ b/ethexe/validator/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hypercore-validator" +name = "ethexe-validator" version.workspace = true authors.workspace = true edition.workspace = true @@ -10,10 +10,10 @@ repository.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -hypercore-network.workspace = true -hypercore-signer.workspace = true -hypercore-sequencer.workspace = true -hypercore-common.workspace = true +ethexe-network.workspace = true +ethexe-signer.workspace = true +ethexe-sequencer.workspace = true +ethexe-common.workspace = true gprimitives.workspace = true log.workspace = true diff --git a/hypercore/validator/src/lib.rs b/ethexe/validator/src/lib.rs similarity index 94% rename from hypercore/validator/src/lib.rs rename to ethexe/validator/src/lib.rs index 06245960f32..59bb85b3831 100644 --- a/hypercore/validator/src/lib.rs +++ b/ethexe/validator/src/lib.rs @@ -17,10 +17,10 @@ // along with this program. If not, see . use anyhow::Result; -use hypercore_common::{BlockCommitment, CodeCommitment}; -use hypercore_network::service::NetworkGossip; -use hypercore_sequencer::AggregatedCommitments; -use hypercore_signer::{Address, PublicKey, Signer}; +use ethexe_common::{BlockCommitment, CodeCommitment}; +use ethexe_network::service::NetworkGossip; +use ethexe_sequencer::AggregatedCommitments; +use ethexe_signer::{Address, PublicKey, Signer}; use parity_scale_codec::Encode; use std::sync::Arc; diff --git a/hypercore/contracts/lib/openzeppelin-contracts b/hypercore/contracts/lib/openzeppelin-contracts deleted file mode 160000 index 337bfd5ea4d..00000000000 --- a/hypercore/contracts/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 337bfd5ea4df9f7ebc755cd3cb4ecb3bd3d33fc7 diff --git a/hypercore/contracts/lib/openzeppelin-contracts-upgradeable b/hypercore/contracts/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index 723f8cab09c..00000000000 --- a/hypercore/contracts/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1