diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3c43ffc65..654fbc1cb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -51,12 +51,12 @@ jobs: with: path: | ./contracts/out - ./contract-bindings ./contracts/cache + ./crates/contract-bindings ## TODO maybe add the rust version and solc version to the key key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }} - - name: Generate ABI and bindings + - name: Generate ABI and contract-bindings run: cd contracts && make gen - name: Install Rust nightly @@ -66,6 +66,7 @@ jobs: components: rustfmt,clippy - name: Print Rust toolchain default versions + working-directory: crates run: | echo "rustup show:" rustup show @@ -77,14 +78,17 @@ jobs: ldd --version - name: Check fmt (nightly) + working-directory: crates run: cargo +nightly-2024-07-05 fmt --check --all - name: Check clippy + working-directory: crates run: cargo clippy --release --tests --no-deps -- -D clippy::all - name: Build all (including tests, benches, examples) + working-directory: crates/node run: | - cd fendermint && make $PWD/builtin-actors/output/bundle.car + make $PWD/builtin-actors/output/bundle.car cargo build --locked --release --all-targets - name: Build Docker image for e2e tests @@ -93,31 +97,31 @@ jobs: cat < /tmp/Dockerfile # syntax=docker/dockerfile:1 FROM alpine as builder - COPY /fendermint/app/config /app/fendermint/app/config - COPY /target/release/fendermint /app/output/bin/fendermint - COPY /target/release/ipc-cli /app/output/bin/ipc-cli + COPY /crates/node/app/config /app/fendermint/app/config + COPY /crates/target/release/fendermint /app/output/bin/fendermint + COPY /crates/target/release/ipc-cli /app/output/bin/ipc-cli EOF - + ## Append the runner build phase to the Dockerfile. - cat fendermint/docker/runner.Dockerfile >> /tmp/Dockerfile - + cat crates/node/docker/runner.Dockerfile >> /tmp/Dockerfile + ## Print the Dockerfile for debugging. echo "Dockerfile:" cat /tmp/Dockerfile - + ## Create the temporary .dockerignore file. cat < /tmp/Dockerfile.dockerignore target - !target/release/fendermint - !target/release/ipc-cli + !crates/target/release/fendermint + !crates/target/release/ipc-cli contracts/cache contracts/node-modules EOF - + ## Print the .dockerignore file for debugging. echo "Dockerfile.dockerignore:" cat /tmp/Dockerfile.dockerignore - + ## Build the Docker image. DOCKER_BUILDKIT=1 docker build \ --load \ diff --git a/.github/workflows/contracts-test.yaml b/.github/workflows/contracts-test.yaml index c1ff3636c..ae9b40b1f 100644 --- a/.github/workflows/contracts-test.yaml +++ b/.github/workflows/contracts-test.yaml @@ -26,8 +26,8 @@ jobs: with: path: | ./contracts/out - ./contract-bindings ./contracts/cache + ./crates/contract-bindings key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }} - name: Run tests diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 60652da93..d2d012a3c 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -7,6 +7,7 @@ on: env: CARGO_INCREMENTAL: "0" SCCACHE_CACHE_SIZE: 10G + # TODO use RUSTC_WRAPPER=sccache and double check if the ones below are still required CC: "sccache clang" CXX: "sccache clang++" PROFILE: "ci" @@ -20,7 +21,7 @@ jobs: matrix: image: - name: fendermint - path: fendermint + path: crates/node needs_deps: true - name: ipc-contracts path: contracts diff --git a/.github/workflows/tests-e2e.yaml b/.github/workflows/tests-e2e.yaml index 798592ae5..bb4d6655d 100644 --- a/.github/workflows/tests-e2e.yaml +++ b/.github/workflows/tests-e2e.yaml @@ -40,8 +40,8 @@ jobs: with: path: | ./contracts/out - ./contract-bindings ./contracts/cache + ./crates/contract-bindings key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }} - uses: Swatinem/rust-cache@v2 @@ -53,5 +53,6 @@ jobs: set -e cd contracts make gen - cd ../fendermint + cd .. + cd crates/node PROFILE=release make e2e-only diff --git a/.github/workflows/tests-unit.yaml b/.github/workflows/tests-unit.yaml index ba2332e09..e9ff3c917 100644 --- a/.github/workflows/tests-unit.yaml +++ b/.github/workflows/tests-unit.yaml @@ -29,8 +29,8 @@ jobs: with: path: | ./contracts/out - ./contract-bindings ./contracts/cache + ./crates/contract-bindings key: v2-contracts-abi-${{ hashFiles('./contracts/**/*.sol') }} - uses: Swatinem/rust-cache@v2 diff --git a/Makefile b/Makefile index 46fa0fd75..cdd7a1cca 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,9 @@ default: cd contracts && make gen - cargo build --release - ./target/release/ipc-cli --version - ./target/release/fendermint --version + cd crates && (cargo build --release && ./target/release/ipc-cli --version && ./target/release/fendermint --version) -SUBTREES_RUST := fendermint ipc ipld/resolver +SUBTREES_RUST := $(patsubst %, crates/%, $(ls -1 crates)) SUBTREES_CONTRACTS := contracts SUBTREES_ALL := $(SUBTREES_RUST) $(SUBTREES_CONTRACTS) diff --git a/contracts/.gitattributes b/contracts/.gitattributes index 68df07e81..1acb9abb5 100644 --- a/contracts/.gitattributes +++ b/contracts/.gitattributes @@ -1,2 +1,2 @@ out/* linguist-generated=true -binding/* linguist-generated=true +contract-bindings/* linguist-generated=true diff --git a/contracts/.gitignore b/contracts/.gitignore index 05b7ae956..48f076222 100644 --- a/contracts/.gitignore +++ b/contracts/.gitignore @@ -6,7 +6,6 @@ crytic-export/ .env broadcast/ out/ -binding/src node_modules @@ -22,7 +21,7 @@ deployments.json scripts/*.out scripts/deploy-registry.ts scripts/deploy-gateway.ts -binding/target +contract-bindings/target subnet.registry.json subnet.actor.json @@ -38,4 +37,4 @@ report.json *.un~ ## Licenses are picked up from the root when packing the npm package. -LICENSE-* \ No newline at end of file +LICENSE-* diff --git a/contracts/Makefile b/contracts/Makefile index d2ae265ca..867c4a9a3 100644 --- a/contracts/Makefile +++ b/contracts/Makefile @@ -85,7 +85,7 @@ compile-abi: node_modules | forge ./ops/compile-abi.sh $(OUTPUT) rust-binding: - OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ../contract-bindings/Cargo.toml -p ipc_actors_abis + OUTPUT=$(OUTPUT) cargo build --locked --release --manifest-path ../crates/contract-bindings/Cargo.toml -p ipc_actors_abis # ============================================================================== # Running security checks within the local computer @@ -149,4 +149,4 @@ forge: exit 1; \ fi -# ============================================================================== \ No newline at end of file +# ============================================================================== diff --git a/contracts/README.md b/contracts/README.md index 7fd69434a..42f284c5e 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -168,7 +168,7 @@ Also: 1. Use `make storage` to check that the storage layout has not been corrupted. 2. Use `make coverage` to get the test coverage report. -3. Use `make rust-binding` to generate bindings in Rust. +3. Use `make rust-binding` to generate contract-bindings in Rust. # Vulnerability Management diff --git a/Cargo.lock b/crates/Cargo.lock similarity index 100% rename from Cargo.lock rename to crates/Cargo.lock diff --git a/Cargo.toml b/crates/Cargo.toml similarity index 86% rename from Cargo.toml rename to crates/Cargo.toml index 1a4ee2498..892488dd8 100644 --- a/Cargo.toml +++ b/crates/Cargo.toml @@ -5,9 +5,9 @@ members = [ "contract-bindings", # merkle - "ext/merkle-tree-rs", - "ext/libp2p-bitswap", - "ext/frc42_dispatch", + "patched_external/merkle-tree-rs", + "patched_external/libp2p-bitswap", + "patched_external/frc42_dispatch", # ipc "ipc/cli", @@ -21,26 +21,26 @@ members = [ "ipld/resolver", # fendermint - "fendermint/abci", - "fendermint/app", - "fendermint/app/options", - "fendermint/crypto", - "fendermint/app/settings", - "fendermint/eth/*", - "fendermint/rocksdb", - "fendermint/rpc", - "fendermint/storage", - "fendermint/testing", - "fendermint/testing/materializer", - "fendermint/testing/*-test", - "fendermint/tracing", - "fendermint/vm/*", - "fendermint/actors", - "fendermint/actors/api", - "fendermint/actors/chainmetadata", - "fendermint/actors/activity-tracker", - "fendermint/actors/eam", - "fendermint/actors/gas_market/eip1559", + "node/abci", + "node/app", + "node/app/options", + "node/crypto", + "node/app/settings", + "node/eth/*", + "node/rocksdb", + "node/rpc", + "node/storage", + "node/testing", + "node/testing/materializer", + "node/testing/*-test", + "node/tracing", + "node/vm/*", + "node/actors", + "node/actors/api", + "node/actors/chainmetadata", + "node/actors/activity-tracker", + "node/actors/eam", + "node/actors/gas_market/eip1559", ] [workspace.package] @@ -116,7 +116,7 @@ libp2p = { version = "0.53", default-features = false, features = [ "plaintext", ] } libp2p-mplex = { version = "0.41" } -libp2p-bitswap = { path = "ext/libp2p-bitswap" } +libp2p-bitswap = { path = "patched_external/libp2p-bitswap" } libsecp256k1 = "0.7" literally = "0.1.3" log = "0.4" @@ -185,7 +185,7 @@ ipc_ipld_resolver = { path = "ipld/resolver" } ipc-types = { path = "ipc/types" } ipc-observability = { path = "ipc/observability" } ipc_actors_abis = { path = "contract-bindings" } -fendermint_actors_api = { path = "fendermint/actors/api" } +fendermint_actors_api = { path = "crates/node/actors/api" } # Vendored for cross-compilation, see https://github.com/cross-rs/cross/wiki/Recipes#openssl # Make sure every top level build target actually imports this dependency, and don't end up @@ -193,7 +193,7 @@ fendermint_actors_api = { path = "fendermint/actors/api" } # for ARM64 on AMD64 will fail, it won't find the OpenSSL installation. openssl = { version = "0.10", features = ["vendored"] } -# NOTE: When upgrading the FVM it may cause our fendermint/actors/build.rs to fail as it can +# NOTE: When upgrading the FVM it may cause our node/actors/build.rs to fail as it can # pull in crates as transitive dependencies that do not support Wasm architector. If this # happens, try removing "crypto" feature from fvm_shared dependency in contract-bindings/Cargo.toml # and run `cargo build`. Then add the "crypto" feature back and run `cargo build` again. @@ -226,15 +226,15 @@ fil_actors_evm_shared = { git = "https://github.com/filecoin-project/builtin-act fil_actor_eam = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v15.0.0" } fil_actors_runtime = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v15.0.0" } -fendermint_actor_eam = { path = "./fendermint/actors/eam" } -fendermint_actor_activity_tracker = { path = "./fendermint/actors/activity-tracker" } +fendermint_actor_eam = { path = "./node/actors/eam" } +fendermint_actor_activity_tracker = { path = "./node/actors/activity-tracker" } cid = { version = "0.10.1", default-features = false, features = [ "serde-codec", "std", ] } -frc42_dispatch = { path = "./ext/frc42_dispatch" } +frc42_dispatch = { path = "./patched_external/frc42_dispatch" } # Using the same tendermint-rs dependency as tower-abci. From both we are interested in v037 modules. tower-abci = { version = "0.7" } diff --git a/crates/README.md b/crates/README.md new file mode 100644 index 000000000..08a2d741f --- /dev/null +++ b/crates/README.md @@ -0,0 +1,5 @@ +# crates + +Home of all rust crates, without exception. + +The root shall contain a virtual manifest referencing all workspace crates. diff --git a/contract-bindings/.gitignore b/crates/contract-bindings/.gitignore similarity index 100% rename from contract-bindings/.gitignore rename to crates/contract-bindings/.gitignore diff --git a/contract-bindings/Cargo.toml b/crates/contract-bindings/Cargo.toml similarity index 100% rename from contract-bindings/Cargo.toml rename to crates/contract-bindings/Cargo.toml diff --git a/contract-bindings/build.rs b/crates/contract-bindings/build.rs similarity index 96% rename from contract-bindings/build.rs rename to crates/contract-bindings/build.rs index 115d92124..ca6cdf989 100644 --- a/contract-bindings/build.rs +++ b/crates/contract-bindings/build.rs @@ -5,7 +5,6 @@ use std::io::Write; use std::path::PathBuf; const SKIP_ENV_VAR_NAME: &str = "SKIP_BINDING_GENERATION"; - /// Generate Rust contract-bindings from the IPC Solidity Actors ABI artifacts. ///p /// These are built by `make ipc-actors-abi`, here we just add the final step @@ -47,7 +46,13 @@ fn main() -> color_eyre::Result<()> { println!("cargo:warn=Running binding generation..."); // Where are the Solidity artifacts. - let workspace_dir = crate_dir.parent().expect("Should exist").to_path_buf(); + let workspace_dir = crate_dir + .clone() + .parent() + .expect("Parent dir should exist, since we are part of a workspace") + .parent() + .expect("Structure is such that we are two levels from the root") + .to_path_buf(); let contracts_dir = workspace_dir.join("contracts"); diff --git a/contract-bindings/src/convert.rs b/crates/contract-bindings/src/convert.rs similarity index 100% rename from contract-bindings/src/convert.rs rename to crates/contract-bindings/src/convert.rs diff --git a/contract-bindings/src/lib.rs b/crates/contract-bindings/src/lib.rs similarity index 100% rename from contract-bindings/src/lib.rs rename to crates/contract-bindings/src/lib.rs diff --git a/ipc/.dockerignore b/crates/ipc/.dockerignore similarity index 100% rename from ipc/.dockerignore rename to crates/ipc/.dockerignore diff --git a/ipc/.gitignore b/crates/ipc/.gitignore similarity index 100% rename from ipc/.gitignore rename to crates/ipc/.gitignore diff --git a/ipc/Cargo.lock b/crates/ipc/Cargo.lock similarity index 100% rename from ipc/Cargo.lock rename to crates/ipc/Cargo.lock diff --git a/ipc/Dockerfile b/crates/ipc/Dockerfile similarity index 100% rename from ipc/Dockerfile rename to crates/ipc/Dockerfile diff --git a/ipc/Makefile b/crates/ipc/Makefile similarity index 100% rename from ipc/Makefile rename to crates/ipc/Makefile diff --git a/ipc/api/Cargo.toml b/crates/ipc/api/Cargo.toml similarity index 94% rename from ipc/api/Cargo.toml rename to crates/ipc/api/Cargo.toml index df2c6bacb..4e44c7dd8 100644 --- a/ipc/api/Cargo.toml +++ b/crates/ipc/api/Cargo.toml @@ -31,7 +31,7 @@ serde_with = { workspace = true, features = ["hex"] } ipc_actors_abis = { workspace = true } ipc-types = { workspace = true } -merkle-tree-rs = { path = "../../ext/merkle-tree-rs" } +merkle-tree-rs = { path = "../../patched_external/merkle-tree-rs" } [dev-dependencies] serde_json = { workspace = true } diff --git a/ipc/api/src/address.rs b/crates/ipc/api/src/address.rs similarity index 100% rename from ipc/api/src/address.rs rename to crates/ipc/api/src/address.rs diff --git a/ipc/api/src/checkpoint.rs b/crates/ipc/api/src/checkpoint.rs similarity index 100% rename from ipc/api/src/checkpoint.rs rename to crates/ipc/api/src/checkpoint.rs diff --git a/ipc/api/src/cross.rs b/crates/ipc/api/src/cross.rs similarity index 100% rename from ipc/api/src/cross.rs rename to crates/ipc/api/src/cross.rs diff --git a/ipc/api/src/error.rs b/crates/ipc/api/src/error.rs similarity index 100% rename from ipc/api/src/error.rs rename to crates/ipc/api/src/error.rs diff --git a/ipc/api/src/evm.rs b/crates/ipc/api/src/evm.rs similarity index 100% rename from ipc/api/src/evm.rs rename to crates/ipc/api/src/evm.rs diff --git a/ipc/api/src/gateway.rs b/crates/ipc/api/src/gateway.rs similarity index 100% rename from ipc/api/src/gateway.rs rename to crates/ipc/api/src/gateway.rs diff --git a/ipc/api/src/lib.rs b/crates/ipc/api/src/lib.rs similarity index 100% rename from ipc/api/src/lib.rs rename to crates/ipc/api/src/lib.rs diff --git a/ipc/api/src/merkle.rs b/crates/ipc/api/src/merkle.rs similarity index 100% rename from ipc/api/src/merkle.rs rename to crates/ipc/api/src/merkle.rs diff --git a/ipc/api/src/runtime.rs b/crates/ipc/api/src/runtime.rs similarity index 100% rename from ipc/api/src/runtime.rs rename to crates/ipc/api/src/runtime.rs diff --git a/ipc/api/src/staking.rs b/crates/ipc/api/src/staking.rs similarity index 100% rename from ipc/api/src/staking.rs rename to crates/ipc/api/src/staking.rs diff --git a/ipc/api/src/subnet.rs b/crates/ipc/api/src/subnet.rs similarity index 100% rename from ipc/api/src/subnet.rs rename to crates/ipc/api/src/subnet.rs diff --git a/ipc/api/src/subnet_id.rs b/crates/ipc/api/src/subnet_id.rs similarity index 100% rename from ipc/api/src/subnet_id.rs rename to crates/ipc/api/src/subnet_id.rs diff --git a/ipc/api/src/validator.rs b/crates/ipc/api/src/validator.rs similarity index 100% rename from ipc/api/src/validator.rs rename to crates/ipc/api/src/validator.rs diff --git a/ipc/cli/Cargo.toml b/crates/ipc/cli/Cargo.toml similarity index 100% rename from ipc/cli/Cargo.toml rename to crates/ipc/cli/Cargo.toml diff --git a/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs b/crates/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/bottomup_bundles.rs rename to crates/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs diff --git a/ipc/cli/src/commands/checkpoint/bottomup_height.rs b/crates/ipc/cli/src/commands/checkpoint/bottomup_height.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/bottomup_height.rs rename to crates/ipc/cli/src/commands/checkpoint/bottomup_height.rs diff --git a/ipc/cli/src/commands/checkpoint/list_validator_changes.rs b/crates/ipc/cli/src/commands/checkpoint/list_validator_changes.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/list_validator_changes.rs rename to crates/ipc/cli/src/commands/checkpoint/list_validator_changes.rs diff --git a/ipc/cli/src/commands/checkpoint/mod.rs b/crates/ipc/cli/src/commands/checkpoint/mod.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/mod.rs rename to crates/ipc/cli/src/commands/checkpoint/mod.rs diff --git a/ipc/cli/src/commands/checkpoint/quorum_reached.rs b/crates/ipc/cli/src/commands/checkpoint/quorum_reached.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/quorum_reached.rs rename to crates/ipc/cli/src/commands/checkpoint/quorum_reached.rs diff --git a/ipc/cli/src/commands/checkpoint/relayer.rs b/crates/ipc/cli/src/commands/checkpoint/relayer.rs similarity index 100% rename from ipc/cli/src/commands/checkpoint/relayer.rs rename to crates/ipc/cli/src/commands/checkpoint/relayer.rs diff --git a/ipc/cli/src/commands/config/init.rs b/crates/ipc/cli/src/commands/config/init.rs similarity index 100% rename from ipc/cli/src/commands/config/init.rs rename to crates/ipc/cli/src/commands/config/init.rs diff --git a/ipc/cli/src/commands/config/mod.rs b/crates/ipc/cli/src/commands/config/mod.rs similarity index 100% rename from ipc/cli/src/commands/config/mod.rs rename to crates/ipc/cli/src/commands/config/mod.rs diff --git a/ipc/cli/src/commands/crossmsg/fund.rs b/crates/ipc/cli/src/commands/crossmsg/fund.rs similarity index 100% rename from ipc/cli/src/commands/crossmsg/fund.rs rename to crates/ipc/cli/src/commands/crossmsg/fund.rs diff --git a/ipc/cli/src/commands/crossmsg/mod.rs b/crates/ipc/cli/src/commands/crossmsg/mod.rs similarity index 100% rename from ipc/cli/src/commands/crossmsg/mod.rs rename to crates/ipc/cli/src/commands/crossmsg/mod.rs diff --git a/ipc/cli/src/commands/crossmsg/propagate.rs b/crates/ipc/cli/src/commands/crossmsg/propagate.rs similarity index 100% rename from ipc/cli/src/commands/crossmsg/propagate.rs rename to crates/ipc/cli/src/commands/crossmsg/propagate.rs diff --git a/ipc/cli/src/commands/crossmsg/release.rs b/crates/ipc/cli/src/commands/crossmsg/release.rs similarity index 100% rename from ipc/cli/src/commands/crossmsg/release.rs rename to crates/ipc/cli/src/commands/crossmsg/release.rs diff --git a/ipc/cli/src/commands/crossmsg/topdown_cross.rs b/crates/ipc/cli/src/commands/crossmsg/topdown_cross.rs similarity index 100% rename from ipc/cli/src/commands/crossmsg/topdown_cross.rs rename to crates/ipc/cli/src/commands/crossmsg/topdown_cross.rs diff --git a/ipc/cli/src/commands/daemon.rs b/crates/ipc/cli/src/commands/daemon.rs similarity index 100% rename from ipc/cli/src/commands/daemon.rs rename to crates/ipc/cli/src/commands/daemon.rs diff --git a/ipc/cli/src/commands/mod.rs b/crates/ipc/cli/src/commands/mod.rs similarity index 100% rename from ipc/cli/src/commands/mod.rs rename to crates/ipc/cli/src/commands/mod.rs diff --git a/ipc/cli/src/commands/subnet/bootstrap.rs b/crates/ipc/cli/src/commands/subnet/bootstrap.rs similarity index 100% rename from ipc/cli/src/commands/subnet/bootstrap.rs rename to crates/ipc/cli/src/commands/subnet/bootstrap.rs diff --git a/ipc/cli/src/commands/subnet/create.rs b/crates/ipc/cli/src/commands/subnet/create.rs similarity index 100% rename from ipc/cli/src/commands/subnet/create.rs rename to crates/ipc/cli/src/commands/subnet/create.rs diff --git a/ipc/cli/src/commands/subnet/genesis_epoch.rs b/crates/ipc/cli/src/commands/subnet/genesis_epoch.rs similarity index 100% rename from ipc/cli/src/commands/subnet/genesis_epoch.rs rename to crates/ipc/cli/src/commands/subnet/genesis_epoch.rs diff --git a/ipc/cli/src/commands/subnet/join.rs b/crates/ipc/cli/src/commands/subnet/join.rs similarity index 100% rename from ipc/cli/src/commands/subnet/join.rs rename to crates/ipc/cli/src/commands/subnet/join.rs diff --git a/ipc/cli/src/commands/subnet/kill.rs b/crates/ipc/cli/src/commands/subnet/kill.rs similarity index 100% rename from ipc/cli/src/commands/subnet/kill.rs rename to crates/ipc/cli/src/commands/subnet/kill.rs diff --git a/ipc/cli/src/commands/subnet/leave.rs b/crates/ipc/cli/src/commands/subnet/leave.rs similarity index 100% rename from ipc/cli/src/commands/subnet/leave.rs rename to crates/ipc/cli/src/commands/subnet/leave.rs diff --git a/ipc/cli/src/commands/subnet/list_subnets.rs b/crates/ipc/cli/src/commands/subnet/list_subnets.rs similarity index 100% rename from ipc/cli/src/commands/subnet/list_subnets.rs rename to crates/ipc/cli/src/commands/subnet/list_subnets.rs diff --git a/ipc/cli/src/commands/subnet/list_validators.rs b/crates/ipc/cli/src/commands/subnet/list_validators.rs similarity index 100% rename from ipc/cli/src/commands/subnet/list_validators.rs rename to crates/ipc/cli/src/commands/subnet/list_validators.rs diff --git a/ipc/cli/src/commands/subnet/mod.rs b/crates/ipc/cli/src/commands/subnet/mod.rs similarity index 100% rename from ipc/cli/src/commands/subnet/mod.rs rename to crates/ipc/cli/src/commands/subnet/mod.rs diff --git a/ipc/cli/src/commands/subnet/rpc.rs b/crates/ipc/cli/src/commands/subnet/rpc.rs similarity index 100% rename from ipc/cli/src/commands/subnet/rpc.rs rename to crates/ipc/cli/src/commands/subnet/rpc.rs diff --git a/ipc/cli/src/commands/subnet/send_value.rs b/crates/ipc/cli/src/commands/subnet/send_value.rs similarity index 100% rename from ipc/cli/src/commands/subnet/send_value.rs rename to crates/ipc/cli/src/commands/subnet/send_value.rs diff --git a/ipc/cli/src/commands/subnet/set_federated_power.rs b/crates/ipc/cli/src/commands/subnet/set_federated_power.rs similarity index 100% rename from ipc/cli/src/commands/subnet/set_federated_power.rs rename to crates/ipc/cli/src/commands/subnet/set_federated_power.rs diff --git a/ipc/cli/src/commands/subnet/show_gateway_contract_commit_sha.rs b/crates/ipc/cli/src/commands/subnet/show_gateway_contract_commit_sha.rs similarity index 100% rename from ipc/cli/src/commands/subnet/show_gateway_contract_commit_sha.rs rename to crates/ipc/cli/src/commands/subnet/show_gateway_contract_commit_sha.rs diff --git a/ipc/cli/src/commands/subnet/validator.rs b/crates/ipc/cli/src/commands/subnet/validator.rs similarity index 100% rename from ipc/cli/src/commands/subnet/validator.rs rename to crates/ipc/cli/src/commands/subnet/validator.rs diff --git a/ipc/cli/src/commands/util/eth.rs b/crates/ipc/cli/src/commands/util/eth.rs similarity index 100% rename from ipc/cli/src/commands/util/eth.rs rename to crates/ipc/cli/src/commands/util/eth.rs diff --git a/ipc/cli/src/commands/util/f4.rs b/crates/ipc/cli/src/commands/util/f4.rs similarity index 100% rename from ipc/cli/src/commands/util/f4.rs rename to crates/ipc/cli/src/commands/util/f4.rs diff --git a/ipc/cli/src/commands/util/mod.rs b/crates/ipc/cli/src/commands/util/mod.rs similarity index 100% rename from ipc/cli/src/commands/util/mod.rs rename to crates/ipc/cli/src/commands/util/mod.rs diff --git a/ipc/cli/src/commands/validator/batch_claim.rs b/crates/ipc/cli/src/commands/validator/batch_claim.rs similarity index 100% rename from ipc/cli/src/commands/validator/batch_claim.rs rename to crates/ipc/cli/src/commands/validator/batch_claim.rs diff --git a/ipc/cli/src/commands/validator/list.rs b/crates/ipc/cli/src/commands/validator/list.rs similarity index 100% rename from ipc/cli/src/commands/validator/list.rs rename to crates/ipc/cli/src/commands/validator/list.rs diff --git a/ipc/cli/src/commands/validator/mod.rs b/crates/ipc/cli/src/commands/validator/mod.rs similarity index 100% rename from ipc/cli/src/commands/validator/mod.rs rename to crates/ipc/cli/src/commands/validator/mod.rs diff --git a/ipc/cli/src/commands/wallet/balances.rs b/crates/ipc/cli/src/commands/wallet/balances.rs similarity index 100% rename from ipc/cli/src/commands/wallet/balances.rs rename to crates/ipc/cli/src/commands/wallet/balances.rs diff --git a/ipc/cli/src/commands/wallet/default.rs b/crates/ipc/cli/src/commands/wallet/default.rs similarity index 100% rename from ipc/cli/src/commands/wallet/default.rs rename to crates/ipc/cli/src/commands/wallet/default.rs diff --git a/ipc/cli/src/commands/wallet/export.rs b/crates/ipc/cli/src/commands/wallet/export.rs similarity index 100% rename from ipc/cli/src/commands/wallet/export.rs rename to crates/ipc/cli/src/commands/wallet/export.rs diff --git a/ipc/cli/src/commands/wallet/import.rs b/crates/ipc/cli/src/commands/wallet/import.rs similarity index 100% rename from ipc/cli/src/commands/wallet/import.rs rename to crates/ipc/cli/src/commands/wallet/import.rs diff --git a/ipc/cli/src/commands/wallet/list.rs b/crates/ipc/cli/src/commands/wallet/list.rs similarity index 100% rename from ipc/cli/src/commands/wallet/list.rs rename to crates/ipc/cli/src/commands/wallet/list.rs diff --git a/ipc/cli/src/commands/wallet/mod.rs b/crates/ipc/cli/src/commands/wallet/mod.rs similarity index 100% rename from ipc/cli/src/commands/wallet/mod.rs rename to crates/ipc/cli/src/commands/wallet/mod.rs diff --git a/ipc/cli/src/commands/wallet/new.rs b/crates/ipc/cli/src/commands/wallet/new.rs similarity index 100% rename from ipc/cli/src/commands/wallet/new.rs rename to crates/ipc/cli/src/commands/wallet/new.rs diff --git a/ipc/cli/src/commands/wallet/remove.rs b/crates/ipc/cli/src/commands/wallet/remove.rs similarity index 100% rename from ipc/cli/src/commands/wallet/remove.rs rename to crates/ipc/cli/src/commands/wallet/remove.rs diff --git a/ipc/cli/src/lib.rs b/crates/ipc/cli/src/lib.rs similarity index 100% rename from ipc/cli/src/lib.rs rename to crates/ipc/cli/src/lib.rs diff --git a/ipc/cli/src/main.rs b/crates/ipc/cli/src/main.rs similarity index 100% rename from ipc/cli/src/main.rs rename to crates/ipc/cli/src/main.rs diff --git a/ipc/observability/Cargo.toml b/crates/ipc/observability/Cargo.toml similarity index 100% rename from ipc/observability/Cargo.toml rename to crates/ipc/observability/Cargo.toml diff --git a/ipc/observability/src/config.rs b/crates/ipc/observability/src/config.rs similarity index 100% rename from ipc/observability/src/config.rs rename to crates/ipc/observability/src/config.rs diff --git a/ipc/observability/src/lib.rs b/crates/ipc/observability/src/lib.rs similarity index 100% rename from ipc/observability/src/lib.rs rename to crates/ipc/observability/src/lib.rs diff --git a/ipc/observability/src/macros.rs b/crates/ipc/observability/src/macros.rs similarity index 100% rename from ipc/observability/src/macros.rs rename to crates/ipc/observability/src/macros.rs diff --git a/ipc/observability/src/observe.rs b/crates/ipc/observability/src/observe.rs similarity index 100% rename from ipc/observability/src/observe.rs rename to crates/ipc/observability/src/observe.rs diff --git a/ipc/observability/src/serde.rs b/crates/ipc/observability/src/serde.rs similarity index 100% rename from ipc/observability/src/serde.rs rename to crates/ipc/observability/src/serde.rs diff --git a/ipc/observability/src/traces.rs b/crates/ipc/observability/src/traces.rs similarity index 100% rename from ipc/observability/src/traces.rs rename to crates/ipc/observability/src/traces.rs diff --git a/ipc/observability/src/tracing_layers.rs b/crates/ipc/observability/src/tracing_layers.rs similarity index 100% rename from ipc/observability/src/tracing_layers.rs rename to crates/ipc/observability/src/tracing_layers.rs diff --git a/ipc/provider/Cargo.toml b/crates/ipc/provider/Cargo.toml similarity index 96% rename from ipc/provider/Cargo.toml rename to crates/ipc/provider/Cargo.toml index f03d6d51d..084886bf7 100644 --- a/ipc/provider/Cargo.toml +++ b/crates/ipc/provider/Cargo.toml @@ -45,7 +45,7 @@ fil_actors_runtime = { workspace = true } fvm_ipld_encoding = { workspace = true } fvm_shared = { workspace = true, features = ["crypto"] } -merkle-tree-rs = { path = "../../ext/merkle-tree-rs" } +merkle-tree-rs = { path = "../../patched_external/merkle-tree-rs" } ipc-types = { workspace = true } ipc-wallet = { workspace = true, features = ["with-ethers"] } diff --git a/ipc/provider/src/checkpoint.rs b/crates/ipc/provider/src/checkpoint.rs similarity index 100% rename from ipc/provider/src/checkpoint.rs rename to crates/ipc/provider/src/checkpoint.rs diff --git a/ipc/provider/src/config/deserialize.rs b/crates/ipc/provider/src/config/deserialize.rs similarity index 100% rename from ipc/provider/src/config/deserialize.rs rename to crates/ipc/provider/src/config/deserialize.rs diff --git a/ipc/provider/src/config/mod.rs b/crates/ipc/provider/src/config/mod.rs similarity index 100% rename from ipc/provider/src/config/mod.rs rename to crates/ipc/provider/src/config/mod.rs diff --git a/ipc/provider/src/config/serialize.rs b/crates/ipc/provider/src/config/serialize.rs similarity index 100% rename from ipc/provider/src/config/serialize.rs rename to crates/ipc/provider/src/config/serialize.rs diff --git a/ipc/provider/src/config/subnet.rs b/crates/ipc/provider/src/config/subnet.rs similarity index 100% rename from ipc/provider/src/config/subnet.rs rename to crates/ipc/provider/src/config/subnet.rs diff --git a/ipc/provider/src/config/tests.rs b/crates/ipc/provider/src/config/tests.rs similarity index 100% rename from ipc/provider/src/config/tests.rs rename to crates/ipc/provider/src/config/tests.rs diff --git a/ipc/provider/src/jsonrpc/mod.rs b/crates/ipc/provider/src/jsonrpc/mod.rs similarity index 100% rename from ipc/provider/src/jsonrpc/mod.rs rename to crates/ipc/provider/src/jsonrpc/mod.rs diff --git a/ipc/provider/src/jsonrpc/tests.rs b/crates/ipc/provider/src/jsonrpc/tests.rs similarity index 100% rename from ipc/provider/src/jsonrpc/tests.rs rename to crates/ipc/provider/src/jsonrpc/tests.rs diff --git a/ipc/provider/src/lib.rs b/crates/ipc/provider/src/lib.rs similarity index 100% rename from ipc/provider/src/lib.rs rename to crates/ipc/provider/src/lib.rs diff --git a/ipc/provider/src/lotus/client.rs b/crates/ipc/provider/src/lotus/client.rs similarity index 100% rename from ipc/provider/src/lotus/client.rs rename to crates/ipc/provider/src/lotus/client.rs diff --git a/ipc/provider/src/lotus/message/chain.rs b/crates/ipc/provider/src/lotus/message/chain.rs similarity index 100% rename from ipc/provider/src/lotus/message/chain.rs rename to crates/ipc/provider/src/lotus/message/chain.rs diff --git a/ipc/provider/src/lotus/message/deserialize.rs b/crates/ipc/provider/src/lotus/message/deserialize.rs similarity index 100% rename from ipc/provider/src/lotus/message/deserialize.rs rename to crates/ipc/provider/src/lotus/message/deserialize.rs diff --git a/ipc/provider/src/lotus/message/ipc.rs b/crates/ipc/provider/src/lotus/message/ipc.rs similarity index 100% rename from ipc/provider/src/lotus/message/ipc.rs rename to crates/ipc/provider/src/lotus/message/ipc.rs diff --git a/ipc/provider/src/lotus/message/mod.rs b/crates/ipc/provider/src/lotus/message/mod.rs similarity index 100% rename from ipc/provider/src/lotus/message/mod.rs rename to crates/ipc/provider/src/lotus/message/mod.rs diff --git a/ipc/provider/src/lotus/message/mpool.rs b/crates/ipc/provider/src/lotus/message/mpool.rs similarity index 100% rename from ipc/provider/src/lotus/message/mpool.rs rename to crates/ipc/provider/src/lotus/message/mpool.rs diff --git a/ipc/provider/src/lotus/message/serialize.rs b/crates/ipc/provider/src/lotus/message/serialize.rs similarity index 100% rename from ipc/provider/src/lotus/message/serialize.rs rename to crates/ipc/provider/src/lotus/message/serialize.rs diff --git a/ipc/provider/src/lotus/message/state.rs b/crates/ipc/provider/src/lotus/message/state.rs similarity index 100% rename from ipc/provider/src/lotus/message/state.rs rename to crates/ipc/provider/src/lotus/message/state.rs diff --git a/ipc/provider/src/lotus/message/tests.rs b/crates/ipc/provider/src/lotus/message/tests.rs similarity index 100% rename from ipc/provider/src/lotus/message/tests.rs rename to crates/ipc/provider/src/lotus/message/tests.rs diff --git a/ipc/provider/src/lotus/message/wallet.rs b/crates/ipc/provider/src/lotus/message/wallet.rs similarity index 100% rename from ipc/provider/src/lotus/message/wallet.rs rename to crates/ipc/provider/src/lotus/message/wallet.rs diff --git a/ipc/provider/src/lotus/mod.rs b/crates/ipc/provider/src/lotus/mod.rs similarity index 100% rename from ipc/provider/src/lotus/mod.rs rename to crates/ipc/provider/src/lotus/mod.rs diff --git a/ipc/provider/src/manager/evm/gas_estimator_middleware.rs b/crates/ipc/provider/src/manager/evm/gas_estimator_middleware.rs similarity index 100% rename from ipc/provider/src/manager/evm/gas_estimator_middleware.rs rename to crates/ipc/provider/src/manager/evm/gas_estimator_middleware.rs diff --git a/ipc/provider/src/manager/evm/manager.rs b/crates/ipc/provider/src/manager/evm/manager.rs similarity index 100% rename from ipc/provider/src/manager/evm/manager.rs rename to crates/ipc/provider/src/manager/evm/manager.rs diff --git a/ipc/provider/src/manager/evm/mod.rs b/crates/ipc/provider/src/manager/evm/mod.rs similarity index 100% rename from ipc/provider/src/manager/evm/mod.rs rename to crates/ipc/provider/src/manager/evm/mod.rs diff --git a/ipc/provider/src/manager/mod.rs b/crates/ipc/provider/src/manager/mod.rs similarity index 100% rename from ipc/provider/src/manager/mod.rs rename to crates/ipc/provider/src/manager/mod.rs diff --git a/ipc/provider/src/manager/subnet.rs b/crates/ipc/provider/src/manager/subnet.rs similarity index 100% rename from ipc/provider/src/manager/subnet.rs rename to crates/ipc/provider/src/manager/subnet.rs diff --git a/ipc/provider/src/observe.rs b/crates/ipc/provider/src/observe.rs similarity index 100% rename from ipc/provider/src/observe.rs rename to crates/ipc/provider/src/observe.rs diff --git a/ipc/rust-toolchain.toml b/crates/ipc/rust-toolchain.toml similarity index 100% rename from ipc/rust-toolchain.toml rename to crates/ipc/rust-toolchain.toml diff --git a/ipc/types/Cargo.toml b/crates/ipc/types/Cargo.toml similarity index 100% rename from ipc/types/Cargo.toml rename to crates/ipc/types/Cargo.toml diff --git a/ipc/types/README.md b/crates/ipc/types/README.md similarity index 100% rename from ipc/types/README.md rename to crates/ipc/types/README.md diff --git a/ipc/types/src/actor_error.rs b/crates/ipc/types/src/actor_error.rs similarity index 100% rename from ipc/types/src/actor_error.rs rename to crates/ipc/types/src/actor_error.rs diff --git a/ipc/types/src/amt.rs b/crates/ipc/types/src/amt.rs similarity index 100% rename from ipc/types/src/amt.rs rename to crates/ipc/types/src/amt.rs diff --git a/ipc/types/src/ethaddr.rs b/crates/ipc/types/src/ethaddr.rs similarity index 100% rename from ipc/types/src/ethaddr.rs rename to crates/ipc/types/src/ethaddr.rs diff --git a/ipc/types/src/hamt.rs b/crates/ipc/types/src/hamt.rs similarity index 100% rename from ipc/types/src/hamt.rs rename to crates/ipc/types/src/hamt.rs diff --git a/ipc/types/src/lib.rs b/crates/ipc/types/src/lib.rs similarity index 100% rename from ipc/types/src/lib.rs rename to crates/ipc/types/src/lib.rs diff --git a/ipc/types/src/link.rs b/crates/ipc/types/src/link.rs similarity index 100% rename from ipc/types/src/link.rs rename to crates/ipc/types/src/link.rs diff --git a/ipc/types/src/taddress.rs b/crates/ipc/types/src/taddress.rs similarity index 100% rename from ipc/types/src/taddress.rs rename to crates/ipc/types/src/taddress.rs diff --git a/ipc/types/src/uints.rs b/crates/ipc/types/src/uints.rs similarity index 100% rename from ipc/types/src/uints.rs rename to crates/ipc/types/src/uints.rs diff --git a/ipc/wallet/Cargo.toml b/crates/ipc/wallet/Cargo.toml similarity index 100% rename from ipc/wallet/Cargo.toml rename to crates/ipc/wallet/Cargo.toml diff --git a/ipc/wallet/src/evm/memory.rs b/crates/ipc/wallet/src/evm/memory.rs similarity index 100% rename from ipc/wallet/src/evm/memory.rs rename to crates/ipc/wallet/src/evm/memory.rs diff --git a/ipc/wallet/src/evm/mod.rs b/crates/ipc/wallet/src/evm/mod.rs similarity index 100% rename from ipc/wallet/src/evm/mod.rs rename to crates/ipc/wallet/src/evm/mod.rs diff --git a/ipc/wallet/src/evm/persistent.rs b/crates/ipc/wallet/src/evm/persistent.rs similarity index 100% rename from ipc/wallet/src/evm/persistent.rs rename to crates/ipc/wallet/src/evm/persistent.rs diff --git a/ipc/wallet/src/fvm/errors.rs b/crates/ipc/wallet/src/fvm/errors.rs similarity index 100% rename from ipc/wallet/src/fvm/errors.rs rename to crates/ipc/wallet/src/fvm/errors.rs diff --git a/ipc/wallet/src/fvm/keystore.rs b/crates/ipc/wallet/src/fvm/keystore.rs similarity index 100% rename from ipc/wallet/src/fvm/keystore.rs rename to crates/ipc/wallet/src/fvm/keystore.rs diff --git a/ipc/wallet/src/fvm/mod.rs b/crates/ipc/wallet/src/fvm/mod.rs similarity index 100% rename from ipc/wallet/src/fvm/mod.rs rename to crates/ipc/wallet/src/fvm/mod.rs diff --git a/ipc/wallet/src/fvm/serialization.rs b/crates/ipc/wallet/src/fvm/serialization.rs similarity index 100% rename from ipc/wallet/src/fvm/serialization.rs rename to crates/ipc/wallet/src/fvm/serialization.rs diff --git a/ipc/wallet/src/fvm/utils.rs b/crates/ipc/wallet/src/fvm/utils.rs similarity index 100% rename from ipc/wallet/src/fvm/utils.rs rename to crates/ipc/wallet/src/fvm/utils.rs diff --git a/ipc/wallet/src/fvm/wallet.rs b/crates/ipc/wallet/src/fvm/wallet.rs similarity index 100% rename from ipc/wallet/src/fvm/wallet.rs rename to crates/ipc/wallet/src/fvm/wallet.rs diff --git a/ipc/wallet/src/fvm/wallet_helpers.rs b/crates/ipc/wallet/src/fvm/wallet_helpers.rs similarity index 100% rename from ipc/wallet/src/fvm/wallet_helpers.rs rename to crates/ipc/wallet/src/fvm/wallet_helpers.rs diff --git a/ipc/wallet/src/lib.rs b/crates/ipc/wallet/src/lib.rs similarity index 100% rename from ipc/wallet/src/lib.rs rename to crates/ipc/wallet/src/lib.rs diff --git a/ipc/wallet/tests/keystore_encrypted_old/keystore b/crates/ipc/wallet/tests/keystore_encrypted_old/keystore similarity index 100% rename from ipc/wallet/tests/keystore_encrypted_old/keystore rename to crates/ipc/wallet/tests/keystore_encrypted_old/keystore diff --git a/ipld/resolver/.gitignore b/crates/ipld/resolver/.gitignore similarity index 100% rename from ipld/resolver/.gitignore rename to crates/ipld/resolver/.gitignore diff --git a/ipld/resolver/Cargo.toml b/crates/ipld/resolver/Cargo.toml similarity index 100% rename from ipld/resolver/Cargo.toml rename to crates/ipld/resolver/Cargo.toml diff --git a/ipld/resolver/Makefile b/crates/ipld/resolver/Makefile similarity index 100% rename from ipld/resolver/Makefile rename to crates/ipld/resolver/Makefile diff --git a/ipld/resolver/README.md b/crates/ipld/resolver/README.md similarity index 100% rename from ipld/resolver/README.md rename to crates/ipld/resolver/README.md diff --git a/ipld/resolver/docs/README.md b/crates/ipld/resolver/docs/README.md similarity index 100% rename from ipld/resolver/docs/README.md rename to crates/ipld/resolver/docs/README.md diff --git a/ipld/resolver/docs/diagrams/Makefile b/crates/ipld/resolver/docs/diagrams/Makefile similarity index 100% rename from ipld/resolver/docs/diagrams/Makefile rename to crates/ipld/resolver/docs/diagrams/Makefile diff --git a/ipld/resolver/docs/diagrams/checkpoint_schema.png b/crates/ipld/resolver/docs/diagrams/checkpoint_schema.png similarity index 100% rename from ipld/resolver/docs/diagrams/checkpoint_schema.png rename to crates/ipld/resolver/docs/diagrams/checkpoint_schema.png diff --git a/ipld/resolver/docs/diagrams/checkpoint_schema.puml b/crates/ipld/resolver/docs/diagrams/checkpoint_schema.puml similarity index 100% rename from ipld/resolver/docs/diagrams/checkpoint_schema.puml rename to crates/ipld/resolver/docs/diagrams/checkpoint_schema.puml diff --git a/ipld/resolver/docs/diagrams/checkpoint_submission.png b/crates/ipld/resolver/docs/diagrams/checkpoint_submission.png similarity index 100% rename from ipld/resolver/docs/diagrams/checkpoint_submission.png rename to crates/ipld/resolver/docs/diagrams/checkpoint_submission.png diff --git a/ipld/resolver/docs/diagrams/checkpoint_submission.puml b/crates/ipld/resolver/docs/diagrams/checkpoint_submission.puml similarity index 100% rename from ipld/resolver/docs/diagrams/checkpoint_submission.puml rename to crates/ipld/resolver/docs/diagrams/checkpoint_submission.puml diff --git a/ipld/resolver/docs/diagrams/ipld_resolver.png b/crates/ipld/resolver/docs/diagrams/ipld_resolver.png similarity index 100% rename from ipld/resolver/docs/diagrams/ipld_resolver.png rename to crates/ipld/resolver/docs/diagrams/ipld_resolver.png diff --git a/ipld/resolver/docs/diagrams/ipld_resolver.puml b/crates/ipld/resolver/docs/diagrams/ipld_resolver.puml similarity index 100% rename from ipld/resolver/docs/diagrams/ipld_resolver.puml rename to crates/ipld/resolver/docs/diagrams/ipld_resolver.puml diff --git a/ipld/resolver/src/arb.rs b/crates/ipld/resolver/src/arb.rs similarity index 100% rename from ipld/resolver/src/arb.rs rename to crates/ipld/resolver/src/arb.rs diff --git a/ipld/resolver/src/behaviour/content.rs b/crates/ipld/resolver/src/behaviour/content.rs similarity index 100% rename from ipld/resolver/src/behaviour/content.rs rename to crates/ipld/resolver/src/behaviour/content.rs diff --git a/ipld/resolver/src/behaviour/discovery.rs b/crates/ipld/resolver/src/behaviour/discovery.rs similarity index 100% rename from ipld/resolver/src/behaviour/discovery.rs rename to crates/ipld/resolver/src/behaviour/discovery.rs diff --git a/ipld/resolver/src/behaviour/membership.rs b/crates/ipld/resolver/src/behaviour/membership.rs similarity index 100% rename from ipld/resolver/src/behaviour/membership.rs rename to crates/ipld/resolver/src/behaviour/membership.rs diff --git a/ipld/resolver/src/behaviour/mod.rs b/crates/ipld/resolver/src/behaviour/mod.rs similarity index 100% rename from ipld/resolver/src/behaviour/mod.rs rename to crates/ipld/resolver/src/behaviour/mod.rs diff --git a/ipld/resolver/src/client.rs b/crates/ipld/resolver/src/client.rs similarity index 100% rename from ipld/resolver/src/client.rs rename to crates/ipld/resolver/src/client.rs diff --git a/ipld/resolver/src/hash.rs b/crates/ipld/resolver/src/hash.rs similarity index 100% rename from ipld/resolver/src/hash.rs rename to crates/ipld/resolver/src/hash.rs diff --git a/ipld/resolver/src/lib.rs b/crates/ipld/resolver/src/lib.rs similarity index 100% rename from ipld/resolver/src/lib.rs rename to crates/ipld/resolver/src/lib.rs diff --git a/ipld/resolver/src/limiter.rs b/crates/ipld/resolver/src/limiter.rs similarity index 100% rename from ipld/resolver/src/limiter.rs rename to crates/ipld/resolver/src/limiter.rs diff --git a/ipld/resolver/src/missing_blocks.rs b/crates/ipld/resolver/src/missing_blocks.rs similarity index 100% rename from ipld/resolver/src/missing_blocks.rs rename to crates/ipld/resolver/src/missing_blocks.rs diff --git a/ipld/resolver/src/observe.rs b/crates/ipld/resolver/src/observe.rs similarity index 100% rename from ipld/resolver/src/observe.rs rename to crates/ipld/resolver/src/observe.rs diff --git a/ipld/resolver/src/provider_cache.rs b/crates/ipld/resolver/src/provider_cache.rs similarity index 100% rename from ipld/resolver/src/provider_cache.rs rename to crates/ipld/resolver/src/provider_cache.rs diff --git a/ipld/resolver/src/provider_record.rs b/crates/ipld/resolver/src/provider_record.rs similarity index 100% rename from ipld/resolver/src/provider_record.rs rename to crates/ipld/resolver/src/provider_record.rs diff --git a/ipld/resolver/src/service.rs b/crates/ipld/resolver/src/service.rs similarity index 100% rename from ipld/resolver/src/service.rs rename to crates/ipld/resolver/src/service.rs diff --git a/ipld/resolver/src/signed_record.rs b/crates/ipld/resolver/src/signed_record.rs similarity index 100% rename from ipld/resolver/src/signed_record.rs rename to crates/ipld/resolver/src/signed_record.rs diff --git a/ipld/resolver/src/timestamp.rs b/crates/ipld/resolver/src/timestamp.rs similarity index 100% rename from ipld/resolver/src/timestamp.rs rename to crates/ipld/resolver/src/timestamp.rs diff --git a/ipld/resolver/src/vote_record.rs b/crates/ipld/resolver/src/vote_record.rs similarity index 100% rename from ipld/resolver/src/vote_record.rs rename to crates/ipld/resolver/src/vote_record.rs diff --git a/ipld/resolver/tests/smoke.rs b/crates/ipld/resolver/tests/smoke.rs similarity index 100% rename from ipld/resolver/tests/smoke.rs rename to crates/ipld/resolver/tests/smoke.rs diff --git a/ipld/resolver/tests/store/mod.rs b/crates/ipld/resolver/tests/store/mod.rs similarity index 100% rename from ipld/resolver/tests/store/mod.rs rename to crates/ipld/resolver/tests/store/mod.rs diff --git a/fendermint/.gitignore b/crates/node/.gitignore similarity index 100% rename from fendermint/.gitignore rename to crates/node/.gitignore diff --git a/fendermint/Makefile b/crates/node/Makefile similarity index 93% rename from fendermint/Makefile rename to crates/node/Makefile index 6fbe3fa3d..f40c7eb13 100644 --- a/fendermint/Makefile +++ b/crates/node/Makefile @@ -1,10 +1,11 @@ .PHONY: all build test lint license check-fmt check-clippy actor-bundle +CONTAINER_FRONTEND_BIN?= docker BUILTIN_ACTORS_TAG ?= v15.0.0 BUILTIN_ACTORS_BUNDLE := $(PWD)/builtin-actors/output/bundle.car CUSTOM_ACTORS_BUNDLE := $(PWD)/actors/output/custom_actors_bundle.car -IPC_ACTORS_DIR := $(PWD)/../contracts +IPC_ACTORS_DIR := $(PWD)/../../contracts IPC_ACTORS_OUT := $(IPC_ACTORS_DIR)/out IPC_ACTORS_CODE := $(shell find $(IPC_ACTORS_DIR) -type f \( -name "*.sol" \)) IPC_ACTORS_GEN := .contracts-gen @@ -29,7 +30,7 @@ BUILDX_TAG ?= fendermint:latest all: lint build test diagrams docker-build diagrams: - make -C ../docs/fendermint/diagrams diagrams + make -C ../../docs/fendermint/diagrams diagrams build: $(IPC_ACTORS_GEN) | protoc npm cargo build --locked --release @@ -50,6 +51,7 @@ e2e: docker-build | cargo-make ${MAKE} e2e-only e2e-only: + cd ../../contracts && make gen && cd - cd testing/smoke-test && cargo make --profile $(PROFILE) cd testing/snapshot-test && cargo make --profile $(PROFILE) cd testing/graph-test && cargo make --profile $(PROFILE) @@ -89,20 +91,21 @@ docker-deps: $(BUILTIN_ACTORS_BUNDLE) $(CUSTOM_ACTORS_BUNDLE) $(IPC_ACTORS_GEN) # After that it looks like even the regular docker build needs the `--load` parameter, which hopefully # it can handle for anyone with `DOCKER_BUILDKIT=1`. docker-build: docker-deps $(FENDERMINT_CODE) + echo "We are here: $(PWD)" if [ "$(PROFILE)" = "ci" ]; then \ cat docker/builder.ci.Dockerfile docker/runner.Dockerfile > docker/Dockerfile ; \ - docker buildx build \ + $(CONTAINER_FRONTEND_BIN) buildx build \ $(BUILDX_STORE) \ $(BUILDX_FLAGS) \ -f docker/Dockerfile \ - -t $(BUILDX_TAG) $(PWD)/..; \ + -t $(BUILDX_TAG) $(PWD)/../..; \ else \ cat docker/builder.local.Dockerfile docker/runner.Dockerfile > docker/Dockerfile ; \ DOCKER_BUILDKIT=1 \ - docker build \ + $(CONTAINER_FRONTEND_BIN) build \ $(BUILDX_STORE) \ -f docker/Dockerfile \ - -t fendermint:latest $(PWD)/..; \ + -t fendermint:latest $(PWD)/../..; \ fi # Build a bundle CAR; this is so we don't have to have a project reference, diff --git a/fendermint/README.md b/crates/node/README.md similarity index 80% rename from fendermint/README.md rename to crates/node/README.md index 7bfe121a7..b2f6376b2 100644 --- a/fendermint/README.md +++ b/crates/node/README.md @@ -16,7 +16,7 @@ Please have a look in the [docs](../docs/fendermint/README.md) to see an overvie ## IPC -Fendermint is built with support for [IPC](https://github.com/consensus-shipyard/ipc) by design. If you are looking to deploy the infrastructure Fendermint-based IPC subnet, refer to the [IPC main repo](https://github.com/consensus-shipyard/ipc), or have a look at the [IPC infrastructure docs](../docs/fendermint/ipc.md). +Fendermint is built with support for [IPC](https://github.com/consensus-shipyard/ipc) by design. If you are looking to deploy the infrastructure Fendermint-based IPC subnet, refer to the [IPC main repo](https://github.com/consensus-shipyard/ipc), or have a look at the [IPC infrastructure docs](../docs/node/ipc.md). ## Testing @@ -27,8 +27,8 @@ make test ``` while the next command builds docker images and runs an end-to-end test using the -[SimpleCoin](./fendermint/rpc/examples/simplecoin.rs) and the -[ethers](./fendermint/eth/api/examples/ethers.rs) examples: +[SimpleCoin](./node/rpc/examples/simplecoin.rs) and the +[ethers](./node/eth/api/examples/ethers.rs) examples: ```bash make e2e @@ -36,7 +36,7 @@ make e2e ## IPC Solidity Actors -We generate Rust bindings for the Solidity actors we need to invoke from the [contracts](../contracts/) folder, some of which are deployed during the genesis process. The bindings live in [contract-bindings/](../contract-bindings), and are generated automatically during the build, or with the following command: +We generate Rust contract-bindings for the Solidity actors we need to invoke from the [contracts](../../contracts/) folder, some of which are deployed during the genesis process. The contract-bindings live in [contracts/contract-bindings/](../contracts/binding), and are generated automatically during the build, or with the following command: ```bash make gen @@ -44,7 +44,11 @@ make gen To run it, you will have to install [forge](https://book.getfoundry.sh/getting-started/installation). +<<<<<<< HEAD:fendermint/README.md The list of contracts for which we generate Rust bindings are in [build.rs](../contract-bindings/build.rs) and needs to be maintained by hand, for example if a new "diamond facet" is added to a contract, it has to be added here. Diamond facets also have to be added manually in [ipc.rs](./vm/actor_interface/src/ipc.rs) where the contracts which need to be deployed during genesis are described. These facets cannot be divined from the ABI description, so they have to be maintained explicitly. +======= +The list of contracts for which we generate Rust contract-bindings are in [build.rs](../contract-bindings/build.rs) and needs to be maintained by hand, for example if a new "diamond facet" is added to a contract, it has to be added here. Diamond facets also have to be added manually in [ipc.rs](./vm/actor_interface/src/ipc.rs) where the contracts which need to be deployed during genesis are described. These facets cannot be divined from the ABI description, so they have to be maintained explicitly. +>>>>>>> 4a98bd0b (rename):crates/node/README.md To test whether the genesis process works, we can run the following unit test: @@ -65,7 +69,7 @@ See the [docker docs](./docker/README.md) for more details about the build. ### Pre-built Docker Image -The CI build publishes a [Docker image](https://github.com/consensus-shipyard/fendermint/pkgs/container/fendermint) to Github Container Registry upon a successful build on the `main` branch. This is the same image as the one used in the End-to-End tests; it contains the built-in actor bundle and IPC Solidity actors, ready to be deployed during genesis. +The CI build publishes a [Docker image](https://github.com/consensus-shipyard/node/pkgs/container/fendermint) to Github Container Registry upon a successful build on the `main` branch. This is the same image as the one used in the End-to-End tests; it contains the built-in actor bundle and IPC Solidity actors, ready to be deployed during genesis. The image can be pulled with the following command: diff --git a/fendermint/abci/Cargo.toml b/crates/node/abci/Cargo.toml similarity index 100% rename from fendermint/abci/Cargo.toml rename to crates/node/abci/Cargo.toml diff --git a/fendermint/abci/README.md b/crates/node/abci/README.md similarity index 100% rename from fendermint/abci/README.md rename to crates/node/abci/README.md diff --git a/fendermint/abci/examples/kvstore.rs b/crates/node/abci/examples/kvstore.rs similarity index 100% rename from fendermint/abci/examples/kvstore.rs rename to crates/node/abci/examples/kvstore.rs diff --git a/fendermint/abci/src/application.rs b/crates/node/abci/src/application.rs similarity index 100% rename from fendermint/abci/src/application.rs rename to crates/node/abci/src/application.rs diff --git a/fendermint/abci/src/lib.rs b/crates/node/abci/src/lib.rs similarity index 100% rename from fendermint/abci/src/lib.rs rename to crates/node/abci/src/lib.rs diff --git a/fendermint/abci/src/util.rs b/crates/node/abci/src/util.rs similarity index 100% rename from fendermint/abci/src/util.rs rename to crates/node/abci/src/util.rs diff --git a/fendermint/actors/.gitignore b/crates/node/actors/.gitignore similarity index 100% rename from fendermint/actors/.gitignore rename to crates/node/actors/.gitignore diff --git a/fendermint/actors/Cargo.toml b/crates/node/actors/Cargo.toml similarity index 100% rename from fendermint/actors/Cargo.toml rename to crates/node/actors/Cargo.toml diff --git a/fendermint/actors/activity-tracker/Cargo.toml b/crates/node/actors/activity-tracker/Cargo.toml similarity index 100% rename from fendermint/actors/activity-tracker/Cargo.toml rename to crates/node/actors/activity-tracker/Cargo.toml diff --git a/fendermint/actors/activity-tracker/src/lib.rs b/crates/node/actors/activity-tracker/src/lib.rs similarity index 100% rename from fendermint/actors/activity-tracker/src/lib.rs rename to crates/node/actors/activity-tracker/src/lib.rs diff --git a/fendermint/actors/activity-tracker/src/state.rs b/crates/node/actors/activity-tracker/src/state.rs similarity index 100% rename from fendermint/actors/activity-tracker/src/state.rs rename to crates/node/actors/activity-tracker/src/state.rs diff --git a/fendermint/actors/activity-tracker/src/types.rs b/crates/node/actors/activity-tracker/src/types.rs similarity index 100% rename from fendermint/actors/activity-tracker/src/types.rs rename to crates/node/actors/activity-tracker/src/types.rs diff --git a/fendermint/actors/api/Cargo.toml b/crates/node/actors/api/Cargo.toml similarity index 100% rename from fendermint/actors/api/Cargo.toml rename to crates/node/actors/api/Cargo.toml diff --git a/fendermint/actors/api/src/gas_market.rs b/crates/node/actors/api/src/gas_market.rs similarity index 100% rename from fendermint/actors/api/src/gas_market.rs rename to crates/node/actors/api/src/gas_market.rs diff --git a/fendermint/actors/api/src/lib.rs b/crates/node/actors/api/src/lib.rs similarity index 100% rename from fendermint/actors/api/src/lib.rs rename to crates/node/actors/api/src/lib.rs diff --git a/fendermint/actors/build.rs b/crates/node/actors/build.rs similarity index 100% rename from fendermint/actors/build.rs rename to crates/node/actors/build.rs diff --git a/fendermint/actors/chainmetadata/Cargo.toml b/crates/node/actors/chainmetadata/Cargo.toml similarity index 100% rename from fendermint/actors/chainmetadata/Cargo.toml rename to crates/node/actors/chainmetadata/Cargo.toml diff --git a/fendermint/actors/chainmetadata/src/actor.rs b/crates/node/actors/chainmetadata/src/actor.rs similarity index 100% rename from fendermint/actors/chainmetadata/src/actor.rs rename to crates/node/actors/chainmetadata/src/actor.rs diff --git a/fendermint/actors/chainmetadata/src/lib.rs b/crates/node/actors/chainmetadata/src/lib.rs similarity index 100% rename from fendermint/actors/chainmetadata/src/lib.rs rename to crates/node/actors/chainmetadata/src/lib.rs diff --git a/fendermint/actors/chainmetadata/src/shared.rs b/crates/node/actors/chainmetadata/src/shared.rs similarity index 100% rename from fendermint/actors/chainmetadata/src/shared.rs rename to crates/node/actors/chainmetadata/src/shared.rs diff --git a/fendermint/actors/eam/Cargo.toml b/crates/node/actors/eam/Cargo.toml similarity index 100% rename from fendermint/actors/eam/Cargo.toml rename to crates/node/actors/eam/Cargo.toml diff --git a/fendermint/actors/eam/src/lib.rs b/crates/node/actors/eam/src/lib.rs similarity index 100% rename from fendermint/actors/eam/src/lib.rs rename to crates/node/actors/eam/src/lib.rs diff --git a/fendermint/actors/eam/src/state.rs b/crates/node/actors/eam/src/state.rs similarity index 100% rename from fendermint/actors/eam/src/state.rs rename to crates/node/actors/eam/src/state.rs diff --git a/fendermint/actors/gas_market/eip1559/Cargo.toml b/crates/node/actors/gas_market/eip1559/Cargo.toml similarity index 100% rename from fendermint/actors/gas_market/eip1559/Cargo.toml rename to crates/node/actors/gas_market/eip1559/Cargo.toml diff --git a/fendermint/actors/gas_market/eip1559/src/lib.rs b/crates/node/actors/gas_market/eip1559/src/lib.rs similarity index 100% rename from fendermint/actors/gas_market/eip1559/src/lib.rs rename to crates/node/actors/gas_market/eip1559/src/lib.rs diff --git a/fendermint/actors/src/lib.rs b/crates/node/actors/src/lib.rs similarity index 100% rename from fendermint/actors/src/lib.rs rename to crates/node/actors/src/lib.rs diff --git a/fendermint/actors/src/manifest.rs b/crates/node/actors/src/manifest.rs similarity index 100% rename from fendermint/actors/src/manifest.rs rename to crates/node/actors/src/manifest.rs diff --git a/fendermint/app/Cargo.toml b/crates/node/app/Cargo.toml similarity index 100% rename from fendermint/app/Cargo.toml rename to crates/node/app/Cargo.toml diff --git a/fendermint/app/config/default.toml b/crates/node/app/config/default.toml similarity index 100% rename from fendermint/app/config/default.toml rename to crates/node/app/config/default.toml diff --git a/fendermint/app/config/test.toml b/crates/node/app/config/test.toml similarity index 100% rename from fendermint/app/config/test.toml rename to crates/node/app/config/test.toml diff --git a/fendermint/app/options/Cargo.toml b/crates/node/app/options/Cargo.toml similarity index 100% rename from fendermint/app/options/Cargo.toml rename to crates/node/app/options/Cargo.toml diff --git a/fendermint/app/options/examples/network.rs b/crates/node/app/options/examples/network.rs similarity index 100% rename from fendermint/app/options/examples/network.rs rename to crates/node/app/options/examples/network.rs diff --git a/fendermint/app/options/src/config.rs b/crates/node/app/options/src/config.rs similarity index 100% rename from fendermint/app/options/src/config.rs rename to crates/node/app/options/src/config.rs diff --git a/fendermint/app/options/src/debug.rs b/crates/node/app/options/src/debug.rs similarity index 100% rename from fendermint/app/options/src/debug.rs rename to crates/node/app/options/src/debug.rs diff --git a/fendermint/app/options/src/eth.rs b/crates/node/app/options/src/eth.rs similarity index 100% rename from fendermint/app/options/src/eth.rs rename to crates/node/app/options/src/eth.rs diff --git a/fendermint/app/options/src/genesis.rs b/crates/node/app/options/src/genesis.rs similarity index 100% rename from fendermint/app/options/src/genesis.rs rename to crates/node/app/options/src/genesis.rs diff --git a/fendermint/app/options/src/key.rs b/crates/node/app/options/src/key.rs similarity index 100% rename from fendermint/app/options/src/key.rs rename to crates/node/app/options/src/key.rs diff --git a/fendermint/app/options/src/lib.rs b/crates/node/app/options/src/lib.rs similarity index 100% rename from fendermint/app/options/src/lib.rs rename to crates/node/app/options/src/lib.rs diff --git a/fendermint/app/options/src/materializer.rs b/crates/node/app/options/src/materializer.rs similarity index 100% rename from fendermint/app/options/src/materializer.rs rename to crates/node/app/options/src/materializer.rs diff --git a/fendermint/app/options/src/parse.rs b/crates/node/app/options/src/parse.rs similarity index 100% rename from fendermint/app/options/src/parse.rs rename to crates/node/app/options/src/parse.rs diff --git a/fendermint/app/options/src/rpc.rs b/crates/node/app/options/src/rpc.rs similarity index 100% rename from fendermint/app/options/src/rpc.rs rename to crates/node/app/options/src/rpc.rs diff --git a/fendermint/app/options/src/run.rs b/crates/node/app/options/src/run.rs similarity index 100% rename from fendermint/app/options/src/run.rs rename to crates/node/app/options/src/run.rs diff --git a/fendermint/app/settings/Cargo.toml b/crates/node/app/settings/Cargo.toml similarity index 96% rename from fendermint/app/settings/Cargo.toml rename to crates/node/app/settings/Cargo.toml index e72a27e1f..4ba5c0baf 100644 --- a/fendermint/app/settings/Cargo.toml +++ b/crates/node/app/settings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fendermint_app_settings" -description = "Fendermint configuration settings. The defaults are in fendermint/app/config/default.toml" +description = "Fendermint configuration settings. The defaults are in node/app/config/default.toml" version = "0.1.0" authors.workspace = true edition.workspace = true diff --git a/fendermint/app/settings/src/eth.rs b/crates/node/app/settings/src/eth.rs similarity index 100% rename from fendermint/app/settings/src/eth.rs rename to crates/node/app/settings/src/eth.rs diff --git a/fendermint/app/settings/src/fvm.rs b/crates/node/app/settings/src/fvm.rs similarity index 100% rename from fendermint/app/settings/src/fvm.rs rename to crates/node/app/settings/src/fvm.rs diff --git a/fendermint/app/settings/src/lib.rs b/crates/node/app/settings/src/lib.rs similarity index 99% rename from fendermint/app/settings/src/lib.rs rename to crates/node/app/settings/src/lib.rs index 566040dcb..010fb4ec6 100644 --- a/fendermint/app/settings/src/lib.rs +++ b/crates/node/app/settings/src/lib.rs @@ -395,7 +395,7 @@ mod tests { let default_dir = PathBuf::from("../config"); let c = Settings::config(&default_dir, ¤t_dir, run_mode)?; // Trying to debug the following sporadic error on CI: - // thread 'tests::parse_test_config' panicked at fendermint/app/settings/src/lib.rs:315:36: + // thread 'tests::parse_test_config' panicked at node/app/settings/src/lib.rs:315:36: // failed to parse Settings: failed to parse: invalid digit found in string // This turned out to be due to the environment variable manipulation below mixing with another test, // which is why `#[serial]` was moved to the top. diff --git a/fendermint/app/settings/src/resolver.rs b/crates/node/app/settings/src/resolver.rs similarity index 100% rename from fendermint/app/settings/src/resolver.rs rename to crates/node/app/settings/src/resolver.rs diff --git a/fendermint/app/settings/src/testing.rs b/crates/node/app/settings/src/testing.rs similarity index 100% rename from fendermint/app/settings/src/testing.rs rename to crates/node/app/settings/src/testing.rs diff --git a/fendermint/app/settings/src/utils.rs b/crates/node/app/settings/src/utils.rs similarity index 100% rename from fendermint/app/settings/src/utils.rs rename to crates/node/app/settings/src/utils.rs diff --git a/fendermint/app/src/app.rs b/crates/node/app/src/app.rs similarity index 100% rename from fendermint/app/src/app.rs rename to crates/node/app/src/app.rs diff --git a/fendermint/app/src/cmd/config.rs b/crates/node/app/src/cmd/config.rs similarity index 100% rename from fendermint/app/src/cmd/config.rs rename to crates/node/app/src/cmd/config.rs diff --git a/fendermint/app/src/cmd/debug.rs b/crates/node/app/src/cmd/debug.rs similarity index 100% rename from fendermint/app/src/cmd/debug.rs rename to crates/node/app/src/cmd/debug.rs diff --git a/fendermint/app/src/cmd/eth.rs b/crates/node/app/src/cmd/eth.rs similarity index 100% rename from fendermint/app/src/cmd/eth.rs rename to crates/node/app/src/cmd/eth.rs diff --git a/fendermint/app/src/cmd/genesis.rs b/crates/node/app/src/cmd/genesis.rs similarity index 100% rename from fendermint/app/src/cmd/genesis.rs rename to crates/node/app/src/cmd/genesis.rs diff --git a/fendermint/app/src/cmd/key.rs b/crates/node/app/src/cmd/key.rs similarity index 100% rename from fendermint/app/src/cmd/key.rs rename to crates/node/app/src/cmd/key.rs diff --git a/fendermint/app/src/cmd/materializer.rs b/crates/node/app/src/cmd/materializer.rs similarity index 100% rename from fendermint/app/src/cmd/materializer.rs rename to crates/node/app/src/cmd/materializer.rs diff --git a/fendermint/app/src/cmd/mod.rs b/crates/node/app/src/cmd/mod.rs similarity index 100% rename from fendermint/app/src/cmd/mod.rs rename to crates/node/app/src/cmd/mod.rs diff --git a/fendermint/app/src/cmd/rpc.rs b/crates/node/app/src/cmd/rpc.rs similarity index 100% rename from fendermint/app/src/cmd/rpc.rs rename to crates/node/app/src/cmd/rpc.rs diff --git a/fendermint/app/src/cmd/run.rs b/crates/node/app/src/cmd/run.rs similarity index 100% rename from fendermint/app/src/cmd/run.rs rename to crates/node/app/src/cmd/run.rs diff --git a/fendermint/app/src/ipc.rs b/crates/node/app/src/ipc.rs similarity index 100% rename from fendermint/app/src/ipc.rs rename to crates/node/app/src/ipc.rs diff --git a/fendermint/app/src/lib.rs b/crates/node/app/src/lib.rs similarity index 100% rename from fendermint/app/src/lib.rs rename to crates/node/app/src/lib.rs diff --git a/fendermint/app/src/main.rs b/crates/node/app/src/main.rs similarity index 100% rename from fendermint/app/src/main.rs rename to crates/node/app/src/main.rs diff --git a/fendermint/app/src/metrics/mod.rs b/crates/node/app/src/metrics/mod.rs similarity index 100% rename from fendermint/app/src/metrics/mod.rs rename to crates/node/app/src/metrics/mod.rs diff --git a/fendermint/app/src/metrics/prometheus.rs b/crates/node/app/src/metrics/prometheus.rs similarity index 100% rename from fendermint/app/src/metrics/prometheus.rs rename to crates/node/app/src/metrics/prometheus.rs diff --git a/fendermint/app/src/observe.rs b/crates/node/app/src/observe.rs similarity index 100% rename from fendermint/app/src/observe.rs rename to crates/node/app/src/observe.rs diff --git a/fendermint/app/src/store.rs b/crates/node/app/src/store.rs similarity index 100% rename from fendermint/app/src/store.rs rename to crates/node/app/src/store.rs diff --git a/fendermint/app/src/tmconv.rs b/crates/node/app/src/tmconv.rs similarity index 100% rename from fendermint/app/src/tmconv.rs rename to crates/node/app/src/tmconv.rs diff --git a/fendermint/app/src/validators.rs b/crates/node/app/src/validators.rs similarity index 100% rename from fendermint/app/src/validators.rs rename to crates/node/app/src/validators.rs diff --git a/fendermint/crypto/Cargo.toml b/crates/node/crypto/Cargo.toml similarity index 100% rename from fendermint/crypto/Cargo.toml rename to crates/node/crypto/Cargo.toml diff --git a/fendermint/crypto/src/lib.rs b/crates/node/crypto/src/lib.rs similarity index 100% rename from fendermint/crypto/src/lib.rs rename to crates/node/crypto/src/lib.rs diff --git a/fendermint/docker/README.md b/crates/node/docker/README.md similarity index 97% rename from fendermint/docker/README.md rename to crates/node/docker/README.md index da9b5a972..e65e1af26 100644 --- a/fendermint/docker/README.md +++ b/crates/node/docker/README.md @@ -13,7 +13,7 @@ The image contains both the `fendermint` and `ipc-cli` executables (dispatched b As a pre-requisite this will ensure that the following artifacts are prepared: * The builtin-actors bundle is downloaded from GitHub; if you upgrade the version of these, make sure you clear out any existing artifacts or you might get interface version conflicts at runtime when the bundles are loaded. * The custom actor bundle is built; this prepares some JSON artifacts as well, which are needed for deployment. -* The IPC actor bindings are generated; this is refreshed every time a Solidity artifact changes. +* The IPC actor contract-bindings are generated; this is refreshed every time a Solidity artifact changes. The actor bundles are CAR files which are copied into the `fendermint` image, so that we don't have to procure them separately when we want to create a container. diff --git a/fendermint/docker/builder.ci.Dockerfile b/crates/node/docker/builder.ci.Dockerfile similarity index 84% rename from fendermint/docker/builder.ci.Dockerfile rename to crates/node/docker/builder.ci.Dockerfile index e7228f5db..6c277e85b 100644 --- a/fendermint/docker/builder.ci.Dockerfile +++ b/crates/node/docker/builder.ci.Dockerfile @@ -8,20 +8,20 @@ # The goal of this step is to copy the `Cargo.toml` and `Cargo.lock` files _without_ the source code, # so that we can run a step in `builder` that compiles the dependencies only. To do so we first # copy the whole codebase then get rid of everything except the dependencies and do a build. -FROM --platform=$BUILDPLATFORM ubuntu:jammy as stripper +FROM --platform=$BUILDPLATFORM ubuntu:jammy AS stripper -WORKDIR /app +WORKDIR /app/crates # Copy the Cargo artifacts and Rust sources everything; even though we only need Cargo.* artifacts and Rust sources. COPY Cargo.toml Cargo.lock ./ -COPY . . +COPY . /app/ # Delete anything other than cargo files: Rust sources, config files, Markdown, etc. -RUN find . -type f \! -name "Cargo.*" | xargs rm -rf +RUN find /app/crates -type f \! -name "Cargo.*" | xargs rm -rf # Construct dummy sources. Add a print to help debug the case if we failed to properly replace the file. -RUN echo "fn main() { println!(\"I'm the dummy.\"); }" > fendermint/app/src/main.rs && \ - for crate in $(find . -name "Cargo.toml" | xargs dirname | grep -v infra | grep -v node_modules | grep /); do \ +RUN echo "fn main() { println!(\"I'm the dummy.\"); }" > /app/crates/node/app/src/main.rs && \ + for crate in $(find /app/crates -name "Cargo.toml" | xargs dirname | grep -v infra | grep -v node_modules | grep /); do \ touch $crate/src/lib.rs; \ done @@ -31,7 +31,7 @@ RUN echo "fn main() { println!(\"I'm the dummy.\"); }" > fendermint/app/src/main # with the `ubuntu` base and Rust installed. # Using the `jammy` version because `latest` gave a GLIBC_2.38 not found with the `debian:bookworm` runner. # See version at https://packages.debian.org/search?searchon=sourcenames&keywords=glibc and https://launchpad.net/ubuntu/+source/glibc -FROM --platform=$BUILDPLATFORM ubuntu:jammy as builder +FROM --platform=$BUILDPLATFORM ubuntu:jammy AS builder RUN apt-get update && \ apt-get install -y build-essential clang cmake protobuf-compiler curl \ @@ -45,7 +45,7 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \ CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ -WORKDIR /app +WORKDIR /app/crates # Update the version here if our `rust-toolchain.toml` would cause something new to be fetched every time. ARG RUST_VERSION=1.78 @@ -68,7 +68,7 @@ COPY --from=stripper /app /app RUN \ --mount=type=cache,target=/root/.cargo/registry,sharing=locked \ --mount=type=cache,target=/root/.cargo/git,sharing=locked \ - --mount=type=cache,target=/app/target,sharing=locked \ + --mount=type=cache,target=/app/crates/target,sharing=locked \ set -eux; \ case "${TARGETARCH}" in \ amd64) ARCH='x86_64' ;; \ @@ -83,10 +83,12 @@ RUN \ # Now copy the full source. -COPY . . +COPY . /app/ # Need to invalidate build caches otherwise they won't be recompiled with the real code. -RUN find . -type f \( -wholename "**/src/lib.rs" -o -wholename "**/src/main.rs" \) | xargs touch +RUN find /app/crates -type f \( -wholename "**/src/lib.rs" -o -wholename "**/src/main.rs" \) | xargs touch + +WORKDIR /app/crates # Do the final build. RUN \ @@ -100,5 +102,5 @@ RUN \ rustup target add aarch64-unknown-linux-gnu; \ rustup toolchain install stable-aarch64-unknown-linux-gnu ;; \ esac; \ - cargo install --locked --root output --path fendermint/app --target ${ARCH}-unknown-linux-gnu ; \ + cargo install --locked --root output --path node/app --target ${ARCH}-unknown-linux-gnu ; \ cargo install --locked --root output --path ipc/cli --target ${ARCH}-unknown-linux-gnu diff --git a/fendermint/docker/builder.local.Dockerfile b/crates/node/docker/builder.local.Dockerfile similarity index 78% rename from fendermint/docker/builder.local.Dockerfile rename to crates/node/docker/builder.local.Dockerfile index 6f9576a4e..00a201036 100644 --- a/fendermint/docker/builder.local.Dockerfile +++ b/crates/node/docker/builder.local.Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 # Builder -FROM rust:bookworm as builder +FROM rust:bookworm AS builder RUN apt-get update && \ apt-get install -y build-essential clang cmake protobuf-compiler && \ @@ -9,7 +9,7 @@ RUN apt-get update && \ WORKDIR /app -COPY . . +COPY . /app/ # Mounting speeds up local builds, but it doesn't get cached between builds on CI. # OTOH it seems like one platform build can be blocked trying to acquire a lock on the build directory, @@ -17,5 +17,5 @@ COPY . . RUN --mount=type=cache,target=target \ --mount=type=cache,target=$RUSTUP_HOME,from=rust,source=$RUSTUP_HOME \ --mount=type=cache,target=$CARGO_HOME,from=rust,source=$CARGO_HOME \ - cargo install --locked --root output --path fendermint/app &&\ - cargo install --locked --root output --path ipc/cli + cargo install --locked --root output --path crates/node/app &&\ + cargo install --locked --root output --path crates/ipc/cli diff --git a/fendermint/docker/docker-entry.sh b/crates/node/docker/docker-entry.sh similarity index 100% rename from fendermint/docker/docker-entry.sh rename to crates/node/docker/docker-entry.sh diff --git a/fendermint/docker/runner.Dockerfile b/crates/node/docker/runner.Dockerfile similarity index 76% rename from fendermint/docker/runner.Dockerfile rename to crates/node/docker/runner.Dockerfile index 846d2985a..0d65b81c9 100644 --- a/fendermint/docker/runner.Dockerfile +++ b/crates/node/docker/runner.Dockerfile @@ -30,10 +30,10 @@ ENV FM_METRICS__LISTEN__HOST=0.0.0.0 RUN mkdir /fendermint/logs RUN chmod 777 /fendermint/logs -COPY fendermint/docker/docker-entry.sh /usr/local/bin/docker-entry.sh -COPY fendermint/builtin-actors/output/bundle.car $FM_HOME_DIR/bundle.car -COPY fendermint/actors/output/custom_actors_bundle.car $FM_HOME_DIR/custom_actors_bundle.car -COPY contracts/out $FM_HOME_DIR/contracts +COPY /crates/node/docker/docker-entry.sh /usr/local/bin/docker-entry.sh +COPY /crates/node/builtin-actors/output/bundle.car $FM_HOME_DIR/bundle.car +COPY /crates/node/actors/output/custom_actors_bundle.car $FM_HOME_DIR/custom_actors_bundle.car +COPY /contracts/out $FM_HOME_DIR/contracts COPY --from=builder /app/fendermint/app/config $FM_HOME_DIR/config COPY --from=builder /app/output/bin/fendermint /usr/local/bin/fendermint COPY --from=builder /app/output/bin/ipc-cli /usr/local/bin/ipc-cli diff --git a/fendermint/eth/api/Cargo.toml b/crates/node/eth/api/Cargo.toml similarity index 100% rename from fendermint/eth/api/Cargo.toml rename to crates/node/eth/api/Cargo.toml diff --git a/fendermint/eth/api/README.md b/crates/node/eth/api/README.md similarity index 100% rename from fendermint/eth/api/README.md rename to crates/node/eth/api/README.md diff --git a/fendermint/eth/api/examples/common/mod.rs b/crates/node/eth/api/examples/common/mod.rs similarity index 100% rename from fendermint/eth/api/examples/common/mod.rs rename to crates/node/eth/api/examples/common/mod.rs diff --git a/fendermint/eth/api/examples/ethers.rs b/crates/node/eth/api/examples/ethers.rs similarity index 100% rename from fendermint/eth/api/examples/ethers.rs rename to crates/node/eth/api/examples/ethers.rs diff --git a/fendermint/eth/api/examples/greeter.rs b/crates/node/eth/api/examples/greeter.rs similarity index 100% rename from fendermint/eth/api/examples/greeter.rs rename to crates/node/eth/api/examples/greeter.rs diff --git a/fendermint/eth/api/examples/query_blockhash.rs b/crates/node/eth/api/examples/query_blockhash.rs similarity index 100% rename from fendermint/eth/api/examples/query_blockhash.rs rename to crates/node/eth/api/examples/query_blockhash.rs diff --git a/fendermint/eth/api/src/apis/eth.rs b/crates/node/eth/api/src/apis/eth.rs similarity index 100% rename from fendermint/eth/api/src/apis/eth.rs rename to crates/node/eth/api/src/apis/eth.rs diff --git a/fendermint/eth/api/src/apis/mod.rs b/crates/node/eth/api/src/apis/mod.rs similarity index 100% rename from fendermint/eth/api/src/apis/mod.rs rename to crates/node/eth/api/src/apis/mod.rs diff --git a/fendermint/eth/api/src/apis/net.rs b/crates/node/eth/api/src/apis/net.rs similarity index 100% rename from fendermint/eth/api/src/apis/net.rs rename to crates/node/eth/api/src/apis/net.rs diff --git a/fendermint/eth/api/src/apis/web3.rs b/crates/node/eth/api/src/apis/web3.rs similarity index 100% rename from fendermint/eth/api/src/apis/web3.rs rename to crates/node/eth/api/src/apis/web3.rs diff --git a/fendermint/eth/api/src/cache.rs b/crates/node/eth/api/src/cache.rs similarity index 100% rename from fendermint/eth/api/src/cache.rs rename to crates/node/eth/api/src/cache.rs diff --git a/fendermint/eth/api/src/client.rs b/crates/node/eth/api/src/client.rs similarity index 100% rename from fendermint/eth/api/src/client.rs rename to crates/node/eth/api/src/client.rs diff --git a/fendermint/eth/api/src/conv/from_eth.rs b/crates/node/eth/api/src/conv/from_eth.rs similarity index 100% rename from fendermint/eth/api/src/conv/from_eth.rs rename to crates/node/eth/api/src/conv/from_eth.rs diff --git a/fendermint/eth/api/src/conv/from_fvm.rs b/crates/node/eth/api/src/conv/from_fvm.rs similarity index 100% rename from fendermint/eth/api/src/conv/from_fvm.rs rename to crates/node/eth/api/src/conv/from_fvm.rs diff --git a/fendermint/eth/api/src/conv/from_tm.rs b/crates/node/eth/api/src/conv/from_tm.rs similarity index 100% rename from fendermint/eth/api/src/conv/from_tm.rs rename to crates/node/eth/api/src/conv/from_tm.rs diff --git a/fendermint/eth/api/src/conv/mod.rs b/crates/node/eth/api/src/conv/mod.rs similarity index 100% rename from fendermint/eth/api/src/conv/mod.rs rename to crates/node/eth/api/src/conv/mod.rs diff --git a/fendermint/eth/api/src/error.rs b/crates/node/eth/api/src/error.rs similarity index 100% rename from fendermint/eth/api/src/error.rs rename to crates/node/eth/api/src/error.rs diff --git a/fendermint/eth/api/src/filters.rs b/crates/node/eth/api/src/filters.rs similarity index 100% rename from fendermint/eth/api/src/filters.rs rename to crates/node/eth/api/src/filters.rs diff --git a/fendermint/eth/api/src/gas/mod.rs b/crates/node/eth/api/src/gas/mod.rs similarity index 100% rename from fendermint/eth/api/src/gas/mod.rs rename to crates/node/eth/api/src/gas/mod.rs diff --git a/fendermint/eth/api/src/gas/output.rs b/crates/node/eth/api/src/gas/output.rs similarity index 100% rename from fendermint/eth/api/src/gas/output.rs rename to crates/node/eth/api/src/gas/output.rs diff --git a/fendermint/eth/api/src/handlers/http.rs b/crates/node/eth/api/src/handlers/http.rs similarity index 100% rename from fendermint/eth/api/src/handlers/http.rs rename to crates/node/eth/api/src/handlers/http.rs diff --git a/fendermint/eth/api/src/handlers/mod.rs b/crates/node/eth/api/src/handlers/mod.rs similarity index 100% rename from fendermint/eth/api/src/handlers/mod.rs rename to crates/node/eth/api/src/handlers/mod.rs diff --git a/fendermint/eth/api/src/handlers/ws.rs b/crates/node/eth/api/src/handlers/ws.rs similarity index 100% rename from fendermint/eth/api/src/handlers/ws.rs rename to crates/node/eth/api/src/handlers/ws.rs diff --git a/fendermint/eth/api/src/lib.rs b/crates/node/eth/api/src/lib.rs similarity index 100% rename from fendermint/eth/api/src/lib.rs rename to crates/node/eth/api/src/lib.rs diff --git a/fendermint/eth/api/src/mpool.rs b/crates/node/eth/api/src/mpool.rs similarity index 100% rename from fendermint/eth/api/src/mpool.rs rename to crates/node/eth/api/src/mpool.rs diff --git a/fendermint/eth/api/src/state.rs b/crates/node/eth/api/src/state.rs similarity index 100% rename from fendermint/eth/api/src/state.rs rename to crates/node/eth/api/src/state.rs diff --git a/fendermint/eth/hardhat/Cargo.toml b/crates/node/eth/hardhat/Cargo.toml similarity index 100% rename from fendermint/eth/hardhat/Cargo.toml rename to crates/node/eth/hardhat/Cargo.toml diff --git a/fendermint/eth/hardhat/src/lib.rs b/crates/node/eth/hardhat/src/lib.rs similarity index 96% rename from fendermint/eth/hardhat/src/lib.rs rename to crates/node/eth/hardhat/src/lib.rs index db3c4a238..96813c153 100644 --- a/fendermint/eth/hardhat/src/lib.rs +++ b/crates/node/eth/hardhat/src/lib.rs @@ -252,13 +252,14 @@ where mod tests { use ethers_core::types as et; use std::collections::HashMap; - use std::path::{Path, PathBuf}; - use std::str::FromStr; + use std::path::PathBuf; use crate::{topo_sort, DependencyTree}; use super::Hardhat; + // TODO factor out into a test support crate + // Find the root of the workspace, not this crate, which is what `env!("CARGO_MANIFEST_DIR")` would return fn workspace_dir() -> PathBuf { let output = std::process::Command::new(env!("CARGO")) .arg("locate-project") @@ -267,20 +268,16 @@ mod tests { .output() .unwrap() .stdout; - let cargo_path = Path::new(std::str::from_utf8(&output).unwrap().trim()); - cargo_path.parent().unwrap().to_path_buf() + + let cargo_path = PathBuf::from(std::str::from_utf8(&output).unwrap().trim()); + cargo_path.parent().unwrap().parent().unwrap().to_path_buf() } /// Path to the Solidity contracts, indended to be used in tests. fn contracts_path() -> PathBuf { - let contracts_path = std::env::var("FM_CONTRACTS_DIR").unwrap_or_else(|_| { - workspace_dir() - .join("contracts/out") - .to_string_lossy() - .into_owned() - }); - - PathBuf::from_str(&contracts_path).expect("malformed contracts path") + std::env::var("FM_CONTRACTS_DIR") + .map(std::path::PathBuf::from) + .unwrap_or_else(|_| workspace_dir().join("contracts").join("out")) } fn test_hardhat() -> Hardhat { diff --git a/fendermint/rocksdb/Cargo.toml b/crates/node/rocksdb/Cargo.toml similarity index 100% rename from fendermint/rocksdb/Cargo.toml rename to crates/node/rocksdb/Cargo.toml diff --git a/fendermint/rocksdb/src/blockstore.rs b/crates/node/rocksdb/src/blockstore.rs similarity index 100% rename from fendermint/rocksdb/src/blockstore.rs rename to crates/node/rocksdb/src/blockstore.rs diff --git a/fendermint/rocksdb/src/kvstore.rs b/crates/node/rocksdb/src/kvstore.rs similarity index 100% rename from fendermint/rocksdb/src/kvstore.rs rename to crates/node/rocksdb/src/kvstore.rs diff --git a/fendermint/rocksdb/src/lib.rs b/crates/node/rocksdb/src/lib.rs similarity index 100% rename from fendermint/rocksdb/src/lib.rs rename to crates/node/rocksdb/src/lib.rs diff --git a/fendermint/rocksdb/src/namespaces.rs b/crates/node/rocksdb/src/namespaces.rs similarity index 100% rename from fendermint/rocksdb/src/namespaces.rs rename to crates/node/rocksdb/src/namespaces.rs diff --git a/fendermint/rocksdb/src/rocks/config.rs b/crates/node/rocksdb/src/rocks/config.rs similarity index 100% rename from fendermint/rocksdb/src/rocks/config.rs rename to crates/node/rocksdb/src/rocks/config.rs diff --git a/fendermint/rocksdb/src/rocks/error.rs b/crates/node/rocksdb/src/rocks/error.rs similarity index 100% rename from fendermint/rocksdb/src/rocks/error.rs rename to crates/node/rocksdb/src/rocks/error.rs diff --git a/fendermint/rocksdb/src/rocks/mod.rs b/crates/node/rocksdb/src/rocks/mod.rs similarity index 100% rename from fendermint/rocksdb/src/rocks/mod.rs rename to crates/node/rocksdb/src/rocks/mod.rs diff --git a/fendermint/rpc/Cargo.toml b/crates/node/rpc/Cargo.toml similarity index 100% rename from fendermint/rpc/Cargo.toml rename to crates/node/rpc/Cargo.toml diff --git a/fendermint/rpc/examples/simplecoin.rs b/crates/node/rpc/examples/simplecoin.rs similarity index 100% rename from fendermint/rpc/examples/simplecoin.rs rename to crates/node/rpc/examples/simplecoin.rs diff --git a/fendermint/rpc/examples/transfer.rs b/crates/node/rpc/examples/transfer.rs similarity index 100% rename from fendermint/rpc/examples/transfer.rs rename to crates/node/rpc/examples/transfer.rs diff --git a/fendermint/rpc/src/client.rs b/crates/node/rpc/src/client.rs similarity index 100% rename from fendermint/rpc/src/client.rs rename to crates/node/rpc/src/client.rs diff --git a/fendermint/rpc/src/lib.rs b/crates/node/rpc/src/lib.rs similarity index 100% rename from fendermint/rpc/src/lib.rs rename to crates/node/rpc/src/lib.rs diff --git a/fendermint/rpc/src/message.rs b/crates/node/rpc/src/message.rs similarity index 100% rename from fendermint/rpc/src/message.rs rename to crates/node/rpc/src/message.rs diff --git a/fendermint/rpc/src/query.rs b/crates/node/rpc/src/query.rs similarity index 100% rename from fendermint/rpc/src/query.rs rename to crates/node/rpc/src/query.rs diff --git a/fendermint/rpc/src/response.rs b/crates/node/rpc/src/response.rs similarity index 100% rename from fendermint/rpc/src/response.rs rename to crates/node/rpc/src/response.rs diff --git a/fendermint/rpc/src/tx.rs b/crates/node/rpc/src/tx.rs similarity index 100% rename from fendermint/rpc/src/tx.rs rename to crates/node/rpc/src/tx.rs diff --git a/fendermint/storage/Cargo.toml b/crates/node/storage/Cargo.toml similarity index 100% rename from fendermint/storage/Cargo.toml rename to crates/node/storage/Cargo.toml diff --git a/fendermint/storage/src/im.rs b/crates/node/storage/src/im.rs similarity index 100% rename from fendermint/storage/src/im.rs rename to crates/node/storage/src/im.rs diff --git a/fendermint/storage/src/lib.rs b/crates/node/storage/src/lib.rs similarity index 100% rename from fendermint/storage/src/lib.rs rename to crates/node/storage/src/lib.rs diff --git a/fendermint/storage/src/testing.rs b/crates/node/storage/src/testing.rs similarity index 100% rename from fendermint/storage/src/testing.rs rename to crates/node/storage/src/testing.rs diff --git a/fendermint/testing/.gitignore b/crates/node/testing/.gitignore similarity index 100% rename from fendermint/testing/.gitignore rename to crates/node/testing/.gitignore diff --git a/fendermint/testing/Cargo.toml b/crates/node/testing/Cargo.toml similarity index 100% rename from fendermint/testing/Cargo.toml rename to crates/node/testing/Cargo.toml diff --git a/fendermint/testing/Makefile b/crates/node/testing/Makefile similarity index 100% rename from fendermint/testing/Makefile rename to crates/node/testing/Makefile diff --git a/fendermint/testing/README.md b/crates/node/testing/README.md similarity index 100% rename from fendermint/testing/README.md rename to crates/node/testing/README.md diff --git a/fendermint/testing/benchmarks/state-size/.gitignore b/crates/node/testing/benchmarks/state-size/.gitignore similarity index 100% rename from fendermint/testing/benchmarks/state-size/.gitignore rename to crates/node/testing/benchmarks/state-size/.gitignore diff --git a/fendermint/testing/benchmarks/state-size/Makefile b/crates/node/testing/benchmarks/state-size/Makefile similarity index 100% rename from fendermint/testing/benchmarks/state-size/Makefile rename to crates/node/testing/benchmarks/state-size/Makefile diff --git a/fendermint/testing/benchmarks/state-size/README.md b/crates/node/testing/benchmarks/state-size/README.md similarity index 52% rename from fendermint/testing/benchmarks/state-size/README.md rename to crates/node/testing/benchmarks/state-size/README.md index 2bf94ccca..de4d01155 100644 --- a/fendermint/testing/benchmarks/state-size/README.md +++ b/crates/node/testing/benchmarks/state-size/README.md @@ -28,28 +28,28 @@ make stats plots For example: ```console -  ~/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size  …798-benchmark-state-size ⇣1 ⇡1 ?4 ···················································································  1.77.0 10:11:25 +  ~/projects/consensuslab/ipc/node/testing/benchmarks/state-size  …798-benchmark-state-size ⇣1 ⇡1 ?4 ···················································································  1.77.0 10:11:25 ❯ make stats plots -/home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/scripts/stats.sh /home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false.jsonline > /home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false.stats -/home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-0-true.stats +/home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/scripts/stats.sh /home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-false.jsonline > /home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-false.stats +/home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-0-true.stats { "block_height": 10278, "db_size_kb": 60740, "avg_growth_kb": 5.131840311587147 } -/home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false.stats +/home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-false.stats { "block_height": 381, "db_size_kb": 8236, "avg_growth_kb": 0.6170212765957447 } -/home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-true.stats +/home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-true.stats { "block_height": 2630, "db_size_kb": 21200, "avg_growth_kb": 5.0248946763692075 } -/home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/scripts/growth-plot.sh /home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false.png /home/aakoshh/projects/consensuslab/ipc/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false.jsonline +/home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/scripts/growth-plot.sh /home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-false.png /home/aakoshh/projects/consensuslab/ipc/node/testing/benchmarks/state-size/measurements/state-size-15-false.jsonline ``` The filename indicates the parameters with with the measurements were taken, e.g. `-0-true` means that all app state history diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.png b/crates/node/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.png similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.png rename to crates/node/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.png diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.stats b/crates/node/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.stats similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.stats rename to crates/node/testing/benchmarks/state-size/measurements/state-size-0-false-level-transfer.stats diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-0-true-none.png b/crates/node/testing/benchmarks/state-size/measurements/state-size-0-true-none.png similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-0-true-none.png rename to crates/node/testing/benchmarks/state-size/measurements/state-size-0-true-none.png diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-0-true-none.stats b/crates/node/testing/benchmarks/state-size/measurements/state-size-0-true-none.stats similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-0-true-none.stats rename to crates/node/testing/benchmarks/state-size/measurements/state-size-0-true-none.stats diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-level.png b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-level.png similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-level.png rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-level.png diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-level.stats b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-level.stats similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-level.stats rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-level.stats diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-none.png b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-none.png similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-none.png rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-none.png diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-none.stats b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-none.stats similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-false-none.stats rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-false-none.stats diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-true-none.png b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-true-none.png similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-true-none.png rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-true-none.png diff --git a/fendermint/testing/benchmarks/state-size/measurements/state-size-15-true-none.stats b/crates/node/testing/benchmarks/state-size/measurements/state-size-15-true-none.stats similarity index 100% rename from fendermint/testing/benchmarks/state-size/measurements/state-size-15-true-none.stats rename to crates/node/testing/benchmarks/state-size/measurements/state-size-15-true-none.stats diff --git a/fendermint/testing/benchmarks/state-size/scripts/growth-plot.plt b/crates/node/testing/benchmarks/state-size/scripts/growth-plot.plt similarity index 100% rename from fendermint/testing/benchmarks/state-size/scripts/growth-plot.plt rename to crates/node/testing/benchmarks/state-size/scripts/growth-plot.plt diff --git a/fendermint/testing/benchmarks/state-size/scripts/growth-plot.sh b/crates/node/testing/benchmarks/state-size/scripts/growth-plot.sh similarity index 100% rename from fendermint/testing/benchmarks/state-size/scripts/growth-plot.sh rename to crates/node/testing/benchmarks/state-size/scripts/growth-plot.sh diff --git a/fendermint/testing/benchmarks/state-size/scripts/make-manifest.sh b/crates/node/testing/benchmarks/state-size/scripts/make-manifest.sh similarity index 100% rename from fendermint/testing/benchmarks/state-size/scripts/make-manifest.sh rename to crates/node/testing/benchmarks/state-size/scripts/make-manifest.sh diff --git a/fendermint/testing/benchmarks/state-size/scripts/make-measurements.sh b/crates/node/testing/benchmarks/state-size/scripts/make-measurements.sh similarity index 100% rename from fendermint/testing/benchmarks/state-size/scripts/make-measurements.sh rename to crates/node/testing/benchmarks/state-size/scripts/make-measurements.sh diff --git a/fendermint/testing/benchmarks/state-size/scripts/stats.sh b/crates/node/testing/benchmarks/state-size/scripts/stats.sh similarity index 100% rename from fendermint/testing/benchmarks/state-size/scripts/stats.sh rename to crates/node/testing/benchmarks/state-size/scripts/stats.sh diff --git a/fendermint/testing/contract-test/Cargo.toml b/crates/node/testing/contract-test/Cargo.toml similarity index 100% rename from fendermint/testing/contract-test/Cargo.toml rename to crates/node/testing/contract-test/Cargo.toml diff --git a/fendermint/testing/contract-test/src/ipc/mod.rs b/crates/node/testing/contract-test/src/ipc/mod.rs similarity index 100% rename from fendermint/testing/contract-test/src/ipc/mod.rs rename to crates/node/testing/contract-test/src/ipc/mod.rs diff --git a/fendermint/testing/contract-test/src/ipc/registry.rs b/crates/node/testing/contract-test/src/ipc/registry.rs similarity index 100% rename from fendermint/testing/contract-test/src/ipc/registry.rs rename to crates/node/testing/contract-test/src/ipc/registry.rs diff --git a/fendermint/testing/contract-test/src/ipc/subnet.rs b/crates/node/testing/contract-test/src/ipc/subnet.rs similarity index 100% rename from fendermint/testing/contract-test/src/ipc/subnet.rs rename to crates/node/testing/contract-test/src/ipc/subnet.rs diff --git a/fendermint/testing/contract-test/src/lib.rs b/crates/node/testing/contract-test/src/lib.rs similarity index 100% rename from fendermint/testing/contract-test/src/lib.rs rename to crates/node/testing/contract-test/src/lib.rs diff --git a/fendermint/testing/contract-test/tests/gas_market.rs b/crates/node/testing/contract-test/tests/gas_market.rs similarity index 100% rename from fendermint/testing/contract-test/tests/gas_market.rs rename to crates/node/testing/contract-test/tests/gas_market.rs diff --git a/fendermint/testing/contract-test/tests/run_upgrades.rs b/crates/node/testing/contract-test/tests/run_upgrades.rs similarity index 99% rename from fendermint/testing/contract-test/tests/run_upgrades.rs rename to crates/node/testing/contract-test/tests/run_upgrades.rs index 0d339946e..af650e41b 100644 --- a/fendermint/testing/contract-test/tests/run_upgrades.rs +++ b/crates/node/testing/contract-test/tests/run_upgrades.rs @@ -52,7 +52,7 @@ async fn test_applying_upgrades() { // this is the contract we want to deploy const CONTRACT_HEX: &str = include_str!("../../contracts/SimpleCoin.bin"); - // generate type safe bindings in rust to this contract + // generate type safe contract-bindings in rust to this contract abigen!(SimpleCoin, "../contracts/SimpleCoin.abi"); // once we deploy this contract, this is the address we expect the contract to be deployed to const CONTRACT_ADDRESS: &str = "f410fnz5jdky3zzcj6pejqkomkggw72pcuvkpihz2rwa"; diff --git a/fendermint/testing/contract-test/tests/smt_staking.rs b/crates/node/testing/contract-test/tests/smt_staking.rs similarity index 100% rename from fendermint/testing/contract-test/tests/smt_staking.rs rename to crates/node/testing/contract-test/tests/smt_staking.rs diff --git a/fendermint/testing/contract-test/tests/staking/machine.rs b/crates/node/testing/contract-test/tests/staking/machine.rs similarity index 100% rename from fendermint/testing/contract-test/tests/staking/machine.rs rename to crates/node/testing/contract-test/tests/staking/machine.rs diff --git a/fendermint/testing/contract-test/tests/staking/mod.rs b/crates/node/testing/contract-test/tests/staking/mod.rs similarity index 100% rename from fendermint/testing/contract-test/tests/staking/mod.rs rename to crates/node/testing/contract-test/tests/staking/mod.rs diff --git a/fendermint/testing/contract-test/tests/staking/state.rs b/crates/node/testing/contract-test/tests/staking/state.rs similarity index 100% rename from fendermint/testing/contract-test/tests/staking/state.rs rename to crates/node/testing/contract-test/tests/staking/state.rs diff --git a/fendermint/testing/contracts/Greeter.abi b/crates/node/testing/contracts/Greeter.abi similarity index 100% rename from fendermint/testing/contracts/Greeter.abi rename to crates/node/testing/contracts/Greeter.abi diff --git a/fendermint/testing/contracts/Greeter.bin b/crates/node/testing/contracts/Greeter.bin similarity index 100% rename from fendermint/testing/contracts/Greeter.bin rename to crates/node/testing/contracts/Greeter.bin diff --git a/fendermint/testing/contracts/Greeter.bin-runtime b/crates/node/testing/contracts/Greeter.bin-runtime similarity index 100% rename from fendermint/testing/contracts/Greeter.bin-runtime rename to crates/node/testing/contracts/Greeter.bin-runtime diff --git a/fendermint/testing/contracts/Greeter.signatures b/crates/node/testing/contracts/Greeter.signatures similarity index 100% rename from fendermint/testing/contracts/Greeter.signatures rename to crates/node/testing/contracts/Greeter.signatures diff --git a/fendermint/testing/contracts/Greeter.sol b/crates/node/testing/contracts/Greeter.sol similarity index 100% rename from fendermint/testing/contracts/Greeter.sol rename to crates/node/testing/contracts/Greeter.sol diff --git a/fendermint/testing/contracts/Greeter_storage.json b/crates/node/testing/contracts/Greeter_storage.json similarity index 100% rename from fendermint/testing/contracts/Greeter_storage.json rename to crates/node/testing/contracts/Greeter_storage.json diff --git a/fendermint/testing/contracts/QueryBlockhash.abi b/crates/node/testing/contracts/QueryBlockhash.abi similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash.abi rename to crates/node/testing/contracts/QueryBlockhash.abi diff --git a/fendermint/testing/contracts/QueryBlockhash.bin b/crates/node/testing/contracts/QueryBlockhash.bin similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash.bin rename to crates/node/testing/contracts/QueryBlockhash.bin diff --git a/fendermint/testing/contracts/QueryBlockhash.bin-runtime b/crates/node/testing/contracts/QueryBlockhash.bin-runtime similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash.bin-runtime rename to crates/node/testing/contracts/QueryBlockhash.bin-runtime diff --git a/fendermint/testing/contracts/QueryBlockhash.signatures b/crates/node/testing/contracts/QueryBlockhash.signatures similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash.signatures rename to crates/node/testing/contracts/QueryBlockhash.signatures diff --git a/fendermint/testing/contracts/QueryBlockhash.sol b/crates/node/testing/contracts/QueryBlockhash.sol similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash.sol rename to crates/node/testing/contracts/QueryBlockhash.sol diff --git a/fendermint/testing/contracts/QueryBlockhash_storage.json b/crates/node/testing/contracts/QueryBlockhash_storage.json similarity index 100% rename from fendermint/testing/contracts/QueryBlockhash_storage.json rename to crates/node/testing/contracts/QueryBlockhash_storage.json diff --git a/fendermint/testing/contracts/SimpleCoin.abi b/crates/node/testing/contracts/SimpleCoin.abi similarity index 100% rename from fendermint/testing/contracts/SimpleCoin.abi rename to crates/node/testing/contracts/SimpleCoin.abi diff --git a/fendermint/testing/contracts/SimpleCoin.bin b/crates/node/testing/contracts/SimpleCoin.bin similarity index 100% rename from fendermint/testing/contracts/SimpleCoin.bin rename to crates/node/testing/contracts/SimpleCoin.bin diff --git a/fendermint/testing/contracts/SimpleCoin.bin-runtime b/crates/node/testing/contracts/SimpleCoin.bin-runtime similarity index 100% rename from fendermint/testing/contracts/SimpleCoin.bin-runtime rename to crates/node/testing/contracts/SimpleCoin.bin-runtime diff --git a/fendermint/testing/contracts/SimpleCoin.signatures b/crates/node/testing/contracts/SimpleCoin.signatures similarity index 100% rename from fendermint/testing/contracts/SimpleCoin.signatures rename to crates/node/testing/contracts/SimpleCoin.signatures diff --git a/fendermint/testing/contracts/SimpleCoin.sol b/crates/node/testing/contracts/SimpleCoin.sol similarity index 100% rename from fendermint/testing/contracts/SimpleCoin.sol rename to crates/node/testing/contracts/SimpleCoin.sol diff --git a/fendermint/testing/contracts/SimpleCoin_storage.json b/crates/node/testing/contracts/SimpleCoin_storage.json similarity index 100% rename from fendermint/testing/contracts/SimpleCoin_storage.json rename to crates/node/testing/contracts/SimpleCoin_storage.json diff --git a/fendermint/testing/graph-test/Cargo.toml b/crates/node/testing/graph-test/Cargo.toml similarity index 100% rename from fendermint/testing/graph-test/Cargo.toml rename to crates/node/testing/graph-test/Cargo.toml diff --git a/fendermint/testing/graph-test/Makefile.toml b/crates/node/testing/graph-test/Makefile.toml similarity index 93% rename from fendermint/testing/graph-test/Makefile.toml rename to crates/node/testing/graph-test/Makefile.toml index 0966d5e0a..c4e7d5205 100644 --- a/fendermint/testing/graph-test/Makefile.toml +++ b/crates/node/testing/graph-test/Makefile.toml @@ -29,7 +29,7 @@ run_task = { name = [ # and put it into the subgraph.template.yaml file. [tasks.greeter-example] script = """ -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cargo run --profile ${PROFILE} -p fendermint_eth_api --example greeter -- \ --secret-key testing/graph-test/test-data/keys/veronica.sk \ --out ${TEST_DATA_DIR}/greeter.json \ @@ -44,7 +44,7 @@ echo "Found deployed contract:" cat ${TEST_DATA_DIR}/greeter.json echo "\n" -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cp -r testing/graph-test/subgraph testing/graph-test/test-data mkdir testing/graph-test/test-data/subgraph/config mkdir testing/graph-test/test-data/subgraph/abis @@ -93,7 +93,7 @@ echo "GraphQL query test PASS." [tasks.graph-teardown] script = """ set -x -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint/testing/graph-test/test-data/subgraph/graph-node +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node/testing/graph-test/test-data/subgraph/graph-node echo "Tearing down subgraph..." docker compose down -v cd .. diff --git a/fendermint/testing/graph-test/README.md b/crates/node/testing/graph-test/README.md similarity index 100% rename from fendermint/testing/graph-test/README.md rename to crates/node/testing/graph-test/README.md diff --git a/fendermint/testing/graph-test/scripts/graph.env b/crates/node/testing/graph-test/scripts/graph.env similarity index 100% rename from fendermint/testing/graph-test/scripts/graph.env rename to crates/node/testing/graph-test/scripts/graph.env diff --git a/fendermint/testing/graph-test/scripts/init.sh b/crates/node/testing/graph-test/scripts/init.sh similarity index 100% rename from fendermint/testing/graph-test/scripts/init.sh rename to crates/node/testing/graph-test/scripts/init.sh diff --git a/fendermint/testing/graph-test/src/lib.rs b/crates/node/testing/graph-test/src/lib.rs similarity index 93% rename from fendermint/testing/graph-test/src/lib.rs rename to crates/node/testing/graph-test/src/lib.rs index 056ab1325..ec9892855 100644 --- a/fendermint/testing/graph-test/src/lib.rs +++ b/crates/node/testing/graph-test/src/lib.rs @@ -16,13 +16,13 @@ //! //! 1. All in one go //! ```text -//! cd fendermint/testing/graph-test +//! cd node/testing/graph-test //! cargo make //! ``` //! //! 2. One by one //! ```text -//! cd fendermint/testing/graph-test +//! cd node/testing/graph-test //! cargo make setup //! cargo make test //! cargo make teardown diff --git a/fendermint/testing/graph-test/subgraph/graph-node/.gitignore b/crates/node/testing/graph-test/subgraph/graph-node/.gitignore similarity index 100% rename from fendermint/testing/graph-test/subgraph/graph-node/.gitignore rename to crates/node/testing/graph-test/subgraph/graph-node/.gitignore diff --git a/fendermint/testing/graph-test/subgraph/graph-node/docker-compose.yaml b/crates/node/testing/graph-test/subgraph/graph-node/docker-compose.yaml similarity index 100% rename from fendermint/testing/graph-test/subgraph/graph-node/docker-compose.yaml rename to crates/node/testing/graph-test/subgraph/graph-node/docker-compose.yaml diff --git a/fendermint/testing/graph-test/subgraph/package.json b/crates/node/testing/graph-test/subgraph/package.json similarity index 100% rename from fendermint/testing/graph-test/subgraph/package.json rename to crates/node/testing/graph-test/subgraph/package.json diff --git a/fendermint/testing/graph-test/subgraph/schema.graphql b/crates/node/testing/graph-test/subgraph/schema.graphql similarity index 100% rename from fendermint/testing/graph-test/subgraph/schema.graphql rename to crates/node/testing/graph-test/subgraph/schema.graphql diff --git a/fendermint/testing/graph-test/subgraph/src/mappings.ts b/crates/node/testing/graph-test/subgraph/src/mappings.ts similarity index 100% rename from fendermint/testing/graph-test/subgraph/src/mappings.ts rename to crates/node/testing/graph-test/subgraph/src/mappings.ts diff --git a/fendermint/testing/graph-test/subgraph/subgraph.template.yaml b/crates/node/testing/graph-test/subgraph/subgraph.template.yaml similarity index 100% rename from fendermint/testing/graph-test/subgraph/subgraph.template.yaml rename to crates/node/testing/graph-test/subgraph/subgraph.template.yaml diff --git a/fendermint/testing/materializer/Cargo.toml b/crates/node/testing/materializer/Cargo.toml similarity index 100% rename from fendermint/testing/materializer/Cargo.toml rename to crates/node/testing/materializer/Cargo.toml diff --git a/fendermint/testing/materializer/README.md b/crates/node/testing/materializer/README.md similarity index 98% rename from fendermint/testing/materializer/README.md rename to crates/node/testing/materializer/README.md index f638876e8..be47a2cb6 100644 --- a/fendermint/testing/materializer/README.md +++ b/crates/node/testing/materializer/README.md @@ -111,7 +111,7 @@ The ports get allocated from 30000 onward, 100 range to each node, so the last t #### Logs For troubleshooting we can look at the logs, either by using `docker logs` and the container name, or for the `fendermint` container we can also access the logs: -* `less testing/materializer/tests/docker-materializer-data/testnets/layer2/root/nodes/brussels/fendermint/logs/fendermint.2024-03-11.log` +* `less testing/materializer/tests/docker-materializer-data/testnets/layer2/root/nodes/brussels/node/logs/fendermint.2024-03-11.log` * `docker logs brussels-fendermint-955632` diff --git a/fendermint/testing/materializer/golden/manifest/json/manifest.json b/crates/node/testing/materializer/golden/manifest/json/manifest.json similarity index 100% rename from fendermint/testing/materializer/golden/manifest/json/manifest.json rename to crates/node/testing/materializer/golden/manifest/json/manifest.json diff --git a/fendermint/testing/materializer/golden/manifest/json/manifest.txt b/crates/node/testing/materializer/golden/manifest/json/manifest.txt similarity index 100% rename from fendermint/testing/materializer/golden/manifest/json/manifest.txt rename to crates/node/testing/materializer/golden/manifest/json/manifest.txt diff --git a/fendermint/testing/materializer/golden/manifest/toml/manifest.toml b/crates/node/testing/materializer/golden/manifest/toml/manifest.toml similarity index 100% rename from fendermint/testing/materializer/golden/manifest/toml/manifest.toml rename to crates/node/testing/materializer/golden/manifest/toml/manifest.toml diff --git a/fendermint/testing/materializer/golden/manifest/toml/manifest.txt b/crates/node/testing/materializer/golden/manifest/toml/manifest.txt similarity index 100% rename from fendermint/testing/materializer/golden/manifest/toml/manifest.txt rename to crates/node/testing/materializer/golden/manifest/toml/manifest.txt diff --git a/fendermint/testing/materializer/golden/manifest/yaml/manifest.txt b/crates/node/testing/materializer/golden/manifest/yaml/manifest.txt similarity index 100% rename from fendermint/testing/materializer/golden/manifest/yaml/manifest.txt rename to crates/node/testing/materializer/golden/manifest/yaml/manifest.txt diff --git a/fendermint/testing/materializer/golden/manifest/yaml/manifest.yaml b/crates/node/testing/materializer/golden/manifest/yaml/manifest.yaml similarity index 100% rename from fendermint/testing/materializer/golden/manifest/yaml/manifest.yaml rename to crates/node/testing/materializer/golden/manifest/yaml/manifest.yaml diff --git a/fendermint/testing/materializer/scripts/docker-entry.sh b/crates/node/testing/materializer/scripts/docker-entry.sh similarity index 83% rename from fendermint/testing/materializer/scripts/docker-entry.sh rename to crates/node/testing/materializer/scripts/docker-entry.sh index 5ad3bfdea..51d9ecbf7 100755 --- a/fendermint/testing/materializer/scripts/docker-entry.sh +++ b/crates/node/testing/materializer/scripts/docker-entry.sh @@ -7,7 +7,7 @@ # echo 'b=2' > test2.env # echo 'echo a=$a b=$b c=$1' > test.sh # chmod +x test.sh -# fendermint/testing/materializer/scripts/docker-entry.sh "./test.sh 3" test1.env test2.env +# node/testing/materializer/scripts/docker-entry.sh "./test.sh 3" test1.env test2.env set -e diff --git a/fendermint/testing/materializer/src/arb.rs b/crates/node/testing/materializer/src/arb.rs similarity index 100% rename from fendermint/testing/materializer/src/arb.rs rename to crates/node/testing/materializer/src/arb.rs diff --git a/fendermint/testing/materializer/src/docker/container.rs b/crates/node/testing/materializer/src/docker/container.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/container.rs rename to crates/node/testing/materializer/src/docker/container.rs diff --git a/fendermint/testing/materializer/src/docker/dropper.rs b/crates/node/testing/materializer/src/docker/dropper.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/dropper.rs rename to crates/node/testing/materializer/src/docker/dropper.rs diff --git a/fendermint/testing/materializer/src/docker/mod.rs b/crates/node/testing/materializer/src/docker/mod.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/mod.rs rename to crates/node/testing/materializer/src/docker/mod.rs diff --git a/fendermint/testing/materializer/src/docker/network.rs b/crates/node/testing/materializer/src/docker/network.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/network.rs rename to crates/node/testing/materializer/src/docker/network.rs diff --git a/fendermint/testing/materializer/src/docker/node.rs b/crates/node/testing/materializer/src/docker/node.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/node.rs rename to crates/node/testing/materializer/src/docker/node.rs diff --git a/fendermint/testing/materializer/src/docker/relayer.rs b/crates/node/testing/materializer/src/docker/relayer.rs similarity index 98% rename from fendermint/testing/materializer/src/docker/relayer.rs rename to crates/node/testing/materializer/src/docker/relayer.rs index 6d5fbd247..27b6ed23b 100644 --- a/fendermint/testing/materializer/src/docker/relayer.rs +++ b/crates/node/testing/materializer/src/docker/relayer.rs @@ -86,7 +86,7 @@ impl DockerRelayer { // TODO: Do we need to use any env vars with the relayer? let entrypoint = split_cmd(&format!( "ipc-cli \ - --config-path /fendermint/.ipc/config.toml \ + --config-path /node/.ipc/config.toml \ checkpoint relayer \ --subnet {} \ --submitter {:?} \ diff --git a/fendermint/testing/materializer/src/docker/runner.rs b/crates/node/testing/materializer/src/docker/runner.rs similarity index 100% rename from fendermint/testing/materializer/src/docker/runner.rs rename to crates/node/testing/materializer/src/docker/runner.rs diff --git a/fendermint/testing/materializer/src/lib.rs b/crates/node/testing/materializer/src/lib.rs similarity index 100% rename from fendermint/testing/materializer/src/lib.rs rename to crates/node/testing/materializer/src/lib.rs diff --git a/fendermint/testing/materializer/src/logging.rs b/crates/node/testing/materializer/src/logging.rs similarity index 100% rename from fendermint/testing/materializer/src/logging.rs rename to crates/node/testing/materializer/src/logging.rs diff --git a/fendermint/testing/materializer/src/manifest.rs b/crates/node/testing/materializer/src/manifest.rs similarity index 100% rename from fendermint/testing/materializer/src/manifest.rs rename to crates/node/testing/materializer/src/manifest.rs diff --git a/fendermint/testing/materializer/src/materializer.rs b/crates/node/testing/materializer/src/materializer.rs similarity index 100% rename from fendermint/testing/materializer/src/materializer.rs rename to crates/node/testing/materializer/src/materializer.rs diff --git a/fendermint/testing/materializer/src/materials/defaults.rs b/crates/node/testing/materializer/src/materials/defaults.rs similarity index 100% rename from fendermint/testing/materializer/src/materials/defaults.rs rename to crates/node/testing/materializer/src/materials/defaults.rs diff --git a/fendermint/testing/materializer/src/materials/mod.rs b/crates/node/testing/materializer/src/materials/mod.rs similarity index 100% rename from fendermint/testing/materializer/src/materials/mod.rs rename to crates/node/testing/materializer/src/materials/mod.rs diff --git a/fendermint/testing/materializer/src/testnet.rs b/crates/node/testing/materializer/src/testnet.rs similarity index 100% rename from fendermint/testing/materializer/src/testnet.rs rename to crates/node/testing/materializer/src/testnet.rs diff --git a/fendermint/testing/materializer/src/validation.rs b/crates/node/testing/materializer/src/validation.rs similarity index 100% rename from fendermint/testing/materializer/src/validation.rs rename to crates/node/testing/materializer/src/validation.rs diff --git a/fendermint/testing/materializer/tests/docker.rs b/crates/node/testing/materializer/tests/docker.rs similarity index 99% rename from fendermint/testing/materializer/tests/docker.rs rename to crates/node/testing/materializer/tests/docker.rs index 04038a183..6ffaa224e 100644 --- a/fendermint/testing/materializer/tests/docker.rs +++ b/crates/node/testing/materializer/tests/docker.rs @@ -181,6 +181,7 @@ async fn wait_for_startup(testnet: &DockerTestnet) -> anyhow::Result { } } +// TODO move every test into a unique ephemeral `tmp_dir` // Run these tests serially because they share a common `materializer-state.json` file with the port mappings. // Unfortunately the `#[serial]` macro can only be applied to module blocks, not this. mod docker_tests; diff --git a/fendermint/testing/materializer/tests/docker_tests/layer2.rs b/crates/node/testing/materializer/tests/docker_tests/layer2.rs similarity index 100% rename from fendermint/testing/materializer/tests/docker_tests/layer2.rs rename to crates/node/testing/materializer/tests/docker_tests/layer2.rs diff --git a/fendermint/testing/materializer/tests/docker_tests/mod.rs b/crates/node/testing/materializer/tests/docker_tests/mod.rs similarity index 100% rename from fendermint/testing/materializer/tests/docker_tests/mod.rs rename to crates/node/testing/materializer/tests/docker_tests/mod.rs diff --git a/fendermint/testing/materializer/tests/docker_tests/root_only.rs b/crates/node/testing/materializer/tests/docker_tests/root_only.rs similarity index 100% rename from fendermint/testing/materializer/tests/docker_tests/root_only.rs rename to crates/node/testing/materializer/tests/docker_tests/root_only.rs diff --git a/fendermint/testing/materializer/tests/docker_tests/standalone.rs b/crates/node/testing/materializer/tests/docker_tests/standalone.rs similarity index 100% rename from fendermint/testing/materializer/tests/docker_tests/standalone.rs rename to crates/node/testing/materializer/tests/docker_tests/standalone.rs diff --git a/fendermint/testing/materializer/tests/golden.rs b/crates/node/testing/materializer/tests/golden.rs similarity index 100% rename from fendermint/testing/materializer/tests/golden.rs rename to crates/node/testing/materializer/tests/golden.rs diff --git a/fendermint/testing/materializer/tests/manifests/layer2.yaml b/crates/node/testing/materializer/tests/manifests/layer2.yaml similarity index 100% rename from fendermint/testing/materializer/tests/manifests/layer2.yaml rename to crates/node/testing/materializer/tests/manifests/layer2.yaml diff --git a/fendermint/testing/materializer/tests/manifests/root-only.yaml b/crates/node/testing/materializer/tests/manifests/root-only.yaml similarity index 100% rename from fendermint/testing/materializer/tests/manifests/root-only.yaml rename to crates/node/testing/materializer/tests/manifests/root-only.yaml diff --git a/fendermint/testing/materializer/tests/manifests/standalone.yaml b/crates/node/testing/materializer/tests/manifests/standalone.yaml similarity index 100% rename from fendermint/testing/materializer/tests/manifests/standalone.yaml rename to crates/node/testing/materializer/tests/manifests/standalone.yaml diff --git a/fendermint/testing/materializer/tests/manifests/test.toml b/crates/node/testing/materializer/tests/manifests/test.toml similarity index 100% rename from fendermint/testing/materializer/tests/manifests/test.toml rename to crates/node/testing/materializer/tests/manifests/test.toml diff --git a/fendermint/testing/scripts/ci.env b/crates/node/testing/scripts/ci.env similarity index 100% rename from fendermint/testing/scripts/ci.env rename to crates/node/testing/scripts/ci.env diff --git a/fendermint/testing/scripts/common.env b/crates/node/testing/scripts/common.env similarity index 79% rename from fendermint/testing/scripts/common.env rename to crates/node/testing/scripts/common.env index 8c52cc4af..c026c4d27 100644 --- a/fendermint/testing/scripts/common.env +++ b/crates/node/testing/scripts/common.env @@ -17,8 +17,8 @@ CARGO_MAKE_WAIT_MILLISECONDS=5000 CMT_WAIT_MILLIS=10000 # Keep example logs to a minimum. VERBOSITY="" -TEST_SCRIPTS_DIR="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint/testing/${TEST_DIR}/scripts" -TEST_DATA_DIR="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint/testing/${TEST_DIR}/test-data" +TEST_SCRIPTS_DIR="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node/testing/${TEST_DIR}/scripts" +TEST_DATA_DIR="${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node/testing/${TEST_DIR}/test-data" NODE_NAME=node-0 CMT_DIR=${TEST_DATA_DIR}/${NODE_NAME}/cometbft BASE_DIR=${TEST_DATA_DIR} diff --git a/fendermint/testing/scripts/common.toml b/crates/node/testing/scripts/common.toml similarity index 83% rename from fendermint/testing/scripts/common.toml rename to crates/node/testing/scripts/common.toml index 73cfe9023..eabcd9dbe 100644 --- a/fendermint/testing/scripts/common.toml +++ b/crates/node/testing/scripts/common.toml @@ -1,7 +1,7 @@ # smoke-test infrastructure: # cargo install cargo-make # -# cd fendermint/testing/smoke-test +# cd crates/node/testing/smoke-test # - then - # cargo make --profile ci # - or - @@ -11,11 +11,11 @@ # cargo make teardown extend = [ - { path = "../../../infra/fendermint/scripts/docker.toml" }, - { path = "../../../infra/fendermint/scripts/cometbft.toml" }, - { path = "../../../infra/fendermint/scripts/ethapi.toml" }, - { path = "../../../infra/fendermint/scripts/fendermint.toml" }, - { path = "../../../infra/fendermint/scripts/promtail.toml" }, + { path = "../../../../infra/fendermint/scripts/docker.toml" }, + { path = "../../../../infra/fendermint/scripts/cometbft.toml" }, + { path = "../../../../infra/fendermint/scripts/ethapi.toml" }, + { path = "../../../../infra/fendermint/scripts/fendermint.toml" }, + { path = "../../../../infra/fendermint/scripts/promtail.toml" }, { path = "./fendermint.toml" }, ] diff --git a/fendermint/testing/scripts/fendermint.toml b/crates/node/testing/scripts/fendermint.toml similarity index 100% rename from fendermint/testing/scripts/fendermint.toml rename to crates/node/testing/scripts/fendermint.toml diff --git a/fendermint/testing/smoke-test/Cargo.toml b/crates/node/testing/smoke-test/Cargo.toml similarity index 100% rename from fendermint/testing/smoke-test/Cargo.toml rename to crates/node/testing/smoke-test/Cargo.toml diff --git a/fendermint/testing/smoke-test/Makefile.toml b/crates/node/testing/smoke-test/Makefile.toml similarity index 85% rename from fendermint/testing/smoke-test/Makefile.toml rename to crates/node/testing/smoke-test/Makefile.toml index f67dc0959..22280d85a 100644 --- a/fendermint/testing/smoke-test/Makefile.toml +++ b/crates/node/testing/smoke-test/Makefile.toml @@ -1,7 +1,7 @@ # smoke-test infrastructure: # cargo install cargo-make # -# cd fendermint/testing/smoke-test +# cd crates/node/testing/smoke-test # - then - # cargo make --profile ci # - or - @@ -41,7 +41,7 @@ dependencies = [ [tasks.simplecoin-example] script = """ -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cargo run --profile ${PROFILE} -p fendermint_rpc --example simplecoin -- \ --secret-key testing/smoke-test/test-data/keys/alice.sk \ ${VERBOSITY} @@ -50,7 +50,7 @@ cargo run --profile ${PROFILE} -p fendermint_rpc --example simplecoin -- \ [tasks.transfer-example] script = """ -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cargo run --profile ${PROFILE} -p fendermint_rpc --example transfer -- \ --secret-key testing/smoke-test/test-data/keys/eric.sk \ ${VERBOSITY} @@ -59,7 +59,7 @@ cargo run --profile ${PROFILE} -p fendermint_rpc --example transfer -- \ [tasks.ethers-example] script = """ -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cargo run --profile ${PROFILE} -p fendermint_eth_api --example ethers -- \ --secret-key-from testing/smoke-test/test-data/keys/emily.sk \ --secret-key-to testing/smoke-test/test-data/keys/eric.sk @@ -67,7 +67,7 @@ cargo run --profile ${PROFILE} -p fendermint_eth_api --example ethers -- \ [tasks.query-blockhash-example] script = """ -cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/fendermint +cd ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/node cargo run --profile ${PROFILE} -p fendermint_eth_api --example query_blockhash -- \ --secret-key testing/smoke-test/test-data/keys/emily.sk \ ${VERBOSITY} diff --git a/fendermint/testing/smoke-test/scripts/init.sh b/crates/node/testing/smoke-test/scripts/init.sh similarity index 100% rename from fendermint/testing/smoke-test/scripts/init.sh rename to crates/node/testing/smoke-test/scripts/init.sh diff --git a/fendermint/testing/smoke-test/scripts/smoke.env b/crates/node/testing/smoke-test/scripts/smoke.env similarity index 100% rename from fendermint/testing/smoke-test/scripts/smoke.env rename to crates/node/testing/smoke-test/scripts/smoke.env diff --git a/fendermint/testing/smoke-test/src/lib.rs b/crates/node/testing/smoke-test/src/lib.rs similarity index 89% rename from fendermint/testing/smoke-test/src/lib.rs rename to crates/node/testing/smoke-test/src/lib.rs index fa418df2b..8466b4fe0 100644 --- a/fendermint/testing/smoke-test/src/lib.rs +++ b/crates/node/testing/smoke-test/src/lib.rs @@ -5,7 +5,7 @@ //! Example: //! //! ```text -//! cd fendermint/testing/smoke-test +//! cd node/testing/smoke-test //! cargo make //! ``` //! diff --git a/fendermint/testing/snapshot-test/Cargo.toml b/crates/node/testing/snapshot-test/Cargo.toml similarity index 100% rename from fendermint/testing/snapshot-test/Cargo.toml rename to crates/node/testing/snapshot-test/Cargo.toml diff --git a/fendermint/testing/snapshot-test/Makefile.toml b/crates/node/testing/snapshot-test/Makefile.toml similarity index 98% rename from fendermint/testing/snapshot-test/Makefile.toml rename to crates/node/testing/snapshot-test/Makefile.toml index 320a3e9cd..bcc99e5a2 100644 --- a/fendermint/testing/snapshot-test/Makefile.toml +++ b/crates/node/testing/snapshot-test/Makefile.toml @@ -1,4 +1,4 @@ -# See fendermint/testing/snapshot-test/src/lib.rs for description. +# See node/testing/snapshot-test/src/lib.rs for description. extend = [ { path = "../scripts/common.toml" }, diff --git a/fendermint/testing/snapshot-test/scripts/init.sh b/crates/node/testing/snapshot-test/scripts/init.sh similarity index 100% rename from fendermint/testing/snapshot-test/scripts/init.sh rename to crates/node/testing/snapshot-test/scripts/init.sh diff --git a/fendermint/testing/snapshot-test/scripts/node-1.env b/crates/node/testing/snapshot-test/scripts/node-1.env similarity index 100% rename from fendermint/testing/snapshot-test/scripts/node-1.env rename to crates/node/testing/snapshot-test/scripts/node-1.env diff --git a/fendermint/testing/snapshot-test/scripts/node-2.env b/crates/node/testing/snapshot-test/scripts/node-2.env similarity index 100% rename from fendermint/testing/snapshot-test/scripts/node-2.env rename to crates/node/testing/snapshot-test/scripts/node-2.env diff --git a/fendermint/testing/snapshot-test/scripts/node-3.env b/crates/node/testing/snapshot-test/scripts/node-3.env similarity index 100% rename from fendermint/testing/snapshot-test/scripts/node-3.env rename to crates/node/testing/snapshot-test/scripts/node-3.env diff --git a/fendermint/testing/snapshot-test/scripts/snapshot.env b/crates/node/testing/snapshot-test/scripts/snapshot.env similarity index 100% rename from fendermint/testing/snapshot-test/scripts/snapshot.env rename to crates/node/testing/snapshot-test/scripts/snapshot.env diff --git a/fendermint/testing/snapshot-test/src/lib.rs b/crates/node/testing/snapshot-test/src/lib.rs similarity index 94% rename from fendermint/testing/snapshot-test/src/lib.rs rename to crates/node/testing/snapshot-test/src/lib.rs index 693de608f..d61459f52 100644 --- a/fendermint/testing/snapshot-test/src/lib.rs +++ b/crates/node/testing/snapshot-test/src/lib.rs @@ -16,13 +16,13 @@ //! //! 1. All in one go //! ```text -//! cd fendermint/testing/snapshot-test +//! cd node/testing/snapshot-test //! cargo make //! ``` //! //! 2. One by one //! ```text -//! cd fendermint/testing/snapshot-test +//! cd node/testing/snapshot-test //! cargo make setup //! cargo make node-1-setup //! cargo make node-2-setup diff --git a/fendermint/testing/src/arb/address.rs b/crates/node/testing/src/arb/address.rs similarity index 100% rename from fendermint/testing/src/arb/address.rs rename to crates/node/testing/src/arb/address.rs diff --git a/fendermint/testing/src/arb/cid.rs b/crates/node/testing/src/arb/cid.rs similarity index 100% rename from fendermint/testing/src/arb/cid.rs rename to crates/node/testing/src/arb/cid.rs diff --git a/fendermint/testing/src/arb/message.rs b/crates/node/testing/src/arb/message.rs similarity index 100% rename from fendermint/testing/src/arb/message.rs rename to crates/node/testing/src/arb/message.rs diff --git a/fendermint/testing/src/arb/mod.rs b/crates/node/testing/src/arb/mod.rs similarity index 100% rename from fendermint/testing/src/arb/mod.rs rename to crates/node/testing/src/arb/mod.rs diff --git a/fendermint/testing/src/arb/subnetid.rs b/crates/node/testing/src/arb/subnetid.rs similarity index 100% rename from fendermint/testing/src/arb/subnetid.rs rename to crates/node/testing/src/arb/subnetid.rs diff --git a/fendermint/testing/src/arb/token.rs b/crates/node/testing/src/arb/token.rs similarity index 100% rename from fendermint/testing/src/arb/token.rs rename to crates/node/testing/src/arb/token.rs diff --git a/fendermint/testing/src/golden.rs b/crates/node/testing/src/golden.rs similarity index 99% rename from fendermint/testing/src/golden.rs rename to crates/node/testing/src/golden.rs index d0e7a66b7..f7faa78ae 100644 --- a/fendermint/testing/src/golden.rs +++ b/crates/node/testing/src/golden.rs @@ -11,7 +11,7 @@ use std::path::Path; /// Path to a golden file. fn path(prefix: &str, name: &str, ext: &str) -> String { // All files will have the same name but different extension. - // They should be under `fendermint/vm/message/golden`. + // They should be under `node/vm/message/golden`. let path = Path::new("golden").join(prefix).join(name); format!("{}.{}", path.display(), ext) } diff --git a/fendermint/testing/src/lib.rs b/crates/node/testing/src/lib.rs similarity index 100% rename from fendermint/testing/src/lib.rs rename to crates/node/testing/src/lib.rs diff --git a/fendermint/testing/src/smt.rs b/crates/node/testing/src/smt.rs similarity index 100% rename from fendermint/testing/src/smt.rs rename to crates/node/testing/src/smt.rs diff --git a/fendermint/tracing/Cargo.toml b/crates/node/tracing/Cargo.toml similarity index 100% rename from fendermint/tracing/Cargo.toml rename to crates/node/tracing/Cargo.toml diff --git a/fendermint/tracing/src/lib.rs b/crates/node/tracing/src/lib.rs similarity index 100% rename from fendermint/tracing/src/lib.rs rename to crates/node/tracing/src/lib.rs diff --git a/fendermint/vm/actor_interface/Cargo.toml b/crates/node/vm/actor_interface/Cargo.toml similarity index 95% rename from fendermint/vm/actor_interface/Cargo.toml rename to crates/node/vm/actor_interface/Cargo.toml index 94bf9bba7..a100cf2e4 100644 --- a/fendermint/vm/actor_interface/Cargo.toml +++ b/crates/node/vm/actor_interface/Cargo.toml @@ -34,7 +34,7 @@ ipc-api = { workspace = true } # hardcoded method hashes than what we care to maintain, but currently there is only one. # frc42_dispatch = { workspace = true } -merkle-tree-rs = { path = "../../../ext/merkle-tree-rs" } +merkle-tree-rs = { path = "../../../patched_external/merkle-tree-rs" } fendermint_vm_genesis = { path = "../genesis" } fendermint_crypto = { path = "../../crypto" } diff --git a/fendermint/vm/actor_interface/src/account.rs b/crates/node/vm/actor_interface/src/account.rs similarity index 100% rename from fendermint/vm/actor_interface/src/account.rs rename to crates/node/vm/actor_interface/src/account.rs diff --git a/fendermint/vm/actor_interface/src/activity.rs b/crates/node/vm/actor_interface/src/activity.rs similarity index 100% rename from fendermint/vm/actor_interface/src/activity.rs rename to crates/node/vm/actor_interface/src/activity.rs diff --git a/fendermint/vm/actor_interface/src/burntfunds.rs b/crates/node/vm/actor_interface/src/burntfunds.rs similarity index 100% rename from fendermint/vm/actor_interface/src/burntfunds.rs rename to crates/node/vm/actor_interface/src/burntfunds.rs diff --git a/fendermint/vm/actor_interface/src/chainmetadata.rs b/crates/node/vm/actor_interface/src/chainmetadata.rs similarity index 100% rename from fendermint/vm/actor_interface/src/chainmetadata.rs rename to crates/node/vm/actor_interface/src/chainmetadata.rs diff --git a/fendermint/vm/actor_interface/src/cron.rs b/crates/node/vm/actor_interface/src/cron.rs similarity index 100% rename from fendermint/vm/actor_interface/src/cron.rs rename to crates/node/vm/actor_interface/src/cron.rs diff --git a/fendermint/vm/actor_interface/src/diamond.rs b/crates/node/vm/actor_interface/src/diamond.rs similarity index 100% rename from fendermint/vm/actor_interface/src/diamond.rs rename to crates/node/vm/actor_interface/src/diamond.rs diff --git a/fendermint/vm/actor_interface/src/eam.rs b/crates/node/vm/actor_interface/src/eam.rs similarity index 100% rename from fendermint/vm/actor_interface/src/eam.rs rename to crates/node/vm/actor_interface/src/eam.rs diff --git a/fendermint/vm/actor_interface/src/ethaccount.rs b/crates/node/vm/actor_interface/src/ethaccount.rs similarity index 100% rename from fendermint/vm/actor_interface/src/ethaccount.rs rename to crates/node/vm/actor_interface/src/ethaccount.rs diff --git a/fendermint/vm/actor_interface/src/evm.rs b/crates/node/vm/actor_interface/src/evm.rs similarity index 100% rename from fendermint/vm/actor_interface/src/evm.rs rename to crates/node/vm/actor_interface/src/evm.rs diff --git a/fendermint/vm/actor_interface/src/gas.rs b/crates/node/vm/actor_interface/src/gas.rs similarity index 100% rename from fendermint/vm/actor_interface/src/gas.rs rename to crates/node/vm/actor_interface/src/gas.rs diff --git a/fendermint/vm/actor_interface/src/gas_market.rs b/crates/node/vm/actor_interface/src/gas_market.rs similarity index 100% rename from fendermint/vm/actor_interface/src/gas_market.rs rename to crates/node/vm/actor_interface/src/gas_market.rs diff --git a/fendermint/vm/actor_interface/src/init.rs b/crates/node/vm/actor_interface/src/init.rs similarity index 100% rename from fendermint/vm/actor_interface/src/init.rs rename to crates/node/vm/actor_interface/src/init.rs diff --git a/fendermint/vm/actor_interface/src/ipc.rs b/crates/node/vm/actor_interface/src/ipc.rs similarity index 99% rename from fendermint/vm/actor_interface/src/ipc.rs rename to crates/node/vm/actor_interface/src/ipc.rs index d3f4c18d7..715db7a56 100644 --- a/fendermint/vm/actor_interface/src/ipc.rs +++ b/crates/node/vm/actor_interface/src/ipc.rs @@ -1,7 +1,7 @@ // Copyright 2022-2024 Protocol Labs // SPDX-License-Identifier: Apache-2.0, MIT -// The IPC actors have bindings in `ipc_actors_abis`. +// The IPC actors have contract-bindings in `ipc_actors_abis`. // Here we define stable IDs for them, so we can deploy the // Solidity contracts during genesis. diff --git a/fendermint/vm/actor_interface/src/lib.rs b/crates/node/vm/actor_interface/src/lib.rs similarity index 100% rename from fendermint/vm/actor_interface/src/lib.rs rename to crates/node/vm/actor_interface/src/lib.rs diff --git a/fendermint/vm/actor_interface/src/multisig.rs b/crates/node/vm/actor_interface/src/multisig.rs similarity index 100% rename from fendermint/vm/actor_interface/src/multisig.rs rename to crates/node/vm/actor_interface/src/multisig.rs diff --git a/fendermint/vm/actor_interface/src/placeholder.rs b/crates/node/vm/actor_interface/src/placeholder.rs similarity index 100% rename from fendermint/vm/actor_interface/src/placeholder.rs rename to crates/node/vm/actor_interface/src/placeholder.rs diff --git a/fendermint/vm/actor_interface/src/reward.rs b/crates/node/vm/actor_interface/src/reward.rs similarity index 100% rename from fendermint/vm/actor_interface/src/reward.rs rename to crates/node/vm/actor_interface/src/reward.rs diff --git a/fendermint/vm/actor_interface/src/system.rs b/crates/node/vm/actor_interface/src/system.rs similarity index 100% rename from fendermint/vm/actor_interface/src/system.rs rename to crates/node/vm/actor_interface/src/system.rs diff --git a/fendermint/vm/core/Cargo.toml b/crates/node/vm/core/Cargo.toml similarity index 100% rename from fendermint/vm/core/Cargo.toml rename to crates/node/vm/core/Cargo.toml diff --git a/fendermint/vm/core/src/chainid.rs b/crates/node/vm/core/src/chainid.rs similarity index 100% rename from fendermint/vm/core/src/chainid.rs rename to crates/node/vm/core/src/chainid.rs diff --git a/fendermint/vm/core/src/lib.rs b/crates/node/vm/core/src/lib.rs similarity index 100% rename from fendermint/vm/core/src/lib.rs rename to crates/node/vm/core/src/lib.rs diff --git a/fendermint/vm/core/src/timestamp.rs b/crates/node/vm/core/src/timestamp.rs similarity index 100% rename from fendermint/vm/core/src/timestamp.rs rename to crates/node/vm/core/src/timestamp.rs diff --git a/fendermint/vm/encoding/Cargo.toml b/crates/node/vm/encoding/Cargo.toml similarity index 100% rename from fendermint/vm/encoding/Cargo.toml rename to crates/node/vm/encoding/Cargo.toml diff --git a/fendermint/vm/encoding/src/lib.rs b/crates/node/vm/encoding/src/lib.rs similarity index 100% rename from fendermint/vm/encoding/src/lib.rs rename to crates/node/vm/encoding/src/lib.rs diff --git a/fendermint/vm/event/Cargo.toml b/crates/node/vm/event/Cargo.toml similarity index 100% rename from fendermint/vm/event/Cargo.toml rename to crates/node/vm/event/Cargo.toml diff --git a/fendermint/vm/event/src/lib.rs b/crates/node/vm/event/src/lib.rs similarity index 100% rename from fendermint/vm/event/src/lib.rs rename to crates/node/vm/event/src/lib.rs diff --git a/fendermint/vm/genesis/Cargo.toml b/crates/node/vm/genesis/Cargo.toml similarity index 100% rename from fendermint/vm/genesis/Cargo.toml rename to crates/node/vm/genesis/Cargo.toml diff --git a/fendermint/vm/genesis/golden/genesis/cbor/genesis.cbor b/crates/node/vm/genesis/golden/genesis/cbor/genesis.cbor similarity index 100% rename from fendermint/vm/genesis/golden/genesis/cbor/genesis.cbor rename to crates/node/vm/genesis/golden/genesis/cbor/genesis.cbor diff --git a/fendermint/vm/genesis/golden/genesis/cbor/genesis.txt b/crates/node/vm/genesis/golden/genesis/cbor/genesis.txt similarity index 100% rename from fendermint/vm/genesis/golden/genesis/cbor/genesis.txt rename to crates/node/vm/genesis/golden/genesis/cbor/genesis.txt diff --git a/fendermint/vm/genesis/golden/genesis/json/genesis.json b/crates/node/vm/genesis/golden/genesis/json/genesis.json similarity index 100% rename from fendermint/vm/genesis/golden/genesis/json/genesis.json rename to crates/node/vm/genesis/golden/genesis/json/genesis.json diff --git a/fendermint/vm/genesis/golden/genesis/json/genesis.txt b/crates/node/vm/genesis/golden/genesis/json/genesis.txt similarity index 100% rename from fendermint/vm/genesis/golden/genesis/json/genesis.txt rename to crates/node/vm/genesis/golden/genesis/json/genesis.txt diff --git a/fendermint/vm/genesis/src/arb.rs b/crates/node/vm/genesis/src/arb.rs similarity index 100% rename from fendermint/vm/genesis/src/arb.rs rename to crates/node/vm/genesis/src/arb.rs diff --git a/fendermint/vm/genesis/src/lib.rs b/crates/node/vm/genesis/src/lib.rs similarity index 100% rename from fendermint/vm/genesis/src/lib.rs rename to crates/node/vm/genesis/src/lib.rs diff --git a/fendermint/vm/genesis/tests/golden.rs b/crates/node/vm/genesis/tests/golden.rs similarity index 100% rename from fendermint/vm/genesis/tests/golden.rs rename to crates/node/vm/genesis/tests/golden.rs diff --git a/fendermint/vm/interpreter/Cargo.toml b/crates/node/vm/interpreter/Cargo.toml similarity index 97% rename from fendermint/vm/interpreter/Cargo.toml rename to crates/node/vm/interpreter/Cargo.toml index 1b1aca7ad..9515521f2 100644 --- a/fendermint/vm/interpreter/Cargo.toml +++ b/crates/node/vm/interpreter/Cargo.toml @@ -71,7 +71,7 @@ arbitrary = { workspace = true, optional = true } quickcheck = { workspace = true, optional = true } rand = { workspace = true, optional = true } -merkle-tree-rs = { path = "../../../ext/merkle-tree-rs" } +merkle-tree-rs = { path = "../../../patched_external/merkle-tree-rs" } [dev-dependencies] quickcheck = { workspace = true } diff --git a/fendermint/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.cbor b/crates/node/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.cbor similarity index 100% rename from fendermint/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.cbor rename to crates/node/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.cbor diff --git a/fendermint/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.txt b/crates/node/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.txt similarity index 100% rename from fendermint/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.txt rename to crates/node/vm/interpreter/golden/fvmstateparams/cbor/fvmstateparams.txt diff --git a/fendermint/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.json b/crates/node/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.json similarity index 100% rename from fendermint/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.json rename to crates/node/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.json diff --git a/fendermint/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.txt b/crates/node/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.txt similarity index 100% rename from fendermint/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.txt rename to crates/node/vm/interpreter/golden/fvmstateparams/json/fvmstateparams.txt diff --git a/fendermint/vm/interpreter/src/arb.rs b/crates/node/vm/interpreter/src/arb.rs similarity index 100% rename from fendermint/vm/interpreter/src/arb.rs rename to crates/node/vm/interpreter/src/arb.rs diff --git a/fendermint/vm/interpreter/src/bytes.rs b/crates/node/vm/interpreter/src/bytes.rs similarity index 100% rename from fendermint/vm/interpreter/src/bytes.rs rename to crates/node/vm/interpreter/src/bytes.rs diff --git a/fendermint/vm/interpreter/src/chain.rs b/crates/node/vm/interpreter/src/chain.rs similarity index 100% rename from fendermint/vm/interpreter/src/chain.rs rename to crates/node/vm/interpreter/src/chain.rs diff --git a/fendermint/vm/interpreter/src/fvm/activity/actor.rs b/crates/node/vm/interpreter/src/fvm/activity/actor.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/activity/actor.rs rename to crates/node/vm/interpreter/src/fvm/activity/actor.rs diff --git a/fendermint/vm/interpreter/src/fvm/activity/mod.rs b/crates/node/vm/interpreter/src/fvm/activity/mod.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/activity/mod.rs rename to crates/node/vm/interpreter/src/fvm/activity/mod.rs diff --git a/fendermint/vm/interpreter/src/fvm/broadcast.rs b/crates/node/vm/interpreter/src/fvm/broadcast.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/broadcast.rs rename to crates/node/vm/interpreter/src/fvm/broadcast.rs diff --git a/crates/node/vm/interpreter/src/fvm/bundle.rs b/crates/node/vm/interpreter/src/fvm/bundle.rs new file mode 100644 index 000000000..61c16ed24 --- /dev/null +++ b/crates/node/vm/interpreter/src/fvm/bundle.rs @@ -0,0 +1,49 @@ +// Copyright 2022-2024 Protocol Labs +// SPDX-License-Identifier: Apache-2.0, MIT + +use std::{fs, path::PathBuf}; + +// TODO factor out into a test support crate +// Find the root of the workspace, not this crate, which is what `env!("CARGO_MANIFEST_DIR")` would return +fn cargo_workspace_dir() -> PathBuf { + let output = std::process::Command::new(env!("CARGO")) + .arg("locate-project") + .arg("--workspace") + .arg("--message-format=plain") + .output() + .unwrap() + .stdout; + + let cargo_path = PathBuf::from(std::str::from_utf8(&output).unwrap().trim()); + cargo_path.parent().unwrap().parent().unwrap().to_path_buf() +} + +/// Path to the Solidity contracts, indended to be used in tests. +pub fn contracts_path() -> PathBuf { + std::env::var("FM_CONTRACTS_DIR") + .map(std::path::PathBuf::from) + .unwrap_or_else(|_| cargo_workspace_dir().join("contracts").join("out")) +} + +pub fn actor_bundles_dir() -> PathBuf { + let p = cargo_workspace_dir() + .join("node") + .join("actors") + .join("output"); + fs::create_dir_all(&p).expect("Must be able to create directories"); + p +} + +/// Path to the builtin-actor bundle, indended to be used in tests. +pub fn bundle_path() -> PathBuf { + std::env::var("FM_BUILTIN_ACTORS_BUNDLE") + .map(std::path::PathBuf::from) + .unwrap_or_else(|_| actor_bundles_dir().join("bundle.car")) +} + +/// Path to the in-repo custom actor bundle, intended to be used in tests. +pub fn custom_actors_bundle_path() -> PathBuf { + std::env::var("FM_CUSTOM_ACTORS_BUNDLE") + .map(std::path::PathBuf::from) + .unwrap_or_else(|_| actor_bundles_dir().join("custom_actors_bundle.car")) +} diff --git a/fendermint/vm/interpreter/src/fvm/check.rs b/crates/node/vm/interpreter/src/fvm/check.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/check.rs rename to crates/node/vm/interpreter/src/fvm/check.rs diff --git a/fendermint/vm/interpreter/src/fvm/checkpoint.rs b/crates/node/vm/interpreter/src/fvm/checkpoint.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/checkpoint.rs rename to crates/node/vm/interpreter/src/fvm/checkpoint.rs diff --git a/fendermint/vm/interpreter/src/fvm/exec.rs b/crates/node/vm/interpreter/src/fvm/exec.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/exec.rs rename to crates/node/vm/interpreter/src/fvm/exec.rs diff --git a/fendermint/vm/interpreter/src/fvm/externs.rs b/crates/node/vm/interpreter/src/fvm/externs.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/externs.rs rename to crates/node/vm/interpreter/src/fvm/externs.rs diff --git a/fendermint/vm/interpreter/src/fvm/gas.rs b/crates/node/vm/interpreter/src/fvm/gas.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/gas.rs rename to crates/node/vm/interpreter/src/fvm/gas.rs diff --git a/fendermint/vm/interpreter/src/fvm/mod.rs b/crates/node/vm/interpreter/src/fvm/mod.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/mod.rs rename to crates/node/vm/interpreter/src/fvm/mod.rs diff --git a/fendermint/vm/interpreter/src/fvm/observe.rs b/crates/node/vm/interpreter/src/fvm/observe.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/observe.rs rename to crates/node/vm/interpreter/src/fvm/observe.rs diff --git a/fendermint/vm/interpreter/src/fvm/query.rs b/crates/node/vm/interpreter/src/fvm/query.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/query.rs rename to crates/node/vm/interpreter/src/fvm/query.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/check.rs b/crates/node/vm/interpreter/src/fvm/state/check.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/check.rs rename to crates/node/vm/interpreter/src/fvm/state/check.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/exec.rs b/crates/node/vm/interpreter/src/fvm/state/exec.rs similarity index 99% rename from fendermint/vm/interpreter/src/fvm/state/exec.rs rename to crates/node/vm/interpreter/src/fvm/state/exec.rs index 4d2c3985b..47bab9a96 100644 --- a/fendermint/vm/interpreter/src/fvm/state/exec.rs +++ b/crates/node/vm/interpreter/src/fvm/state/exec.rs @@ -75,7 +75,7 @@ pub struct FvmStateParams { /// Custom implementation of Debug to exclude `consensus_params` from the debug output /// if it is `None`. This ensures consistency between the debug output and JSON/CBOR -/// serialization, which omits `None` values for `consensus_params`. See: fendermint/vm/interpreter/tests/golden.rs. +/// serialization, which omits `None` values for `consensus_params`. See: node/vm/interpreter/tests/golden.rs. /// /// This implementation is temporary and should be removed once `consensus_params` is /// no longer part of `FvmStateParams`. diff --git a/fendermint/vm/interpreter/src/fvm/state/fevm.rs b/crates/node/vm/interpreter/src/fvm/state/fevm.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/fevm.rs rename to crates/node/vm/interpreter/src/fvm/state/fevm.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/genesis.rs b/crates/node/vm/interpreter/src/fvm/state/genesis.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/genesis.rs rename to crates/node/vm/interpreter/src/fvm/state/genesis.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/ipc.rs b/crates/node/vm/interpreter/src/fvm/state/ipc.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/ipc.rs rename to crates/node/vm/interpreter/src/fvm/state/ipc.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/mod.rs b/crates/node/vm/interpreter/src/fvm/state/mod.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/mod.rs rename to crates/node/vm/interpreter/src/fvm/state/mod.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/priority.rs b/crates/node/vm/interpreter/src/fvm/state/priority.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/priority.rs rename to crates/node/vm/interpreter/src/fvm/state/priority.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/query.rs b/crates/node/vm/interpreter/src/fvm/state/query.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/query.rs rename to crates/node/vm/interpreter/src/fvm/state/query.rs diff --git a/fendermint/vm/interpreter/src/fvm/state/snapshot.rs b/crates/node/vm/interpreter/src/fvm/state/snapshot.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/state/snapshot.rs rename to crates/node/vm/interpreter/src/fvm/state/snapshot.rs diff --git a/fendermint/vm/interpreter/src/fvm/store/memory.rs b/crates/node/vm/interpreter/src/fvm/store/memory.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/store/memory.rs rename to crates/node/vm/interpreter/src/fvm/store/memory.rs diff --git a/fendermint/vm/interpreter/src/fvm/store/mod.rs b/crates/node/vm/interpreter/src/fvm/store/mod.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/store/mod.rs rename to crates/node/vm/interpreter/src/fvm/store/mod.rs diff --git a/fendermint/vm/interpreter/src/fvm/topdown.rs b/crates/node/vm/interpreter/src/fvm/topdown.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/topdown.rs rename to crates/node/vm/interpreter/src/fvm/topdown.rs diff --git a/fendermint/vm/interpreter/src/fvm/upgrades.rs b/crates/node/vm/interpreter/src/fvm/upgrades.rs similarity index 100% rename from fendermint/vm/interpreter/src/fvm/upgrades.rs rename to crates/node/vm/interpreter/src/fvm/upgrades.rs diff --git a/fendermint/vm/interpreter/src/genesis.rs b/crates/node/vm/interpreter/src/genesis.rs similarity index 100% rename from fendermint/vm/interpreter/src/genesis.rs rename to crates/node/vm/interpreter/src/genesis.rs diff --git a/fendermint/vm/interpreter/src/lib.rs b/crates/node/vm/interpreter/src/lib.rs similarity index 100% rename from fendermint/vm/interpreter/src/lib.rs rename to crates/node/vm/interpreter/src/lib.rs diff --git a/fendermint/vm/interpreter/src/selector.rs b/crates/node/vm/interpreter/src/selector.rs similarity index 100% rename from fendermint/vm/interpreter/src/selector.rs rename to crates/node/vm/interpreter/src/selector.rs diff --git a/fendermint/vm/interpreter/src/signed.rs b/crates/node/vm/interpreter/src/signed.rs similarity index 100% rename from fendermint/vm/interpreter/src/signed.rs rename to crates/node/vm/interpreter/src/signed.rs diff --git a/fendermint/vm/interpreter/tests/golden.rs b/crates/node/vm/interpreter/tests/golden.rs similarity index 100% rename from fendermint/vm/interpreter/tests/golden.rs rename to crates/node/vm/interpreter/tests/golden.rs diff --git a/fendermint/vm/message/Cargo.toml b/crates/node/vm/message/Cargo.toml similarity index 100% rename from fendermint/vm/message/Cargo.toml rename to crates/node/vm/message/Cargo.toml diff --git a/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.cbor b/crates/node/vm/message/golden/chain/ipc_bottom_up_exec.cbor similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_bottom_up_exec.cbor rename to crates/node/vm/message/golden/chain/ipc_bottom_up_exec.cbor diff --git a/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.txt b/crates/node/vm/message/golden/chain/ipc_bottom_up_exec.txt similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_bottom_up_exec.txt rename to crates/node/vm/message/golden/chain/ipc_bottom_up_exec.txt diff --git a/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.cbor b/crates/node/vm/message/golden/chain/ipc_bottom_up_resolve.cbor similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.cbor rename to crates/node/vm/message/golden/chain/ipc_bottom_up_resolve.cbor diff --git a/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.txt b/crates/node/vm/message/golden/chain/ipc_bottom_up_resolve.txt similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.txt rename to crates/node/vm/message/golden/chain/ipc_bottom_up_resolve.txt diff --git a/fendermint/vm/message/golden/chain/ipc_top_down.cbor b/crates/node/vm/message/golden/chain/ipc_top_down.cbor similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_top_down.cbor rename to crates/node/vm/message/golden/chain/ipc_top_down.cbor diff --git a/fendermint/vm/message/golden/chain/ipc_top_down.txt b/crates/node/vm/message/golden/chain/ipc_top_down.txt similarity index 100% rename from fendermint/vm/message/golden/chain/ipc_top_down.txt rename to crates/node/vm/message/golden/chain/ipc_top_down.txt diff --git a/fendermint/vm/message/golden/chain/signed.cbor b/crates/node/vm/message/golden/chain/signed.cbor similarity index 100% rename from fendermint/vm/message/golden/chain/signed.cbor rename to crates/node/vm/message/golden/chain/signed.cbor diff --git a/fendermint/vm/message/golden/chain/signed.txt b/crates/node/vm/message/golden/chain/signed.txt similarity index 100% rename from fendermint/vm/message/golden/chain/signed.txt rename to crates/node/vm/message/golden/chain/signed.txt diff --git a/fendermint/vm/message/golden/fvm/message.cbor b/crates/node/vm/message/golden/fvm/message.cbor similarity index 100% rename from fendermint/vm/message/golden/fvm/message.cbor rename to crates/node/vm/message/golden/fvm/message.cbor diff --git a/fendermint/vm/message/golden/fvm/message.cid b/crates/node/vm/message/golden/fvm/message.cid similarity index 100% rename from fendermint/vm/message/golden/fvm/message.cid rename to crates/node/vm/message/golden/fvm/message.cid diff --git a/fendermint/vm/message/golden/fvm/message.txt b/crates/node/vm/message/golden/fvm/message.txt similarity index 100% rename from fendermint/vm/message/golden/fvm/message.txt rename to crates/node/vm/message/golden/fvm/message.txt diff --git a/fendermint/vm/message/golden/query/request/actor_state.cbor b/crates/node/vm/message/golden/query/request/actor_state.cbor similarity index 100% rename from fendermint/vm/message/golden/query/request/actor_state.cbor rename to crates/node/vm/message/golden/query/request/actor_state.cbor diff --git a/fendermint/vm/message/golden/query/request/actor_state.txt b/crates/node/vm/message/golden/query/request/actor_state.txt similarity index 100% rename from fendermint/vm/message/golden/query/request/actor_state.txt rename to crates/node/vm/message/golden/query/request/actor_state.txt diff --git a/fendermint/vm/message/golden/query/request/ipld.cbor b/crates/node/vm/message/golden/query/request/ipld.cbor similarity index 100% rename from fendermint/vm/message/golden/query/request/ipld.cbor rename to crates/node/vm/message/golden/query/request/ipld.cbor diff --git a/fendermint/vm/message/golden/query/request/ipld.txt b/crates/node/vm/message/golden/query/request/ipld.txt similarity index 100% rename from fendermint/vm/message/golden/query/request/ipld.txt rename to crates/node/vm/message/golden/query/request/ipld.txt diff --git a/fendermint/vm/message/golden/query/response/actor_state.cbor b/crates/node/vm/message/golden/query/response/actor_state.cbor similarity index 100% rename from fendermint/vm/message/golden/query/response/actor_state.cbor rename to crates/node/vm/message/golden/query/response/actor_state.cbor diff --git a/fendermint/vm/message/golden/query/response/actor_state.txt b/crates/node/vm/message/golden/query/response/actor_state.txt similarity index 100% rename from fendermint/vm/message/golden/query/response/actor_state.txt rename to crates/node/vm/message/golden/query/response/actor_state.txt diff --git a/fendermint/vm/message/src/chain.rs b/crates/node/vm/message/src/chain.rs similarity index 100% rename from fendermint/vm/message/src/chain.rs rename to crates/node/vm/message/src/chain.rs diff --git a/fendermint/vm/message/src/conv/from_eth.rs b/crates/node/vm/message/src/conv/from_eth.rs similarity index 100% rename from fendermint/vm/message/src/conv/from_eth.rs rename to crates/node/vm/message/src/conv/from_eth.rs diff --git a/fendermint/vm/message/src/conv/from_fvm.rs b/crates/node/vm/message/src/conv/from_fvm.rs similarity index 100% rename from fendermint/vm/message/src/conv/from_fvm.rs rename to crates/node/vm/message/src/conv/from_fvm.rs diff --git a/fendermint/vm/message/src/conv/mod.rs b/crates/node/vm/message/src/conv/mod.rs similarity index 100% rename from fendermint/vm/message/src/conv/mod.rs rename to crates/node/vm/message/src/conv/mod.rs diff --git a/fendermint/vm/message/src/ipc.rs b/crates/node/vm/message/src/ipc.rs similarity index 100% rename from fendermint/vm/message/src/ipc.rs rename to crates/node/vm/message/src/ipc.rs diff --git a/fendermint/vm/message/src/lib.rs b/crates/node/vm/message/src/lib.rs similarity index 100% rename from fendermint/vm/message/src/lib.rs rename to crates/node/vm/message/src/lib.rs diff --git a/fendermint/vm/message/src/query.rs b/crates/node/vm/message/src/query.rs similarity index 100% rename from fendermint/vm/message/src/query.rs rename to crates/node/vm/message/src/query.rs diff --git a/fendermint/vm/message/src/signed.rs b/crates/node/vm/message/src/signed.rs similarity index 100% rename from fendermint/vm/message/src/signed.rs rename to crates/node/vm/message/src/signed.rs diff --git a/fendermint/vm/message/tests/golden.rs b/crates/node/vm/message/tests/golden.rs similarity index 100% rename from fendermint/vm/message/tests/golden.rs rename to crates/node/vm/message/tests/golden.rs diff --git a/fendermint/vm/resolver/Cargo.toml b/crates/node/vm/resolver/Cargo.toml similarity index 100% rename from fendermint/vm/resolver/Cargo.toml rename to crates/node/vm/resolver/Cargo.toml diff --git a/fendermint/vm/resolver/src/ipld.rs b/crates/node/vm/resolver/src/ipld.rs similarity index 100% rename from fendermint/vm/resolver/src/ipld.rs rename to crates/node/vm/resolver/src/ipld.rs diff --git a/fendermint/vm/resolver/src/lib.rs b/crates/node/vm/resolver/src/lib.rs similarity index 100% rename from fendermint/vm/resolver/src/lib.rs rename to crates/node/vm/resolver/src/lib.rs diff --git a/fendermint/vm/resolver/src/pool.rs b/crates/node/vm/resolver/src/pool.rs similarity index 100% rename from fendermint/vm/resolver/src/pool.rs rename to crates/node/vm/resolver/src/pool.rs diff --git a/fendermint/vm/snapshot/Cargo.toml b/crates/node/vm/snapshot/Cargo.toml similarity index 100% rename from fendermint/vm/snapshot/Cargo.toml rename to crates/node/vm/snapshot/Cargo.toml diff --git a/fendermint/vm/snapshot/golden/manifest/cbor/manifest.cbor b/crates/node/vm/snapshot/golden/manifest/cbor/manifest.cbor similarity index 100% rename from fendermint/vm/snapshot/golden/manifest/cbor/manifest.cbor rename to crates/node/vm/snapshot/golden/manifest/cbor/manifest.cbor diff --git a/fendermint/vm/snapshot/golden/manifest/cbor/manifest.txt b/crates/node/vm/snapshot/golden/manifest/cbor/manifest.txt similarity index 100% rename from fendermint/vm/snapshot/golden/manifest/cbor/manifest.txt rename to crates/node/vm/snapshot/golden/manifest/cbor/manifest.txt diff --git a/fendermint/vm/snapshot/golden/manifest/json/manifest.json b/crates/node/vm/snapshot/golden/manifest/json/manifest.json similarity index 100% rename from fendermint/vm/snapshot/golden/manifest/json/manifest.json rename to crates/node/vm/snapshot/golden/manifest/json/manifest.json diff --git a/fendermint/vm/snapshot/golden/manifest/json/manifest.txt b/crates/node/vm/snapshot/golden/manifest/json/manifest.txt similarity index 100% rename from fendermint/vm/snapshot/golden/manifest/json/manifest.txt rename to crates/node/vm/snapshot/golden/manifest/json/manifest.txt diff --git a/fendermint/vm/snapshot/src/car/chunker.rs b/crates/node/vm/snapshot/src/car/chunker.rs similarity index 100% rename from fendermint/vm/snapshot/src/car/chunker.rs rename to crates/node/vm/snapshot/src/car/chunker.rs diff --git a/fendermint/vm/snapshot/src/car/mod.rs b/crates/node/vm/snapshot/src/car/mod.rs similarity index 100% rename from fendermint/vm/snapshot/src/car/mod.rs rename to crates/node/vm/snapshot/src/car/mod.rs diff --git a/fendermint/vm/snapshot/src/car/streamer.rs b/crates/node/vm/snapshot/src/car/streamer.rs similarity index 100% rename from fendermint/vm/snapshot/src/car/streamer.rs rename to crates/node/vm/snapshot/src/car/streamer.rs diff --git a/fendermint/vm/snapshot/src/client.rs b/crates/node/vm/snapshot/src/client.rs similarity index 100% rename from fendermint/vm/snapshot/src/client.rs rename to crates/node/vm/snapshot/src/client.rs diff --git a/fendermint/vm/snapshot/src/error.rs b/crates/node/vm/snapshot/src/error.rs similarity index 100% rename from fendermint/vm/snapshot/src/error.rs rename to crates/node/vm/snapshot/src/error.rs diff --git a/fendermint/vm/snapshot/src/lib.rs b/crates/node/vm/snapshot/src/lib.rs similarity index 100% rename from fendermint/vm/snapshot/src/lib.rs rename to crates/node/vm/snapshot/src/lib.rs diff --git a/fendermint/vm/snapshot/src/manager.rs b/crates/node/vm/snapshot/src/manager.rs similarity index 100% rename from fendermint/vm/snapshot/src/manager.rs rename to crates/node/vm/snapshot/src/manager.rs diff --git a/fendermint/vm/snapshot/src/manifest.rs b/crates/node/vm/snapshot/src/manifest.rs similarity index 100% rename from fendermint/vm/snapshot/src/manifest.rs rename to crates/node/vm/snapshot/src/manifest.rs diff --git a/fendermint/vm/snapshot/src/state.rs b/crates/node/vm/snapshot/src/state.rs similarity index 100% rename from fendermint/vm/snapshot/src/state.rs rename to crates/node/vm/snapshot/src/state.rs diff --git a/fendermint/vm/snapshot/tests/golden.rs b/crates/node/vm/snapshot/tests/golden.rs similarity index 100% rename from fendermint/vm/snapshot/tests/golden.rs rename to crates/node/vm/snapshot/tests/golden.rs diff --git a/fendermint/vm/topdown/Cargo.toml b/crates/node/vm/topdown/Cargo.toml similarity index 100% rename from fendermint/vm/topdown/Cargo.toml rename to crates/node/vm/topdown/Cargo.toml diff --git a/fendermint/vm/topdown/src/cache.rs b/crates/node/vm/topdown/src/cache.rs similarity index 100% rename from fendermint/vm/topdown/src/cache.rs rename to crates/node/vm/topdown/src/cache.rs diff --git a/fendermint/vm/topdown/src/convert.rs b/crates/node/vm/topdown/src/convert.rs similarity index 100% rename from fendermint/vm/topdown/src/convert.rs rename to crates/node/vm/topdown/src/convert.rs diff --git a/fendermint/vm/topdown/src/error.rs b/crates/node/vm/topdown/src/error.rs similarity index 100% rename from fendermint/vm/topdown/src/error.rs rename to crates/node/vm/topdown/src/error.rs diff --git a/fendermint/vm/topdown/src/finality/fetch.rs b/crates/node/vm/topdown/src/finality/fetch.rs similarity index 100% rename from fendermint/vm/topdown/src/finality/fetch.rs rename to crates/node/vm/topdown/src/finality/fetch.rs diff --git a/fendermint/vm/topdown/src/finality/mod.rs b/crates/node/vm/topdown/src/finality/mod.rs similarity index 100% rename from fendermint/vm/topdown/src/finality/mod.rs rename to crates/node/vm/topdown/src/finality/mod.rs diff --git a/fendermint/vm/topdown/src/finality/null.rs b/crates/node/vm/topdown/src/finality/null.rs similarity index 100% rename from fendermint/vm/topdown/src/finality/null.rs rename to crates/node/vm/topdown/src/finality/null.rs diff --git a/fendermint/vm/topdown/src/lib.rs b/crates/node/vm/topdown/src/lib.rs similarity index 100% rename from fendermint/vm/topdown/src/lib.rs rename to crates/node/vm/topdown/src/lib.rs diff --git a/fendermint/vm/topdown/src/observe.rs b/crates/node/vm/topdown/src/observe.rs similarity index 100% rename from fendermint/vm/topdown/src/observe.rs rename to crates/node/vm/topdown/src/observe.rs diff --git a/fendermint/vm/topdown/src/proxy.rs b/crates/node/vm/topdown/src/proxy.rs similarity index 100% rename from fendermint/vm/topdown/src/proxy.rs rename to crates/node/vm/topdown/src/proxy.rs diff --git a/fendermint/vm/topdown/src/sync/mod.rs b/crates/node/vm/topdown/src/sync/mod.rs similarity index 100% rename from fendermint/vm/topdown/src/sync/mod.rs rename to crates/node/vm/topdown/src/sync/mod.rs diff --git a/fendermint/vm/topdown/src/sync/syncer.rs b/crates/node/vm/topdown/src/sync/syncer.rs similarity index 100% rename from fendermint/vm/topdown/src/sync/syncer.rs rename to crates/node/vm/topdown/src/sync/syncer.rs diff --git a/fendermint/vm/topdown/src/sync/tendermint.rs b/crates/node/vm/topdown/src/sync/tendermint.rs similarity index 100% rename from fendermint/vm/topdown/src/sync/tendermint.rs rename to crates/node/vm/topdown/src/sync/tendermint.rs diff --git a/fendermint/vm/topdown/src/toggle.rs b/crates/node/vm/topdown/src/toggle.rs similarity index 100% rename from fendermint/vm/topdown/src/toggle.rs rename to crates/node/vm/topdown/src/toggle.rs diff --git a/fendermint/vm/topdown/src/voting.rs b/crates/node/vm/topdown/src/voting.rs similarity index 100% rename from fendermint/vm/topdown/src/voting.rs rename to crates/node/vm/topdown/src/voting.rs diff --git a/fendermint/vm/topdown/tests/smt_voting.rs b/crates/node/vm/topdown/tests/smt_voting.rs similarity index 100% rename from fendermint/vm/topdown/tests/smt_voting.rs rename to crates/node/vm/topdown/tests/smt_voting.rs diff --git a/crates/patched_external/README.md b/crates/patched_external/README.md new file mode 100644 index 000000000..bbf4fb739 --- /dev/null +++ b/crates/patched_external/README.md @@ -0,0 +1,3 @@ +# patched external + +Projects that were copied and altered to serve our needs, but changes were not upstreamed. diff --git a/ext/frc42_dispatch/Cargo.toml b/crates/patched_external/frc42_dispatch/Cargo.toml similarity index 100% rename from ext/frc42_dispatch/Cargo.toml rename to crates/patched_external/frc42_dispatch/Cargo.toml diff --git a/ext/frc42_dispatch/README.md b/crates/patched_external/frc42_dispatch/README.md similarity index 100% rename from ext/frc42_dispatch/README.md rename to crates/patched_external/frc42_dispatch/README.md diff --git a/ext/frc42_dispatch/generate_hashes.py b/crates/patched_external/frc42_dispatch/generate_hashes.py similarity index 100% rename from ext/frc42_dispatch/generate_hashes.py rename to crates/patched_external/frc42_dispatch/generate_hashes.py diff --git a/ext/frc42_dispatch/hasher/Cargo.toml b/crates/patched_external/frc42_dispatch/hasher/Cargo.toml similarity index 100% rename from ext/frc42_dispatch/hasher/Cargo.toml rename to crates/patched_external/frc42_dispatch/hasher/Cargo.toml diff --git a/ext/frc42_dispatch/hasher/src/hash.rs b/crates/patched_external/frc42_dispatch/hasher/src/hash.rs similarity index 100% rename from ext/frc42_dispatch/hasher/src/hash.rs rename to crates/patched_external/frc42_dispatch/hasher/src/hash.rs diff --git a/ext/frc42_dispatch/hasher/src/lib.rs b/crates/patched_external/frc42_dispatch/hasher/src/lib.rs similarity index 100% rename from ext/frc42_dispatch/hasher/src/lib.rs rename to crates/patched_external/frc42_dispatch/hasher/src/lib.rs diff --git a/ext/frc42_dispatch/macros/Cargo.toml b/crates/patched_external/frc42_dispatch/macros/Cargo.toml similarity index 100% rename from ext/frc42_dispatch/macros/Cargo.toml rename to crates/patched_external/frc42_dispatch/macros/Cargo.toml diff --git a/ext/frc42_dispatch/macros/example/Cargo.toml b/crates/patched_external/frc42_dispatch/macros/example/Cargo.toml similarity index 100% rename from ext/frc42_dispatch/macros/example/Cargo.toml rename to crates/patched_external/frc42_dispatch/macros/example/Cargo.toml diff --git a/ext/frc42_dispatch/macros/example/src/main.rs b/crates/patched_external/frc42_dispatch/macros/example/src/main.rs similarity index 100% rename from ext/frc42_dispatch/macros/example/src/main.rs rename to crates/patched_external/frc42_dispatch/macros/example/src/main.rs diff --git a/ext/frc42_dispatch/macros/src/hash.rs b/crates/patched_external/frc42_dispatch/macros/src/hash.rs similarity index 100% rename from ext/frc42_dispatch/macros/src/hash.rs rename to crates/patched_external/frc42_dispatch/macros/src/hash.rs diff --git a/ext/frc42_dispatch/macros/src/lib.rs b/crates/patched_external/frc42_dispatch/macros/src/lib.rs similarity index 100% rename from ext/frc42_dispatch/macros/src/lib.rs rename to crates/patched_external/frc42_dispatch/macros/src/lib.rs diff --git a/ext/frc42_dispatch/macros/tests/build-success.rs b/crates/patched_external/frc42_dispatch/macros/tests/build-success.rs similarity index 100% rename from ext/frc42_dispatch/macros/tests/build-success.rs rename to crates/patched_external/frc42_dispatch/macros/tests/build-success.rs diff --git a/ext/frc42_dispatch/macros/tests/naming/empty-name-string.rs b/crates/patched_external/frc42_dispatch/macros/tests/naming/empty-name-string.rs similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/empty-name-string.rs rename to crates/patched_external/frc42_dispatch/macros/tests/naming/empty-name-string.rs diff --git a/ext/frc42_dispatch/macros/tests/naming/empty-name-string.stderr b/crates/patched_external/frc42_dispatch/macros/tests/naming/empty-name-string.stderr similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/empty-name-string.stderr rename to crates/patched_external/frc42_dispatch/macros/tests/naming/empty-name-string.stderr diff --git a/ext/frc42_dispatch/macros/tests/naming/illegal-chars.rs b/crates/patched_external/frc42_dispatch/macros/tests/naming/illegal-chars.rs similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/illegal-chars.rs rename to crates/patched_external/frc42_dispatch/macros/tests/naming/illegal-chars.rs diff --git a/ext/frc42_dispatch/macros/tests/naming/illegal-chars.stderr b/crates/patched_external/frc42_dispatch/macros/tests/naming/illegal-chars.stderr similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/illegal-chars.stderr rename to crates/patched_external/frc42_dispatch/macros/tests/naming/illegal-chars.stderr diff --git a/ext/frc42_dispatch/macros/tests/naming/missing-name.rs b/crates/patched_external/frc42_dispatch/macros/tests/naming/missing-name.rs similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/missing-name.rs rename to crates/patched_external/frc42_dispatch/macros/tests/naming/missing-name.rs diff --git a/ext/frc42_dispatch/macros/tests/naming/missing-name.stderr b/crates/patched_external/frc42_dispatch/macros/tests/naming/missing-name.stderr similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/missing-name.stderr rename to crates/patched_external/frc42_dispatch/macros/tests/naming/missing-name.stderr diff --git a/ext/frc42_dispatch/macros/tests/naming/non-capital-start.rs b/crates/patched_external/frc42_dispatch/macros/tests/naming/non-capital-start.rs similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/non-capital-start.rs rename to crates/patched_external/frc42_dispatch/macros/tests/naming/non-capital-start.rs diff --git a/ext/frc42_dispatch/macros/tests/naming/non-capital-start.stderr b/crates/patched_external/frc42_dispatch/macros/tests/naming/non-capital-start.stderr similarity index 100% rename from ext/frc42_dispatch/macros/tests/naming/non-capital-start.stderr rename to crates/patched_external/frc42_dispatch/macros/tests/naming/non-capital-start.stderr diff --git a/ext/frc42_dispatch/src/lib.rs b/crates/patched_external/frc42_dispatch/src/lib.rs similarity index 100% rename from ext/frc42_dispatch/src/lib.rs rename to crates/patched_external/frc42_dispatch/src/lib.rs diff --git a/ext/frc42_dispatch/src/match_method.rs b/crates/patched_external/frc42_dispatch/src/match_method.rs similarity index 100% rename from ext/frc42_dispatch/src/match_method.rs rename to crates/patched_external/frc42_dispatch/src/match_method.rs diff --git a/ext/frc42_dispatch/src/message.rs b/crates/patched_external/frc42_dispatch/src/message.rs similarity index 100% rename from ext/frc42_dispatch/src/message.rs rename to crates/patched_external/frc42_dispatch/src/message.rs diff --git a/ext/libp2p-bitswap/.gitignore b/crates/patched_external/libp2p-bitswap/.gitignore similarity index 100% rename from ext/libp2p-bitswap/.gitignore rename to crates/patched_external/libp2p-bitswap/.gitignore diff --git a/ext/libp2p-bitswap/Cargo.lock b/crates/patched_external/libp2p-bitswap/Cargo.lock similarity index 100% rename from ext/libp2p-bitswap/Cargo.lock rename to crates/patched_external/libp2p-bitswap/Cargo.lock diff --git a/ext/libp2p-bitswap/Cargo.toml b/crates/patched_external/libp2p-bitswap/Cargo.toml similarity index 100% rename from ext/libp2p-bitswap/Cargo.toml rename to crates/patched_external/libp2p-bitswap/Cargo.toml diff --git a/ext/libp2p-bitswap/README.md b/crates/patched_external/libp2p-bitswap/README.md similarity index 100% rename from ext/libp2p-bitswap/README.md rename to crates/patched_external/libp2p-bitswap/README.md diff --git a/ext/libp2p-bitswap/build.rs b/crates/patched_external/libp2p-bitswap/build.rs similarity index 100% rename from ext/libp2p-bitswap/build.rs rename to crates/patched_external/libp2p-bitswap/build.rs diff --git a/ext/libp2p-bitswap/src/behaviour.rs b/crates/patched_external/libp2p-bitswap/src/behaviour.rs similarity index 100% rename from ext/libp2p-bitswap/src/behaviour.rs rename to crates/patched_external/libp2p-bitswap/src/behaviour.rs diff --git a/ext/libp2p-bitswap/src/compat/bitswap_pb.proto b/crates/patched_external/libp2p-bitswap/src/compat/bitswap_pb.proto similarity index 100% rename from ext/libp2p-bitswap/src/compat/bitswap_pb.proto rename to crates/patched_external/libp2p-bitswap/src/compat/bitswap_pb.proto diff --git a/ext/libp2p-bitswap/src/compat/message.rs b/crates/patched_external/libp2p-bitswap/src/compat/message.rs similarity index 100% rename from ext/libp2p-bitswap/src/compat/message.rs rename to crates/patched_external/libp2p-bitswap/src/compat/message.rs diff --git a/ext/libp2p-bitswap/src/compat/mod.rs b/crates/patched_external/libp2p-bitswap/src/compat/mod.rs similarity index 100% rename from ext/libp2p-bitswap/src/compat/mod.rs rename to crates/patched_external/libp2p-bitswap/src/compat/mod.rs diff --git a/ext/libp2p-bitswap/src/compat/prefix.rs b/crates/patched_external/libp2p-bitswap/src/compat/prefix.rs similarity index 100% rename from ext/libp2p-bitswap/src/compat/prefix.rs rename to crates/patched_external/libp2p-bitswap/src/compat/prefix.rs diff --git a/ext/libp2p-bitswap/src/compat/protocol.rs b/crates/patched_external/libp2p-bitswap/src/compat/protocol.rs similarity index 100% rename from ext/libp2p-bitswap/src/compat/protocol.rs rename to crates/patched_external/libp2p-bitswap/src/compat/protocol.rs diff --git a/ext/libp2p-bitswap/src/lib.rs b/crates/patched_external/libp2p-bitswap/src/lib.rs similarity index 100% rename from ext/libp2p-bitswap/src/lib.rs rename to crates/patched_external/libp2p-bitswap/src/lib.rs diff --git a/ext/libp2p-bitswap/src/protocol.rs b/crates/patched_external/libp2p-bitswap/src/protocol.rs similarity index 100% rename from ext/libp2p-bitswap/src/protocol.rs rename to crates/patched_external/libp2p-bitswap/src/protocol.rs diff --git a/ext/libp2p-bitswap/src/query.rs b/crates/patched_external/libp2p-bitswap/src/query.rs similarity index 100% rename from ext/libp2p-bitswap/src/query.rs rename to crates/patched_external/libp2p-bitswap/src/query.rs diff --git a/ext/libp2p-bitswap/src/stats.rs b/crates/patched_external/libp2p-bitswap/src/stats.rs similarity index 100% rename from ext/libp2p-bitswap/src/stats.rs rename to crates/patched_external/libp2p-bitswap/src/stats.rs diff --git a/ext/merkle-tree-rs/Cargo.toml b/crates/patched_external/merkle-tree-rs/Cargo.toml similarity index 100% rename from ext/merkle-tree-rs/Cargo.toml rename to crates/patched_external/merkle-tree-rs/Cargo.toml diff --git a/ext/merkle-tree-rs/README.md b/crates/patched_external/merkle-tree-rs/README.md similarity index 100% rename from ext/merkle-tree-rs/README.md rename to crates/patched_external/merkle-tree-rs/README.md diff --git a/ext/merkle-tree-rs/src/core.rs b/crates/patched_external/merkle-tree-rs/src/core.rs similarity index 100% rename from ext/merkle-tree-rs/src/core.rs rename to crates/patched_external/merkle-tree-rs/src/core.rs diff --git a/ext/merkle-tree-rs/src/format.rs b/crates/patched_external/merkle-tree-rs/src/format.rs similarity index 100% rename from ext/merkle-tree-rs/src/format.rs rename to crates/patched_external/merkle-tree-rs/src/format.rs diff --git a/ext/merkle-tree-rs/src/lib.rs b/crates/patched_external/merkle-tree-rs/src/lib.rs similarity index 100% rename from ext/merkle-tree-rs/src/lib.rs rename to crates/patched_external/merkle-tree-rs/src/lib.rs diff --git a/ext/merkle-tree-rs/src/standard.rs b/crates/patched_external/merkle-tree-rs/src/standard.rs similarity index 100% rename from ext/merkle-tree-rs/src/standard.rs rename to crates/patched_external/merkle-tree-rs/src/standard.rs diff --git a/docs-gitbook/developer-guides/pluggable-syscall-tutorial.md b/docs-gitbook/developer-guides/pluggable-syscall-tutorial.md index 04af82437..ba35e12c6 100644 --- a/docs-gitbook/developer-guides/pluggable-syscall-tutorial.md +++ b/docs-gitbook/developer-guides/pluggable-syscall-tutorial.md @@ -349,14 +349,14 @@ In order to see this working end to end in IPC, you can run one of our integrati We must first need to build a new docker container for the fendermint image which will contain all the code you have added so for. To do this run: ```bash -cd fendermint +cd crates/node make docker-build ``` After the fendermint docker image has been built, you can run one of the integration tests ```bash -cd fendermint/testing/smoke-test +cd crates/node/testing/smoke-test # creates the docker containers cargo make setup # runs the integration test diff --git a/docs-gitbook/reference/troubleshooting.md b/docs-gitbook/reference/troubleshooting.md index dea4a0498..bee996571 100644 --- a/docs-gitbook/reference/troubleshooting.md +++ b/docs-gitbook/reference/troubleshooting.md @@ -33,7 +33,7 @@ This error can happen for example when upgrading to a new major/minor FVM versio When upgrading FVM dependency (from 4.0 to 4.1) it resulted in our `fendermint/actors/build.rs` script to fail due Cargo including multiple new dependencies in the `wasm32` target which did not occur before and caused build errors since these new dependencies did not support Wasm target. -By running `cargo tree` we saw that these dependencies were pulled in from the `filecoin-proofs-api` required by `fvm_shared`. This dependency is pulled in when requiring `fvm_shared` with the `crypto` feature. Looking at our different Cargo.toml files, we noticed that `contract-bindings/Cargo.toml` file was the only one setting that feature. We needed to remove the `crypto` feature, compile, and then add it back in for the wasm build (and tests) to succeed. +By running `cargo tree` we saw that these dependencies were pulled in from the `filecoin-proofs-api` required by `fvm_shared`. This dependency is pulled in when requiring `fvm_shared` with the `crypto` feature. Looking at our different Cargo.toml files, we noticed that `contracts/bindings/Cargo.toml` file was the only one setting that feature. We needed to remove the `crypto` feature, compile, and then add it back in for the wasm build (and tests) to succeed. ## Troubleshooting Misc Cargo related issues diff --git a/docs/ipc/developers.md b/docs/ipc/developers.md index ee9f459c3..1e2c3d783 100644 --- a/docs/ipc/developers.md +++ b/docs/ipc/developers.md @@ -38,7 +38,7 @@ This error can happen for example when upgrading to a new major/minor FVM versio When upgrading FVM dependency (from 4.0 to 4.1) it resulted in our `fendermint/actors/build.rs` script to fail due Cargo including multiple new dependencies in the `wasm32` target which did not occur before and caused build errors since these new dependencies did not support Wasm target. -By running `cargo tree` we saw that these dependencies were pulled in from the `filecoin-proofs-api` required by `fvm_shared`. This dependency is pulled in when requiring `fvm_shared` with the `crypto` feature. Looking at our different Cargo.toml files, we noticed that `contract-bindings/Cargo.toml` file was the only one setting that feature. We needed to remove the `crypto` feature, compile, and then add it back in for the wasm build (and tests) to succeed. +By running `cargo tree` we saw that these dependencies were pulled in from the `filecoin-proofs-api` required by `fvm_shared`. This dependency is pulled in when requiring `fvm_shared` with the `crypto` feature. Looking at our different Cargo.toml files, we noticed that `contracts/bindings/Cargo.toml` file was the only one setting that feature. We needed to remove the `crypto` feature, compile, and then add it back in for the wasm build (and tests) to succeed. ## Troubleshooting Misc Cargo related issues diff --git a/fendermint/vm/interpreter/src/fvm/bundle.rs b/fendermint/vm/interpreter/src/fvm/bundle.rs deleted file mode 100644 index af8f97d15..000000000 --- a/fendermint/vm/interpreter/src/fvm/bundle.rs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022-2024 Protocol Labs -// SPDX-License-Identifier: Apache-2.0, MIT - -use std::path::{Path, PathBuf}; -use std::str::FromStr; - -fn workspace_dir() -> PathBuf { - let output = std::process::Command::new(env!("CARGO")) - .arg("locate-project") - .arg("--workspace") - .arg("--message-format=plain") - .output() - .unwrap() - .stdout; - let cargo_path = Path::new(std::str::from_utf8(&output).unwrap().trim()); - cargo_path.parent().unwrap().to_path_buf() -} - -/// Path to the builtin-actor bundle, indended to be used in tests. -pub fn bundle_path() -> PathBuf { - let bundle_path = std::env::var("FM_BUILTIN_ACTORS_BUNDLE").unwrap_or_else(|_| { - workspace_dir() - .join("fendermint/builtin-actors/output/bundle.car") - .to_string_lossy() - .into_owned() - }); - - PathBuf::from_str(&bundle_path).expect("malformed bundle path") -} - -/// Path to the in-repo custom actor bundle, intended to be used in tests. -pub fn custom_actors_bundle_path() -> PathBuf { - let custom_actors_bundle_path = std::env::var("FM_CUSTOM_ACTORS_BUNDLE").unwrap_or_else(|_| { - workspace_dir() - .join("fendermint/actors/output/custom_actors_bundle.car") - .to_string_lossy() - .into_owned() - }); - - PathBuf::from_str(&custom_actors_bundle_path).expect("malformed custom actors bundle path") -} - -/// Path to the Solidity contracts, intended to be used in tests. -pub fn contracts_path() -> PathBuf { - let contracts_path = std::env::var("FM_CONTRACTS_DIR").unwrap_or_else(|_| { - workspace_dir() - .join("contracts/out") - .to_string_lossy() - .into_owned() - }); - - PathBuf::from_str(&contracts_path).expect("malformed contracts path") -} diff --git a/rustfmt.toml b/rustfmt.toml index 2ec344b2f..912c015cb 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,4 +1,4 @@ edition = "2021" # Ignore auto-generated files. -ignore = ["contract-bindings/src/gen"] +ignore = ["crates/contract-bindings/src"] diff --git a/scripts/add_license.sh b/scripts/add_license.sh index f0018ffb1..44e536b92 100755 --- a/scripts/add_license.sh +++ b/scripts/add_license.sh @@ -13,7 +13,7 @@ LINES=4 # Ignore auto-generated code. IGNORE=( - "contract-bindings" "ext/merkle-tree-rs" + "crates/contract-bindings" "crates/patched_external" ); ignore() {