From 5bc18b7c471675f6da10ce6b1c224ad2b65d9956 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 11 Oct 2024 16:02:18 +0200 Subject: [PATCH] chore: odyssey (#1) --- .config/nextest.toml | 4 +- .dockerignore | 2 +- .github/workflows/docker.yml | 6 +- .github/workflows/lint.yml | 4 +- Cargo.lock | 395 ++++++++++-------- Cargo.toml | 14 +- Dockerfile | 14 +- Dockerfile.cross | 8 +- Makefile | 8 +- README.md | 94 ++--- bin/{alphanet => odyssey}/Cargo.toml | 12 +- bin/{alphanet => odyssey}/src/main.rs | 18 +- crates/node/Cargo.toml | 4 +- crates/node/src/chainspec.rs | 42 +- crates/node/src/evm.rs | 22 +- crates/node/src/lib.rs | 12 +- crates/node/src/node.rs | 66 +-- crates/precompile/Cargo.toml | 2 +- crates/precompile/src/lib.rs | 6 +- crates/precompile/src/secp256r1.rs | 8 +- crates/testing/Cargo.toml | 4 +- crates/testing/src/lib.rs | 2 +- crates/wallet/Cargo.toml | 2 +- crates/wallet/src/lib.rs | 52 +-- etc/kurtosis.yaml | 2 +- ...anet-genesis.json => odyssey-genesis.json} | 0 ...phanet-rollup.json => odyssey-rollup.json} | 0 27 files changed, 426 insertions(+), 377 deletions(-) rename bin/{alphanet => odyssey}/Cargo.toml (80%) rename bin/{alphanet => odyssey}/src/main.rs (88%) rename etc/{alphanet-genesis.json => odyssey-genesis.json} (100%) rename etc/{alphanet-rollup.json => odyssey-rollup.json} (100%) diff --git a/.config/nextest.toml b/.config/nextest.toml index 3d19210..7d3b97a 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -2,5 +2,5 @@ serial-integration = { max-threads = 1 } [[profile.default.overrides]] -filter = 'package(alphanet-testing)' -test-group = 'serial-integration' \ No newline at end of file +filter = 'package(odyssey-testing)' +test-group = 'serial-integration' diff --git a/.dockerignore b/.dockerignore index 07cc54f..684ac6a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,7 +20,7 @@ !/dist # include L2 genesis files -!/etc/alphanet-genesis.json +!/etc/odyssey-genesis.json !/etc/dev-genesis.json # include example files diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8ad01e8..3f5c80b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -9,10 +9,10 @@ on: - v* env: - REPO_NAME: ${{ github.repository_owner }}/alphanet - IMAGE_NAME: ${{ github.repository_owner }}/alphanet + REPO_NAME: ${{ github.repository_owner }}/odyssey + IMAGE_NAME: ${{ github.repository_owner }}/odyssey CARGO_TERM_COLOR: always - DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/alphanet + DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/odyssey DOCKER_USERNAME: ${{ github.actor }} jobs: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 24ffe24..f8305d3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - - run: cargo clippy --bin alphanet --workspace --features "asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs" + - run: cargo clippy --bin odyssey --workspace --features "asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs" env: RUSTFLAGS: -D warnings @@ -62,7 +62,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: cache-on-failure: true - - run: cargo build --bin alphanet --workspace + - run: cargo build --bin odyssey --workspace env: RUSTFLAGS: -D warnings diff --git a/Cargo.lock b/Cargo.lock index 73c1a7d..1c60ab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -117,10 +117,11 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94c225801d42099570d0674701dddd4142f0ef715282aeb5985042e2ec962df7" +checksum = "c54e2fbc026948a0f638bf6a94fc0ce6e44652280fed40bb0dd970e3357bc5f2" dependencies = [ + "alloy-primitives", "alloy-rlp", "num_enum", "serde", @@ -167,9 +168,9 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce854562e7cafd5049189d0268d6e5cba05fe6c9cb7c6f8126a79b94800629c" +checksum = "eeb750349efda145ca6aada68d0336067f7f364d7d44ef09e2cf000b040c5e99" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -180,9 +181,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b499852e1d0e9b8c6db0f24c48998e647c0d5762a01090f955106a7700e4611" +checksum = "f95d76a38cae906fd394a5afb0736aaceee5432efe76addfd71048e623e208af" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -256,9 +257,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a438d4486b5d525df3b3004188f9d5cd1d65cd30ecc41e5a3ccef6f6342e8af9" +checksum = "03c66eec1acdd96b39b995b8f5ee5239bc0c871d62c527ae1ac9fd1d7fecd455" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -631,9 +632,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e7f6e8fe5b443f82b3f1e15abfa191128f71569148428e49449d01f6f49e8b" +checksum = "661c516eb1fa3294cc7f2fb8955b3b609d639c282ac81a4eedb14d3046db503a" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -645,9 +646,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b96ce28d2fde09abb6135f410c41fad670a3a770b6776869bd852f1df102e6f" +checksum = "ecbabb8fc3d75a0c2cea5215be22e7a267e3efde835b0f2a8922f5e3f5d47683" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -664,9 +665,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906746396a8296537745711630d9185746c0b50c033d5e9d18b0a6eba3d53f90" +checksum = "16517f2af03064485150d89746b8ffdcdbc9b6eeb3d536fb66efd7c2846fbc75" dependencies = [ "alloy-json-abi", "const-hex", @@ -681,9 +682,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc85178909a49c8827ffccfc9103a7ce1767ae66a801b69bdc326913870bf8e6" +checksum = "c07ebb0c1674ff8cbb08378d7c2e0e27919d2a2dae07ad3bca26174deda8d389" dependencies = [ "serde", "winnow", @@ -691,9 +692,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a533ce22525969661b25dfe296c112d35eb6861f188fd284f8bd4bb3842ae" +checksum = "8e448d879903624863f608c552d10efb0e0905ddbee98b0049412799911eb062" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -769,100 +770,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "alphanet" -version = "0.0.0" -dependencies = [ - "alloy-network", - "alloy-primitives", - "alloy-signer-local", - "alphanet-node", - "alphanet-wallet", - "clap", - "eyre", - "reth-cli-util", - "reth-node-builder", - "reth-optimism-cli", - "reth-optimism-node", - "reth-optimism-rpc", - "reth-provider", - "tracing", -] - -[[package]] -name = "alphanet-node" -version = "0.0.0" -dependencies = [ - "alloy-primitives", - "alphanet-precompile", - "eyre", - "once_cell", - "reth-chainspec", - "reth-cli", - "reth-network", - "reth-network-types", - "reth-node-api", - "reth-node-builder", - "reth-optimism-chainspec", - "reth-optimism-forks", - "reth-optimism-node", - "reth-payload-builder", - "reth-primitives", - "reth-revm", - "reth-transaction-pool", - "serde_json", -] - -[[package]] -name = "alphanet-precompile" -version = "0.0.0" -dependencies = [ - "alloy-primitives", - "eyre", - "p256", - "reth-node-api", - "reth-primitives", - "reth-revm", - "rstest", -] - -[[package]] -name = "alphanet-testing" -version = "0.0.0" -dependencies = [ - "alloy", - "alloy-network", - "alloy-signer-local", - "alphanet-node", - "once_cell", - "reth", - "reth-node-builder", - "reth-node-core", - "reth-primitives", - "reth-tracing", - "tokio", - "url", -] - -[[package]] -name = "alphanet-wallet" -version = "0.0.0" -dependencies = [ - "alloy-network", - "alloy-primitives", - "alloy-rpc-types", - "jsonrpsee", - "reth-primitives", - "reth-revm", - "reth-rpc-eth-api", - "reth-storage-api", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", -] - [[package]] name = "android-tzdata" version = "0.1.1" @@ -1100,9 +1007,9 @@ checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" [[package]] name = "async-compression" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e614738943d3f68c628ae3dbce7c3daffb196665f82f8c8ea6b65de73c79429" +checksum = "998282f8f49ccd6116b0ed8a4de0fbd3151697920e7c7533416d6e25e76434a7" dependencies = [ "brotli", "flate2", @@ -1575,9 +1482,9 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", @@ -1663,9 +1570,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.25" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d9e0b4957f635b8d3da819d0db5603620467ecf1f692d22a8c2717ce27e6d8" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ "jobserver", "libc", @@ -1731,9 +1638,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8" dependencies = [ "clap_builder", "clap_derive", @@ -1741,9 +1648,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54" dependencies = [ "anstream", "anstyle", @@ -2966,6 +2873,8 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" dependencies = [ + "allocator-api2", + "equivalent", "foldhash", "serde", ] @@ -3623,18 +3532,18 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126b48a5acc3c52fbd5381a77898cb60e145123179588a29e7ac48f9c06e401b" +checksum = "02f01f48e04e0d7da72280ab787c9943695699c9b32b99158ece105e8ad0afea" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3650,9 +3559,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf679a8e0e083c77997f7c4bb4ca826577105906027ae462aac70ff348d02c6a" +checksum = "d80eccbd47a7b9f1e67663fd846928e941cb49c65236e297dd11c9ea3c5e3387" dependencies = [ "base64 0.22.1", "futures-channel", @@ -3675,9 +3584,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0e503369a76e195b65af35058add0e6900b794a4e9a9316900ddd3a87a80477" +checksum = "3c2709a32915d816a6e8f625bf72cf74523ebe5d8829f895d6b041b1d3137818" dependencies = [ "async-trait", "bytes", @@ -3702,9 +3611,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c0caba4a6a8efbafeec9baa986aa22a75a96c29d3e4b0091b0098d6470efb5" +checksum = "cc54db939002b030e794fbfc9d5a925aa2854889c5a2f0352b0bffa54681707e" dependencies = [ "async-trait", "base64 0.22.1", @@ -3727,9 +3636,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc660a9389e2748e794a40673a4155d501f32db667757cdb80edeff0306b489b" +checksum = "3a9a4b2eaba8cc928f49c4ccf4fcfa65b690a73997682da99ed08f3393b51f07" dependencies = [ "heck", "proc-macro-crate", @@ -3740,9 +3649,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6e6c9b6d975edcb443565d648b605f3e85a04ec63aa6941811a8894cc9cded" +checksum = "e30110d0f2d7866c8cc6c86483bdab2eb9f4d2f0e20db55518b2bca84651ba8e" dependencies = [ "futures-util", "http", @@ -3767,9 +3676,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8fb16314327cbc94fdf7965ef7e4422509cd5597f76d137bd104eb34aeede67" +checksum = "1ca331cd7b3fe95b33432825c2d4c9f5a43963e207fdc01ae67f9fd80ab0930f" dependencies = [ "http", "serde", @@ -3779,9 +3688,9 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0da62b43702bd5640ea305d35df95da30abc878e79a7b4b01feda3beaf35d3c" +checksum = "5c603d97578071dc44d79d3cfaf0775437638fd5adc33c6b622dfe4fa2ec812d" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", @@ -3790,9 +3699,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.24.5" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39aabf5d6c6f22da8d5b808eea1fab0736059f11fb42f71f141b14f404e5046a" +checksum = "755ca3da1c67671f1fae01cd1a47f41dfb2233a8f19a643e587ab0a663942044" dependencies = [ "http", "jsonrpsee-client-transport", @@ -3936,9 +3845,9 @@ dependencies = [ [[package]] name = "libproc" -version = "0.14.9" +version = "0.14.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cca3586d5efa98fba425856ba227950fd4287525dd5317b352f476ca7d603b" +checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" dependencies = [ "bindgen", "errno", @@ -4049,11 +3958,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -4157,17 +4066,18 @@ dependencies = [ [[package]] name = "metrics-process" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb524e5438255eaa8aa74214d5a62713b77b2c3c6e3c0bbeee65cfd9a58948ba" +checksum = "48e9ed6b48279656a738d38d832440bd59c349cd178a21ff46276a4a86f15f60" dependencies = [ + "libc", "libproc", "mach2", "metrics", "once_cell", "procfs", "rlimit", - "windows", + "windows 0.58.0", ] [[package]] @@ -4515,6 +4425,100 @@ dependencies = [ "memchr", ] +[[package]] +name = "odyssey" +version = "0.0.0" +dependencies = [ + "alloy-network", + "alloy-primitives", + "alloy-signer-local", + "clap", + "eyre", + "odyssey-node", + "odyssey-wallet", + "reth-cli-util", + "reth-node-builder", + "reth-optimism-cli", + "reth-optimism-node", + "reth-optimism-rpc", + "reth-provider", + "tracing", +] + +[[package]] +name = "odyssey-node" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "eyre", + "odyssey-precompile", + "once_cell", + "reth-chainspec", + "reth-cli", + "reth-network", + "reth-network-types", + "reth-node-api", + "reth-node-builder", + "reth-optimism-chainspec", + "reth-optimism-forks", + "reth-optimism-node", + "reth-payload-builder", + "reth-primitives", + "reth-revm", + "reth-transaction-pool", + "serde_json", +] + +[[package]] +name = "odyssey-precompile" +version = "0.0.0" +dependencies = [ + "alloy-primitives", + "eyre", + "p256", + "reth-node-api", + "reth-primitives", + "reth-revm", + "rstest", +] + +[[package]] +name = "odyssey-testing" +version = "0.0.0" +dependencies = [ + "alloy", + "alloy-network", + "alloy-signer-local", + "odyssey-node", + "once_cell", + "reth", + "reth-node-builder", + "reth-node-core", + "reth-primitives", + "reth-tracing", + "tokio", + "url", +] + +[[package]] +name = "odyssey-wallet" +version = "0.0.0" +dependencies = [ + "alloy-network", + "alloy-primitives", + "alloy-rpc-types", + "jsonrpsee", + "reth-primitives", + "reth-revm", + "reth-rpc-eth-api", + "reth-storage-api", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "once_cell" version = "1.20.2" @@ -5052,9 +5056,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] @@ -8474,9 +8478,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ "windows-sys 0.59.0", ] @@ -9017,9 +9021,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab661c8148c2261222a4d641ad5477fd4bea79406a99056096a0b41b35617a5" +checksum = "20e7b52ad118b2153644eea95c6fc740b6c1555b2344fdab763fc9de4075f665" dependencies = [ "paste", "proc-macro2", @@ -9063,7 +9067,7 @@ dependencies = [ "libc", "memchr", "ntapi", - "windows", + "windows 0.57.0", ] [[package]] @@ -9875,9 +9879,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -9886,9 +9890,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -9901,9 +9905,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -9913,9 +9917,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9923,9 +9927,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -9936,15 +9940,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -10006,6 +10010,16 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +dependencies = [ + "windows-core 0.58.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -10021,12 +10035,25 @@ version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.57.0", + "windows-interface 0.57.0", "windows-result 0.1.2", "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement 0.58.0", + "windows-interface 0.58.0", + "windows-result 0.2.0", + "windows-strings", + "windows-targets 0.52.6", +] + [[package]] name = "windows-implement" version = "0.57.0" @@ -10038,6 +10065,17 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "windows-implement" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "windows-interface" version = "0.57.0" @@ -10049,6 +10087,17 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "windows-interface" +version = "0.58.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "windows-registry" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 02c4f44..67c38bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [workspace] members = [ - "bin/alphanet/", + "bin/odyssey/", "crates/node", "crates/precompile", "crates/testing", "crates/wallet", ] -default-members = ["bin/alphanet/"] +default-members = ["bin/odyssey/"] resolver = "2" [workspace.package] @@ -15,7 +15,7 @@ edition = "2021" rust-version = "1.81" authors = [] license = "MIT OR Apache-2.0" -repository = "https://github.com/paradigmxyz/alphanet" +repository = "https://github.com/ithacaxyz/odyssey" keywords = ["ethereum", "crypto"] categories = ["cryptography", "cryptography::cryptocurrencies"] @@ -54,10 +54,10 @@ debug = 2 strip = false [workspace.dependencies] -# alphanet -alphanet-node = { path = "crates/node" } -alphanet-precompile = { path = "crates/precompile" } -alphanet-wallet = { path = "crates/wallet" } +# odyssey +odyssey-node = { path = "crates/node" } +odyssey-precompile = { path = "crates/precompile" } +odyssey-wallet = { path = "crates/wallet" } alloy = { version = "0.4", features = [ "contract", diff --git a/Dockerfile b/Dockerfile index 0d8ed16..a99edf7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef WORKDIR /app -LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/alphanet +LABEL org.opencontainers.image.source=https://github.com/ithacaxyz/odyssey LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0" # Builds a cargo-chef plan @@ -28,25 +28,25 @@ RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json # Build application COPY . . -RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin alphanet +RUN cargo build --profile $BUILD_PROFILE --features "$FEATURES" --locked --bin odyssey # ARG is not resolved in COPY so we have to hack around it by copying the # binary to a temporary location -RUN cp /app/target/$BUILD_PROFILE/alphanet /app/alphanet +RUN cp /app/target/$BUILD_PROFILE/odyssey /app/odyssey # Use Ubuntu as the release image FROM ubuntu AS runtime WORKDIR /app -# Copy alphanet over from the build stage -COPY --from=builder /app/alphanet /usr/local/bin +# Copy odyssey over from the build stage +COPY --from=builder /app/odyssey /usr/local/bin # Copy licenses COPY LICENSE-* ./ # Copy the genesis files ADD etc/dev-genesis.json ./etc/dev-genesis.json -ADD etc/alphanet-genesis.json ./etc/alphanet-genesis.json +ADD etc/odyssey-genesis.json ./etc/odyssey-genesis.json EXPOSE 30303 30303/udp 9001 8545 9000 8546 -ENTRYPOINT ["/usr/local/bin/alphanet"] +ENTRYPOINT ["/usr/local/bin/odyssey"] diff --git a/Dockerfile.cross b/Dockerfile.cross index 3cc1aa1..92e7c55 100644 --- a/Dockerfile.cross +++ b/Dockerfile.cross @@ -3,14 +3,14 @@ # locatable in `./dist/bin/$TARGETARCH` FROM --platform=$TARGETPLATFORM ubuntu:22.04 -LABEL org.opencontainers.image.source=https://github.com/paradigmxyz/alphanet +LABEL org.opencontainers.image.source=https://github.com/ithacaxyz/odyssey LABEL org.opencontainers.image.licenses="MIT OR Apache-2.0" # Filled by docker buildx ARG TARGETARCH -COPY ./dist/bin/$TARGETARCH/alphanet /usr/local/bin/alphanet -ADD ./etc/alphanet-genesis.json /etc/alphanet-genesis.json +COPY ./dist/bin/$TARGETARCH/odyssey /usr/local/bin/odyssey +ADD ./etc/odyssey-genesis.json /etc/odyssey-genesis.json EXPOSE 30303 30303/udp 9001 8545 8546 9000 -ENTRYPOINT ["/usr/local/bin/alphanet", "--chain", "/etc/alphanet-genesis.json"] +ENTRYPOINT ["/usr/local/bin/odyssey", "--chain", "/etc/odyssey-genesis.json"] diff --git a/Makefile b/Makefile index 796e9b1..0f87ba4 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ BIN_DIR = "dist/bin" PROFILE ?= release # The docker image name -DOCKER_IMAGE_NAME ?= ghcr.io/paradigmxyz/alphanet +DOCKER_IMAGE_NAME ?= ghcr.io/ithacaxyz/odyssey BUILD_PATH = "target" @@ -90,7 +90,7 @@ build-x86_64-pc-windows-gnu: FEATURES := $(filter-out jemalloc jemalloc-prof,$(F # See: https://github.com/cross-rs/cross/wiki/FAQ#undefined-reference-with-build-std build-%: RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \ - cross build --bin alphanet --target $* --features "$(FEATURES)" --profile "$(PROFILE)" + cross build --bin odyssey --target $* --features "$(FEATURES)" --profile "$(PROFILE)" # Unfortunately we can't easily use cross to build for Darwin because of licensing issues. # If we wanted to, we would need to build a custom Docker image with the SDK available. @@ -133,11 +133,11 @@ docker-build-push-nightly: ## Build and push cross-arch Docker image tagged with define docker_build_push $(MAKE) build-x86_64-unknown-linux-gnu mkdir -p $(BIN_DIR)/amd64 - cp $(BUILD_PATH)/x86_64-unknown-linux-gnu/$(PROFILE)/alphanet $(BIN_DIR)/amd64/alphanet + cp $(BUILD_PATH)/x86_64-unknown-linux-gnu/$(PROFILE)/odyssey $(BIN_DIR)/amd64/odyssey $(MAKE) build-aarch64-unknown-linux-gnu mkdir -p $(BIN_DIR)/arm64 - cp $(BUILD_PATH)/aarch64-unknown-linux-gnu/$(PROFILE)/alphanet $(BIN_DIR)/arm64/alphanet + cp $(BUILD_PATH)/aarch64-unknown-linux-gnu/$(PROFILE)/odyssey $(BIN_DIR)/arm64/odyssey docker buildx build --file ./Dockerfile.cross . \ --platform linux/amd64,linux/arm64 \ diff --git a/README.md b/README.md index 63142f4..dda2e2a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# alphanet +# Odyssey @@ -6,67 +6,67 @@ [![Apache-2.0 License][apache-badge]][apache-url] [![CI Status][actions-badge]][actions-url] -## What is Reth AlphaNet? +## What is Odyssey? -Reth AlphaNet is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge Ethereum Research. -AlphaNet is __not__ a fork of reth. -AlphaNet implements traits provided by the [reth node builder API](https://paradigmxyz.github.io/reth/docs/reth_node_builder/index.html), allowing implementation of precompiles and instructions of experimental EIPs without forking the node. +Odyssey is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge Ethereum Research. +Odyssey is __not__ a fork of reth. +Odyssey implements traits provided by the [reth node builder API](https://paradigmxyz.github.io/reth/docs/reth_node_builder/index.html), allowing implementation of precompiles and instructions of experimental EIPs without forking the node. -Specifically, AlphaNet currently implements the following EIPs: +Specifically, Odyssey currently implements the following EIPs: - [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702): Set EOA account code. - [EIP-7212](https://eips.ethereum.org/EIPS/eip-7212): Precompile for secp256r1 curve support. - [EIP-2537](https://eips.ethereum.org/EIPS/eip-2537): Precompiles for BLS12-381 curve operations. -AlphaNet also implements the EIPs for EOF, or [The EVM Object Format](https://evmobjectformat.org/). +Odyssey also implements the EIPs for EOF, or [The EVM Object Format](https://evmobjectformat.org/). -### Why AlphaNet? +### Why Odyssey? -AlphaNet has 2 goals: -1. Showcase Reth's performance at the extremes. We intend to launch a hosted version of AlphaNet on [Conduit](https://conduit.xyz/), targeting 50mgas/s, and eventually ramping up to 1ggas/s and beyond. In the process we hope to hit the state growth performance bottleneck, and discover ways to solve it. If our hosted chains end up getting too big, we may possibly restart the experiment from zero, and try again. +Odyssey has 2 goals: +1. Showcase Reth's performance at the extremes. We intend to launch a hosted version of Odyssey on [Conduit](https://conduit.xyz/), targeting 50mgas/s, and eventually ramping up to 1ggas/s and beyond. In the process we hope to hit the state growth performance bottleneck, and discover ways to solve it. If our hosted chains end up getting too big, we may possibly restart the experiment from zero, and try again. 2. Showcase how Reth's modular architecture can serve as a distribution channel for research ideas. Specifically, -AlphaNet's node extensions were chosen for their ability to enable applications that enhance the onchain user experience, and +Odyssey's node extensions were chosen for their ability to enable applications that enhance the onchain user experience, and drastically reduce cost for existing applications that improve UX. -### AlphaNet Local Development +### Odyssey Local Development -AlphaNet does not yet have a running testnet, but can be run locally for development and testing purposes. To do this, the binary can be run with the `--dev` flag, which will start the node with a development configuration. +Odyssey does not yet have a running testnet, but can be run locally for development and testing purposes. To do this, the binary can be run with the `--dev` flag, which will start the node with a development configuration. -First, alphanet should be built locally: +First, odyssey should be built locally: ```bash -git clone https://github.com/paradigmxyz/alphanet -cd alphanet -cargo install --path bin/alphanet +git clone https://github.com/ithacaxyz/odyssey +cd odyssey +cargo install --path bin/odyssey ``` ```bash -alphanet node --chain etc/alphanet-genesis.json --dev --http --http.api all +odyssey node --chain etc/odyssey-genesis.json --dev --http --http.api all ``` This will start the node with a development configuration, and expose the HTTP API on `http://localhost:8545`. To use EOF-enabled foundry, use [forge-eof](https://github.com/paradigmxyz/forge-eof) and follow installation instructions. -### Running AlphaNet +### Running Odyssey > [!WARNING] > -> AlphaNet does not yet have a running testnet, please use the local development instructions above! +> Odyssey does not yet have a running testnet, please use the local development instructions above! -Running AlphaNet will require running additional infrastructure for the archival L1 node. These instructions are a guide for -running the AlphaNet OP-stack node only. +Running Odyssey will require running additional infrastructure for the archival L1 node. These instructions are a guide for +running the Odyssey OP-stack node only. -For instructions on running the full AlphaNet OP stack, including the L1 node, see the [Reth book section on running the OP stack](https://paradigmxyz.github.io/reth/run/optimism.html), using the `alphanet` binary instead of `op-reth`. +For instructions on running the full Odyssey OP stack, including the L1 node, see the [Reth book section on running the OP stack](https://paradigmxyz.github.io/reth/run/optimism.html), using the `odyssey` binary instead of `op-reth`. -#### Running the alphanet execution node +#### Running the Odyssey execution node -To run AlphaNet from source, clone the repository and run the following commands: +To run Odyssey from source, clone the repository and run the following commands: ```bash -git clone https://github.com/paradigmxyz/alphanet.git -cd alphanet -cargo install --path bin/alphanet -alphanet node - --chain etc/alphanet-genesis.json \ +git clone https://github.com/ithacaxyz/odyssey.git +cd odyssey +cargo install --path bin/odyssey +odyssey node + --chain etc/odyssey-genesis.json \ --rollup.sequencer-http \ --http \ --ws \ @@ -74,15 +74,15 @@ alphanet node --authrpc.jwtsecret /path/to/jwt.hex ``` -#### Running op-node with the alphanet configuration +#### Running op-node with the Odyssey configuration -Once `alphanet` is started, [`op-node`](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) can be run with the -included `alphanet-rollup.json`: +Once `odyssey` is started, [`op-node`](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) can be run with the +included `odyssey-rollup.json`: ```bash -cd alphanet/ +cd odyssey/ op-node \ - --rollup.config ./etc/alphanet-rollup.json \ + --rollup.config ./etc/odyssey-rollup.json \ --l1= \ --l2=http://localhost:9551 \ --l2.jwt-secret=/path/to/jwt.hex \ @@ -91,9 +91,9 @@ op-node \ --l1.trustrpc ``` -### Running AlphaNet with Kurtosis +### Running Odyssey with Kurtosis -Running a local network with a full AlphaNet OP stack with Kurtosis requires some extra setup, since AlphaNet uses a forked version of `op-node`. +Running a local network with a full Odyssey OP stack with Kurtosis requires some extra setup, since Odyssey uses a forked version of `op-node`. To get started, follow [these instructions](https://docs.kurtosis.com/install/) to install Kurtosis. @@ -102,7 +102,7 @@ Next, clone and build the modified `optimism-contract-deployer` image: ```bash git clone git@github.com:paradigmxyz/optimism-package.git cd optimism-package -git switch alphanet +git switch odyssey docker build . -t ethpandaops/optimism-contract-deployer:latest --progress plain ``` @@ -113,15 +113,15 @@ docker build . -t ethpandaops/optimism-contract-deployer:latest --progress plain Finally, run start a Kurtosis enclave (ensure you are still in `optimism-package`): ```bash -kurtosis run --enclave op-devnet github.com/paradigmxyz/optimism-package@alphanet \ - --args-file https://raw.githubusercontent.com/paradigmxyz/alphanet/main/etc/kurtosis.yaml +kurtosis run --enclave op-devnet github.com/paradigmxyz/optimism-package@odyssey \ + --args-file https://raw.githubusercontent.com/ithacaxyz/odyssey/main/etc/kurtosis.yaml ``` This will start an enclave named `op-devnet`. You can tear down the enclave with `kurtosis enclave rm --force op-devnet`, or tear down all enclaves using `kurtosis clean -a`. > [!NOTE] > -> If you want to use a custom build of AlphaNet, simply build an AlphaNet image with `docker build . -t ghcr.io/paradigmxyz/alphanet:latest`. +> If you want to use a custom build of Odyssey, simply build an Odyssey image with `docker build . -t ghcr.io/ithacaxyz/odyssey:latest`. Consult the [Kurtosis OP package](https://github.com/ethpandaops/optimism-package) repository for instructions on how to adjust the args file to spin up additional services, like a block exporer. @@ -144,13 +144,13 @@ for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. - - - + + + [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg [apache-badge]: https://img.shields.io/badge/license-Apache--2.0-blue.svg [mit-url]: LICENSE-MIT [apache-url]: LICENSE-APACHE -[actions-badge]: https://github.com/paradigmxyz/alphanet/workflows/unit/badge.svg -[actions-url]: https://github.com/paradigmxyz/alphanet/actions?query=workflow%3ACI+branch%3Amain -[foundry-alphanet]: https://github.com/paradigmxyz/foundry-alphanet +[actions-badge]: https://github.com/ithacaxyz/odyssey/workflows/unit/badge.svg +[actions-url]: https://github.com/ithacaxyz/odyssey/actions?query=workflow%3ACI+branch%3Amain +[foundry-odyssey]: https://github.com/ithacaxyz/foundry-odyssey diff --git a/bin/alphanet/Cargo.toml b/bin/odyssey/Cargo.toml similarity index 80% rename from bin/alphanet/Cargo.toml rename to bin/odyssey/Cargo.toml index 06c5e77..06f23b4 100644 --- a/bin/alphanet/Cargo.toml +++ b/bin/odyssey/Cargo.toml @@ -1,12 +1,12 @@ [package] -name = "alphanet" +name = "odyssey" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true repository.workspace = true -description = "Reth AlphaNet is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge Ethereum Research." -default-run = "alphanet" +description = "Odyssey is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge Ethereum Research." +default-run = "odyssey" [lints] workspace = true @@ -15,8 +15,8 @@ workspace = true alloy-signer-local.workspace = true alloy-network.workspace = true alloy-primitives.workspace = true -alphanet-node.workspace = true -alphanet-wallet.workspace = true +odyssey-node.workspace = true +odyssey-wallet.workspace = true eyre.workspace = true tracing.workspace = true reth-cli-util.workspace = true @@ -42,5 +42,5 @@ min-debug-logs = ["tracing/release_max_level_debug"] min-trace-logs = ["tracing/release_max_level_trace"] [[bin]] -name = "alphanet" +name = "odyssey" path = "src/main.rs" diff --git a/bin/alphanet/src/main.rs b/bin/odyssey/src/main.rs similarity index 88% rename from bin/alphanet/src/main.rs rename to bin/odyssey/src/main.rs index dd54af1..77b8af1 100644 --- a/bin/alphanet/src/main.rs +++ b/bin/odyssey/src/main.rs @@ -1,6 +1,6 @@ -//! # Reth AlphaNet +//! # Odyssey //! -//! Reth AlphaNet is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge +//! Odyssey is a testnet OP Stack rollup aimed at enabling experimentation of bleeding edge //! Ethereum Research. It aims to showcase how Reth's pluggable and modularized architecture can //! serve as a distribution channel for research ideas. //! @@ -26,10 +26,10 @@ use alloy_network::EthereumWallet; use alloy_primitives::Address; use alloy_signer_local::PrivateKeySigner; -use alphanet_node::{chainspec::AlphanetChainSpecParser, node::AlphaNetNode}; -use alphanet_wallet::{AlphaNetWallet, AlphaNetWalletApiServer}; use clap::Parser; use eyre::Context; +use odyssey_node::{chainspec::OdysseyChainSpecParser, node::OdysseyNode}; +use odyssey_wallet::{OdysseyWallet, OdysseyWalletApiServer}; use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher}; use reth_optimism_cli::Cli; use reth_optimism_node::{args::RollupArgs, node::OptimismAddOns}; @@ -50,10 +50,10 @@ fn main() { } if let Err(err) = - Cli::::parse().run(|builder, rollup_args| async move { + Cli::::parse().run(|builder, rollup_args| async move { let node = builder - .with_types_and_provider::>() - .with_components(AlphaNetNode::components(rollup_args.clone())) + .with_types_and_provider::>() + .with_components(OdysseyNode::components(rollup_args.clone())) .with_add_ons(OptimismAddOns::new(rollup_args.sequencer_http.clone())) .extend_rpc_modules(move |ctx| { // register sequencer tx forwarder @@ -63,7 +63,7 @@ fn main() { .set_sequencer_client(SequencerClient::new(sequencer_http))?; } - // register alphanet wallet namespace + // register odyssey wallet namespace if let Ok(sk) = std::env::var("EXP1_SK") { let signer: PrivateKeySigner = sk.parse().wrap_err("Invalid EXP0001 secret key.")?; @@ -78,7 +78,7 @@ fn main() { .wrap_err("No valid EXP0001 delegations specified")?; ctx.modules.merge_configured( - AlphaNetWallet::new( + OdysseyWallet::new( ctx.provider().clone(), wallet, ctx.registry.eth_api().clone(), diff --git a/crates/node/Cargo.toml b/crates/node/Cargo.toml index 561da0e..3ed6070 100644 --- a/crates/node/Cargo.toml +++ b/crates/node/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "alphanet-node" +name = "odyssey-node" version.workspace = true edition.workspace = true rust-version.workspace = true @@ -10,7 +10,7 @@ keywords.workspace = true categories.workspace = true [dependencies] -alphanet-precompile.workspace = true +odyssey-precompile.workspace = true once_cell.workspace = true reth-cli.workspace = true reth-node-api.workspace = true diff --git a/crates/node/src/chainspec.rs b/crates/node/src/chainspec.rs index 8a275cc..d096079 100644 --- a/crates/node/src/chainspec.rs +++ b/crates/node/src/chainspec.rs @@ -1,4 +1,4 @@ -//! Alphanet chainspec parsing logic. +//! Odyssey chainspec parsing logic. use alloy_primitives::{b256, U256}; use once_cell::sync::Lazy; @@ -12,8 +12,8 @@ use reth_optimism_forks::OptimismHardfork; use reth_primitives::constants::ETHEREUM_BLOCK_GAS_LIMIT; use std::sync::Arc; -/// Alphanet forks. -pub static ALPHANET_FORKS: Lazy = Lazy::new(|| { +/// Odyssey forks. +pub static ODYSSEY_FORKS: Lazy = Lazy::new(|| { ChainHardforks::new(vec![ (EthereumHardfork::Frontier.boxed(), ForkCondition::Block(0)), (EthereumHardfork::Homestead.boxed(), ForkCondition::Block(0)), @@ -40,14 +40,14 @@ pub static ALPHANET_FORKS: Lazy = Lazy::new(|| { ]) }); -/// Alphanet dev testnet specification. -pub static ALPHANET_DEV: Lazy> = Lazy::new(|| { +/// Odyssey dev testnet specification. +pub static ODYSSEY_DEV: Lazy> = Lazy::new(|| { OpChainSpec::new(ChainSpec { chain: Chain::from_named(NamedChain::Alphanet), genesis: serde_json::from_str(include_str!("../../../etc/dev-genesis.json")) - .expect("Can't deserialize alphanet genesis json"), + .expect("Can't deserialize odyssey genesis json"), paris_block_and_final_difficulty: Some((0, U256::from(0))), - hardforks: ALPHANET_FORKS.clone(), + hardforks: ODYSSEY_FORKS.clone(), base_fee_params: BaseFeeParamsKind::Constant(BaseFeeParams::ethereum()), deposit_contract: None, ..Default::default() @@ -55,19 +55,19 @@ pub static ALPHANET_DEV: Lazy> = Lazy::new(|| { .into() }); -/// Alphanet main chain specification. -pub static ALPHANET_MAINNET: Lazy> = Lazy::new(|| { +/// Odyssey main chain specification. +pub static ODYSSEY_MAINNET: Lazy> = Lazy::new(|| { OpChainSpec::new(ChainSpec { chain: Chain::from_named(NamedChain::Alphanet), // genesis contains empty alloc field because state at first bedrock block is imported // manually from trusted source - genesis: serde_json::from_str(include_str!("../../../etc/alphanet-genesis.json")) - .expect("Can't deserialize alphanet genesis json"), + genesis: serde_json::from_str(include_str!("../../../etc/odyssey-genesis.json")) + .expect("Can't deserialize odyssey genesis json"), genesis_hash: once_cell_set(b256!( "2f980576711e3617a5e4d83dd539548ec0f7792007d505a3d2e9674833af2d7c" )), paris_block_and_final_difficulty: Some((0, U256::from(0))), - hardforks: ALPHANET_FORKS.clone(), + hardforks: ODYSSEY_FORKS.clone(), base_fee_params: BaseFeeParamsKind::Variable( vec![ (EthereumHardfork::London.boxed(), BaseFeeParams::optimism()), @@ -82,19 +82,19 @@ pub static ALPHANET_MAINNET: Lazy> = Lazy::new(|| { .into() }); -/// Alphanet chain specification parser. +/// Odyssey chain specification parser. #[derive(Debug, Clone, Default)] -pub struct AlphanetChainSpecParser; +pub struct OdysseyChainSpecParser; -impl ChainSpecParser for AlphanetChainSpecParser { +impl ChainSpecParser for OdysseyChainSpecParser { type ChainSpec = OpChainSpec; - const SUPPORTED_CHAINS: &'static [&'static str] = &["alphanet", "dev"]; + const SUPPORTED_CHAINS: &'static [&'static str] = &["odyssey", "dev"]; fn parse(s: &str) -> eyre::Result> { Ok(match s { - "alphanet" => ALPHANET_MAINNET.clone(), - "dev" => ALPHANET_DEV.clone(), + "odyssey" => ODYSSEY_MAINNET.clone(), + "dev" => ODYSSEY_DEV.clone(), s => { let mut chainspec = OpChainSpec::from(parse_genesis(s)?); @@ -125,7 +125,7 @@ impl ChainSpecParser for AlphanetChainSpecParser { mod tests { use std::path::PathBuf; - use super::AlphanetChainSpecParser; + use super::OdysseyChainSpecParser; use reth_chainspec::EthereumHardforks; use reth_cli::chainspec::ChainSpecParser; use reth_optimism_forks::OptimismHardforks; @@ -133,9 +133,9 @@ mod tests { #[test] fn chainspec_parser_adds_prague() { let mut chainspec_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - chainspec_path.push("../../etc/alphanet-genesis.json"); + chainspec_path.push("../../etc/odyssey-genesis.json"); - let chain_spec = AlphanetChainSpecParser::parse(&chainspec_path.to_string_lossy()) + let chain_spec = OdysseyChainSpecParser::parse(&chainspec_path.to_string_lossy()) .expect("could not parse chainspec"); assert!(chain_spec.is_bedrock_active_at_block(0)); diff --git a/crates/node/src/evm.rs b/crates/node/src/evm.rs index a086f42..43500f9 100644 --- a/crates/node/src/evm.rs +++ b/crates/node/src/evm.rs @@ -1,17 +1,17 @@ -//! # AlphaNet EVM configuration +//! # Odyssey EVM configuration //! -//! The [AlphaNetEvmConfig] type implements the [ConfigureEvm] and [ConfigureEvmEnv] traits, -//! configuring the custom AlphaNet precompiles and instructions. +//! The [OdysseyEvmConfig] type implements the [ConfigureEvm] and [ConfigureEvmEnv] traits, +//! configuring the custom Odyssey precompiles and instructions. //! //! These trait implementations allow for custom precompiles and instructions to be implemented and //! integrated in a reth node only with importing, without the need to fork the node or EVM //! implementation. //! //! This currently configures the instructions defined in [EIP3074-instructions](https://github.com/paradigmxyz/eip3074-instructions), and the -//! precompiles defined by [`alphanet_precompile`]. +//! precompiles defined by [`odyssey_precompile`]. use alloy_primitives::{Address, Bytes, TxKind, U256}; -use alphanet_precompile::secp256r1; +use odyssey_precompile::secp256r1; use reth_chainspec::{ChainSpec, EthereumHardfork, Head}; use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, NextBlockEnvAttributes}; use reth_optimism_chainspec::OpChainSpec; @@ -35,12 +35,12 @@ use std::sync::Arc; /// Custom EVM configuration #[derive(Debug, Clone)] -pub struct AlphaNetEvmConfig { +pub struct OdysseyEvmConfig { chain_spec: Arc, } -impl AlphaNetEvmConfig { - /// Creates a new AlphaNet EVM configuration with the given chain spec. +impl OdysseyEvmConfig { + /// Creates a new Odyssey EVM configuration with the given chain spec. pub const fn new(chain_spec: Arc) -> Self { Self { chain_spec } } @@ -70,7 +70,7 @@ impl AlphaNetEvmConfig { } } -impl ConfigureEvmEnv for AlphaNetEvmConfig { +impl ConfigureEvmEnv for OdysseyEvmConfig { type Header = Header; fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) { @@ -229,7 +229,7 @@ impl ConfigureEvmEnv for AlphaNetEvmConfig { } } -impl ConfigureEvm for AlphaNetEvmConfig { +impl ConfigureEvm for OdysseyEvmConfig { type DefaultExternalContext<'a> = (); fn evm(&self, db: DB) -> Evm<'_, Self::DefaultExternalContext<'_>, DB> { @@ -332,7 +332,7 @@ mod tests { )); let total_difficulty = U256::ZERO; - AlphaNetEvmConfig::new(chain_spec.clone()).fill_cfg_and_block_env( + OdysseyEvmConfig::new(chain_spec.clone()).fill_cfg_and_block_env( &mut cfg_env, &mut block_env, &header, diff --git a/crates/node/src/lib.rs b/crates/node/src/lib.rs index 2a044c4..3de4745 100644 --- a/crates/node/src/lib.rs +++ b/crates/node/src/lib.rs @@ -1,15 +1,15 @@ -//! Standalone crate for AlphaNet's node configuration and builder types. +//! Standalone crate for Odyssey's node configuration and builder types. //! -//! This contains mainly two types, [AlphaNetNode](node::AlphaNetNode) and -//! [AlphaNetEvmConfig](evm::AlphaNetEvmConfig). +//! This contains mainly two types, [OdysseyNode](node::OdysseyNode) and +//! [OdysseyEvmConfig](evm::OdysseyEvmConfig). //! -//! The [AlphaNetNode](node::AlphaNetNode) type implements the +//! The [OdysseyNode](node::OdysseyNode) type implements the //! [NodeTypes](reth_node_builder::NodeTypes) trait, and configures the engine types required for //! the optimism engine API. //! -//! The [AlphaNetEvmConfig](evm::AlphaNetEvmConfig) type implements the +//! The [OdysseyEvmConfig](evm::OdysseyEvmConfig) type implements the //! [ConfigureEvm](reth_node_api::ConfigureEvm) and -//! [ConfigureEvmEnv](reth_node_api::ConfigureEvmEnv) traits, configuring the custom AlphaNet +//! [ConfigureEvmEnv](reth_node_api::ConfigureEvmEnv) traits, configuring the custom Odyssey //! precompiles and instructions. #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/crates/node/src/node.rs b/crates/node/src/node.rs index 987b145..e50746b 100644 --- a/crates/node/src/node.rs +++ b/crates/node/src/node.rs @@ -1,9 +1,9 @@ -//! # AlphaNet Node types configuration +//! # Odyssey Node types configuration //! -//! The [AlphaNetNode] type implements the [NodeTypes] trait, and configures the engine types +//! The [OdysseyNode] type implements the [NodeTypes] trait, and configures the engine types //! required for the optimism engine API. -use crate::evm::AlphaNetEvmConfig; +use crate::evm::OdysseyEvmConfig; use reth_network::{ transactions::{TransactionPropagationMode, TransactionsManagerConfig}, NetworkHandle, NetworkManager, @@ -30,14 +30,14 @@ use reth_payload_builder::PayloadBuilderHandle; use reth_transaction_pool::{SubPoolLimit, TransactionPool, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER}; use std::time::Duration; -/// Type configuration for a regular AlphaNet node. +/// Type configuration for a regular Odyssey node. #[derive(Debug, Clone, Default)] -pub struct AlphaNetNode { +pub struct OdysseyNode { /// Additional Optimism args pub args: RollupArgs, } -impl AlphaNetNode { +impl OdysseyNode { /// Creates a new instance of the Optimism node type. pub const fn new(args: RollupArgs) -> Self { Self { args } @@ -49,9 +49,9 @@ impl AlphaNetNode { ) -> ComponentsBuilder< Node, OptimismPoolBuilder, - AlphaNetPayloadBuilder, - AlphanetNetworkBuilder, - AlphaNetExecutorBuilder, + OdysseyPayloadBuilder, + OdysseyNetworkBuilder, + OdysseyExecutorBuilder, OptimismConsensusBuilder, OptimismEngineValidatorBuilder, > @@ -72,28 +72,28 @@ impl AlphaNetNode { ..Default::default() }, }) - .payload(AlphaNetPayloadBuilder::new(compute_pending_block)) - .network(AlphanetNetworkBuilder::new(OptimismNetworkBuilder { + .payload(OdysseyPayloadBuilder::new(compute_pending_block)) + .network(OdysseyNetworkBuilder::new(OptimismNetworkBuilder { disable_txpool_gossip, disable_discovery_v4: !discovery_v4, })) - .executor(AlphaNetExecutorBuilder::default()) + .executor(OdysseyExecutorBuilder::default()) .consensus(OptimismConsensusBuilder::default()) .engine_validator(OptimismEngineValidatorBuilder::default()) } } /// Configure the node types -impl NodeTypes for AlphaNetNode { +impl NodeTypes for OdysseyNode { type Primitives = (); type ChainSpec = OpChainSpec; } -impl NodeTypesWithEngine for AlphaNetNode { +impl NodeTypesWithEngine for OdysseyNode { type Engine = OptimismEngineTypes; } -impl Node for AlphaNetNode +impl Node for OdysseyNode where N: FullNodeTypes< Types: NodeTypesWithEngine, @@ -102,9 +102,9 @@ where type ComponentsBuilder = ComponentsBuilder< N, OptimismPoolBuilder, - AlphaNetPayloadBuilder, - AlphanetNetworkBuilder, - AlphaNetExecutorBuilder, + OdysseyPayloadBuilder, + OdysseyNetworkBuilder, + OdysseyExecutorBuilder, OptimismConsensusBuilder, OptimismEngineValidatorBuilder, >; @@ -121,16 +121,16 @@ where } } -/// The AlphaNet evm and executor builder. +/// The Odyssey evm and executor builder. #[derive(Debug, Default, Clone, Copy)] #[non_exhaustive] -pub struct AlphaNetExecutorBuilder; +pub struct OdysseyExecutorBuilder; -impl ExecutorBuilder for AlphaNetExecutorBuilder +impl ExecutorBuilder for OdysseyExecutorBuilder where Node: FullNodeTypes>, { - type EVM = AlphaNetEvmConfig; + type EVM = OdysseyEvmConfig; type Executor = OpExecutorProvider; async fn build_evm( @@ -138,31 +138,31 @@ where ctx: &BuilderContext, ) -> eyre::Result<(Self::EVM, Self::Executor)> { let chain_spec = ctx.chain_spec(); - let evm_config = AlphaNetEvmConfig::new(chain_spec.clone()); + let evm_config = OdysseyEvmConfig::new(chain_spec.clone()); let executor = OpExecutorProvider::new(chain_spec, evm_config.clone()); Ok((evm_config, executor)) } } -/// The AlphaNet payload service builder. +/// The Odyssey payload service builder. /// /// This service wraps the default Optimism payload builder, but replaces the default evm config -/// with AlphaNet's own. +/// with Odyssey's own. #[derive(Debug, Default, Clone)] -pub struct AlphaNetPayloadBuilder { +pub struct OdysseyPayloadBuilder { /// Inner Optimism payload builder service. inner: OptimismPayloadBuilder, } -impl AlphaNetPayloadBuilder { +impl OdysseyPayloadBuilder { /// Create a new instance with the given `compute_pending_block` flag. pub const fn new(compute_pending_block: bool) -> Self { Self { inner: OptimismPayloadBuilder::new(compute_pending_block) } } } -impl PayloadServiceBuilder for AlphaNetPayloadBuilder +impl PayloadServiceBuilder for OdysseyPayloadBuilder where Node: FullNodeTypes< Types: NodeTypesWithEngine, @@ -174,24 +174,24 @@ where ctx: &BuilderContext, pool: Pool, ) -> eyre::Result> { - self.inner.spawn(AlphaNetEvmConfig::new(ctx.chain_spec().clone()), ctx, pool) + self.inner.spawn(OdysseyEvmConfig::new(ctx.chain_spec().clone()), ctx, pool) } } -/// The default alphanet network builder. +/// The default odyssey network builder. #[derive(Debug, Default, Clone)] -pub struct AlphanetNetworkBuilder { +pub struct OdysseyNetworkBuilder { inner: OptimismNetworkBuilder, } -impl AlphanetNetworkBuilder { +impl OdysseyNetworkBuilder { /// Create a new instance based on the given op builder pub const fn new(network: OptimismNetworkBuilder) -> Self { Self { inner: network } } } -impl NetworkBuilder for AlphanetNetworkBuilder +impl NetworkBuilder for OdysseyNetworkBuilder where Node: FullNodeTypes>, Pool: TransactionPool + Unpin + 'static, diff --git a/crates/precompile/Cargo.toml b/crates/precompile/Cargo.toml index ea33c3b..a1a64cf 100644 --- a/crates/precompile/Cargo.toml +++ b/crates/precompile/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "alphanet-precompile" +name = "odyssey-precompile" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/crates/precompile/src/lib.rs b/crates/precompile/src/lib.rs index 0afdfff..482b29d 100644 --- a/crates/precompile/src/lib.rs +++ b/crates/precompile/src/lib.rs @@ -1,8 +1,8 @@ -//! # AlphaNet precompiles. +//! # Odyssey precompiles. //! -//! Implementations of EVM precompiled contracts for AlphaNet. +//! Implementations of EVM precompiled contracts for Odyssey. //! -//! Alphanet currently implements the following EIPs, which define precompiles: +//! Odyssey currently implements the following EIPs, which define precompiles: //! - [EIP-7212](https://eips.ethereum.org/EIPS/eip-7212): Precompile for secp256r1 Curve Support. //! The precompile implementation is located in the [secp256r1] module. diff --git a/crates/precompile/src/secp256r1.rs b/crates/precompile/src/secp256r1.rs index 9ca6bea..f5b21e4 100644 --- a/crates/precompile/src/secp256r1.rs +++ b/crates/precompile/src/secp256r1.rs @@ -10,7 +10,7 @@ //! The precompile can be inserted in a custom EVM like this: //! ``` //! use alloy_primitives::U256; -//! use alphanet_precompile::secp256r1; +//! use odyssey_precompile::secp256r1; //! use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, NextBlockEnvAttributes}; //! use reth_primitives::{Header, TransactionSigned}; //! use reth_revm::{ @@ -22,9 +22,9 @@ //! //! #[derive(Debug, Clone, Copy, Default)] //! #[non_exhaustive] -//! struct AlphaNetEvmConfig; +//! struct OdysseyEvmConfig; //! -//! impl ConfigureEvm for AlphaNetEvmConfig { +//! impl ConfigureEvm for OdysseyEvmConfig { //! type DefaultExternalContext<'a> = (); //! //! fn evm(&self, db: DB) -> Evm<'_, (), DB> { @@ -46,7 +46,7 @@ //! fn default_external_context<'a>(&self) -> Self::DefaultExternalContext<'a> {} //! } //! -//! impl ConfigureEvmEnv for AlphaNetEvmConfig { +//! impl ConfigureEvmEnv for OdysseyEvmConfig { //! type Header = Header; //! //! fn fill_tx_env( diff --git a/crates/testing/Cargo.toml b/crates/testing/Cargo.toml index e524899..956dd2c 100644 --- a/crates/testing/Cargo.toml +++ b/crates/testing/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "alphanet-testing" +name = "odyssey-testing" version.workspace = true edition.workspace = true rust-version.workspace = true @@ -10,7 +10,7 @@ keywords.workspace = true categories.workspace = true [dev-dependencies] -alphanet-node.workspace = true +odyssey-node.workspace = true alloy.workspace = true alloy-network.workspace = true diff --git a/crates/testing/src/lib.rs b/crates/testing/src/lib.rs index 2d93298..f758890 100644 --- a/crates/testing/src/lib.rs +++ b/crates/testing/src/lib.rs @@ -1,4 +1,4 @@ -//! Alphanet-testing module +//! Odyssey-testing module // todo(onbjerg): uncomment this when adding a test, // it was commented out due to removing our bls tests since they are now diff --git a/crates/wallet/Cargo.toml b/crates/wallet/Cargo.toml index ebc922a..c7c3d99 100644 --- a/crates/wallet/Cargo.toml +++ b/crates/wallet/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "alphanet-wallet" +name = "odyssey-wallet" version.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/crates/wallet/src/lib.rs b/crates/wallet/src/lib.rs index a3b39d5..0f6f4e1 100644 --- a/crates/wallet/src/lib.rs +++ b/crates/wallet/src/lib.rs @@ -1,6 +1,6 @@ -//! # AlphaNet wallet. +//! # Odyssey wallet. //! -//! Implementations of a custom `wallet_` namespace for AlphaNet experiment 1. +//! Implementations of a custom `wallet_` namespace for Odyssey experiment 1. //! //! - `wallet_getCapabilities` based on [EIP-5792][eip-5792], with the only capability being //! `delegation`. @@ -66,10 +66,10 @@ impl WalletCapabilities { } } -/// AlphaNet `wallet_` RPC namespace. +/// Odyssey `wallet_` RPC namespace. #[cfg_attr(not(test), rpc(server, namespace = "wallet"))] #[cfg_attr(test, rpc(server, client, namespace = "wallet"))] -pub trait AlphaNetWalletApi { +pub trait OdysseyWalletApi { /// Get the capabilities of the wallet. /// /// Currently the only capability is [`DelegationCapability`]. @@ -101,7 +101,7 @@ pub trait AlphaNetWalletApi { /// Errors returned by the wallet API. #[derive(Debug, thiserror::Error)] -pub enum AlphaNetWalletError { +pub enum OdysseyWalletError { /// The transaction value is not 0. /// /// The value should be 0 to prevent draining the sequencer. @@ -143,8 +143,8 @@ pub enum AlphaNetWalletError { InternalError, } -impl From for jsonrpsee::types::error::ErrorObject<'static> { - fn from(error: AlphaNetWalletError) -> Self { +impl From for jsonrpsee::types::error::ErrorObject<'static> { + fn from(error: OdysseyWalletError) -> Self { jsonrpsee::types::error::ErrorObject::owned::<()>( jsonrpsee::types::error::INVALID_PARAMS_CODE, error.to_string(), @@ -153,13 +153,13 @@ impl From for jsonrpsee::types::error::ErrorObject<'static> } } -/// Implementation of the AlphaNet `wallet_` namespace. -pub struct AlphaNetWallet { - inner: Arc>, +/// Implementation of the Odyssey `wallet_` namespace. +pub struct OdysseyWallet { + inner: Arc>, } -impl AlphaNetWallet { - /// Create a new AlphaNet wallet module. +impl OdysseyWallet { + /// Create a new Odyssey wallet module. pub fn new( provider: Provider, wallet: EthereumWallet, @@ -167,7 +167,7 @@ impl AlphaNetWallet { chain_id: ChainId, valid_designations: Vec
, ) -> Self { - let inner = AlphaNetWalletInner { + let inner = OdysseyWalletInner { provider, wallet, eth_api, @@ -187,7 +187,7 @@ impl AlphaNetWallet { } #[async_trait] -impl AlphaNetWalletApiServer for AlphaNetWallet +impl OdysseyWalletApiServer for OdysseyWallet where Provider: StateProviderFactory + Send + Sync + 'static, Eth: FullEthApi + Send + Sync + 'static, @@ -212,7 +212,7 @@ where if let Some(authorizations) = &request.authorization_list { // check that all auth items delegate to a valid address if authorizations.iter().any(|auth| !valid_delegations.contains(&auth.address)) { - return Err(AlphaNetWalletError::InvalidAuthorization.into()); + return Err(OdysseyWalletError::InvalidAuthorization.into()); } } @@ -222,7 +222,7 @@ where // whitelisted address (false, Some(TxKind::Call(addr))) => { let state = - self.inner.provider.latest().map_err(|_| AlphaNetWalletError::InternalError)?; + self.inner.provider.latest().map_err(|_| OdysseyWalletError::InternalError)?; let delegated_address = state .account_code(addr) .ok() @@ -237,13 +237,13 @@ where if delegated_address == Address::ZERO || !valid_delegations.contains(&delegated_address) { - return Err(AlphaNetWalletError::IllegalDestination.into()); + return Err(OdysseyWalletError::IllegalDestination.into()); } } // if it's an eip-7702 tx, let it through (true, _) => (), // create tx's disallowed - _ => return Err(AlphaNetWalletError::IllegalDestination.into()), + _ => return Err(OdysseyWalletError::IllegalDestination.into()), } // we acquire the permit here so that all following operations are performed exclusively @@ -273,7 +273,7 @@ where let (base_fee, max_priority_fee_per_gas) = LoadFee::eip1559_fees(&self.inner.eth_api, None, None) .await - .map_err(|_| AlphaNetWalletError::InvalidTransactionRequest)?; + .map_err(|_| OdysseyWalletError::InvalidTransactionRequest)?; request.max_fee_per_gas = Some((base_fee + max_priority_fee_per_gas).to::() * 2u128); request.max_priority_fee_per_gas = Some((max_priority_fee_per_gas * U256::from(2)).to()); request.gas_price = None; @@ -285,7 +285,7 @@ where &self.inner.wallet, ) .await - .map_err(|_| AlphaNetWalletError::InvalidTransactionRequest)?; + .map_err(|_| OdysseyWalletError::InvalidTransactionRequest)?; // this uses the internal `OpEthApi` to either forward the tx to the sequencer, or add it to // the txpool @@ -298,8 +298,8 @@ where } } -/// Implementation of the AlphaNet `wallet_` namespace. -struct AlphaNetWalletInner { +/// Implementation of the Odyssey `wallet_` namespace. +struct OdysseyWalletInner { provider: Provider, eth_api: Eth, wallet: EthereumWallet, @@ -309,20 +309,20 @@ struct AlphaNetWalletInner { permit: Mutex<()>, } -fn validate_tx_request(request: &TransactionRequest) -> Result<(), AlphaNetWalletError> { +fn validate_tx_request(request: &TransactionRequest) -> Result<(), OdysseyWalletError> { // reject transactions that have a non-zero value to prevent draining the sequencer. if request.value.is_some_and(|val| val > U256::ZERO) { - return Err(AlphaNetWalletError::ValueNotZero); + return Err(OdysseyWalletError::ValueNotZero); } // reject transactions that have from set, as this will be the sequencer. if request.from.is_some() { - return Err(AlphaNetWalletError::FromSet); + return Err(OdysseyWalletError::FromSet); } // reject transaction requests that have nonce set, as this is managed by the sequencer. if request.nonce.is_some() { - return Err(AlphaNetWalletError::NonceSet); + return Err(OdysseyWalletError::NonceSet); } Ok(()) diff --git a/etc/kurtosis.yaml b/etc/kurtosis.yaml index fdbce7f..d4a8569 100644 --- a/etc/kurtosis.yaml +++ b/etc/kurtosis.yaml @@ -5,7 +5,7 @@ ethereum_package: optimism_package: participants: - el_type: op-reth - el_image: ghcr.io/paradigmxyz/alphanet:latest + el_image: ghcr.io/ithacaxyz/odyssey:latest count: 2 network_params: network_id: "41144114" diff --git a/etc/alphanet-genesis.json b/etc/odyssey-genesis.json similarity index 100% rename from etc/alphanet-genesis.json rename to etc/odyssey-genesis.json diff --git a/etc/alphanet-rollup.json b/etc/odyssey-rollup.json similarity index 100% rename from etc/alphanet-rollup.json rename to etc/odyssey-rollup.json