From db0002c639355cdde7d0694661ecdad6d361caac Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Thu, 7 Dec 2023 11:08:11 +0100 Subject: [PATCH 1/6] wip: figuring out dependencies --- .gitignore | 1 + fendermint/Cargo.lock => Cargo.lock | 1378 ++-- fendermint/Cargo.toml => Cargo.toml | 94 +- fendermint/LICENSE-APACHE => LICENSE-APACHE | 0 fendermint/LICENSE-MIT => LICENSE-MIT | 0 contracts/LICENSE-APACHE | 5 - contracts/LICENSE-MIT | 19 - contracts/binding/Cargo.toml | 8 +- .../{fendermint => src}/abci/Cargo.toml | 0 fendermint/{fendermint => src}/abci/README.md | 0 .../abci/examples/kvstore.rs | 0 .../abci/src/application.rs | 0 .../{fendermint => src}/abci/src/lib.rs | 0 .../{fendermint => src}/abci/src/util.rs | 0 fendermint/{fendermint => src}/app/Cargo.toml | 0 .../app/config/default.toml | 0 .../{fendermint => src}/app/config/test.toml | 0 .../app/options/Cargo.toml | 0 .../app/options/examples/network.rs | 0 .../app/options/src/eth.rs | 0 .../app/options/src/genesis.rs | 0 .../app/options/src/key.rs | 0 .../app/options/src/lib.rs | 0 .../app/options/src/parse.rs | 0 .../app/options/src/rpc.rs | 0 .../app/options/src/run.rs | 0 .../app/settings/Cargo.toml | 0 .../app/settings/src/eth.rs | 0 .../app/settings/src/fvm.rs | 0 .../app/settings/src/lib.rs | 0 .../app/settings/src/resolver.rs | 0 fendermint/{fendermint => src}/app/src/app.rs | 0 .../{fendermint => src}/app/src/cmd/eth.rs | 0 .../app/src/cmd/genesis.rs | 0 .../{fendermint => src}/app/src/cmd/key.rs | 0 .../{fendermint => src}/app/src/cmd/mod.rs | 0 .../{fendermint => src}/app/src/cmd/rpc.rs | 0 .../{fendermint => src}/app/src/cmd/run.rs | 0 fendermint/{fendermint => src}/app/src/ipc.rs | 0 fendermint/{fendermint => src}/app/src/lib.rs | 0 .../{fendermint => src}/app/src/main.rs | 0 .../{fendermint => src}/app/src/store.rs | 0 .../{fendermint => src}/app/src/tmconv.rs | 0 .../{fendermint => src}/crypto/Cargo.toml | 0 .../{fendermint => src}/crypto/src/lib.rs | 0 .../{fendermint => src}/eth/api/Cargo.toml | 0 .../{fendermint => src}/eth/api/README.md | 0 .../eth/api/examples/ethers.rs | 0 .../eth/api/src/apis/eth.rs | 0 .../eth/api/src/apis/mod.rs | 0 .../eth/api/src/apis/net.rs | 0 .../eth/api/src/apis/web3.rs | 0 .../{fendermint => src}/eth/api/src/cache.rs | 0 .../eth/api/src/conv/from_eth.rs | 0 .../eth/api/src/conv/from_fvm.rs | 0 .../eth/api/src/conv/from_tm.rs | 0 .../eth/api/src/conv/mod.rs | 0 .../{fendermint => src}/eth/api/src/error.rs | 0 .../eth/api/src/filters.rs | 0 .../eth/api/src/gas/mod.rs | 0 .../eth/api/src/gas/output.rs | 0 .../eth/api/src/handlers/http.rs | 0 .../eth/api/src/handlers/mod.rs | 0 .../eth/api/src/handlers/ws.rs | 0 .../{fendermint => src}/eth/api/src/lib.rs | 0 .../{fendermint => src}/eth/api/src/state.rs | 0 .../eth/hardhat/Cargo.toml | 0 .../eth/hardhat/src/lib.rs | 0 .../{fendermint => src}/rocksdb/Cargo.toml | 0 .../rocksdb/src/blockstore.rs | 0 .../rocksdb/src/kvstore.rs | 0 .../{fendermint => src}/rocksdb/src/lib.rs | 0 .../rocksdb/src/namespaces.rs | 0 .../rocksdb/src/rocks/config.rs | 0 .../rocksdb/src/rocks/error.rs | 0 .../rocksdb/src/rocks/mod.rs | 0 fendermint/{fendermint => src}/rpc/Cargo.toml | 0 .../rpc/examples/simplecoin.rs | 0 .../{fendermint => src}/rpc/src/client.rs | 0 fendermint/{fendermint => src}/rpc/src/lib.rs | 0 .../{fendermint => src}/rpc/src/message.rs | 0 .../{fendermint => src}/rpc/src/query.rs | 0 .../{fendermint => src}/rpc/src/response.rs | 0 fendermint/{fendermint => src}/rpc/src/tx.rs | 0 .../{fendermint => src}/storage/Cargo.toml | 0 .../{fendermint => src}/storage/src/im.rs | 0 .../{fendermint => src}/storage/src/lib.rs | 0 .../storage/src/testing.rs | 0 .../{fendermint => src}/testing/Cargo.toml | 0 .../testing/Makefile/ci.env | 0 .../testing/Makefile/cometbft.toml | 0 .../testing/Makefile/common.env | 0 .../testing/Makefile/common.toml | 0 .../testing/Makefile/docker.toml | 0 .../testing/Makefile/ethapi.toml | 0 .../testing/Makefile/fendermint.toml | 0 .../{fendermint => src}/testing/README.md | 0 .../testing/contract-test/Cargo.toml | 0 .../testing/contract-test/src/ipc/mod.rs | 0 .../testing/contract-test/src/ipc/registry.rs | 0 .../testing/contract-test/src/ipc/subnet.rs | 0 .../testing/contract-test/src/lib.rs | 0 .../contract-test/tests/smt_staking.rs | 0 .../contract-test/tests/staking/machine.rs | 0 .../contract-test/tests/staking/mod.rs | 0 .../contract-test/tests/staking/state.rs | 0 .../testing/smoke-test/.gitignore | 0 .../testing/smoke-test/Cargo.toml | 0 .../testing/smoke-test/Makefile.toml | 0 .../testing/smoke-test/scripts/init.sh | 0 .../testing/smoke-test/smoke.env | 0 .../testing/smoke-test/src/lib.rs | 0 .../testing/src/arb/address.rs | 0 .../testing/src/arb/cid.rs | 0 .../testing/src/arb/message.rs | 0 .../testing/src/arb/mod.rs | 0 .../testing/src/arb/subnetid.rs | 0 .../testing/src/arb/token.rs | 0 .../{fendermint => src}/testing/src/golden.rs | 0 .../{fendermint => src}/testing/src/lib.rs | 0 .../{fendermint => src}/testing/src/smt.rs | 0 .../vm/actor_interface/Cargo.toml | 0 .../vm/actor_interface/src/account.rs | 0 .../vm/actor_interface/src/burntfunds.rs | 0 .../vm/actor_interface/src/cron.rs | 0 .../vm/actor_interface/src/diamond.rs | 0 .../vm/actor_interface/src/eam.rs | 0 .../vm/actor_interface/src/ethaccount.rs | 0 .../vm/actor_interface/src/evm.rs | 0 .../vm/actor_interface/src/init.rs | 0 .../vm/actor_interface/src/ipc.rs | 0 .../vm/actor_interface/src/lib.rs | 0 .../vm/actor_interface/src/multisig.rs | 0 .../vm/actor_interface/src/placeholder.rs | 0 .../vm/actor_interface/src/reward.rs | 0 .../vm/actor_interface/src/system.rs | 0 .../{fendermint => src}/vm/core/Cargo.toml | 0 .../vm/core/src/chainid.rs | 0 .../{fendermint => src}/vm/core/src/lib.rs | 0 .../vm/core/src/timestamp.rs | 0 .../vm/encoding/Cargo.toml | 0 .../vm/encoding/src/lib.rs | 0 .../{fendermint => src}/vm/genesis/Cargo.toml | 0 .../genesis/golden/genesis/cbor/genesis.cbor | 0 .../genesis/golden/genesis/cbor/genesis.txt | 0 .../genesis/golden/genesis/json/genesis.json | 0 .../genesis/golden/genesis/json/genesis.txt | 0 .../{fendermint => src}/vm/genesis/src/arb.rs | 0 .../{fendermint => src}/vm/genesis/src/lib.rs | 0 .../vm/genesis/tests/golden.rs | 0 .../vm/interpreter/Cargo.toml | 0 .../vm/interpreter/src/bytes.rs | 0 .../vm/interpreter/src/chain.rs | 0 .../vm/interpreter/src/fvm/broadcast.rs | 0 .../vm/interpreter/src/fvm/bundle.rs | 0 .../vm/interpreter/src/fvm/check.rs | 0 .../vm/interpreter/src/fvm/checkpoint.rs | 0 .../vm/interpreter/src/fvm/exec.rs | 0 .../vm/interpreter/src/fvm/externs.rs | 0 .../vm/interpreter/src/fvm/genesis.rs | 0 .../vm/interpreter/src/fvm/mod.rs | 0 .../vm/interpreter/src/fvm/query.rs | 0 .../vm/interpreter/src/fvm/state/check.rs | 0 .../vm/interpreter/src/fvm/state/exec.rs | 0 .../vm/interpreter/src/fvm/state/fevm.rs | 0 .../vm/interpreter/src/fvm/state/genesis.rs | 0 .../vm/interpreter/src/fvm/state/ipc.rs | 0 .../vm/interpreter/src/fvm/state/mod.rs | 0 .../vm/interpreter/src/fvm/state/query.rs | 0 .../vm/interpreter/src/fvm/state/snapshot.rs | 0 .../vm/interpreter/src/fvm/store/memory.rs | 0 .../vm/interpreter/src/fvm/store/mod.rs | 0 .../vm/interpreter/src/fvm/topdown.rs | 0 .../vm/interpreter/src/lib.rs | 0 .../vm/interpreter/src/signed.rs | 0 .../{fendermint => src}/vm/message/Cargo.toml | 0 .../golden/chain/ipc_bottom_up_exec.cbor | 0 .../golden/chain/ipc_bottom_up_exec.txt | 0 .../golden/chain/ipc_bottom_up_resolve.cbor | 0 .../golden/chain/ipc_bottom_up_resolve.txt | 0 .../vm/message/golden/chain/ipc_top_down.cbor | 0 .../vm/message/golden/chain/ipc_top_down.txt | 0 .../vm/message/golden/chain/signed.cbor | 0 .../vm/message/golden/chain/signed.txt | 0 .../vm/message/golden/fvm/message.cbor | 0 .../vm/message/golden/fvm/message.cid | 0 .../vm/message/golden/fvm/message.txt | 0 .../golden/query/request/actor_state.cbor | 0 .../golden/query/request/actor_state.txt | 0 .../vm/message/golden/query/request/ipld.cbor | 0 .../vm/message/golden/query/request/ipld.txt | 0 .../golden/query/response/actor_state.cbor | 0 .../golden/query/response/actor_state.txt | 0 .../vm/message/src/chain.rs | 0 .../vm/message/src/conv/from_eth.rs | 0 .../vm/message/src/conv/from_fvm.rs | 0 .../vm/message/src/conv/mod.rs | 0 .../{fendermint => src}/vm/message/src/ipc.rs | 0 .../{fendermint => src}/vm/message/src/lib.rs | 0 .../vm/message/src/query.rs | 0 .../vm/message/src/signed.rs | 0 .../vm/message/tests/golden.rs | 0 .../vm/resolver/Cargo.toml | 0 .../vm/resolver/src/ipld.rs | 0 .../vm/resolver/src/lib.rs | 0 .../vm/resolver/src/pool.rs | 0 .../vm/snapshot/Cargo.toml | 0 .../golden/manifest/cbor/manifest.cbor | 0 .../golden/manifest/cbor/manifest.txt | 0 .../golden/manifest/json/manifest.json | 0 .../golden/manifest/json/manifest.txt | 0 .../vm/snapshot/src/car/chunker.rs | 0 .../vm/snapshot/src/car/mod.rs | 0 .../vm/snapshot/src/car/streamer.rs | 0 .../vm/snapshot/src/client.rs | 0 .../vm/snapshot/src/error.rs | 0 .../vm/snapshot/src/lib.rs | 0 .../vm/snapshot/src/manager.rs | 0 .../vm/snapshot/src/manifest.rs | 0 .../vm/snapshot/src/state.rs | 0 .../vm/snapshot/tests/golden.rs | 0 .../{fendermint => src}/vm/topdown/Cargo.toml | 0 .../vm/topdown/src/cache.rs | 0 .../vm/topdown/src/convert.rs | 0 .../vm/topdown/src/error.rs | 0 .../vm/topdown/src/finality/fetch.rs | 0 .../vm/topdown/src/finality/mod.rs | 0 .../vm/topdown/src/finality/null.rs | 0 .../{fendermint => src}/vm/topdown/src/lib.rs | 0 .../vm/topdown/src/proxy.rs | 0 .../vm/topdown/src/sync/mod.rs | 0 .../vm/topdown/src/sync/pointers.rs | 0 .../vm/topdown/src/sync/syncer.rs | 0 .../vm/topdown/src/sync/tendermint.rs | 0 .../vm/topdown/src/toggle.rs | 0 fvm-utils/.github/pull_request_template.md | 35 - fvm-utils/.github/workflows/tests.yml | 58 - fvm-utils/.gitignore | 3 - fvm-utils/Cargo.toml | 16 - fvm-utils/README.md | 10 - fvm-utils/example/Cargo.toml | 36 - fvm-utils/example/README.md | 26 - fvm-utils/example/build.rs | 12 - fvm-utils/example/src/lib.rs | 124 - fvm-utils/example/src/state.rs | 57 - fvm-utils/primitives/Cargo.toml | 24 - fvm-utils/runtime/Cargo.toml | 84 - fvm-utils/runtime/README.md | 3 - fvm-utils/runtime/src/actor_error.rs | 346 - fvm-utils/runtime/src/builtin/mod.rs | 72 - fvm-utils/runtime/src/builtin/network.rs | 15 - fvm-utils/runtime/src/builtin/shared.rs | 65 - fvm-utils/runtime/src/builtin/singletons.rs | 33 - fvm-utils/runtime/src/builtin/types.rs | 33 - fvm-utils/runtime/src/dispatch.rs | 180 - fvm-utils/runtime/src/lib.rs | 100 - .../runtime/src/runtime/actor_blockstore.rs | 48 - fvm-utils/runtime/src/runtime/actor_code.rs | 26 - fvm-utils/runtime/src/runtime/empty.rs | 40 - fvm-utils/runtime/src/runtime/fvm.rs | 467 -- fvm-utils/runtime/src/runtime/mod.rs | 209 - fvm-utils/runtime/src/test_utils.rs | 945 --- fvm-utils/runtime/src/util/cbor.rs | 34 - fvm-utils/runtime/src/util/downcast.rs | 118 - .../runtime/src/util/message_accumulator.rs | 175 - fvm-utils/runtime/src/util/mod.rs | 15 - fvm-utils/runtime/src/util/multimap.rs | 118 - fvm-utils/runtime/src/util/set.rs | 89 - fvm-utils/runtime/src/util/set_multimap.rs | 126 - fvm-utils/runtime/tests/multimap_test.rs | 77 - fvm-utils/runtime/tests/set_multimap_test.rs | 49 - fvm-utils/runtime/tests/set_test.rs | 49 - fvm-utils/src/lib.rs | 2 - ipc/Cargo.lock | 5793 ----------------- ipc/Cargo.toml | 66 - ipc/{ipc => }/cli/Cargo.toml | 6 +- .../commands/checkpoint/bottomup_bundles.rs | 0 .../commands/checkpoint/bottomup_height.rs | 0 .../commands/checkpoint/bottomup_submitted.rs | 0 .../commands/checkpoint/list_checkpoints.rs | 0 .../checkpoint/list_validator_changes.rs | 0 .../cli/src/commands/checkpoint/mod.rs | 0 .../src/commands/checkpoint/quorum_reached.rs | 0 .../cli/src/commands/checkpoint/relayer.rs | 0 ipc/{ipc => }/cli/src/commands/config/init.rs | 0 ipc/{ipc => }/cli/src/commands/config/mod.rs | 0 .../cli/src/commands/crossmsg/fund.rs | 0 .../cli/src/commands/crossmsg/mod.rs | 0 .../cli/src/commands/crossmsg/propagate.rs | 0 .../cli/src/commands/crossmsg/release.rs | 0 .../src/commands/crossmsg/topdown_cross.rs | 0 ipc/{ipc => }/cli/src/commands/daemon.rs | 0 ipc/{ipc => }/cli/src/commands/mod.rs | 0 .../cli/src/commands/subnet/bootstrap.rs | 0 .../cli/src/commands/subnet/create.rs | 0 .../cli/src/commands/subnet/genesis_epoch.rs | 0 ipc/{ipc => }/cli/src/commands/subnet/join.rs | 0 ipc/{ipc => }/cli/src/commands/subnet/kill.rs | 0 .../cli/src/commands/subnet/leave.rs | 0 .../cli/src/commands/subnet/list_subnets.rs | 0 ipc/{ipc => }/cli/src/commands/subnet/mod.rs | 0 ipc/{ipc => }/cli/src/commands/subnet/rpc.rs | 0 .../cli/src/commands/subnet/send_value.rs | 0 .../cli/src/commands/subnet/validator.rs | 0 ipc/{ipc => }/cli/src/commands/util/f4.rs | 0 ipc/{ipc => }/cli/src/commands/util/mod.rs | 0 .../cli/src/commands/wallet/balances.rs | 0 .../cli/src/commands/wallet/default.rs | 0 .../cli/src/commands/wallet/export.rs | 0 .../cli/src/commands/wallet/import.rs | 0 ipc/{ipc => }/cli/src/commands/wallet/mod.rs | 0 ipc/{ipc => }/cli/src/commands/wallet/new.rs | 0 .../cli/src/commands/wallet/remove.rs | 0 ipc/{ipc => }/cli/src/lib.rs | 0 ipc/{ipc => }/cli/src/main.rs | 0 ipc/{ipc => }/identity/Cargo.toml | 0 ipc/{ipc => }/identity/src/evm/memory.rs | 0 ipc/{ipc => }/identity/src/evm/mod.rs | 0 ipc/{ipc => }/identity/src/evm/persistent.rs | 0 ipc/{ipc => }/identity/src/fvm/errors.rs | 0 ipc/{ipc => }/identity/src/fvm/keystore.rs | 0 ipc/{ipc => }/identity/src/fvm/mod.rs | 0 .../identity/src/fvm/serialization.rs | 0 ipc/{ipc => }/identity/src/fvm/utils.rs | 0 ipc/{ipc => }/identity/src/fvm/wallet.rs | 0 .../identity/src/fvm/wallet_helpers.rs | 0 ipc/{ipc => }/identity/src/lib.rs | 0 .../tests/keystore_encrypted_old/keystore | 0 ipc/ipc/ipld/resolver/README.md | 3 - ipc/ipc/testing/e2e/.gitignore | 2 - ipc/ipc/testing/e2e/Cargo.toml | 20 - ipc/ipc/testing/e2e/Makefile | 294 - ipc/ipc/testing/e2e/README.md | 62 - ipc/ipc/testing/e2e/scripts/connect.sh | 87 - ipc/ipc/testing/e2e/scripts/fund-subnet.sh | 57 - ipc/ipc/testing/e2e/scripts/fund-wallet.sh | 38 - ipc/ipc/testing/e2e/scripts/join-subnet.sh | 61 - ipc/ipc/testing/e2e/scripts/make-env.sh | 34 - ipc/ipc/testing/e2e/scripts/new-subnet.sh | 55 - ipc/ipc/testing/e2e/scripts/new-wallet.sh | 56 - ipc/ipc/testing/e2e/scripts/topology.sh | 105 - ipc/ipc/testing/e2e/src/lib.rs | 79 - ipc/ipc/testing/e2e/template/agent/.env | 0 .../testing/e2e/template/agent/compose.yaml | 31 - .../testing/e2e/template/agent/config.toml | 2 - ipc/ipc/testing/e2e/template/eudico/.env | 0 .../testing/e2e/template/eudico/compose.yaml | 69 - .../e2e/template/eudico/genesis/README.md | 8 - .../template/eudico/genesis/genesis-test.json | 127 - .../e2e/template/eudico/genesis/genesis.json | 120 - .../e2e/template/eudico/genesis/wallet.key | 1 - .../template/eudico/scripts/subnet-daemon.sh | 21 - .../eudico/scripts/subnet-validator.sh | 46 - .../eudico/scripts/validator-entry.sh | 18 - ipc/ipc/testing/e2e/tests/subnet_lifecycle.rs | 58 - ipc/ipc/testing/e2e/topologies/example.sh | 17 - ipc/ipc/testing/e2e/topologies/example.yaml | 82 - ipc/ipc/testing/e2e/topologies/simple.sh | 13 - ipc/ipc/testing/e2e/topologies/simple.yaml | 35 - ipc/ipc/testing/itest/.env.template | 23 - ipc/ipc/testing/itest/Cargo.toml | 20 - ipc/ipc/testing/itest/README.md | 57 - .../itest/examples/no_create_subnet.rs | 91 - .../testing/itest/examples/no_tear_down.rs | 91 - ipc/ipc/testing/itest/src/infra/mod.rs | 307 - ipc/ipc/testing/itest/src/infra/subnet.rs | 504 -- ipc/ipc/testing/itest/src/infra/util.rs | 151 - ipc/ipc/testing/itest/src/lib.rs | 22 - ipc/ipc/testing/itest/tests/checkpoint.rs | 80 - .../ipld-resolver}/.github/workflows/ci.yaml | 0 .../ipld-resolver}/.gitignore | 0 ipc/ipld-resolver/Cargo.toml | 61 + ipc/{ => ipld-resolver}/LICENSE | 0 {ipld-resolver => ipc/ipld-resolver}/Makefile | 0 .../ipld-resolver}/README.md | 0 .../ipld-resolver}/docs/README.md | 0 .../ipld-resolver}/docs/diagrams/Makefile | 0 .../docs/diagrams/checkpoint_schema.png | Bin .../docs/diagrams/checkpoint_schema.puml | 0 .../docs/diagrams/checkpoint_submission.png | Bin .../docs/diagrams/checkpoint_submission.puml | 0 .../docs/diagrams/ipld_resolver.png | Bin .../docs/diagrams/ipld_resolver.puml | 0 .../ipld-resolver}/rust-toolchain.toml | 0 .../ipld-resolver}/scripts/add_license.sh | 0 .../ipld-resolver}/scripts/copyright.txt | 0 .../ipld-resolver}/src/arb.rs | 0 .../ipld-resolver}/src/behaviour/content.rs | 0 .../ipld-resolver}/src/behaviour/discovery.rs | 0 .../src/behaviour/membership.rs | 0 .../ipld-resolver}/src/behaviour/mod.rs | 0 .../ipld-resolver}/src/client.rs | 0 .../ipld-resolver}/src/hash.rs | 0 .../ipld-resolver}/src/lib.rs | 0 .../ipld-resolver}/src/limiter.rs | 0 .../ipld-resolver}/src/missing_blocks.rs | 0 .../ipld-resolver}/src/provider_cache.rs | 0 .../ipld-resolver}/src/provider_record.rs | 0 .../ipld-resolver}/src/service.rs | 0 .../ipld-resolver}/src/signed_record.rs | 0 .../ipld-resolver}/src/stats.rs | 0 .../ipld-resolver}/src/timestamp.rs | 0 .../ipld-resolver}/src/vote_record.rs | 0 .../ipld-resolver}/tests/smoke.rs | 0 .../ipld-resolver}/tests/store/mod.rs | 0 ipc/primitives/Cargo.toml | 24 + {fvm-utils => ipc}/primitives/README.md | 0 {fvm-utils => ipc}/primitives/src/amt.rs | 0 {fvm-utils => ipc}/primitives/src/ethaddr.rs | 0 {fvm-utils => ipc}/primitives/src/hamt.rs | 0 {fvm-utils => ipc}/primitives/src/lib.rs | 0 {fvm-utils => ipc}/primitives/src/link.rs | 0 {fvm-utils => ipc}/primitives/src/taddress.rs | 0 {fvm-utils => ipc}/primitives/src/uints.rs | 0 ipc/{ipc => }/provider/Cargo.toml | 0 ipc/{ipc => }/provider/src/checkpoint.rs | 0 .../provider/src/config/deserialize.rs | 0 ipc/{ipc => }/provider/src/config/mod.rs | 0 ipc/{ipc => }/provider/src/config/reload.rs | 0 .../provider/src/config/serialize.rs | 0 ipc/{ipc => }/provider/src/config/subnet.rs | 0 ipc/{ipc => }/provider/src/config/tests.rs | 0 ipc/{ipc => }/provider/src/jsonrpc/mod.rs | 0 ipc/{ipc => }/provider/src/jsonrpc/tests.rs | 0 ipc/{ipc => }/provider/src/lib.rs | 0 ipc/{ipc => }/provider/src/lotus/client.rs | 0 ipc/{ipc => }/provider/src/lotus/json.rs | 0 .../provider/src/lotus/message/chain.rs | 0 .../provider/src/lotus/message/deserialize.rs | 0 .../provider/src/lotus/message/ipc.rs | 0 .../provider/src/lotus/message/mod.rs | 0 .../provider/src/lotus/message/mpool.rs | 0 .../provider/src/lotus/message/serialize.rs | 0 .../provider/src/lotus/message/state.rs | 0 .../provider/src/lotus/message/tests.rs | 0 .../provider/src/lotus/message/wallet.rs | 0 ipc/{ipc => }/provider/src/lotus/mod.rs | 0 ipc/{ipc => }/provider/src/lotus/tests.rs | 0 .../provider/src/manager/evm/manager.rs | 0 ipc/{ipc => }/provider/src/manager/evm/mod.rs | 0 ipc/{ipc => }/provider/src/manager/mod.rs | 0 ipc/{ipc => }/provider/src/manager/subnet.rs | 0 ipc/scripts/install_infra.sh | 63 - ipc/{ipc => }/sdk/Cargo.toml | 2 +- ipc/{ipc => }/sdk/src/address.rs | 0 ipc/{ipc => }/sdk/src/checkpoint.rs | 0 ipc/{ipc => }/sdk/src/cross.rs | 0 ipc/{ipc => }/sdk/src/error.rs | 0 ipc/{ipc => }/sdk/src/evm.rs | 0 ipc/{ipc => }/sdk/src/gateway.rs | 0 ipc/{ipc => }/sdk/src/lib.rs | 0 ipc/{ipc => }/sdk/src/runtime.rs | 0 ipc/{ipc => }/sdk/src/staking.rs | 0 ipc/{ipc => }/sdk/src/subnet.rs | 0 ipc/{ipc => }/sdk/src/subnet_id.rs | 0 ipc/{ipc => }/sdk/src/validator.rs | 0 ipld-resolver/Cargo.toml | 67 - ipld-resolver/LICENSE | 21 - ...rust-toolchain.toml => rust-toolchain.toml | 0 fendermint/rustfmt.toml => rustfmt.toml | 2 +- src/main.rs | 3 + 461 files changed, 882 insertions(+), 13597 deletions(-) create mode 100644 .gitignore rename fendermint/Cargo.lock => Cargo.lock (93%) rename fendermint/Cargo.toml => Cargo.toml (67%) rename fendermint/LICENSE-APACHE => LICENSE-APACHE (100%) rename fendermint/LICENSE-MIT => LICENSE-MIT (100%) delete mode 100644 contracts/LICENSE-APACHE delete mode 100644 contracts/LICENSE-MIT rename fendermint/{fendermint => src}/abci/Cargo.toml (100%) rename fendermint/{fendermint => src}/abci/README.md (100%) rename fendermint/{fendermint => src}/abci/examples/kvstore.rs (100%) rename fendermint/{fendermint => src}/abci/src/application.rs (100%) rename fendermint/{fendermint => src}/abci/src/lib.rs (100%) rename fendermint/{fendermint => src}/abci/src/util.rs (100%) rename fendermint/{fendermint => src}/app/Cargo.toml (100%) rename fendermint/{fendermint => src}/app/config/default.toml (100%) rename fendermint/{fendermint => src}/app/config/test.toml (100%) rename fendermint/{fendermint => src}/app/options/Cargo.toml (100%) rename fendermint/{fendermint => src}/app/options/examples/network.rs (100%) rename fendermint/{fendermint => src}/app/options/src/eth.rs (100%) rename fendermint/{fendermint => src}/app/options/src/genesis.rs (100%) rename fendermint/{fendermint => src}/app/options/src/key.rs (100%) rename fendermint/{fendermint => src}/app/options/src/lib.rs (100%) rename fendermint/{fendermint => src}/app/options/src/parse.rs (100%) rename fendermint/{fendermint => src}/app/options/src/rpc.rs (100%) rename fendermint/{fendermint => src}/app/options/src/run.rs (100%) rename fendermint/{fendermint => src}/app/settings/Cargo.toml (100%) rename fendermint/{fendermint => src}/app/settings/src/eth.rs (100%) rename fendermint/{fendermint => src}/app/settings/src/fvm.rs (100%) rename fendermint/{fendermint => src}/app/settings/src/lib.rs (100%) rename fendermint/{fendermint => src}/app/settings/src/resolver.rs (100%) rename fendermint/{fendermint => src}/app/src/app.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/eth.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/genesis.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/key.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/mod.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/rpc.rs (100%) rename fendermint/{fendermint => src}/app/src/cmd/run.rs (100%) rename fendermint/{fendermint => src}/app/src/ipc.rs (100%) rename fendermint/{fendermint => src}/app/src/lib.rs (100%) rename fendermint/{fendermint => src}/app/src/main.rs (100%) rename fendermint/{fendermint => src}/app/src/store.rs (100%) rename fendermint/{fendermint => src}/app/src/tmconv.rs (100%) rename fendermint/{fendermint => src}/crypto/Cargo.toml (100%) rename fendermint/{fendermint => src}/crypto/src/lib.rs (100%) rename fendermint/{fendermint => src}/eth/api/Cargo.toml (100%) rename fendermint/{fendermint => src}/eth/api/README.md (100%) rename fendermint/{fendermint => src}/eth/api/examples/ethers.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/apis/eth.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/apis/mod.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/apis/net.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/apis/web3.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/cache.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/conv/from_eth.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/conv/from_fvm.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/conv/from_tm.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/conv/mod.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/error.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/filters.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/gas/mod.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/gas/output.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/handlers/http.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/handlers/mod.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/handlers/ws.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/lib.rs (100%) rename fendermint/{fendermint => src}/eth/api/src/state.rs (100%) rename fendermint/{fendermint => src}/eth/hardhat/Cargo.toml (100%) rename fendermint/{fendermint => src}/eth/hardhat/src/lib.rs (100%) rename fendermint/{fendermint => src}/rocksdb/Cargo.toml (100%) rename fendermint/{fendermint => src}/rocksdb/src/blockstore.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/kvstore.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/lib.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/namespaces.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/rocks/config.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/rocks/error.rs (100%) rename fendermint/{fendermint => src}/rocksdb/src/rocks/mod.rs (100%) rename fendermint/{fendermint => src}/rpc/Cargo.toml (100%) rename fendermint/{fendermint => src}/rpc/examples/simplecoin.rs (100%) rename fendermint/{fendermint => src}/rpc/src/client.rs (100%) rename fendermint/{fendermint => src}/rpc/src/lib.rs (100%) rename fendermint/{fendermint => src}/rpc/src/message.rs (100%) rename fendermint/{fendermint => src}/rpc/src/query.rs (100%) rename fendermint/{fendermint => src}/rpc/src/response.rs (100%) rename fendermint/{fendermint => src}/rpc/src/tx.rs (100%) rename fendermint/{fendermint => src}/storage/Cargo.toml (100%) rename fendermint/{fendermint => src}/storage/src/im.rs (100%) rename fendermint/{fendermint => src}/storage/src/lib.rs (100%) rename fendermint/{fendermint => src}/storage/src/testing.rs (100%) rename fendermint/{fendermint => src}/testing/Cargo.toml (100%) rename fendermint/{fendermint => src}/testing/Makefile/ci.env (100%) rename fendermint/{fendermint => src}/testing/Makefile/cometbft.toml (100%) rename fendermint/{fendermint => src}/testing/Makefile/common.env (100%) rename fendermint/{fendermint => src}/testing/Makefile/common.toml (100%) rename fendermint/{fendermint => src}/testing/Makefile/docker.toml (100%) rename fendermint/{fendermint => src}/testing/Makefile/ethapi.toml (100%) rename fendermint/{fendermint => src}/testing/Makefile/fendermint.toml (100%) rename fendermint/{fendermint => src}/testing/README.md (100%) rename fendermint/{fendermint => src}/testing/contract-test/Cargo.toml (100%) rename fendermint/{fendermint => src}/testing/contract-test/src/ipc/mod.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/src/ipc/registry.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/src/ipc/subnet.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/src/lib.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/tests/smt_staking.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/tests/staking/machine.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/tests/staking/mod.rs (100%) rename fendermint/{fendermint => src}/testing/contract-test/tests/staking/state.rs (100%) rename fendermint/{fendermint => src}/testing/smoke-test/.gitignore (100%) rename fendermint/{fendermint => src}/testing/smoke-test/Cargo.toml (100%) rename fendermint/{fendermint => src}/testing/smoke-test/Makefile.toml (100%) rename fendermint/{fendermint => src}/testing/smoke-test/scripts/init.sh (100%) rename fendermint/{fendermint => src}/testing/smoke-test/smoke.env (100%) rename fendermint/{fendermint => src}/testing/smoke-test/src/lib.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/address.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/cid.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/message.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/mod.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/subnetid.rs (100%) rename fendermint/{fendermint => src}/testing/src/arb/token.rs (100%) rename fendermint/{fendermint => src}/testing/src/golden.rs (100%) rename fendermint/{fendermint => src}/testing/src/lib.rs (100%) rename fendermint/{fendermint => src}/testing/src/smt.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/account.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/burntfunds.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/cron.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/diamond.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/eam.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/ethaccount.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/evm.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/init.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/ipc.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/multisig.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/placeholder.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/reward.rs (100%) rename fendermint/{fendermint => src}/vm/actor_interface/src/system.rs (100%) rename fendermint/{fendermint => src}/vm/core/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/core/src/chainid.rs (100%) rename fendermint/{fendermint => src}/vm/core/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/core/src/timestamp.rs (100%) rename fendermint/{fendermint => src}/vm/encoding/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/encoding/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/genesis/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/genesis/golden/genesis/cbor/genesis.cbor (100%) rename fendermint/{fendermint => src}/vm/genesis/golden/genesis/cbor/genesis.txt (100%) rename fendermint/{fendermint => src}/vm/genesis/golden/genesis/json/genesis.json (100%) rename fendermint/{fendermint => src}/vm/genesis/golden/genesis/json/genesis.txt (100%) rename fendermint/{fendermint => src}/vm/genesis/src/arb.rs (100%) rename fendermint/{fendermint => src}/vm/genesis/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/genesis/tests/golden.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/bytes.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/chain.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/broadcast.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/bundle.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/check.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/checkpoint.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/exec.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/externs.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/genesis.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/mod.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/query.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/check.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/exec.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/fevm.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/genesis.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/ipc.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/mod.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/query.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/state/snapshot.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/store/memory.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/store/mod.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/fvm/topdown.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/interpreter/src/signed.rs (100%) rename fendermint/{fendermint => src}/vm/message/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_bottom_up_exec.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_bottom_up_exec.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_bottom_up_resolve.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_bottom_up_resolve.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_top_down.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/ipc_top_down.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/signed.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/chain/signed.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/fvm/message.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/fvm/message.cid (100%) rename fendermint/{fendermint => src}/vm/message/golden/fvm/message.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/request/actor_state.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/request/actor_state.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/request/ipld.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/request/ipld.txt (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/response/actor_state.cbor (100%) rename fendermint/{fendermint => src}/vm/message/golden/query/response/actor_state.txt (100%) rename fendermint/{fendermint => src}/vm/message/src/chain.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/conv/from_eth.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/conv/from_fvm.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/conv/mod.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/ipc.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/query.rs (100%) rename fendermint/{fendermint => src}/vm/message/src/signed.rs (100%) rename fendermint/{fendermint => src}/vm/message/tests/golden.rs (100%) rename fendermint/{fendermint => src}/vm/resolver/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/resolver/src/ipld.rs (100%) rename fendermint/{fendermint => src}/vm/resolver/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/resolver/src/pool.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/snapshot/golden/manifest/cbor/manifest.cbor (100%) rename fendermint/{fendermint => src}/vm/snapshot/golden/manifest/cbor/manifest.txt (100%) rename fendermint/{fendermint => src}/vm/snapshot/golden/manifest/json/manifest.json (100%) rename fendermint/{fendermint => src}/vm/snapshot/golden/manifest/json/manifest.txt (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/car/chunker.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/car/mod.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/car/streamer.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/client.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/error.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/manager.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/manifest.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/src/state.rs (100%) rename fendermint/{fendermint => src}/vm/snapshot/tests/golden.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/Cargo.toml (100%) rename fendermint/{fendermint => src}/vm/topdown/src/cache.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/convert.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/error.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/finality/fetch.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/finality/mod.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/finality/null.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/lib.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/proxy.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/sync/mod.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/sync/pointers.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/sync/syncer.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/sync/tendermint.rs (100%) rename fendermint/{fendermint => src}/vm/topdown/src/toggle.rs (100%) delete mode 100644 fvm-utils/.github/pull_request_template.md delete mode 100644 fvm-utils/.github/workflows/tests.yml delete mode 100644 fvm-utils/.gitignore delete mode 100644 fvm-utils/Cargo.toml delete mode 100644 fvm-utils/README.md delete mode 100644 fvm-utils/example/Cargo.toml delete mode 100644 fvm-utils/example/README.md delete mode 100644 fvm-utils/example/build.rs delete mode 100644 fvm-utils/example/src/lib.rs delete mode 100644 fvm-utils/example/src/state.rs delete mode 100644 fvm-utils/primitives/Cargo.toml delete mode 100644 fvm-utils/runtime/Cargo.toml delete mode 100644 fvm-utils/runtime/README.md delete mode 100644 fvm-utils/runtime/src/actor_error.rs delete mode 100644 fvm-utils/runtime/src/builtin/mod.rs delete mode 100644 fvm-utils/runtime/src/builtin/network.rs delete mode 100644 fvm-utils/runtime/src/builtin/shared.rs delete mode 100644 fvm-utils/runtime/src/builtin/singletons.rs delete mode 100644 fvm-utils/runtime/src/builtin/types.rs delete mode 100644 fvm-utils/runtime/src/dispatch.rs delete mode 100644 fvm-utils/runtime/src/lib.rs delete mode 100644 fvm-utils/runtime/src/runtime/actor_blockstore.rs delete mode 100644 fvm-utils/runtime/src/runtime/actor_code.rs delete mode 100644 fvm-utils/runtime/src/runtime/empty.rs delete mode 100644 fvm-utils/runtime/src/runtime/fvm.rs delete mode 100644 fvm-utils/runtime/src/runtime/mod.rs delete mode 100644 fvm-utils/runtime/src/test_utils.rs delete mode 100644 fvm-utils/runtime/src/util/cbor.rs delete mode 100644 fvm-utils/runtime/src/util/downcast.rs delete mode 100644 fvm-utils/runtime/src/util/message_accumulator.rs delete mode 100644 fvm-utils/runtime/src/util/mod.rs delete mode 100644 fvm-utils/runtime/src/util/multimap.rs delete mode 100644 fvm-utils/runtime/src/util/set.rs delete mode 100644 fvm-utils/runtime/src/util/set_multimap.rs delete mode 100644 fvm-utils/runtime/tests/multimap_test.rs delete mode 100644 fvm-utils/runtime/tests/set_multimap_test.rs delete mode 100644 fvm-utils/runtime/tests/set_test.rs delete mode 100644 fvm-utils/src/lib.rs delete mode 100644 ipc/Cargo.lock delete mode 100644 ipc/Cargo.toml rename ipc/{ipc => }/cli/Cargo.toml (90%) rename ipc/{ipc => }/cli/src/commands/checkpoint/bottomup_bundles.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/bottomup_height.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/bottomup_submitted.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/list_checkpoints.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/list_validator_changes.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/quorum_reached.rs (100%) rename ipc/{ipc => }/cli/src/commands/checkpoint/relayer.rs (100%) rename ipc/{ipc => }/cli/src/commands/config/init.rs (100%) rename ipc/{ipc => }/cli/src/commands/config/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/crossmsg/fund.rs (100%) rename ipc/{ipc => }/cli/src/commands/crossmsg/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/crossmsg/propagate.rs (100%) rename ipc/{ipc => }/cli/src/commands/crossmsg/release.rs (100%) rename ipc/{ipc => }/cli/src/commands/crossmsg/topdown_cross.rs (100%) rename ipc/{ipc => }/cli/src/commands/daemon.rs (100%) rename ipc/{ipc => }/cli/src/commands/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/bootstrap.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/create.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/genesis_epoch.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/join.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/kill.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/leave.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/list_subnets.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/rpc.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/send_value.rs (100%) rename ipc/{ipc => }/cli/src/commands/subnet/validator.rs (100%) rename ipc/{ipc => }/cli/src/commands/util/f4.rs (100%) rename ipc/{ipc => }/cli/src/commands/util/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/balances.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/default.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/export.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/import.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/mod.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/new.rs (100%) rename ipc/{ipc => }/cli/src/commands/wallet/remove.rs (100%) rename ipc/{ipc => }/cli/src/lib.rs (100%) rename ipc/{ipc => }/cli/src/main.rs (100%) rename ipc/{ipc => }/identity/Cargo.toml (100%) rename ipc/{ipc => }/identity/src/evm/memory.rs (100%) rename ipc/{ipc => }/identity/src/evm/mod.rs (100%) rename ipc/{ipc => }/identity/src/evm/persistent.rs (100%) rename ipc/{ipc => }/identity/src/fvm/errors.rs (100%) rename ipc/{ipc => }/identity/src/fvm/keystore.rs (100%) rename ipc/{ipc => }/identity/src/fvm/mod.rs (100%) rename ipc/{ipc => }/identity/src/fvm/serialization.rs (100%) rename ipc/{ipc => }/identity/src/fvm/utils.rs (100%) rename ipc/{ipc => }/identity/src/fvm/wallet.rs (100%) rename ipc/{ipc => }/identity/src/fvm/wallet_helpers.rs (100%) rename ipc/{ipc => }/identity/src/lib.rs (100%) rename ipc/{ipc => }/identity/tests/keystore_encrypted_old/keystore (100%) delete mode 100644 ipc/ipc/ipld/resolver/README.md delete mode 100644 ipc/ipc/testing/e2e/.gitignore delete mode 100644 ipc/ipc/testing/e2e/Cargo.toml delete mode 100644 ipc/ipc/testing/e2e/Makefile delete mode 100644 ipc/ipc/testing/e2e/README.md delete mode 100755 ipc/ipc/testing/e2e/scripts/connect.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/fund-subnet.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/fund-wallet.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/join-subnet.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/make-env.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/new-subnet.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/new-wallet.sh delete mode 100755 ipc/ipc/testing/e2e/scripts/topology.sh delete mode 100644 ipc/ipc/testing/e2e/src/lib.rs delete mode 100644 ipc/ipc/testing/e2e/template/agent/.env delete mode 100644 ipc/ipc/testing/e2e/template/agent/compose.yaml delete mode 100644 ipc/ipc/testing/e2e/template/agent/config.toml delete mode 100644 ipc/ipc/testing/e2e/template/eudico/.env delete mode 100644 ipc/ipc/testing/e2e/template/eudico/compose.yaml delete mode 100644 ipc/ipc/testing/e2e/template/eudico/genesis/README.md delete mode 100644 ipc/ipc/testing/e2e/template/eudico/genesis/genesis-test.json delete mode 100644 ipc/ipc/testing/e2e/template/eudico/genesis/genesis.json delete mode 100644 ipc/ipc/testing/e2e/template/eudico/genesis/wallet.key delete mode 100755 ipc/ipc/testing/e2e/template/eudico/scripts/subnet-daemon.sh delete mode 100755 ipc/ipc/testing/e2e/template/eudico/scripts/subnet-validator.sh delete mode 100755 ipc/ipc/testing/e2e/template/eudico/scripts/validator-entry.sh delete mode 100644 ipc/ipc/testing/e2e/tests/subnet_lifecycle.rs delete mode 100644 ipc/ipc/testing/e2e/topologies/example.sh delete mode 100644 ipc/ipc/testing/e2e/topologies/example.yaml delete mode 100644 ipc/ipc/testing/e2e/topologies/simple.sh delete mode 100644 ipc/ipc/testing/e2e/topologies/simple.yaml delete mode 100644 ipc/ipc/testing/itest/.env.template delete mode 100644 ipc/ipc/testing/itest/Cargo.toml delete mode 100644 ipc/ipc/testing/itest/README.md delete mode 100644 ipc/ipc/testing/itest/examples/no_create_subnet.rs delete mode 100644 ipc/ipc/testing/itest/examples/no_tear_down.rs delete mode 100644 ipc/ipc/testing/itest/src/infra/mod.rs delete mode 100644 ipc/ipc/testing/itest/src/infra/subnet.rs delete mode 100644 ipc/ipc/testing/itest/src/infra/util.rs delete mode 100644 ipc/ipc/testing/itest/src/lib.rs delete mode 100644 ipc/ipc/testing/itest/tests/checkpoint.rs rename {ipld-resolver => ipc/ipld-resolver}/.github/workflows/ci.yaml (100%) rename {ipld-resolver => ipc/ipld-resolver}/.gitignore (100%) create mode 100644 ipc/ipld-resolver/Cargo.toml rename ipc/{ => ipld-resolver}/LICENSE (100%) rename {ipld-resolver => ipc/ipld-resolver}/Makefile (100%) rename {ipld-resolver => ipc/ipld-resolver}/README.md (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/README.md (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/Makefile (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/checkpoint_schema.png (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/checkpoint_schema.puml (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/checkpoint_submission.png (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/checkpoint_submission.puml (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/ipld_resolver.png (100%) rename {ipld-resolver => ipc/ipld-resolver}/docs/diagrams/ipld_resolver.puml (100%) rename {ipld-resolver => ipc/ipld-resolver}/rust-toolchain.toml (100%) rename {ipld-resolver => ipc/ipld-resolver}/scripts/add_license.sh (100%) rename {ipld-resolver => ipc/ipld-resolver}/scripts/copyright.txt (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/arb.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/behaviour/content.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/behaviour/discovery.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/behaviour/membership.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/behaviour/mod.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/client.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/hash.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/lib.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/limiter.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/missing_blocks.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/provider_cache.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/provider_record.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/service.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/signed_record.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/stats.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/timestamp.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/src/vote_record.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/tests/smoke.rs (100%) rename {ipld-resolver => ipc/ipld-resolver}/tests/store/mod.rs (100%) create mode 100644 ipc/primitives/Cargo.toml rename {fvm-utils => ipc}/primitives/README.md (100%) rename {fvm-utils => ipc}/primitives/src/amt.rs (100%) rename {fvm-utils => ipc}/primitives/src/ethaddr.rs (100%) rename {fvm-utils => ipc}/primitives/src/hamt.rs (100%) rename {fvm-utils => ipc}/primitives/src/lib.rs (100%) rename {fvm-utils => ipc}/primitives/src/link.rs (100%) rename {fvm-utils => ipc}/primitives/src/taddress.rs (100%) rename {fvm-utils => ipc}/primitives/src/uints.rs (100%) rename ipc/{ipc => }/provider/Cargo.toml (100%) rename ipc/{ipc => }/provider/src/checkpoint.rs (100%) rename ipc/{ipc => }/provider/src/config/deserialize.rs (100%) rename ipc/{ipc => }/provider/src/config/mod.rs (100%) rename ipc/{ipc => }/provider/src/config/reload.rs (100%) rename ipc/{ipc => }/provider/src/config/serialize.rs (100%) rename ipc/{ipc => }/provider/src/config/subnet.rs (100%) rename ipc/{ipc => }/provider/src/config/tests.rs (100%) rename ipc/{ipc => }/provider/src/jsonrpc/mod.rs (100%) rename ipc/{ipc => }/provider/src/jsonrpc/tests.rs (100%) rename ipc/{ipc => }/provider/src/lib.rs (100%) rename ipc/{ipc => }/provider/src/lotus/client.rs (100%) rename ipc/{ipc => }/provider/src/lotus/json.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/chain.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/deserialize.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/ipc.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/mod.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/mpool.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/serialize.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/state.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/tests.rs (100%) rename ipc/{ipc => }/provider/src/lotus/message/wallet.rs (100%) rename ipc/{ipc => }/provider/src/lotus/mod.rs (100%) rename ipc/{ipc => }/provider/src/lotus/tests.rs (100%) rename ipc/{ipc => }/provider/src/manager/evm/manager.rs (100%) rename ipc/{ipc => }/provider/src/manager/evm/mod.rs (100%) rename ipc/{ipc => }/provider/src/manager/mod.rs (100%) rename ipc/{ipc => }/provider/src/manager/subnet.rs (100%) delete mode 100755 ipc/scripts/install_infra.sh rename ipc/{ipc => }/sdk/Cargo.toml (93%) rename ipc/{ipc => }/sdk/src/address.rs (100%) rename ipc/{ipc => }/sdk/src/checkpoint.rs (100%) rename ipc/{ipc => }/sdk/src/cross.rs (100%) rename ipc/{ipc => }/sdk/src/error.rs (100%) rename ipc/{ipc => }/sdk/src/evm.rs (100%) rename ipc/{ipc => }/sdk/src/gateway.rs (100%) rename ipc/{ipc => }/sdk/src/lib.rs (100%) rename ipc/{ipc => }/sdk/src/runtime.rs (100%) rename ipc/{ipc => }/sdk/src/staking.rs (100%) rename ipc/{ipc => }/sdk/src/subnet.rs (100%) rename ipc/{ipc => }/sdk/src/subnet_id.rs (100%) rename ipc/{ipc => }/sdk/src/validator.rs (100%) delete mode 100644 ipld-resolver/Cargo.toml delete mode 100644 ipld-resolver/LICENSE rename ipc/rust-toolchain.toml => rust-toolchain.toml (100%) rename fendermint/rustfmt.toml => rustfmt.toml (53%) create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..ea8c4bf7f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/fendermint/Cargo.lock b/Cargo.lock similarity index 93% rename from fendermint/Cargo.lock rename to Cargo.lock index 3d017b419..faf22fc70 100644 --- a/fendermint/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "gimli 0.26.2", + "gimli 0.27.3", ] [[package]] @@ -226,30 +226,30 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "a3a318f1f38d2418400f8209655bfd825785afd25aa30bb7ba6cc792e4596748" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -421,7 +421,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 0.38.25", + "rustix", "slab", "tracing", "windows-sys 0.52.0", @@ -429,9 +429,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea8b3453dd7cc96711834b75400d671b73e3656975fa68d9f277163b7f7e316" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" dependencies = [ "event-listener 4.0.0", "event-listener-strategy", @@ -643,25 +643,50 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +[[package]] +name = "bellpepper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0271a107b5f600ee41bdafbb3c8ddf4afa52983d4b078917d89dbb920116e987" +dependencies = [ + "bellpepper-core", + "byteorder", + "ff 0.13.0", +] + +[[package]] +name = "bellpepper-core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2c9a1b2f748c59938bc72165ebdf34efffeecee9cfbe0bb7d6b01aea21cd523" +dependencies = [ + "blake2s_simd 1.0.2", + "byteorder", + "ff 0.13.0", + "serde", + "thiserror", +] + [[package]] name = "bellperson" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a8623f815c0b1fd89efd9b5f4afbb937f91f51c1ebe3f6dda399c69fa938f3" +checksum = "5c41bd83b8437856d267eb311de13dcd9bff9077cc5ba35c7ec886070dea8a45" dependencies = [ + "bellpepper-core", "bincode", "blake2s_simd 1.0.2", - "blstrs", + "blstrs 0.7.1", "byteorder", "crossbeam-channel", "digest 0.10.7", "ec-gpu", "ec-gpu-gen", - "ff 0.12.1", - "group 0.12.1", + "ff 0.13.0", + "group 0.13.0", "log", "memmap2", - "pairing", + "pairing 0.23.0", "rand 0.8.5", "rand_core 0.6.4", "rayon", @@ -733,6 +758,9 @@ name = "bitflags" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] [[package]] name = "bitmaps" @@ -869,10 +897,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1659e487883b92123806f16ff3568dd57563991231d187d29b23eea5d910e800" dependencies = [ "blst", - "blstrs", + "blstrs 0.6.2", "ff 0.12.1", "group 0.12.1", - "pairing", + "pairing 0.22.0", + "rand_core 0.6.4", + "subtle", + "thiserror", +] + +[[package]] +name = "bls-signatures" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc7fce0356b52c2483bb6188cc8bdc11add526bce75d1a44e5e5d889a6ab008" +dependencies = [ + "blst", + "blstrs 0.7.1", + "ff 0.13.0", + "group 0.13.0", + "pairing 0.23.0", "rand_core 0.6.4", "subtle", "thiserror", @@ -898,10 +942,26 @@ checksum = "1ff3694b352ece02eb664a09ffb948ee69b35afa2e6ac444a6b8cb9d515deebd" dependencies = [ "blst", "byte-slice-cast", - "ec-gpu", "ff 0.12.1", "group 0.12.1", - "pairing", + "pairing 0.22.0", + "rand_core 0.6.4", + "serde", + "subtle", +] + +[[package]] +name = "blstrs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29" +dependencies = [ + "blst", + "byte-slice-cast", + "ec-gpu", + "ff 0.13.0", + "group 0.13.0", + "pairing 0.23.0", "rand_core 0.6.4", "serde", "subtle", @@ -1119,12 +1179,26 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" dependencies = [ - "arbitrary", "core2", "multibase", "multihash 0.16.3", - "quickcheck 0.9.2", - "rand 0.7.3", + "serde", + "serde_bytes", + "unsigned-varint", +] + +[[package]] +name = "cid" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" +dependencies = [ + "arbitrary", + "core2", + "multibase", + "multihash 0.18.1", + "quickcheck", + "rand 0.8.5", "serde", "serde_bytes", "unsigned-varint", @@ -1187,9 +1261,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.10" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive", @@ -1197,9 +1271,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -1207,6 +1281,15 @@ dependencies = [ "strsim 0.10.0", ] +[[package]] +name = "clap_complete" +version = "4.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" +dependencies = [ + "clap 4.4.11", +] + [[package]] name = "clap_derive" version = "4.4.7" @@ -1285,9 +1368,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -1372,7 +1455,7 @@ dependencies = [ "fendermint_vm_interpreter", "fendermint_vm_message", "fvm", - "fvm_ipld_blockstore", + "fvm_ipld_blockstore 0.2.0", "fvm_shared", "hex", "ipc-sdk", @@ -1390,9 +1473,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1400,9 +1483,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1433,27 +1516,28 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "593b398dd0c5b1e2e3a9c3dae8584e287894ea84e361949ad506376e99196265" +checksum = "5a91a1ccf6fb772808742db2f51e2179f25b1ec559cbe39ea080c72ff61caf8f" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc0d8faabd099ea15ab33d49d150e5572c04cfeb95d675fd41286739b754629" +checksum = "169db1a457791bff4fd1fc585bb5cc515609647e0420a7d5c98d7700c59c2d00" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", + "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1462,33 +1546,42 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac1669e42579476f001571d6ba4b825fac686282c97b88b18f8e34242066a81" +checksum = "3486b93751ef19e6d6eef66d2c0e83ed3d2ba01da1919ed2747f2f7bd8ba3419" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.89.2" +version = "0.99.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86a1205ab18e7cd25dc4eca5246e56b506ced3feb8d95a8d776195e48d2cd4ef" + +[[package]] +name = "cranelift-control" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a1b1eef9640ab72c1e7b583ac678083855a509da34b4b4378bd99954127c20" +checksum = "1b108cae0f724ddfdec1871a0dc193a607e0c2d960f083cfefaae8ccf655eff2" +dependencies = [ + "arbitrary", +] [[package]] name = "cranelift-entity" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eea4e17c3791fd8134640b26242a9ddbd7c67db78f0bad98cb778bf563ef81a0" +checksum = "720444006240622798665bfc6aa8178e2eed556da342fda62f659c5267c3c659" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca1474b5302348799656d43a40eacd716a3b46169405a3af812832c9edf77b4" +checksum = "b7a94c4c5508b7407e125af9d5320694b7423322e59a4ac0d07919ae254347ca" dependencies = [ "cranelift-codegen", "log", @@ -1498,15 +1591,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77aa537f020ea43483100153278e7215d41695bdcef9eea6642d122675f64249" +checksum = "ef1f888d0845dcd6be4d625b91d9d8308f3d95bed5c5d4072ce38e1917faa505" [[package]] name = "cranelift-native" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bdc6b65241a95b7d8eafbf4e114c082e49b80162a2dcd9c6bcc5989c3310c9e" +checksum = "9ad5966da08f1e96a3ae63be49966a85c9b249fa465f8cf1b66469a82b1004a0" dependencies = [ "cranelift-codegen", "libc", @@ -1515,9 +1608,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.89.2" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb6359f606a1c80ccaa04fae9dbbb504615ec7a49b6c212b341080fff7a65dd" +checksum = "0d8635c88b424f1d232436f683a301143b36953cd98fc6f86f7bac862dfeb6f5" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1525,7 +1618,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.92.0", + "wasmparser 0.110.0", "wasmtime-types", ] @@ -1890,6 +1983,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid 1.6.1", +] + [[package]] name = "der" version = "0.6.1" @@ -2100,16 +2202,16 @@ checksum = "bd63582de2b59ea1aa48d7c1941b5d87618d95484397521b3acdfa0e1e9f5e45" [[package]] name = "ec-gpu-gen" -version = "0.5.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd09bf9d5313ad60379f70250590bccc10f7a04e2773062ac13255a37022584e" +checksum = "50c3a1c7cc1906cead1b1763ab4ad1b86f0fa037c4407e2c7f90568f9c2eeb78" dependencies = [ "bitvec", "crossbeam-channel", "ec-gpu", "execute", - "ff 0.12.1", - "group 0.12.1", + "ff 0.13.0", + "group 0.13.0", "hex", "log", "num_cpus", @@ -2304,9 +2406,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.7.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" dependencies = [ "log", "regex", @@ -2314,12 +2416,15 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.8.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ + "humantime", + "is-terminal", "log", "regex", + "termcolor", ] [[package]] @@ -2337,17 +2442,6 @@ dependencies = [ "serde", ] -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.8" @@ -2358,16 +2452,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "eth-keystore" version = "0.5.0" @@ -2823,7 +2907,7 @@ dependencies = [ "async-trait", "base64 0.21.5", "bytes", - "cid", + "cid 0.10.1", "fendermint_abci", "fendermint_app_options", "fendermint_app_settings", @@ -2842,9 +2926,9 @@ dependencies = [ "fendermint_vm_snapshot", "fendermint_vm_topdown", "fvm", - "fvm_ipld_blockstore", + "fvm_ipld_blockstore 0.2.0", "fvm_ipld_car", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-provider", @@ -2859,7 +2943,7 @@ dependencies = [ "num-traits", "openssl", "prost", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "rand_chacha 0.3.1", "serde", @@ -2882,10 +2966,10 @@ name = "fendermint_app_options" version = "0.1.0" dependencies = [ "bytes", - "cid", - "clap 4.4.10", + "cid 0.10.1", + "clap 4.4.11", "fendermint_vm_actor_interface", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-sdk", @@ -2905,7 +2989,7 @@ dependencies = [ "dirs", "fendermint_vm_encoding", "fendermint_vm_topdown", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "ipc-provider", "ipc-sdk", @@ -2931,8 +3015,8 @@ dependencies = [ "anyhow", "async-trait", "axum", - "cid", - "clap 4.4.10", + "cid 0.10.1", + "clap 4.4.11", "erased-serde", "ethers", "ethers-core", @@ -2942,14 +3026,14 @@ dependencies = [ "fendermint_vm_actor_interface", "fendermint_vm_message", "futures", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "jsonrpc-v2", "lazy_static", "lru_time_cache", "paste", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "rand 0.8.5", "serde", @@ -2978,12 +3062,12 @@ name = "fendermint_rocksdb" version = "0.1.0" dependencies = [ "anyhow", - "cid", + "cid 0.10.1", "fendermint_storage", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", "num_cpus", - "quickcheck 1.0.3", + "quickcheck", "rocksdb", "serde", "tempfile", @@ -2998,14 +3082,14 @@ dependencies = [ "async-trait", "base64 0.21.5", "bytes", - "cid", - "clap 4.4.10", + "cid 0.10.1", + "clap 4.4.11", "ethers", "fendermint_crypto", "fendermint_vm_actor_interface", "fendermint_vm_genesis", "fendermint_vm_message", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "lazy_static", @@ -3024,9 +3108,9 @@ dependencies = [ name = "fendermint_storage" version = "0.1.0" dependencies = [ - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "im", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "serde", "thiserror", @@ -3038,16 +3122,16 @@ version = "0.1.0" dependencies = [ "arbitrary", "arbtest", - "cid", + "cid 0.10.1", "ethers", "fendermint_testing", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-sdk", "lazy_static", "num-bigint", - "quickcheck 1.0.3", + "quickcheck", "rand 0.8.5", "serde", "serde_json", @@ -3058,15 +3142,15 @@ name = "fendermint_vm_actor_interface" version = "0.1.0" dependencies = [ "anyhow", - "cid", + "cid 0.10.1", "ethers", "ethers-core", "fendermint_crypto", "fendermint_vm_genesis", "fil_actors_evm_shared", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.6.1", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_shared", "hex", "ipc-sdk", @@ -3074,7 +3158,7 @@ dependencies = [ "lazy_static", "merkle-tree-rs", "paste", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "rand 0.8.5", "serde", @@ -3087,11 +3171,11 @@ name = "fendermint_vm_core" version = "0.1.0" dependencies = [ "arbitrary", - "cid", + "cid 0.10.1", "fnv", "fvm_shared", "lazy_static", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "regex", "serde", @@ -3102,7 +3186,7 @@ dependencies = [ name = "fendermint_vm_encoding" version = "0.1.0" dependencies = [ - "cid", + "cid 0.10.1", "fvm_shared", "ipc-sdk", "num-traits", @@ -3116,18 +3200,18 @@ version = "0.1.0" dependencies = [ "anyhow", "arbitrary", - "cid", + "cid 0.10.1", "fendermint_crypto", "fendermint_testing", "fendermint_vm_core", "fendermint_vm_encoding", "fendermint_vm_genesis", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-sdk", "num-traits", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "rand 0.8.5", "serde", @@ -3143,7 +3227,7 @@ dependencies = [ "anyhow", "async-stm", "async-trait", - "cid", + "cid 0.10.1", "ethers", "fendermint_crypto", "fendermint_eth_hardhat", @@ -3158,9 +3242,9 @@ dependencies = [ "futures-core", "futures-util", "fvm", - "fvm_ipld_blockstore", + "fvm_ipld_blockstore 0.2.0", "fvm_ipld_car", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-sdk", @@ -3168,7 +3252,7 @@ dependencies = [ "libipld", "num-traits", "pin-project", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "serde", "serde_json", @@ -3190,7 +3274,7 @@ dependencies = [ "anyhow", "arbitrary", "blake2b_simd", - "cid", + "cid 0.10.1", "ethers", "ethers-core", "fendermint_crypto", @@ -3198,13 +3282,13 @@ dependencies = [ "fendermint_vm_actor_interface", "fendermint_vm_encoding", "fendermint_vm_message", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "ipc-sdk", "lazy_static", "num-traits", - "quickcheck 1.0.3", + "quickcheck", "quickcheck_macros", "rand 0.8.5", "serde", @@ -3218,7 +3302,7 @@ name = "fendermint_vm_resolver" version = "0.1.0" dependencies = [ "async-stm", - "cid", + "cid 0.10.1", "im", "ipc-sdk", "ipc_ipld_resolver", @@ -3233,7 +3317,7 @@ dependencies = [ "anyhow", "arbitrary", "async-stm", - "cid", + "cid 0.10.1", "fendermint_testing", "fendermint_vm_core", "fendermint_vm_genesis", @@ -3241,13 +3325,13 @@ dependencies = [ "fendermint_vm_snapshot", "futures", "fvm", - "fvm_ipld_blockstore", + "fvm_ipld_blockstore 0.2.0", "fvm_ipld_car", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "im", "multihash 0.16.3", - "quickcheck 1.0.3", + "quickcheck", "serde", "serde_json", "sha2 0.10.8", @@ -3267,10 +3351,10 @@ dependencies = [ "anyhow", "async-stm", "async-trait", - "cid", - "clap 4.4.10", + "cid 0.10.1", + "clap 4.4.11", "ethers", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "ipc-provider", "ipc-sdk", @@ -3302,6 +3386,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ + "bitvec", "rand_core 0.6.4", "subtle", ] @@ -3314,11 +3399,11 @@ checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "fil_actors_evm_shared" -version = "11.0.0" -source = "git+https://github.com/filecoin-project/builtin-actors?tag=v11.0.0#cd9ac2bb0afcca7a59465e57cee6569e69070d7a" +version = "12.0.0" +source = "git+https://github.com/filecoin-project/builtin-actors?tag=v12.0.0#b86938e410daebf27f9397fd622370a16b24f58b" dependencies = [ - "fil_actors_runtime 11.0.0", - "fvm_ipld_encoding 0.3.3", + "fil_actors_runtime", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", "serde", @@ -3327,62 +3412,27 @@ dependencies = [ [[package]] name = "fil_actors_runtime" -version = "0.0.1" -source = "git+https://github.com/consensus-shipyard/fvm-utils#368ad258a82204d0004b7321f1015373fb4d17b9" +version = "12.0.0" +source = "git+https://github.com/filecoin-project/builtin-actors?tag=v12.0.0#b86938e410daebf27f9397fd622370a16b24f58b" dependencies = [ "anyhow", - "base64 0.13.1", - "blake2b_simd", + "base64 0.21.5", "byteorder", "castaway", - "cid", - "frc42_dispatch", - "fvm_ipld_amt 0.4.2", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.5.1", + "cid 0.10.1", + "fvm_ipld_amt", + "fvm_ipld_bitfield", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_sdk", "fvm_shared", - "getrandom 0.2.11", - "indexmap 1.9.3", "integer-encoding", "itertools 0.10.5", - "lazy_static", "log", - "multihash 0.16.3", - "num-derive", - "num-traits", - "paste", - "rand 0.7.3", - "regex", - "serde", - "serde_repr", - "serde_tuple", - "sha2 0.10.8", - "thiserror", - "unsigned-varint", -] - -[[package]] -name = "fil_actors_runtime" -version = "11.0.0" -source = "git+https://github.com/filecoin-project/builtin-actors?tag=v11.0.0#cd9ac2bb0afcca7a59465e57cee6569e69070d7a" -dependencies = [ - "anyhow", - "byteorder", - "castaway", - "cid", - "fvm_ipld_amt 0.5.1", - "fvm_ipld_bitfield", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.6.1", - "fvm_shared", - "itertools 0.10.5", - "log", - "multihash 0.16.3", + "multihash 0.18.1", "num", - "num-derive", + "num-derive 0.3.3", "num-traits", "paste", "regex", @@ -3391,33 +3441,19 @@ dependencies = [ "sha2 0.10.8", "thiserror", "unsigned-varint", -] - -[[package]] -name = "fil_pasta_curves" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3303ea3c462ab949ab95b49f6e6d255d8d9396ebd4f1626ccb34c7037615aa8f" -dependencies = [ - "blake2b_simd", - "ff 0.12.1", - "group 0.12.1", - "lazy_static", - "rand 0.8.5", - "static_assertions", - "subtle", + "vm_api", ] [[package]] name = "filecoin-hashers" -version = "9.0.0" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d7e656d4f01d7772ef2dd0f59854c8f904370a946053cf37ef420c854d9a35" +checksum = "18a96fbc8232ba762026e6b4687dedf08ba1b3830148c919a158c21d7720fb62" dependencies = [ "anyhow", "bellperson", - "blstrs", - "ff 0.12.1", + "blstrs 0.7.1", + "ff 0.13.0", "generic-array 0.14.7", "hex", "lazy_static", @@ -3430,19 +3466,21 @@ dependencies = [ [[package]] name = "filecoin-proofs" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e00449c0e89be0922127e7e927e578247825450abdaf0da2fc30b733cb0e535b" +checksum = "7d5a4daf099aade347b0f23c1dd5b644aad340a223d5b65c37840faedda3092f" dependencies = [ "anyhow", "bellperson", "bincode", "blake2b_simd", - "blstrs", + "blstrs 0.7.1", + "ff 0.13.0", "filecoin-hashers", "fr32", "generic-array 0.14.7", "hex", + "iowrap", "lazy_static", "log", "memmap2", @@ -3462,14 +3500,14 @@ dependencies = [ [[package]] name = "filecoin-proofs-api" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347a43603e12b147cc3d8285fee27771e1e9702d90f1f8e5018b8dd96b5da467" +checksum = "64cef9a819a3125ab92269da594daf2f742a3f6b1e03a2493c13a0bda4514b03" dependencies = [ "anyhow", "bellperson", "bincode", - "blstrs", + "blstrs 0.7.1", "filecoin-hashers", "filecoin-proofs", "fr32", @@ -3567,56 +3605,18 @@ dependencies = [ [[package]] name = "fr32" -version = "7.0.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f07b8a600b8c699f8ddc5f520231bc2aac03e944c64055eccfd9a959c3fd60" +checksum = "fca9913cf6179723cdc69827661a36d9ac3fea4c6c8c0ee71536417e5b2cf5d6" dependencies = [ "anyhow", - "blstrs", + "blstrs 0.7.1", "byte-slice-cast", "byteorder", - "ff 0.12.1", - "thiserror", -] - -[[package]] -name = "frc42_dispatch" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fda233581861602b8c1c0922a44d79977cb0f56cfe1c3b71eafb589d1da749" -dependencies = [ - "frc42_hasher", - "frc42_macros", - "fvm_ipld_encoding 0.3.3", - "fvm_sdk", - "fvm_shared", - "thiserror", -] - -[[package]] -name = "frc42_hasher" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1cf7cebdc57c39906ba8b1148cde4a633cd76614131b983eb4c07f35c735d0" -dependencies = [ - "fvm_sdk", - "fvm_shared", + "ff 0.13.0", "thiserror", ] -[[package]] -name = "frc42_macros" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9479347c6b83b53f1c041045e9954e3213bb6d1cfc9d2f2927340765a1aabd58" -dependencies = [ - "blake2b_simd", - "frc42_hasher", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "fs2" version = "0.4.3" @@ -3684,9 +3684,9 @@ checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" dependencies = [ "futures-core", "pin-project-lite", @@ -3766,35 +3766,37 @@ dependencies = [ [[package]] name = "fvm" -version = "3.2.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c89b59f4c749b23543f16a4161d133f100263333bf50cb7ae192caf9599129" +checksum = "290a65ac2d207225ce14021e993a54a1cb1c09384dab3996546fb91d29736209" dependencies = [ "anyhow", "arbitrary", + "blake2b_simd", "byteorder", - "cid", + "cid 0.10.1", "derive_more", "filecoin-proofs-api", "fvm-wasm-instrument", - "fvm_ipld_amt 0.5.1", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.6.1", + "fvm_ipld_amt", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_shared", "lazy_static", "log", "minstant", - "multihash 0.16.3", + "multihash 0.18.1", "num-traits", "num_cpus", "once_cell", - "quickcheck 1.0.3", + "quickcheck", "rand 0.8.5", "rayon", "replace_with", "serde", "serde_tuple", + "static_assertions", "thiserror", "wasmtime", "wasmtime-environ", @@ -3809,39 +3811,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddd62c1cbb59244314d761b57cb5d2bcc35e8b7bc8f3082d56980f69145c1be8" dependencies = [ "anyhow", - "wasm-encoder", + "wasm-encoder 0.20.0", "wasmparser 0.95.0", "wasmprinter", ] [[package]] name = "fvm_ipld_amt" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d09e5aa7de45452676d18fcb70b750acd65faae7a4fe18fe784b4c85f869fb" -dependencies = [ - "ahash 0.7.7", - "anyhow", - "cid", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.2.3", - "itertools 0.10.5", - "once_cell", - "serde", - "thiserror", -] - -[[package]] -name = "fvm_ipld_amt" -version = "0.5.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e84f16d6927ce342ef86bd20fcc2d5bd498ed33ae6d7a22fea7a1b453488ec88" +checksum = "5fea333475130094f27ce67809aae3f69eb5247541d835950b7c5da733dbbb34" dependencies = [ "anyhow", - "cid", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "itertools 0.10.5", + "cid 0.10.1", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "itertools 0.11.0", "once_cell", "serde", "thiserror", @@ -3849,11 +3834,11 @@ dependencies = [ [[package]] name = "fvm_ipld_bitfield" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1950291f40d2d1047eb0a4568f7ef6d5b4973452dcef012dffb1957fe483ff7" +checksum = "da94287cafa663c2e295fe45c4c9dbf5ab7b52f648568f9ae3823deaf9873a89" dependencies = [ - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "serde", "thiserror", "unsigned-varint", @@ -3866,19 +3851,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fee8c75be2b58943e1a9755802d34d4c3934f6ea151b6be192ff98f644e515bd" dependencies = [ "anyhow", - "cid", + "cid 0.8.6", "multihash 0.16.3", ] +[[package]] +name = "fvm_ipld_blockstore" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417f52f6915b9f9a68de8462e1cf46f14a2c16420f484b8d2066873de2ffe420" +dependencies = [ + "anyhow", + "cid 0.10.1", + "multihash 0.18.1", +] + [[package]] name = "fvm_ipld_car" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c60423568393a284de6d7c342cd664690611f27d223eb78629fa568ddd4e7951" dependencies = [ - "cid", + "cid 0.8.6", "futures", - "fvm_ipld_blockstore", + "fvm_ipld_blockstore 0.1.2", "fvm_ipld_encoding 0.3.3", "integer-encoding", "serde", @@ -3887,17 +3883,16 @@ dependencies = [ [[package]] name = "fvm_ipld_encoding" -version = "0.2.3" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1ff5ba581625ab38cf2829fbd04ac232c6277466fdbe0270b42dcb976902d5" +checksum = "f0816a2a6df4853de08a723d261110d56a121aa313bc570fe9d248f0a4bc5288" dependencies = [ "anyhow", - "cid", - "cs_serde_bytes", - "fvm_ipld_blockstore", + "cid 0.8.6", + "fvm_ipld_blockstore 0.1.2", "multihash 0.16.3", "serde", - "serde_ipld_dagcbor", + "serde_ipld_dagcbor 0.2.2", "serde_repr", "serde_tuple", "thiserror", @@ -3905,16 +3900,16 @@ dependencies = [ [[package]] name = "fvm_ipld_encoding" -version = "0.3.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0816a2a6df4853de08a723d261110d56a121aa313bc570fe9d248f0a4bc5288" +checksum = "90608092e31d9a06236268c58f7c36668ab4b2a48afafe3a97e08f094ad7ae50" dependencies = [ "anyhow", - "cid", - "fvm_ipld_blockstore", - "multihash 0.16.3", + "cid 0.10.1", + "fvm_ipld_blockstore 0.2.0", + "multihash 0.18.1", "serde", - "serde_ipld_dagcbor", + "serde_ipld_dagcbor 0.4.2", "serde_repr", "serde_tuple", "thiserror", @@ -3922,39 +3917,18 @@ dependencies = [ [[package]] name = "fvm_ipld_hamt" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b5c939897aa1bfd63e7cb9c458ba10689371af3278ff20d66c6f8ca152c6c0" -dependencies = [ - "anyhow", - "byteorder", - "cid", - "cs_serde_bytes", - "forest_hash_utils", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.2.3", - "libipld-core 0.13.1", - "multihash 0.16.3", - "once_cell", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "fvm_ipld_hamt" -version = "0.6.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c942494dde990aeac314311bde34c787be99cab7d0836397a75556cbaa2c3e7" +checksum = "03a53e14c789449cec999ca0e93d909490c921b967adb7a9ec8f12286fb809bd" dependencies = [ "anyhow", "byteorder", - "cid", + "cid 0.10.1", "forest_hash_utils", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "libipld-core 0.14.0", - "multihash 0.16.3", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "libipld-core 0.16.0", + "multihash 0.18.1", "once_cell", "serde", "sha2 0.10.8", @@ -3963,12 +3937,13 @@ dependencies = [ [[package]] name = "fvm_sdk" -version = "3.2.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8ac1214ca6c31bcbb4e2e7461cd17af18e0496b9053547d465f15c8d8429a7" +checksum = "258cfc9a2e5dcb28ffcadd4abed504893996d31238488a07ef7d2a6a6e80e1ec" dependencies = [ - "cid", - "fvm_ipld_encoding 0.3.3", + "byteorder", + "cid 0.10.1", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "lazy_static", "log", @@ -3978,28 +3953,28 @@ dependencies = [ [[package]] name = "fvm_shared" -version = "3.2.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e86afc2ce02808d24f578296f105b13c23300e60e0eac331c4c1575beabb5" +checksum = "c3a19ef48bbc1b22742002667b82944237cfdebc38e946c216aa8de1192392ea" dependencies = [ "anyhow", "arbitrary", - "bitflags 1.3.2", + "bitflags 2.4.1", "blake2b_simd", - "bls-signatures", - "cid", + "bls-signatures 0.15.0", + "cid 0.10.1", "data-encoding", "data-encoding-macro", "filecoin-proofs-api", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "lazy_static", "libsecp256k1", - "multihash 0.16.3", + "multihash 0.18.1", "num-bigint", - "num-derive", + "num-derive 0.4.1", "num-integer", "num-traits", - "quickcheck 1.0.3", + "quickcheck", "serde", "serde_tuple", "thiserror", @@ -4015,6 +3990,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "fxprof-processed-profile" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" +dependencies = [ + "bitflags 2.4.1", + "debugid", + "fxhash", + "serde", + "serde_json", +] + [[package]] name = "gcra" version = "0.4.0" @@ -4091,9 +4079,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -4144,7 +4132,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", + "rand 0.8.5", "rand_core 0.6.4", + "rand_xorshift", "subtle", ] @@ -4182,6 +4172,15 @@ dependencies = [ "ahash 0.7.7", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.6", +] + [[package]] name = "hashbrown" version = "0.14.3" @@ -4266,6 +4265,9 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] [[package]] name = "hex_fmt" @@ -4376,6 +4378,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" version = "0.14.27" @@ -4620,8 +4628,15 @@ checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", "hashbrown 0.14.3", + "serde", ] +[[package]] +name = "indoc" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" + [[package]] name = "inout" version = "0.1.3" @@ -4671,22 +4686,66 @@ dependencies = [ ] [[package]] -name = "io-lifetimes" -version = "0.7.5" +name = "iowrap" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" +checksum = "8d778bd9a4fa138d91f62017e3ac5ff905d2b829a30d3b1be473cb57d32ad15a" +dependencies = [ + "memchr", +] + +[[package]] +name = "ipc-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-channel", + "async-trait", + "base64 0.21.5", + "bytes", + "cid 0.10.1", + "clap 4.4.11", + "clap_complete", + "env_logger 0.10.1", + "ethers", + "ethers-contract", + "fil_actors_runtime", + "futures-util", + "fvm_ipld_encoding 0.4.0", + "fvm_shared", + "hex", + "ipc-identity", + "ipc-provider", + "ipc-sdk", + "libsecp256k1", + "log", + "num-derive 0.3.3", + "num-traits", + "primitives", + "reqwest", + "serde", + "serde_bytes", + "serde_json", + "serde_tuple", + "strum 0.24.1", + "thiserror", + "tokio", + "tokio-tungstenite 0.18.0", + "toml 0.7.8", + "url", + "zeroize", +] [[package]] name = "ipc-identity" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc.git?branch=dev#68d5c10e5f801dd3e89f96e39dff5144489861f0" dependencies = [ "ahash 0.8.6", "anyhow", "argon2", "base64 0.21.5", "blake2b_simd", - "bls-signatures", + "bls-signatures 0.13.1", "ethers", "fvm_shared", "hex", @@ -4694,11 +4753,15 @@ dependencies = [ "libsecp256k1", "log", "primitives", + "quickcheck", + "quickcheck_macros", "rand 0.8.5", "serde", - "serde_ipld_dagcbor", + "serde_ipld_dagcbor 0.2.2", "serde_json", + "tempfile", "thiserror", + "tokio", "xsalsa20poly1305", "zeroize", ] @@ -4706,27 +4769,27 @@ dependencies = [ [[package]] name = "ipc-provider" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc.git?branch=dev#68d5c10e5f801dd3e89f96e39dff5144489861f0" dependencies = [ "anyhow", "async-channel", "async-trait", "base64 0.21.5", "bytes", - "cid", + "cid 0.10.1", "dirs", "ethers", "ethers-contract", - "fil_actors_runtime 0.0.1", + "fil_actors_runtime", "futures-util", - "fvm_ipld_encoding 0.3.3", + "fvm_ipld_encoding 0.4.0", "fvm_shared", "hex", + "indoc", "ipc-identity", "ipc-sdk", "ipc_actors_abis", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "primitives", "reqwest", @@ -4735,6 +4798,7 @@ dependencies = [ "serde_json", "serde_tuple", "strum 0.24.1", + "tempfile", "thiserror", "tokio", "tokio-tungstenite 0.18.0", @@ -4746,15 +4810,15 @@ dependencies = [ [[package]] name = "ipc-sdk" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc.git?branch=dev#68d5c10e5f801dd3e89f96e39dff5144489861f0" dependencies = [ "anyhow", - "cid", + "cid 0.10.1", "ethers", + "fil_actors_runtime", "fnv", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.6.1", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_shared", "integer-encoding", "ipc_actors_abis", @@ -4763,6 +4827,7 @@ dependencies = [ "num-traits", "primitives", "serde", + "serde_json", "serde_tuple", "thiserror", ] @@ -4770,7 +4835,6 @@ dependencies = [ [[package]] name = "ipc_actors_abis" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc-solidity-actors.git?branch=dev#ae9edfbf9ca41fbf31f28b8428229f091ada0917" dependencies = [ "anyhow", "ethers", @@ -4780,24 +4844,27 @@ dependencies = [ [[package]] name = "ipc_ipld_resolver" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc-ipld-resolver.git?branch=main#4888d016b639ad6519c17cd3d8ff3ea8cda94122" dependencies = [ "anyhow", "base64 0.21.5", "blake2b_simd", "bloom", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", + "env_logger 0.10.1", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_shared", "gcra", "ipc-sdk", + "ipc_ipld_resolver", "lazy_static", "libipld", "libp2p", "libp2p-bitswap", "log", "prometheus", - "quickcheck 1.0.3", + "quickcheck", + "quickcheck_macros", "rand 0.8.5", "serde", "serde_json", @@ -4830,7 +4897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.25", + "rustix", "windows-sys 0.48.0", ] @@ -5002,6 +5069,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "lazycell" @@ -5052,30 +5122,29 @@ dependencies = [ [[package]] name = "libipld-core" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdd758764f9680a818af33c31db733eb7c45224715d8816b9dcf0548c75f7c5" +checksum = "d44790246ec6b7314cba745992c23d479d018073e66d49ae40ae1b64e5dd8eb5" dependencies = [ "anyhow", - "cid", + "cid 0.8.6", "core2", "multibase", "multihash 0.16.3", - "serde", "thiserror", ] [[package]] name = "libipld-core" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44790246ec6b7314cba745992c23d479d018073e66d49ae40ae1b64e5dd8eb5" +checksum = "5acd707e8d8b092e967b2af978ed84709eaded82b75effe6cb6f6cc797ef8158" dependencies = [ "anyhow", - "cid", + "cid 0.10.1", "core2", "multibase", - "multihash 0.16.3", + "multihash 0.18.1", "serde", "thiserror", ] @@ -5685,19 +5754,13 @@ dependencies = [ name = "linked-hash-map" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "literally" @@ -5804,7 +5867,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.25", + "rustix", ] [[package]] @@ -5849,9 +5912,9 @@ dependencies = [ [[package]] name = "merkletree" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d348b5b0d1707be1c8a727b7078daa08e2a3051d63b35715a19c35a324d2aaac" +checksum = "4a0ed8c0ce1e281870da29266398541a0dbab168f5fb5fd36d7ef2bbdbf808a3" dependencies = [ "anyhow", "arrayref", @@ -5898,9 +5961,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5961,16 +6024,12 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" dependencies = [ - "arbitrary", "blake2b_simd", "blake2s_simd 1.0.2", "blake3", "core2", "digest 0.10.7", "multihash-derive", - "quickcheck 0.9.2", - "rand 0.7.3", - "ripemd", "serde", "serde-big-array", "sha2 0.10.8", @@ -5989,6 +6048,27 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "arbitrary", + "blake2b_simd", + "core2", + "digest 0.10.7", + "multihash-derive", + "quickcheck", + "rand 0.8.5", + "ripemd", + "serde", + "serde-big-array", + "sha2 0.10.8", + "sha3", + "unsigned-varint", +] + [[package]] name = "multihash-derive" version = "0.8.1" @@ -6043,20 +6123,21 @@ dependencies = [ [[package]] name = "neptune" -version = "8.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dedb261f1b35ddfd867295eacbc25eb78b4b5b63b08b1c0dc4c1b5ef0e5b2c2" +checksum = "7eaa7f90368545907dce7d5652a78f96a77d1e97019b230edbf54ce2440d5698" dependencies = [ - "bellperson", + "bellpepper", + "bellpepper-core", "blake2s_simd 0.5.11", - "blstrs", + "blstrs 0.7.1", "byteorder", - "ff 0.12.1", - "fil_pasta_curves", + "ff 0.13.0", "generic-array 0.14.7", "itertools 0.8.2", - "lazy_static", "log", + "pasta_curves", + "serde", "trait-set", ] @@ -6194,7 +6275,7 @@ dependencies = [ "autocfg", "num-integer", "num-traits", - "quickcheck 1.0.3", + "quickcheck", "serde", ] @@ -6219,6 +6300,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -6305,12 +6397,12 @@ dependencies = [ [[package]] name = "object" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "crc32fast", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "indexmap 1.9.3", "memchr", ] @@ -6381,9 +6473,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.60" +version = "0.10.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -6422,9 +6514,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.96" +version = "0.9.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" dependencies = [ "cc", "libc", @@ -6486,6 +6578,15 @@ dependencies = [ "group 0.12.1", ] +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group 0.13.0", +] + [[package]] name = "parity-scale-codec" version = "3.6.9" @@ -6588,6 +6689,23 @@ dependencies = [ "subtle", ] +[[package]] +name = "pasta_curves" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" +dependencies = [ + "blake2b_simd", + "ff 0.13.0", + "group 0.13.0", + "hex", + "lazy_static", + "rand 0.8.5", + "serde", + "static_assertions", + "subtle", +] + [[package]] name = "paste" version = "1.0.14" @@ -6892,7 +7010,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.25", + "rustix", "tracing", "windows-sys 0.52.0", ] @@ -7002,21 +7120,20 @@ dependencies = [ [[package]] name = "primitives" version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/fvm-utils#368ad258a82204d0004b7321f1015373fb4d17b9" dependencies = [ "anyhow", - "cid", - "fil_actors_runtime 0.0.1", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.5.1", + "cid 0.10.1", + "fil_actors_runtime", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", "fvm_shared", "hex", "indexmap 1.9.3", "integer-encoding", "lazy_static", "log", - "num-derive", + "num-derive 0.3.3", "num-traits", "serde", "uint", @@ -7225,18 +7342,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "quickcheck" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f" -dependencies = [ - "env_logger 0.7.1", - "log", - "rand 0.7.3", - "rand_core 0.5.1", -] - [[package]] name = "quickcheck" version = "1.0.3" @@ -7457,12 +7562,13 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.4.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b2eab54204ea0117fe9a060537e0b07a4e72f7c7d182361ecc346cab2240e5" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ - "fxhash", + "hashbrown 0.13.2", "log", + "rustc-hash", "slice-group-by", "smallvec", ] @@ -7610,9 +7716,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom 0.2.11", @@ -7762,29 +7868,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5363f616a5244fd47fc1dd0a0b24c28a5c0154f5010c16332a7ad6f78f2e8b62" -dependencies = [ - "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" -version = "0.38.25" +version = "0.38.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "9470c4bf8246c8daf25f9598dca807fb6510347b1e1cfa55749113850c79d88a" dependencies = [ "bitflags 2.4.1", - "errno 0.3.8", + "errno", "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] @@ -7819,7 +7911,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring 0.17.6", + "ring 0.17.7", "rustls-webpki", "sct 0.7.1", ] @@ -7863,7 +7955,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.6", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -7975,7 +8067,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.6", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -8108,7 +8200,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1e23de7a4a18dff77ab9531f279a882500b8cf3549fde044d4e10481b411f1e" dependencies = [ "cbor4ii", - "cid", + "cid 0.8.6", + "scopeguard", + "serde", +] + +[[package]] +name = "serde_ipld_dagcbor" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e880e0b1f9c7a8db874642c1217f7e19b29e325f24ab9f0fcb11818adec7f01" +dependencies = [ + "cbor4ii", + "cid 0.10.1", "scopeguard", "serde", ] @@ -8275,9 +8379,9 @@ dependencies = [ [[package]] name = "sha2raw" -version = "9.0.0" +version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ec45c74ebb91d25e61e14cfc1925e7571723ae14a38fc6c8bd0b2e516db101" +checksum = "b05310f1b1ceedfef5da1f80b6690342aec43713a79d1c303fa7b451f4e313de" dependencies = [ "byteorder", "cpufeatures", @@ -8417,7 +8521,7 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.17.6", + "ring 0.17.7", "rustc_version", "sha2 0.10.8", "subtle", @@ -8492,6 +8596,12 @@ dependencies = [ "der 0.7.8", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -8506,19 +8616,19 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "storage-proofs-core" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f756ef2dd06efda2eb30bf6806399d493072d8469b0a724f1905dc051fea59c1" +checksum = "568106d9e94bd28082551873fe36e0295de24770e67cecdd25f345a1b39664f7" dependencies = [ "aes 0.8.3", "anyhow", "bellperson", "blake2b_simd", - "blstrs", + "blstrs 0.7.1", "byteorder", "cbc", "config 0.12.0", - "ff 0.12.1", + "ff 0.13.0", "filecoin-hashers", "fr32", "fs2", @@ -8541,22 +8651,25 @@ dependencies = [ [[package]] name = "storage-proofs-porep" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2450a62eb009602a4a4d697a027ab1025657cd76b325a99dfeb8d263d44b1c5c" +checksum = "e4d3d0dd1f03de0f4a3ea54ceed7d79c62e3c7963abe2014db0934e828514b54" dependencies = [ "anyhow", "bellperson", "bincode", - "blstrs", + "blake2b_simd", + "blstrs 0.7.1", "byte-slice-cast", "byteorder", + "chacha20", "crossbeam", "fdlimit", - "ff 0.12.1", + "ff 0.13.0", "filecoin-hashers", "fr32", "generic-array 0.14.7", + "glob", "hex", "lazy_static", "libc", @@ -8580,16 +8693,16 @@ dependencies = [ [[package]] name = "storage-proofs-post" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e034a55f3c5137120c4cd1abb717cd397c660447c4393c2550be3ee5b070c4" +checksum = "c4817014940a69e7e84aa459afa3d7a0b81090a312d9918089f14810e988ac24" dependencies = [ "anyhow", "bellperson", "blake2b_simd", - "blstrs", + "blstrs 0.7.1", "byteorder", - "ff 0.12.1", + "ff 0.13.0", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -8603,14 +8716,14 @@ dependencies = [ [[package]] name = "storage-proofs-update" -version = "14.0.0" +version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3433b2832153e2744bfa87176dcb0b587392b57fd1bd770804d366c98822285a" +checksum = "5374a6a435d62e23700a08e124a8b4756ddd937fd6152289346481bfdbac21f5" dependencies = [ "anyhow", "bellperson", - "blstrs", - "ff 0.12.1", + "blstrs 0.7.1", + "ff 0.13.0", "filecoin-hashers", "fr32", "generic-array 0.14.7", @@ -8869,7 +8982,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.25", + "rustix", "windows-sys 0.48.0", ] @@ -8969,7 +9082,7 @@ checksum = "a1f15666993e193fa4d2b2479aa1e4f1bbe41283c820812df8dd618f41ca3f7a" dependencies = [ "bytes", "flex-error", - "num-derive", + "num-derive 0.3.3", "num-traits", "prost", "prost-types", @@ -8987,7 +9100,7 @@ checksum = "639e5adffd77220d238a800a72c74c98d7e869290a6e4494c10b6b4e8f702f02" dependencies = [ "bytes", "flex-error", - "num-derive", + "num-derive 0.3.3", "num-traits", "prost", "prost-types", @@ -9717,9 +9830,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -9807,7 +9920,6 @@ dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding", - "serde", ] [[package]] @@ -9877,6 +9989,24 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vm_api" +version = "1.0.0" +source = "git+https://github.com/filecoin-project/builtin-actors?tag=v12.0.0#b86938e410daebf27f9397fd622370a16b24f58b" +dependencies = [ + "anyhow", + "cid 0.10.1", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_encoding 0.4.0", + "fvm_ipld_hamt", + "fvm_shared", + "num-derive 0.3.3", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", +] + [[package]] name = "void" version = "1.0.2" @@ -10004,6 +10134,15 @@ dependencies = [ "leb128", ] +[[package]] +name = "wasm-encoder" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41763f20eafed1399fff1afb466496d3a959f58241436cfdc17e3f5ca954de16" +dependencies = [ + "leb128", +] + [[package]] name = "wasm-timer" version = "0.2.5" @@ -10021,28 +10160,29 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.92.0" +version = "0.95.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da34cec2a8c23db906cdf8b26e988d7a7f0d549eb5d51299129647af61a1b37" +checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" dependencies = [ "indexmap 1.9.3", + "url", ] [[package]] name = "wasmparser" -version = "0.95.0" +version = "0.110.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +checksum = "1dfcdb72d96f01e6c85b6bf20102e7423bdbaad5c337301bab2bbf253d26413c" dependencies = [ - "indexmap 1.9.3", - "url", + "indexmap 2.1.0", + "semver", ] [[package]] name = "wasmparser" -version = "0.118.0" +version = "0.118.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbb91574de0011ded32b14db12777e7dd5e9ea2f9d7317a1ab51a9495c75924" +checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" dependencies = [ "indexmap 2.1.0", "semver", @@ -10050,158 +10190,206 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.74" +version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a7a046e6636d25c06a5df00bdc34e02f9e6e0e8a356d738299b961a6126114" +checksum = "3d027eb8294904fc715ac0870cebe6b0271e96b90605ee21511e7565c4ce568c" dependencies = [ "anyhow", - "wasmparser 0.118.0", + "wasmparser 0.118.1", ] [[package]] name = "wasmtime" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743d37c265fa134a76de653c7e66be22590eaccd03da13cee99f3ac7a59cb826" +checksum = "c4e87029cc5760db9a3774aff4708596fe90c20ed2baeef97212e98b812fd0fc" dependencies = [ "anyhow", "bincode", + "bumpalo", "cfg-if", - "indexmap 1.9.3", + "fxprof-processed-profile", + "indexmap 2.1.0", "libc", "log", - "object 0.29.0", + "object 0.31.1", "once_cell", "paste", "psm", "rayon", "serde", + "serde_json", "target-lexicon", - "wasmparser 0.92.0", + "wasm-encoder 0.31.1", + "wasmparser 0.110.0", "wasmtime-cranelift", "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-asm-macros" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de327cf46d5218315957138131ed904621e6f99018aa2da508c0dcf0c65f1bf2" +checksum = "96d84f68d831200016e120f2ee79d81b50cf4c4123112914aefb168d036d445d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cranelift" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "017c3605ccce867b3ba7f71d95e5652acc22b9dc2971ad6a6f9df4a8d7af2648" +checksum = "8ae8ed7a4845f22be6b1ad80f33f43fa03445b03a02f2d40dca695129769cd1a" dependencies = [ "anyhow", "cranelift-codegen", + "cranelift-control", "cranelift-entity", "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.31.1", "target-lexicon", "thiserror", - "wasmparser 0.92.0", + "wasmparser 0.110.0", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "wasmtime-versioned-export-macros", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b17099f9320a1c481634d88101258917d5065717cf22b04ed75b1a8ea062b4" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-control", + "cranelift-native", + "gimli 0.27.3", + "object 0.31.1", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aec5c1f81aab9bb35997113c171b6bb9093afc90e3757c55e0c08dc9ac612e4" +checksum = "e8b9227b1001229ff125e0f76bf1d5b9dc4895e6bcfd5cc35a56f84685964ec7" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", - "indexmap 1.9.3", + "gimli 0.27.3", + "indexmap 2.1.0", "log", - "object 0.29.0", + "object 0.31.1", "serde", "target-lexicon", "thiserror", - "wasmparser 0.92.0", + "wasmparser 0.110.0", "wasmtime-types", ] [[package]] name = "wasmtime-jit" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c683893dbba3986aa71582a5332b87157fb95d34098de2e5f077c7f078726d" +checksum = "cce606b392c321d7272928003543447119ef937a9c3ebfce5c4bb0bf6b0f5bac" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.20.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.31.1", "rustc-demangle", - "rustix 0.35.16", + "rustix", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-jit-debug" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2f8f15a81292eec468c79a4f887a37a3d02eb0c610f34ddbec607d3e9022f18" +checksum = "aef27ea6c34ef888030d15560037fe7ef27a5609fbbba8e1e3e41dc4245f5bb2" dependencies = [ "once_cell", + "wasmtime-versioned-export-macros", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b59f94b0409221873565419168e20b5aedf18c4bd64de5c38acf8f0634efeee3" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-runtime" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09af6238c962e8220424c815a7b1a9a6d0ba0694f0ab0ae12a6cda1923935a0d" +checksum = "ceb587a88ae5bb6ca248455a391aff29ac63329a404b2cdea36d91267c797db4" dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap 1.9.3", + "indexmap 2.1.0", "libc", "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.9.0", "paste", "rand 0.8.5", - "rustix 0.35.16", - "thiserror", + "rustix", + "sptr", + "wasm-encoder 0.31.1", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "wasmtime-versioned-export-macros", + "windows-sys 0.48.0", ] [[package]] name = "wasmtime-types" -version = "2.0.2" +version = "12.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc3dd9521815984b35d6362f79e6b9c72475027cd1c71c44eb8df8fbf33a9fb" +checksum = "77943729d4b46141538e8d0b6168915dc5f88575ecdfea26753fd3ba8bab244a" dependencies = [ "cranelift-entity", "serde", "thiserror", - "wasmparser 0.92.0", + "wasmparser 0.110.0", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "12.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca7af9bb3ee875c4907835e607a275d10b04d15623d3aebe01afe8fbd3f85050" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", ] [[package]] @@ -10230,7 +10418,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.6", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -10466,7 +10654,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.25", + "rustix", ] [[package]] @@ -10525,34 +10713,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.48.0" @@ -10601,12 +10761,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -10619,18 +10773,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -10643,18 +10785,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -10667,18 +10797,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -10691,18 +10809,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -10715,12 +10821,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -10733,18 +10833,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -10759,9 +10847,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "b7e87b8dfbe3baffbe687eef2e164e32286eff31a5ee16463ce03d991643ec94" dependencies = [ "memchr", ] @@ -10927,18 +11015,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "5d075cf85bbb114e933343e087b92f2146bac0d55b534cbb8188becf0039948e" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "86cd5ca076997b97ef09d3ad65efe811fa68c9e874cb636ccb211223a813b0c2" dependencies = [ "proc-macro2", "quote", diff --git a/fendermint/Cargo.toml b/Cargo.toml similarity index 67% rename from fendermint/Cargo.toml rename to Cargo.toml index 0538736bd..2975f417b 100644 --- a/fendermint/Cargo.toml +++ b/Cargo.toml @@ -1,34 +1,45 @@ [workspace] resolver = "2" members = [ - "fendermint/abci", - "fendermint/app", - "fendermint/app/options", - "fendermint/crypto", - "fendermint/app/settings", - "fendermint/eth/*", - "fendermint/rocksdb", - "fendermint/rpc", - "fendermint/storage", - "fendermint/testing", - "fendermint/testing/*-test", - "fendermint/vm/*", + # fendermint + "fendermint/src/abci", + "fendermint/src/app", + "fendermint/src/app/options", + "fendermint/src/crypto", + "fendermint/src/app/settings", + "fendermint/src/eth/*", + "fendermint/src/rocksdb", + "fendermint/src/rpc", + "fendermint/src/storage", + "fendermint/src/testing", + "fendermint/src/testing/*-test", + "fendermint/src/vm/*", + # ipc + "ipc/cli", + "ipc/identity", + "ipc/ipld-resolver", + "ipc/primitives", + "ipc/provider", + "ipc/sdk", + # contracts + "contracts/binding" ] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [workspace.package] authors = ["Protocol Labs"] edition = "2021" license = "MIT OR Apache-2.0" license-file = "LICENSE-APACHE" +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + [workspace.dependencies] anyhow = "1" arbitrary = { version = "1", features = ["derive"] } arbtest = "0.2" async-stm = "0.4" async-trait = "0.1" +async-channel = "1.8.0" axum = { version = "0.6", features = ["ws"] } base64 = "0.21" blake2b_simd = "1.0" @@ -88,25 +99,36 @@ url = "2.4.1" zeroize = "1.6" trace4rs = "0.5.1" literally = "0.1.3" +reqwest = { version = "0.11.13", features = ["json"] } +log = "0.4" +env_logger = "0.10" +prometheus = "0.13" +tokio-tungstenite = { version = "0.18.0", features = ["native-tls"] } +libsecp256k1 = "0.7" +ethers-contract = "2.0.8" +integer-encoding = {version = "3.0.3", default-features = false} + +# Workspace deps +ipc-sdk = { path = "ipc/sdk" } +ipc-provider = { path = "ipc/provider" } +ipc-identity = { path = "ipc/identity", features = ["with-ethers"] } +ipc_ipld_resolver = { path = "ipc/ipld-resolver" } +primitives = { path = "ipc/primitives" } +ipc_actors_abis = { path = "contracts/binding" } # Vendored for cross-compilation, see https://github.com/cross-rs/cross/wiki/Recipes#openssl openssl = { version = "0.10", features = ["vendored"] } # Stable FVM dependencies from crates.io +fvm = { version = "4.0.0-alpha.1", default-features = false } # no opencl feature or it fails on CI +fvm_shared = { version = "4.0.0-alpha.1", default-features = false, features = ["crypto"] } -# Using the 3.3 version of the FVM because the newer ones update the IPLD dependencies -# to version which are different than the ones in the builtin-actors project, and since -# they are 0.x cargo cannot upgrade them automatically, which leads to version conflicts. -fvm = { version = "~3.2", default-features = false } # no opencl feature or it fails on CI -fvm_shared = { version = "~3.2", features = ["crypto"] } -primitives = { git = "https://github.com/consensus-shipyard/fvm-utils" } - -fvm_ipld_blockstore = "0.1" +fvm_ipld_blockstore = "0.2.0" fvm_ipld_car = "0.6" -fvm_ipld_encoding = "0.3" -fvm_ipld_hamt = "0.6" +fvm_ipld_encoding = "0.4.0" +fvm_ipld_hamt = "0.8.0" -# Local FVM debugging +# Local FVM debuggin # fvm = { path = "../ref-fvm/fvm", default-features = false } # fvm_ipld_blockstore = { path = "../ref-fvm/ipld/blockstore" } # fvm_ipld_encoding = { path = "../ref-fvm/ipld/encoding" } @@ -118,12 +140,13 @@ fvm_ipld_hamt = "0.6" # to cut down the time it takes to compile everything. However, some projects have a "shared" part, # and this copy-paste is clunky, so at least for those that have it, we should use it. # Keep the version here in sync with the Makefile! -fil_actors_evm_shared = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v11.0.0" } +fil_actors_evm_shared = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v12.0.0" } +fil_actors_runtime = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v12.0.0" } # Using 0.8 because of ref-fvm. # 0.9 would be better because of its updated quickcheck dependency. # 0.10 breaks some API. -cid = { version = "0.8", features = ["serde-codec", "std"] } +cid = { version = "0.10.1", default-features = false, features = ["serde-codec", "std"] } # Depending on the release cycle, this dependency might want an earlier version of the FVM. # We can work around it by hardcoding the method hashes; currently there is only one. @@ -136,23 +159,8 @@ tendermint-config = "0.33.0" tendermint-rpc = { version = "0.31", features = ["secp256k1", "http-client", "websocket-client"] } tendermint-proto = { version = "0.31" } -ipc-sdk = { git = "https://github.com/consensus-shipyard/ipc.git", branch = "dev" } -ipc_ipld_resolver = { git = "https://github.com/consensus-shipyard/ipc-ipld-resolver.git", branch = "main" } -ipc-provider = { git = "https://github.com/consensus-shipyard/ipc.git", branch = "dev" } -# NOTE: If you change the branch here make sure to change IPC_ACTORS_TAG in the Makefile as well. -ipc_actors_abis = { git = "https://github.com/consensus-shipyard/ipc-solidity-actors.git", branch = "dev" } - [patch.crates-io] # Use stable-only features. gcra = { git = "https://github.com/consensus-shipyard/gcra-rs.git", branch = "main" } # Contains some API changes that the upstream has not merged. -merkle-tree-rs = { git = "https://github.com/consensus-shipyard/merkle-tree-rs.git", branch = "dev" } - - -# Uncomment to point to your local versions -# [patch."https://github.com/consensus-shipyard/ipc"] -# ipc-sdk = { path = "../ipc/ipc/sdk" } -# ipc-provider = { path = "../ipc/ipc/provider" } - -# [patch."https://github.com/consensus-shipyard/ipc-solidity-actors.git"] -# ipc_actors_abis = { path = "../ipc-solidity-actors/binding" } +merkle-tree-rs = { git = "https://github.com/consensus-shipyard/merkle-tree-rs.git", branch = "dev" } \ No newline at end of file diff --git a/fendermint/LICENSE-APACHE b/LICENSE-APACHE similarity index 100% rename from fendermint/LICENSE-APACHE rename to LICENSE-APACHE diff --git a/fendermint/LICENSE-MIT b/LICENSE-MIT similarity index 100% rename from fendermint/LICENSE-MIT rename to LICENSE-MIT diff --git a/contracts/LICENSE-APACHE b/contracts/LICENSE-APACHE deleted file mode 100644 index 4c83a2841..000000000 --- a/contracts/LICENSE-APACHE +++ /dev/null @@ -1,5 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/contracts/LICENSE-MIT b/contracts/LICENSE-MIT deleted file mode 100644 index 749aa1ecd..000000000 --- a/contracts/LICENSE-MIT +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/contracts/binding/Cargo.toml b/contracts/binding/Cargo.toml index 0736c64fa..1686a47df 100644 --- a/contracts/binding/Cargo.toml +++ b/contracts/binding/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -ethers = { version = "2.0", features = ["abigen", "ws"] } -fvm_shared = { version = "=3.2.0", default-features = false, features = ["crypto"] } -anyhow = { version = "1.0" } +ethers = { workspace = true, features = ["abigen", "ws"] } +fvm_shared = { workspace = true, default-features = false, features = ["crypto"] } +anyhow = { workspace = true } [build-dependencies] -ethers = { version = "2.0", features = ["abigen", "ws"] } +ethers = { workspace = true, features = ["abigen", "ws"] } diff --git a/fendermint/fendermint/abci/Cargo.toml b/fendermint/src/abci/Cargo.toml similarity index 100% rename from fendermint/fendermint/abci/Cargo.toml rename to fendermint/src/abci/Cargo.toml diff --git a/fendermint/fendermint/abci/README.md b/fendermint/src/abci/README.md similarity index 100% rename from fendermint/fendermint/abci/README.md rename to fendermint/src/abci/README.md diff --git a/fendermint/fendermint/abci/examples/kvstore.rs b/fendermint/src/abci/examples/kvstore.rs similarity index 100% rename from fendermint/fendermint/abci/examples/kvstore.rs rename to fendermint/src/abci/examples/kvstore.rs diff --git a/fendermint/fendermint/abci/src/application.rs b/fendermint/src/abci/src/application.rs similarity index 100% rename from fendermint/fendermint/abci/src/application.rs rename to fendermint/src/abci/src/application.rs diff --git a/fendermint/fendermint/abci/src/lib.rs b/fendermint/src/abci/src/lib.rs similarity index 100% rename from fendermint/fendermint/abci/src/lib.rs rename to fendermint/src/abci/src/lib.rs diff --git a/fendermint/fendermint/abci/src/util.rs b/fendermint/src/abci/src/util.rs similarity index 100% rename from fendermint/fendermint/abci/src/util.rs rename to fendermint/src/abci/src/util.rs diff --git a/fendermint/fendermint/app/Cargo.toml b/fendermint/src/app/Cargo.toml similarity index 100% rename from fendermint/fendermint/app/Cargo.toml rename to fendermint/src/app/Cargo.toml diff --git a/fendermint/fendermint/app/config/default.toml b/fendermint/src/app/config/default.toml similarity index 100% rename from fendermint/fendermint/app/config/default.toml rename to fendermint/src/app/config/default.toml diff --git a/fendermint/fendermint/app/config/test.toml b/fendermint/src/app/config/test.toml similarity index 100% rename from fendermint/fendermint/app/config/test.toml rename to fendermint/src/app/config/test.toml diff --git a/fendermint/fendermint/app/options/Cargo.toml b/fendermint/src/app/options/Cargo.toml similarity index 100% rename from fendermint/fendermint/app/options/Cargo.toml rename to fendermint/src/app/options/Cargo.toml diff --git a/fendermint/fendermint/app/options/examples/network.rs b/fendermint/src/app/options/examples/network.rs similarity index 100% rename from fendermint/fendermint/app/options/examples/network.rs rename to fendermint/src/app/options/examples/network.rs diff --git a/fendermint/fendermint/app/options/src/eth.rs b/fendermint/src/app/options/src/eth.rs similarity index 100% rename from fendermint/fendermint/app/options/src/eth.rs rename to fendermint/src/app/options/src/eth.rs diff --git a/fendermint/fendermint/app/options/src/genesis.rs b/fendermint/src/app/options/src/genesis.rs similarity index 100% rename from fendermint/fendermint/app/options/src/genesis.rs rename to fendermint/src/app/options/src/genesis.rs diff --git a/fendermint/fendermint/app/options/src/key.rs b/fendermint/src/app/options/src/key.rs similarity index 100% rename from fendermint/fendermint/app/options/src/key.rs rename to fendermint/src/app/options/src/key.rs diff --git a/fendermint/fendermint/app/options/src/lib.rs b/fendermint/src/app/options/src/lib.rs similarity index 100% rename from fendermint/fendermint/app/options/src/lib.rs rename to fendermint/src/app/options/src/lib.rs diff --git a/fendermint/fendermint/app/options/src/parse.rs b/fendermint/src/app/options/src/parse.rs similarity index 100% rename from fendermint/fendermint/app/options/src/parse.rs rename to fendermint/src/app/options/src/parse.rs diff --git a/fendermint/fendermint/app/options/src/rpc.rs b/fendermint/src/app/options/src/rpc.rs similarity index 100% rename from fendermint/fendermint/app/options/src/rpc.rs rename to fendermint/src/app/options/src/rpc.rs diff --git a/fendermint/fendermint/app/options/src/run.rs b/fendermint/src/app/options/src/run.rs similarity index 100% rename from fendermint/fendermint/app/options/src/run.rs rename to fendermint/src/app/options/src/run.rs diff --git a/fendermint/fendermint/app/settings/Cargo.toml b/fendermint/src/app/settings/Cargo.toml similarity index 100% rename from fendermint/fendermint/app/settings/Cargo.toml rename to fendermint/src/app/settings/Cargo.toml diff --git a/fendermint/fendermint/app/settings/src/eth.rs b/fendermint/src/app/settings/src/eth.rs similarity index 100% rename from fendermint/fendermint/app/settings/src/eth.rs rename to fendermint/src/app/settings/src/eth.rs diff --git a/fendermint/fendermint/app/settings/src/fvm.rs b/fendermint/src/app/settings/src/fvm.rs similarity index 100% rename from fendermint/fendermint/app/settings/src/fvm.rs rename to fendermint/src/app/settings/src/fvm.rs diff --git a/fendermint/fendermint/app/settings/src/lib.rs b/fendermint/src/app/settings/src/lib.rs similarity index 100% rename from fendermint/fendermint/app/settings/src/lib.rs rename to fendermint/src/app/settings/src/lib.rs diff --git a/fendermint/fendermint/app/settings/src/resolver.rs b/fendermint/src/app/settings/src/resolver.rs similarity index 100% rename from fendermint/fendermint/app/settings/src/resolver.rs rename to fendermint/src/app/settings/src/resolver.rs diff --git a/fendermint/fendermint/app/src/app.rs b/fendermint/src/app/src/app.rs similarity index 100% rename from fendermint/fendermint/app/src/app.rs rename to fendermint/src/app/src/app.rs diff --git a/fendermint/fendermint/app/src/cmd/eth.rs b/fendermint/src/app/src/cmd/eth.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/eth.rs rename to fendermint/src/app/src/cmd/eth.rs diff --git a/fendermint/fendermint/app/src/cmd/genesis.rs b/fendermint/src/app/src/cmd/genesis.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/genesis.rs rename to fendermint/src/app/src/cmd/genesis.rs diff --git a/fendermint/fendermint/app/src/cmd/key.rs b/fendermint/src/app/src/cmd/key.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/key.rs rename to fendermint/src/app/src/cmd/key.rs diff --git a/fendermint/fendermint/app/src/cmd/mod.rs b/fendermint/src/app/src/cmd/mod.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/mod.rs rename to fendermint/src/app/src/cmd/mod.rs diff --git a/fendermint/fendermint/app/src/cmd/rpc.rs b/fendermint/src/app/src/cmd/rpc.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/rpc.rs rename to fendermint/src/app/src/cmd/rpc.rs diff --git a/fendermint/fendermint/app/src/cmd/run.rs b/fendermint/src/app/src/cmd/run.rs similarity index 100% rename from fendermint/fendermint/app/src/cmd/run.rs rename to fendermint/src/app/src/cmd/run.rs diff --git a/fendermint/fendermint/app/src/ipc.rs b/fendermint/src/app/src/ipc.rs similarity index 100% rename from fendermint/fendermint/app/src/ipc.rs rename to fendermint/src/app/src/ipc.rs diff --git a/fendermint/fendermint/app/src/lib.rs b/fendermint/src/app/src/lib.rs similarity index 100% rename from fendermint/fendermint/app/src/lib.rs rename to fendermint/src/app/src/lib.rs diff --git a/fendermint/fendermint/app/src/main.rs b/fendermint/src/app/src/main.rs similarity index 100% rename from fendermint/fendermint/app/src/main.rs rename to fendermint/src/app/src/main.rs diff --git a/fendermint/fendermint/app/src/store.rs b/fendermint/src/app/src/store.rs similarity index 100% rename from fendermint/fendermint/app/src/store.rs rename to fendermint/src/app/src/store.rs diff --git a/fendermint/fendermint/app/src/tmconv.rs b/fendermint/src/app/src/tmconv.rs similarity index 100% rename from fendermint/fendermint/app/src/tmconv.rs rename to fendermint/src/app/src/tmconv.rs diff --git a/fendermint/fendermint/crypto/Cargo.toml b/fendermint/src/crypto/Cargo.toml similarity index 100% rename from fendermint/fendermint/crypto/Cargo.toml rename to fendermint/src/crypto/Cargo.toml diff --git a/fendermint/fendermint/crypto/src/lib.rs b/fendermint/src/crypto/src/lib.rs similarity index 100% rename from fendermint/fendermint/crypto/src/lib.rs rename to fendermint/src/crypto/src/lib.rs diff --git a/fendermint/fendermint/eth/api/Cargo.toml b/fendermint/src/eth/api/Cargo.toml similarity index 100% rename from fendermint/fendermint/eth/api/Cargo.toml rename to fendermint/src/eth/api/Cargo.toml diff --git a/fendermint/fendermint/eth/api/README.md b/fendermint/src/eth/api/README.md similarity index 100% rename from fendermint/fendermint/eth/api/README.md rename to fendermint/src/eth/api/README.md diff --git a/fendermint/fendermint/eth/api/examples/ethers.rs b/fendermint/src/eth/api/examples/ethers.rs similarity index 100% rename from fendermint/fendermint/eth/api/examples/ethers.rs rename to fendermint/src/eth/api/examples/ethers.rs diff --git a/fendermint/fendermint/eth/api/src/apis/eth.rs b/fendermint/src/eth/api/src/apis/eth.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/apis/eth.rs rename to fendermint/src/eth/api/src/apis/eth.rs diff --git a/fendermint/fendermint/eth/api/src/apis/mod.rs b/fendermint/src/eth/api/src/apis/mod.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/apis/mod.rs rename to fendermint/src/eth/api/src/apis/mod.rs diff --git a/fendermint/fendermint/eth/api/src/apis/net.rs b/fendermint/src/eth/api/src/apis/net.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/apis/net.rs rename to fendermint/src/eth/api/src/apis/net.rs diff --git a/fendermint/fendermint/eth/api/src/apis/web3.rs b/fendermint/src/eth/api/src/apis/web3.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/apis/web3.rs rename to fendermint/src/eth/api/src/apis/web3.rs diff --git a/fendermint/fendermint/eth/api/src/cache.rs b/fendermint/src/eth/api/src/cache.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/cache.rs rename to fendermint/src/eth/api/src/cache.rs diff --git a/fendermint/fendermint/eth/api/src/conv/from_eth.rs b/fendermint/src/eth/api/src/conv/from_eth.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/conv/from_eth.rs rename to fendermint/src/eth/api/src/conv/from_eth.rs diff --git a/fendermint/fendermint/eth/api/src/conv/from_fvm.rs b/fendermint/src/eth/api/src/conv/from_fvm.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/conv/from_fvm.rs rename to fendermint/src/eth/api/src/conv/from_fvm.rs diff --git a/fendermint/fendermint/eth/api/src/conv/from_tm.rs b/fendermint/src/eth/api/src/conv/from_tm.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/conv/from_tm.rs rename to fendermint/src/eth/api/src/conv/from_tm.rs diff --git a/fendermint/fendermint/eth/api/src/conv/mod.rs b/fendermint/src/eth/api/src/conv/mod.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/conv/mod.rs rename to fendermint/src/eth/api/src/conv/mod.rs diff --git a/fendermint/fendermint/eth/api/src/error.rs b/fendermint/src/eth/api/src/error.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/error.rs rename to fendermint/src/eth/api/src/error.rs diff --git a/fendermint/fendermint/eth/api/src/filters.rs b/fendermint/src/eth/api/src/filters.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/filters.rs rename to fendermint/src/eth/api/src/filters.rs diff --git a/fendermint/fendermint/eth/api/src/gas/mod.rs b/fendermint/src/eth/api/src/gas/mod.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/gas/mod.rs rename to fendermint/src/eth/api/src/gas/mod.rs diff --git a/fendermint/fendermint/eth/api/src/gas/output.rs b/fendermint/src/eth/api/src/gas/output.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/gas/output.rs rename to fendermint/src/eth/api/src/gas/output.rs diff --git a/fendermint/fendermint/eth/api/src/handlers/http.rs b/fendermint/src/eth/api/src/handlers/http.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/handlers/http.rs rename to fendermint/src/eth/api/src/handlers/http.rs diff --git a/fendermint/fendermint/eth/api/src/handlers/mod.rs b/fendermint/src/eth/api/src/handlers/mod.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/handlers/mod.rs rename to fendermint/src/eth/api/src/handlers/mod.rs diff --git a/fendermint/fendermint/eth/api/src/handlers/ws.rs b/fendermint/src/eth/api/src/handlers/ws.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/handlers/ws.rs rename to fendermint/src/eth/api/src/handlers/ws.rs diff --git a/fendermint/fendermint/eth/api/src/lib.rs b/fendermint/src/eth/api/src/lib.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/lib.rs rename to fendermint/src/eth/api/src/lib.rs diff --git a/fendermint/fendermint/eth/api/src/state.rs b/fendermint/src/eth/api/src/state.rs similarity index 100% rename from fendermint/fendermint/eth/api/src/state.rs rename to fendermint/src/eth/api/src/state.rs diff --git a/fendermint/fendermint/eth/hardhat/Cargo.toml b/fendermint/src/eth/hardhat/Cargo.toml similarity index 100% rename from fendermint/fendermint/eth/hardhat/Cargo.toml rename to fendermint/src/eth/hardhat/Cargo.toml diff --git a/fendermint/fendermint/eth/hardhat/src/lib.rs b/fendermint/src/eth/hardhat/src/lib.rs similarity index 100% rename from fendermint/fendermint/eth/hardhat/src/lib.rs rename to fendermint/src/eth/hardhat/src/lib.rs diff --git a/fendermint/fendermint/rocksdb/Cargo.toml b/fendermint/src/rocksdb/Cargo.toml similarity index 100% rename from fendermint/fendermint/rocksdb/Cargo.toml rename to fendermint/src/rocksdb/Cargo.toml diff --git a/fendermint/fendermint/rocksdb/src/blockstore.rs b/fendermint/src/rocksdb/src/blockstore.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/blockstore.rs rename to fendermint/src/rocksdb/src/blockstore.rs diff --git a/fendermint/fendermint/rocksdb/src/kvstore.rs b/fendermint/src/rocksdb/src/kvstore.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/kvstore.rs rename to fendermint/src/rocksdb/src/kvstore.rs diff --git a/fendermint/fendermint/rocksdb/src/lib.rs b/fendermint/src/rocksdb/src/lib.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/lib.rs rename to fendermint/src/rocksdb/src/lib.rs diff --git a/fendermint/fendermint/rocksdb/src/namespaces.rs b/fendermint/src/rocksdb/src/namespaces.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/namespaces.rs rename to fendermint/src/rocksdb/src/namespaces.rs diff --git a/fendermint/fendermint/rocksdb/src/rocks/config.rs b/fendermint/src/rocksdb/src/rocks/config.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/rocks/config.rs rename to fendermint/src/rocksdb/src/rocks/config.rs diff --git a/fendermint/fendermint/rocksdb/src/rocks/error.rs b/fendermint/src/rocksdb/src/rocks/error.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/rocks/error.rs rename to fendermint/src/rocksdb/src/rocks/error.rs diff --git a/fendermint/fendermint/rocksdb/src/rocks/mod.rs b/fendermint/src/rocksdb/src/rocks/mod.rs similarity index 100% rename from fendermint/fendermint/rocksdb/src/rocks/mod.rs rename to fendermint/src/rocksdb/src/rocks/mod.rs diff --git a/fendermint/fendermint/rpc/Cargo.toml b/fendermint/src/rpc/Cargo.toml similarity index 100% rename from fendermint/fendermint/rpc/Cargo.toml rename to fendermint/src/rpc/Cargo.toml diff --git a/fendermint/fendermint/rpc/examples/simplecoin.rs b/fendermint/src/rpc/examples/simplecoin.rs similarity index 100% rename from fendermint/fendermint/rpc/examples/simplecoin.rs rename to fendermint/src/rpc/examples/simplecoin.rs diff --git a/fendermint/fendermint/rpc/src/client.rs b/fendermint/src/rpc/src/client.rs similarity index 100% rename from fendermint/fendermint/rpc/src/client.rs rename to fendermint/src/rpc/src/client.rs diff --git a/fendermint/fendermint/rpc/src/lib.rs b/fendermint/src/rpc/src/lib.rs similarity index 100% rename from fendermint/fendermint/rpc/src/lib.rs rename to fendermint/src/rpc/src/lib.rs diff --git a/fendermint/fendermint/rpc/src/message.rs b/fendermint/src/rpc/src/message.rs similarity index 100% rename from fendermint/fendermint/rpc/src/message.rs rename to fendermint/src/rpc/src/message.rs diff --git a/fendermint/fendermint/rpc/src/query.rs b/fendermint/src/rpc/src/query.rs similarity index 100% rename from fendermint/fendermint/rpc/src/query.rs rename to fendermint/src/rpc/src/query.rs diff --git a/fendermint/fendermint/rpc/src/response.rs b/fendermint/src/rpc/src/response.rs similarity index 100% rename from fendermint/fendermint/rpc/src/response.rs rename to fendermint/src/rpc/src/response.rs diff --git a/fendermint/fendermint/rpc/src/tx.rs b/fendermint/src/rpc/src/tx.rs similarity index 100% rename from fendermint/fendermint/rpc/src/tx.rs rename to fendermint/src/rpc/src/tx.rs diff --git a/fendermint/fendermint/storage/Cargo.toml b/fendermint/src/storage/Cargo.toml similarity index 100% rename from fendermint/fendermint/storage/Cargo.toml rename to fendermint/src/storage/Cargo.toml diff --git a/fendermint/fendermint/storage/src/im.rs b/fendermint/src/storage/src/im.rs similarity index 100% rename from fendermint/fendermint/storage/src/im.rs rename to fendermint/src/storage/src/im.rs diff --git a/fendermint/fendermint/storage/src/lib.rs b/fendermint/src/storage/src/lib.rs similarity index 100% rename from fendermint/fendermint/storage/src/lib.rs rename to fendermint/src/storage/src/lib.rs diff --git a/fendermint/fendermint/storage/src/testing.rs b/fendermint/src/storage/src/testing.rs similarity index 100% rename from fendermint/fendermint/storage/src/testing.rs rename to fendermint/src/storage/src/testing.rs diff --git a/fendermint/fendermint/testing/Cargo.toml b/fendermint/src/testing/Cargo.toml similarity index 100% rename from fendermint/fendermint/testing/Cargo.toml rename to fendermint/src/testing/Cargo.toml diff --git a/fendermint/fendermint/testing/Makefile/ci.env b/fendermint/src/testing/Makefile/ci.env similarity index 100% rename from fendermint/fendermint/testing/Makefile/ci.env rename to fendermint/src/testing/Makefile/ci.env diff --git a/fendermint/fendermint/testing/Makefile/cometbft.toml b/fendermint/src/testing/Makefile/cometbft.toml similarity index 100% rename from fendermint/fendermint/testing/Makefile/cometbft.toml rename to fendermint/src/testing/Makefile/cometbft.toml diff --git a/fendermint/fendermint/testing/Makefile/common.env b/fendermint/src/testing/Makefile/common.env similarity index 100% rename from fendermint/fendermint/testing/Makefile/common.env rename to fendermint/src/testing/Makefile/common.env diff --git a/fendermint/fendermint/testing/Makefile/common.toml b/fendermint/src/testing/Makefile/common.toml similarity index 100% rename from fendermint/fendermint/testing/Makefile/common.toml rename to fendermint/src/testing/Makefile/common.toml diff --git a/fendermint/fendermint/testing/Makefile/docker.toml b/fendermint/src/testing/Makefile/docker.toml similarity index 100% rename from fendermint/fendermint/testing/Makefile/docker.toml rename to fendermint/src/testing/Makefile/docker.toml diff --git a/fendermint/fendermint/testing/Makefile/ethapi.toml b/fendermint/src/testing/Makefile/ethapi.toml similarity index 100% rename from fendermint/fendermint/testing/Makefile/ethapi.toml rename to fendermint/src/testing/Makefile/ethapi.toml diff --git a/fendermint/fendermint/testing/Makefile/fendermint.toml b/fendermint/src/testing/Makefile/fendermint.toml similarity index 100% rename from fendermint/fendermint/testing/Makefile/fendermint.toml rename to fendermint/src/testing/Makefile/fendermint.toml diff --git a/fendermint/fendermint/testing/README.md b/fendermint/src/testing/README.md similarity index 100% rename from fendermint/fendermint/testing/README.md rename to fendermint/src/testing/README.md diff --git a/fendermint/fendermint/testing/contract-test/Cargo.toml b/fendermint/src/testing/contract-test/Cargo.toml similarity index 100% rename from fendermint/fendermint/testing/contract-test/Cargo.toml rename to fendermint/src/testing/contract-test/Cargo.toml diff --git a/fendermint/fendermint/testing/contract-test/src/ipc/mod.rs b/fendermint/src/testing/contract-test/src/ipc/mod.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/src/ipc/mod.rs rename to fendermint/src/testing/contract-test/src/ipc/mod.rs diff --git a/fendermint/fendermint/testing/contract-test/src/ipc/registry.rs b/fendermint/src/testing/contract-test/src/ipc/registry.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/src/ipc/registry.rs rename to fendermint/src/testing/contract-test/src/ipc/registry.rs diff --git a/fendermint/fendermint/testing/contract-test/src/ipc/subnet.rs b/fendermint/src/testing/contract-test/src/ipc/subnet.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/src/ipc/subnet.rs rename to fendermint/src/testing/contract-test/src/ipc/subnet.rs diff --git a/fendermint/fendermint/testing/contract-test/src/lib.rs b/fendermint/src/testing/contract-test/src/lib.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/src/lib.rs rename to fendermint/src/testing/contract-test/src/lib.rs diff --git a/fendermint/fendermint/testing/contract-test/tests/smt_staking.rs b/fendermint/src/testing/contract-test/tests/smt_staking.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/tests/smt_staking.rs rename to fendermint/src/testing/contract-test/tests/smt_staking.rs diff --git a/fendermint/fendermint/testing/contract-test/tests/staking/machine.rs b/fendermint/src/testing/contract-test/tests/staking/machine.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/tests/staking/machine.rs rename to fendermint/src/testing/contract-test/tests/staking/machine.rs diff --git a/fendermint/fendermint/testing/contract-test/tests/staking/mod.rs b/fendermint/src/testing/contract-test/tests/staking/mod.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/tests/staking/mod.rs rename to fendermint/src/testing/contract-test/tests/staking/mod.rs diff --git a/fendermint/fendermint/testing/contract-test/tests/staking/state.rs b/fendermint/src/testing/contract-test/tests/staking/state.rs similarity index 100% rename from fendermint/fendermint/testing/contract-test/tests/staking/state.rs rename to fendermint/src/testing/contract-test/tests/staking/state.rs diff --git a/fendermint/fendermint/testing/smoke-test/.gitignore b/fendermint/src/testing/smoke-test/.gitignore similarity index 100% rename from fendermint/fendermint/testing/smoke-test/.gitignore rename to fendermint/src/testing/smoke-test/.gitignore diff --git a/fendermint/fendermint/testing/smoke-test/Cargo.toml b/fendermint/src/testing/smoke-test/Cargo.toml similarity index 100% rename from fendermint/fendermint/testing/smoke-test/Cargo.toml rename to fendermint/src/testing/smoke-test/Cargo.toml diff --git a/fendermint/fendermint/testing/smoke-test/Makefile.toml b/fendermint/src/testing/smoke-test/Makefile.toml similarity index 100% rename from fendermint/fendermint/testing/smoke-test/Makefile.toml rename to fendermint/src/testing/smoke-test/Makefile.toml diff --git a/fendermint/fendermint/testing/smoke-test/scripts/init.sh b/fendermint/src/testing/smoke-test/scripts/init.sh similarity index 100% rename from fendermint/fendermint/testing/smoke-test/scripts/init.sh rename to fendermint/src/testing/smoke-test/scripts/init.sh diff --git a/fendermint/fendermint/testing/smoke-test/smoke.env b/fendermint/src/testing/smoke-test/smoke.env similarity index 100% rename from fendermint/fendermint/testing/smoke-test/smoke.env rename to fendermint/src/testing/smoke-test/smoke.env diff --git a/fendermint/fendermint/testing/smoke-test/src/lib.rs b/fendermint/src/testing/smoke-test/src/lib.rs similarity index 100% rename from fendermint/fendermint/testing/smoke-test/src/lib.rs rename to fendermint/src/testing/smoke-test/src/lib.rs diff --git a/fendermint/fendermint/testing/src/arb/address.rs b/fendermint/src/testing/src/arb/address.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/address.rs rename to fendermint/src/testing/src/arb/address.rs diff --git a/fendermint/fendermint/testing/src/arb/cid.rs b/fendermint/src/testing/src/arb/cid.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/cid.rs rename to fendermint/src/testing/src/arb/cid.rs diff --git a/fendermint/fendermint/testing/src/arb/message.rs b/fendermint/src/testing/src/arb/message.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/message.rs rename to fendermint/src/testing/src/arb/message.rs diff --git a/fendermint/fendermint/testing/src/arb/mod.rs b/fendermint/src/testing/src/arb/mod.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/mod.rs rename to fendermint/src/testing/src/arb/mod.rs diff --git a/fendermint/fendermint/testing/src/arb/subnetid.rs b/fendermint/src/testing/src/arb/subnetid.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/subnetid.rs rename to fendermint/src/testing/src/arb/subnetid.rs diff --git a/fendermint/fendermint/testing/src/arb/token.rs b/fendermint/src/testing/src/arb/token.rs similarity index 100% rename from fendermint/fendermint/testing/src/arb/token.rs rename to fendermint/src/testing/src/arb/token.rs diff --git a/fendermint/fendermint/testing/src/golden.rs b/fendermint/src/testing/src/golden.rs similarity index 100% rename from fendermint/fendermint/testing/src/golden.rs rename to fendermint/src/testing/src/golden.rs diff --git a/fendermint/fendermint/testing/src/lib.rs b/fendermint/src/testing/src/lib.rs similarity index 100% rename from fendermint/fendermint/testing/src/lib.rs rename to fendermint/src/testing/src/lib.rs diff --git a/fendermint/fendermint/testing/src/smt.rs b/fendermint/src/testing/src/smt.rs similarity index 100% rename from fendermint/fendermint/testing/src/smt.rs rename to fendermint/src/testing/src/smt.rs diff --git a/fendermint/fendermint/vm/actor_interface/Cargo.toml b/fendermint/src/vm/actor_interface/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/actor_interface/Cargo.toml rename to fendermint/src/vm/actor_interface/Cargo.toml diff --git a/fendermint/fendermint/vm/actor_interface/src/account.rs b/fendermint/src/vm/actor_interface/src/account.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/account.rs rename to fendermint/src/vm/actor_interface/src/account.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/burntfunds.rs b/fendermint/src/vm/actor_interface/src/burntfunds.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/burntfunds.rs rename to fendermint/src/vm/actor_interface/src/burntfunds.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/cron.rs b/fendermint/src/vm/actor_interface/src/cron.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/cron.rs rename to fendermint/src/vm/actor_interface/src/cron.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/diamond.rs b/fendermint/src/vm/actor_interface/src/diamond.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/diamond.rs rename to fendermint/src/vm/actor_interface/src/diamond.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/eam.rs b/fendermint/src/vm/actor_interface/src/eam.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/eam.rs rename to fendermint/src/vm/actor_interface/src/eam.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/ethaccount.rs b/fendermint/src/vm/actor_interface/src/ethaccount.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/ethaccount.rs rename to fendermint/src/vm/actor_interface/src/ethaccount.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/evm.rs b/fendermint/src/vm/actor_interface/src/evm.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/evm.rs rename to fendermint/src/vm/actor_interface/src/evm.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/init.rs b/fendermint/src/vm/actor_interface/src/init.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/init.rs rename to fendermint/src/vm/actor_interface/src/init.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/ipc.rs b/fendermint/src/vm/actor_interface/src/ipc.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/ipc.rs rename to fendermint/src/vm/actor_interface/src/ipc.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/lib.rs b/fendermint/src/vm/actor_interface/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/lib.rs rename to fendermint/src/vm/actor_interface/src/lib.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/multisig.rs b/fendermint/src/vm/actor_interface/src/multisig.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/multisig.rs rename to fendermint/src/vm/actor_interface/src/multisig.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/placeholder.rs b/fendermint/src/vm/actor_interface/src/placeholder.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/placeholder.rs rename to fendermint/src/vm/actor_interface/src/placeholder.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/reward.rs b/fendermint/src/vm/actor_interface/src/reward.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/reward.rs rename to fendermint/src/vm/actor_interface/src/reward.rs diff --git a/fendermint/fendermint/vm/actor_interface/src/system.rs b/fendermint/src/vm/actor_interface/src/system.rs similarity index 100% rename from fendermint/fendermint/vm/actor_interface/src/system.rs rename to fendermint/src/vm/actor_interface/src/system.rs diff --git a/fendermint/fendermint/vm/core/Cargo.toml b/fendermint/src/vm/core/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/core/Cargo.toml rename to fendermint/src/vm/core/Cargo.toml diff --git a/fendermint/fendermint/vm/core/src/chainid.rs b/fendermint/src/vm/core/src/chainid.rs similarity index 100% rename from fendermint/fendermint/vm/core/src/chainid.rs rename to fendermint/src/vm/core/src/chainid.rs diff --git a/fendermint/fendermint/vm/core/src/lib.rs b/fendermint/src/vm/core/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/core/src/lib.rs rename to fendermint/src/vm/core/src/lib.rs diff --git a/fendermint/fendermint/vm/core/src/timestamp.rs b/fendermint/src/vm/core/src/timestamp.rs similarity index 100% rename from fendermint/fendermint/vm/core/src/timestamp.rs rename to fendermint/src/vm/core/src/timestamp.rs diff --git a/fendermint/fendermint/vm/encoding/Cargo.toml b/fendermint/src/vm/encoding/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/encoding/Cargo.toml rename to fendermint/src/vm/encoding/Cargo.toml diff --git a/fendermint/fendermint/vm/encoding/src/lib.rs b/fendermint/src/vm/encoding/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/encoding/src/lib.rs rename to fendermint/src/vm/encoding/src/lib.rs diff --git a/fendermint/fendermint/vm/genesis/Cargo.toml b/fendermint/src/vm/genesis/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/genesis/Cargo.toml rename to fendermint/src/vm/genesis/Cargo.toml diff --git a/fendermint/fendermint/vm/genesis/golden/genesis/cbor/genesis.cbor b/fendermint/src/vm/genesis/golden/genesis/cbor/genesis.cbor similarity index 100% rename from fendermint/fendermint/vm/genesis/golden/genesis/cbor/genesis.cbor rename to fendermint/src/vm/genesis/golden/genesis/cbor/genesis.cbor diff --git a/fendermint/fendermint/vm/genesis/golden/genesis/cbor/genesis.txt b/fendermint/src/vm/genesis/golden/genesis/cbor/genesis.txt similarity index 100% rename from fendermint/fendermint/vm/genesis/golden/genesis/cbor/genesis.txt rename to fendermint/src/vm/genesis/golden/genesis/cbor/genesis.txt diff --git a/fendermint/fendermint/vm/genesis/golden/genesis/json/genesis.json b/fendermint/src/vm/genesis/golden/genesis/json/genesis.json similarity index 100% rename from fendermint/fendermint/vm/genesis/golden/genesis/json/genesis.json rename to fendermint/src/vm/genesis/golden/genesis/json/genesis.json diff --git a/fendermint/fendermint/vm/genesis/golden/genesis/json/genesis.txt b/fendermint/src/vm/genesis/golden/genesis/json/genesis.txt similarity index 100% rename from fendermint/fendermint/vm/genesis/golden/genesis/json/genesis.txt rename to fendermint/src/vm/genesis/golden/genesis/json/genesis.txt diff --git a/fendermint/fendermint/vm/genesis/src/arb.rs b/fendermint/src/vm/genesis/src/arb.rs similarity index 100% rename from fendermint/fendermint/vm/genesis/src/arb.rs rename to fendermint/src/vm/genesis/src/arb.rs diff --git a/fendermint/fendermint/vm/genesis/src/lib.rs b/fendermint/src/vm/genesis/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/genesis/src/lib.rs rename to fendermint/src/vm/genesis/src/lib.rs diff --git a/fendermint/fendermint/vm/genesis/tests/golden.rs b/fendermint/src/vm/genesis/tests/golden.rs similarity index 100% rename from fendermint/fendermint/vm/genesis/tests/golden.rs rename to fendermint/src/vm/genesis/tests/golden.rs diff --git a/fendermint/fendermint/vm/interpreter/Cargo.toml b/fendermint/src/vm/interpreter/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/interpreter/Cargo.toml rename to fendermint/src/vm/interpreter/Cargo.toml diff --git a/fendermint/fendermint/vm/interpreter/src/bytes.rs b/fendermint/src/vm/interpreter/src/bytes.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/bytes.rs rename to fendermint/src/vm/interpreter/src/bytes.rs diff --git a/fendermint/fendermint/vm/interpreter/src/chain.rs b/fendermint/src/vm/interpreter/src/chain.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/chain.rs rename to fendermint/src/vm/interpreter/src/chain.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/broadcast.rs b/fendermint/src/vm/interpreter/src/fvm/broadcast.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/broadcast.rs rename to fendermint/src/vm/interpreter/src/fvm/broadcast.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/bundle.rs b/fendermint/src/vm/interpreter/src/fvm/bundle.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/bundle.rs rename to fendermint/src/vm/interpreter/src/fvm/bundle.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/check.rs b/fendermint/src/vm/interpreter/src/fvm/check.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/check.rs rename to fendermint/src/vm/interpreter/src/fvm/check.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/checkpoint.rs b/fendermint/src/vm/interpreter/src/fvm/checkpoint.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/checkpoint.rs rename to fendermint/src/vm/interpreter/src/fvm/checkpoint.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/exec.rs b/fendermint/src/vm/interpreter/src/fvm/exec.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/exec.rs rename to fendermint/src/vm/interpreter/src/fvm/exec.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/externs.rs b/fendermint/src/vm/interpreter/src/fvm/externs.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/externs.rs rename to fendermint/src/vm/interpreter/src/fvm/externs.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/genesis.rs b/fendermint/src/vm/interpreter/src/fvm/genesis.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/genesis.rs rename to fendermint/src/vm/interpreter/src/fvm/genesis.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/mod.rs b/fendermint/src/vm/interpreter/src/fvm/mod.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/mod.rs rename to fendermint/src/vm/interpreter/src/fvm/mod.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/query.rs b/fendermint/src/vm/interpreter/src/fvm/query.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/query.rs rename to fendermint/src/vm/interpreter/src/fvm/query.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/check.rs b/fendermint/src/vm/interpreter/src/fvm/state/check.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/check.rs rename to fendermint/src/vm/interpreter/src/fvm/state/check.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/exec.rs b/fendermint/src/vm/interpreter/src/fvm/state/exec.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/exec.rs rename to fendermint/src/vm/interpreter/src/fvm/state/exec.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/fevm.rs b/fendermint/src/vm/interpreter/src/fvm/state/fevm.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/fevm.rs rename to fendermint/src/vm/interpreter/src/fvm/state/fevm.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/genesis.rs b/fendermint/src/vm/interpreter/src/fvm/state/genesis.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/genesis.rs rename to fendermint/src/vm/interpreter/src/fvm/state/genesis.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/ipc.rs b/fendermint/src/vm/interpreter/src/fvm/state/ipc.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/ipc.rs rename to fendermint/src/vm/interpreter/src/fvm/state/ipc.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/mod.rs b/fendermint/src/vm/interpreter/src/fvm/state/mod.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/mod.rs rename to fendermint/src/vm/interpreter/src/fvm/state/mod.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/query.rs b/fendermint/src/vm/interpreter/src/fvm/state/query.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/query.rs rename to fendermint/src/vm/interpreter/src/fvm/state/query.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/state/snapshot.rs b/fendermint/src/vm/interpreter/src/fvm/state/snapshot.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/state/snapshot.rs rename to fendermint/src/vm/interpreter/src/fvm/state/snapshot.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/store/memory.rs b/fendermint/src/vm/interpreter/src/fvm/store/memory.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/store/memory.rs rename to fendermint/src/vm/interpreter/src/fvm/store/memory.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/store/mod.rs b/fendermint/src/vm/interpreter/src/fvm/store/mod.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/store/mod.rs rename to fendermint/src/vm/interpreter/src/fvm/store/mod.rs diff --git a/fendermint/fendermint/vm/interpreter/src/fvm/topdown.rs b/fendermint/src/vm/interpreter/src/fvm/topdown.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/fvm/topdown.rs rename to fendermint/src/vm/interpreter/src/fvm/topdown.rs diff --git a/fendermint/fendermint/vm/interpreter/src/lib.rs b/fendermint/src/vm/interpreter/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/lib.rs rename to fendermint/src/vm/interpreter/src/lib.rs diff --git a/fendermint/fendermint/vm/interpreter/src/signed.rs b/fendermint/src/vm/interpreter/src/signed.rs similarity index 100% rename from fendermint/fendermint/vm/interpreter/src/signed.rs rename to fendermint/src/vm/interpreter/src/signed.rs diff --git a/fendermint/fendermint/vm/message/Cargo.toml b/fendermint/src/vm/message/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/message/Cargo.toml rename to fendermint/src/vm/message/Cargo.toml diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.cbor b/fendermint/src/vm/message/golden/chain/ipc_bottom_up_exec.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.cbor rename to fendermint/src/vm/message/golden/chain/ipc_bottom_up_exec.cbor diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.txt b/fendermint/src/vm/message/golden/chain/ipc_bottom_up_exec.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_exec.txt rename to fendermint/src/vm/message/golden/chain/ipc_bottom_up_exec.txt diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.cbor b/fendermint/src/vm/message/golden/chain/ipc_bottom_up_resolve.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.cbor rename to fendermint/src/vm/message/golden/chain/ipc_bottom_up_resolve.cbor diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.txt b/fendermint/src/vm/message/golden/chain/ipc_bottom_up_resolve.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_bottom_up_resolve.txt rename to fendermint/src/vm/message/golden/chain/ipc_bottom_up_resolve.txt diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_top_down.cbor b/fendermint/src/vm/message/golden/chain/ipc_top_down.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_top_down.cbor rename to fendermint/src/vm/message/golden/chain/ipc_top_down.cbor diff --git a/fendermint/fendermint/vm/message/golden/chain/ipc_top_down.txt b/fendermint/src/vm/message/golden/chain/ipc_top_down.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/ipc_top_down.txt rename to fendermint/src/vm/message/golden/chain/ipc_top_down.txt diff --git a/fendermint/fendermint/vm/message/golden/chain/signed.cbor b/fendermint/src/vm/message/golden/chain/signed.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/signed.cbor rename to fendermint/src/vm/message/golden/chain/signed.cbor diff --git a/fendermint/fendermint/vm/message/golden/chain/signed.txt b/fendermint/src/vm/message/golden/chain/signed.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/chain/signed.txt rename to fendermint/src/vm/message/golden/chain/signed.txt diff --git a/fendermint/fendermint/vm/message/golden/fvm/message.cbor b/fendermint/src/vm/message/golden/fvm/message.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/fvm/message.cbor rename to fendermint/src/vm/message/golden/fvm/message.cbor diff --git a/fendermint/fendermint/vm/message/golden/fvm/message.cid b/fendermint/src/vm/message/golden/fvm/message.cid similarity index 100% rename from fendermint/fendermint/vm/message/golden/fvm/message.cid rename to fendermint/src/vm/message/golden/fvm/message.cid diff --git a/fendermint/fendermint/vm/message/golden/fvm/message.txt b/fendermint/src/vm/message/golden/fvm/message.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/fvm/message.txt rename to fendermint/src/vm/message/golden/fvm/message.txt diff --git a/fendermint/fendermint/vm/message/golden/query/request/actor_state.cbor b/fendermint/src/vm/message/golden/query/request/actor_state.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/request/actor_state.cbor rename to fendermint/src/vm/message/golden/query/request/actor_state.cbor diff --git a/fendermint/fendermint/vm/message/golden/query/request/actor_state.txt b/fendermint/src/vm/message/golden/query/request/actor_state.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/request/actor_state.txt rename to fendermint/src/vm/message/golden/query/request/actor_state.txt diff --git a/fendermint/fendermint/vm/message/golden/query/request/ipld.cbor b/fendermint/src/vm/message/golden/query/request/ipld.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/request/ipld.cbor rename to fendermint/src/vm/message/golden/query/request/ipld.cbor diff --git a/fendermint/fendermint/vm/message/golden/query/request/ipld.txt b/fendermint/src/vm/message/golden/query/request/ipld.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/request/ipld.txt rename to fendermint/src/vm/message/golden/query/request/ipld.txt diff --git a/fendermint/fendermint/vm/message/golden/query/response/actor_state.cbor b/fendermint/src/vm/message/golden/query/response/actor_state.cbor similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/response/actor_state.cbor rename to fendermint/src/vm/message/golden/query/response/actor_state.cbor diff --git a/fendermint/fendermint/vm/message/golden/query/response/actor_state.txt b/fendermint/src/vm/message/golden/query/response/actor_state.txt similarity index 100% rename from fendermint/fendermint/vm/message/golden/query/response/actor_state.txt rename to fendermint/src/vm/message/golden/query/response/actor_state.txt diff --git a/fendermint/fendermint/vm/message/src/chain.rs b/fendermint/src/vm/message/src/chain.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/chain.rs rename to fendermint/src/vm/message/src/chain.rs diff --git a/fendermint/fendermint/vm/message/src/conv/from_eth.rs b/fendermint/src/vm/message/src/conv/from_eth.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/conv/from_eth.rs rename to fendermint/src/vm/message/src/conv/from_eth.rs diff --git a/fendermint/fendermint/vm/message/src/conv/from_fvm.rs b/fendermint/src/vm/message/src/conv/from_fvm.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/conv/from_fvm.rs rename to fendermint/src/vm/message/src/conv/from_fvm.rs diff --git a/fendermint/fendermint/vm/message/src/conv/mod.rs b/fendermint/src/vm/message/src/conv/mod.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/conv/mod.rs rename to fendermint/src/vm/message/src/conv/mod.rs diff --git a/fendermint/fendermint/vm/message/src/ipc.rs b/fendermint/src/vm/message/src/ipc.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/ipc.rs rename to fendermint/src/vm/message/src/ipc.rs diff --git a/fendermint/fendermint/vm/message/src/lib.rs b/fendermint/src/vm/message/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/lib.rs rename to fendermint/src/vm/message/src/lib.rs diff --git a/fendermint/fendermint/vm/message/src/query.rs b/fendermint/src/vm/message/src/query.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/query.rs rename to fendermint/src/vm/message/src/query.rs diff --git a/fendermint/fendermint/vm/message/src/signed.rs b/fendermint/src/vm/message/src/signed.rs similarity index 100% rename from fendermint/fendermint/vm/message/src/signed.rs rename to fendermint/src/vm/message/src/signed.rs diff --git a/fendermint/fendermint/vm/message/tests/golden.rs b/fendermint/src/vm/message/tests/golden.rs similarity index 100% rename from fendermint/fendermint/vm/message/tests/golden.rs rename to fendermint/src/vm/message/tests/golden.rs diff --git a/fendermint/fendermint/vm/resolver/Cargo.toml b/fendermint/src/vm/resolver/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/resolver/Cargo.toml rename to fendermint/src/vm/resolver/Cargo.toml diff --git a/fendermint/fendermint/vm/resolver/src/ipld.rs b/fendermint/src/vm/resolver/src/ipld.rs similarity index 100% rename from fendermint/fendermint/vm/resolver/src/ipld.rs rename to fendermint/src/vm/resolver/src/ipld.rs diff --git a/fendermint/fendermint/vm/resolver/src/lib.rs b/fendermint/src/vm/resolver/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/resolver/src/lib.rs rename to fendermint/src/vm/resolver/src/lib.rs diff --git a/fendermint/fendermint/vm/resolver/src/pool.rs b/fendermint/src/vm/resolver/src/pool.rs similarity index 100% rename from fendermint/fendermint/vm/resolver/src/pool.rs rename to fendermint/src/vm/resolver/src/pool.rs diff --git a/fendermint/fendermint/vm/snapshot/Cargo.toml b/fendermint/src/vm/snapshot/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/snapshot/Cargo.toml rename to fendermint/src/vm/snapshot/Cargo.toml diff --git a/fendermint/fendermint/vm/snapshot/golden/manifest/cbor/manifest.cbor b/fendermint/src/vm/snapshot/golden/manifest/cbor/manifest.cbor similarity index 100% rename from fendermint/fendermint/vm/snapshot/golden/manifest/cbor/manifest.cbor rename to fendermint/src/vm/snapshot/golden/manifest/cbor/manifest.cbor diff --git a/fendermint/fendermint/vm/snapshot/golden/manifest/cbor/manifest.txt b/fendermint/src/vm/snapshot/golden/manifest/cbor/manifest.txt similarity index 100% rename from fendermint/fendermint/vm/snapshot/golden/manifest/cbor/manifest.txt rename to fendermint/src/vm/snapshot/golden/manifest/cbor/manifest.txt diff --git a/fendermint/fendermint/vm/snapshot/golden/manifest/json/manifest.json b/fendermint/src/vm/snapshot/golden/manifest/json/manifest.json similarity index 100% rename from fendermint/fendermint/vm/snapshot/golden/manifest/json/manifest.json rename to fendermint/src/vm/snapshot/golden/manifest/json/manifest.json diff --git a/fendermint/fendermint/vm/snapshot/golden/manifest/json/manifest.txt b/fendermint/src/vm/snapshot/golden/manifest/json/manifest.txt similarity index 100% rename from fendermint/fendermint/vm/snapshot/golden/manifest/json/manifest.txt rename to fendermint/src/vm/snapshot/golden/manifest/json/manifest.txt diff --git a/fendermint/fendermint/vm/snapshot/src/car/chunker.rs b/fendermint/src/vm/snapshot/src/car/chunker.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/car/chunker.rs rename to fendermint/src/vm/snapshot/src/car/chunker.rs diff --git a/fendermint/fendermint/vm/snapshot/src/car/mod.rs b/fendermint/src/vm/snapshot/src/car/mod.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/car/mod.rs rename to fendermint/src/vm/snapshot/src/car/mod.rs diff --git a/fendermint/fendermint/vm/snapshot/src/car/streamer.rs b/fendermint/src/vm/snapshot/src/car/streamer.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/car/streamer.rs rename to fendermint/src/vm/snapshot/src/car/streamer.rs diff --git a/fendermint/fendermint/vm/snapshot/src/client.rs b/fendermint/src/vm/snapshot/src/client.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/client.rs rename to fendermint/src/vm/snapshot/src/client.rs diff --git a/fendermint/fendermint/vm/snapshot/src/error.rs b/fendermint/src/vm/snapshot/src/error.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/error.rs rename to fendermint/src/vm/snapshot/src/error.rs diff --git a/fendermint/fendermint/vm/snapshot/src/lib.rs b/fendermint/src/vm/snapshot/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/lib.rs rename to fendermint/src/vm/snapshot/src/lib.rs diff --git a/fendermint/fendermint/vm/snapshot/src/manager.rs b/fendermint/src/vm/snapshot/src/manager.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/manager.rs rename to fendermint/src/vm/snapshot/src/manager.rs diff --git a/fendermint/fendermint/vm/snapshot/src/manifest.rs b/fendermint/src/vm/snapshot/src/manifest.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/manifest.rs rename to fendermint/src/vm/snapshot/src/manifest.rs diff --git a/fendermint/fendermint/vm/snapshot/src/state.rs b/fendermint/src/vm/snapshot/src/state.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/src/state.rs rename to fendermint/src/vm/snapshot/src/state.rs diff --git a/fendermint/fendermint/vm/snapshot/tests/golden.rs b/fendermint/src/vm/snapshot/tests/golden.rs similarity index 100% rename from fendermint/fendermint/vm/snapshot/tests/golden.rs rename to fendermint/src/vm/snapshot/tests/golden.rs diff --git a/fendermint/fendermint/vm/topdown/Cargo.toml b/fendermint/src/vm/topdown/Cargo.toml similarity index 100% rename from fendermint/fendermint/vm/topdown/Cargo.toml rename to fendermint/src/vm/topdown/Cargo.toml diff --git a/fendermint/fendermint/vm/topdown/src/cache.rs b/fendermint/src/vm/topdown/src/cache.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/cache.rs rename to fendermint/src/vm/topdown/src/cache.rs diff --git a/fendermint/fendermint/vm/topdown/src/convert.rs b/fendermint/src/vm/topdown/src/convert.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/convert.rs rename to fendermint/src/vm/topdown/src/convert.rs diff --git a/fendermint/fendermint/vm/topdown/src/error.rs b/fendermint/src/vm/topdown/src/error.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/error.rs rename to fendermint/src/vm/topdown/src/error.rs diff --git a/fendermint/fendermint/vm/topdown/src/finality/fetch.rs b/fendermint/src/vm/topdown/src/finality/fetch.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/finality/fetch.rs rename to fendermint/src/vm/topdown/src/finality/fetch.rs diff --git a/fendermint/fendermint/vm/topdown/src/finality/mod.rs b/fendermint/src/vm/topdown/src/finality/mod.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/finality/mod.rs rename to fendermint/src/vm/topdown/src/finality/mod.rs diff --git a/fendermint/fendermint/vm/topdown/src/finality/null.rs b/fendermint/src/vm/topdown/src/finality/null.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/finality/null.rs rename to fendermint/src/vm/topdown/src/finality/null.rs diff --git a/fendermint/fendermint/vm/topdown/src/lib.rs b/fendermint/src/vm/topdown/src/lib.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/lib.rs rename to fendermint/src/vm/topdown/src/lib.rs diff --git a/fendermint/fendermint/vm/topdown/src/proxy.rs b/fendermint/src/vm/topdown/src/proxy.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/proxy.rs rename to fendermint/src/vm/topdown/src/proxy.rs diff --git a/fendermint/fendermint/vm/topdown/src/sync/mod.rs b/fendermint/src/vm/topdown/src/sync/mod.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/sync/mod.rs rename to fendermint/src/vm/topdown/src/sync/mod.rs diff --git a/fendermint/fendermint/vm/topdown/src/sync/pointers.rs b/fendermint/src/vm/topdown/src/sync/pointers.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/sync/pointers.rs rename to fendermint/src/vm/topdown/src/sync/pointers.rs diff --git a/fendermint/fendermint/vm/topdown/src/sync/syncer.rs b/fendermint/src/vm/topdown/src/sync/syncer.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/sync/syncer.rs rename to fendermint/src/vm/topdown/src/sync/syncer.rs diff --git a/fendermint/fendermint/vm/topdown/src/sync/tendermint.rs b/fendermint/src/vm/topdown/src/sync/tendermint.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/sync/tendermint.rs rename to fendermint/src/vm/topdown/src/sync/tendermint.rs diff --git a/fendermint/fendermint/vm/topdown/src/toggle.rs b/fendermint/src/vm/topdown/src/toggle.rs similarity index 100% rename from fendermint/fendermint/vm/topdown/src/toggle.rs rename to fendermint/src/vm/topdown/src/toggle.rs diff --git a/fvm-utils/.github/pull_request_template.md b/fvm-utils/.github/pull_request_template.md deleted file mode 100644 index 7eb6a0410..000000000 --- a/fvm-utils/.github/pull_request_template.md +++ /dev/null @@ -1,35 +0,0 @@ -## Changes - - - -- -- -- - -## Tests - - - -``` - -``` - -## Issues - - - -- diff --git a/fvm-utils/.github/workflows/tests.yml b/fvm-utils/.github/workflows/tests.yml deleted file mode 100644 index f35860570..000000000 --- a/fvm-utils/.github/workflows/tests.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Tests - -on: - push: - branches: - - "main" - pull_request: - branches: - - '**' - -jobs: - test: - name: Test Suite - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: wasm32-unknown-unknown - toolchain: nightly-2022-10-03 - override: true - - run: cargo b --all --release - - run: cargo t --all --release - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: wasm32-unknown-unknown - toolchain: stable - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: wasm32-unknown-unknown - toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings diff --git a/fvm-utils/.gitignore b/fvm-utils/.gitignore deleted file mode 100644 index df4996576..000000000 --- a/fvm-utils/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -/Cargo.lock -.idea \ No newline at end of file diff --git a/fvm-utils/Cargo.toml b/fvm-utils/Cargo.toml deleted file mode 100644 index dc5d9edb3..000000000 --- a/fvm-utils/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "fvm-utils" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -fil_actors_runtime = { path = "./runtime", features = ["test_utils", "fil-actor"] } -primitives = { path = "primitives" } - -[workspace] -members = [ - "runtime", - "primitives", - "example", -] diff --git a/fvm-utils/README.md b/fvm-utils/README.md deleted file mode 100644 index 921b357de..000000000 --- a/fvm-utils/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# fvm-utils -This repo contains a series of crates that serve as utils for fvm development and testing. -Here are some simple breakdowns: -- runtime: Contains the runtime wrapper for communicating with `fvm`. It provides some -handy utility functions such as `transaction` and `verification`. -- primitives: Contains typed version of `fvm` primitives such as `cid` and `hamt`. -- example: Contains a sample user defined actor using `runtime` and `primitive` crate which -one can deploy to `fvm` as wasm binary. - -For more details, please refer to each crate's `README.md`. \ No newline at end of file diff --git a/fvm-utils/example/Cargo.toml b/fvm-utils/example/Cargo.toml deleted file mode 100644 index 5b7422c07..000000000 --- a/fvm-utils/example/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -edition = "2021" -name = "fil_actor_example" -version = "0.1.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -fil_actors_runtime = {path = "../runtime", features = ["test_utils", "fil-actor"]} -primitives = {path = "../primitives"} - -frc42_dispatch = "3.2.0" -fvm_ipld_blockstore = "0.1.1" -fvm_ipld_encoding = "0.3.3" -fvm_ipld_hamt = "0.5.1" -fvm_shared = {version = "=3.2.0", default-features = false} - -anyhow = "1.0.56" -cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]} -log = "0.4.14" -num-derive = "0.3.3" -num-traits = "0.2.14" -serde = {version = "1.0.136", features = ["derive"]} - -[dev-dependencies] -base64 = "0.13.0" -blake2b_simd = "1.0.0" -libsecp256k1 = {version = "0.7"} -num-traits = "0.2" -rand = "0.8" -rand_chacha = "0.3" -wabt = "0.10.0" -wasmtime = "0.35.2" - -[build-dependencies] -wasm-builder = "3.0.1" -wasmtime = "0.35.2" diff --git a/fvm-utils/example/README.md b/fvm-utils/example/README.md deleted file mode 100644 index 242d66dbb..000000000 --- a/fvm-utils/example/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# fil-actor-example -Sample fvm actor based on `fvm-utils`. To create your own user defined actor, define -`Actor` that implements `ActorCode` trait. At the same time, you can create the wasm -entrypoint with the following short cut: -```rust -#[no_mangle] -pub fn invoke(param: u32) -> u32 { - runtime::fvm::trampoline::(param) -} -``` -See `src/lib.rs` for more details. - -## Build -To compile: -```shell -cargo build -``` -You should be able to see the `fil_actor_example.compact.wasm` compiled generated. - -Set up a local fvm according to this [tutorial](https://lotus.filecoin.io/lotus/developers/local-network/). - -## Test -To trigger unit tests, perform the following: -```shell -cargo test -``` \ No newline at end of file diff --git a/fvm-utils/example/build.rs b/fvm-utils/example/build.rs deleted file mode 100644 index 0f2aa8a56..000000000 --- a/fvm-utils/example/build.rs +++ /dev/null @@ -1,12 +0,0 @@ -fn main() { - use wasm_builder::WasmBuilder; - WasmBuilder::new() - .with_current_project() - .import_memory() - .append_to_rust_flags("-Ctarget-feature=+crt-static") - .append_to_rust_flags("-Cpanic=abort") - .append_to_rust_flags("-Coverflow-checks=true") - .append_to_rust_flags("-Clto=true") - .append_to_rust_flags("-Copt-level=z") - .build() -} diff --git a/fvm-utils/example/src/lib.rs b/fvm-utils/example/src/lib.rs deleted file mode 100644 index 0723d0aa8..000000000 --- a/fvm-utils/example/src/lib.rs +++ /dev/null @@ -1,124 +0,0 @@ -mod state; - -use crate::state::{State, UserPersistParam}; -use fil_actors_runtime::runtime::{ActorCode, Runtime}; -use fil_actors_runtime::{ - actor_dispatch, actor_error, restrict_internal_api, runtime, ActorDowncast, ActorError, - INIT_ACTOR_ADDR, -}; -use fvm_shared::error::ExitCode; -use fvm_shared::{MethodNum, METHOD_CONSTRUCTOR}; -use num_derive::FromPrimitive; -use num_traits::FromPrimitive; - -#[no_mangle] -pub fn invoke(param: u32) -> u32 { - runtime::fvm::trampoline::(param) -} - -/// SCA actor methods available -#[derive(FromPrimitive)] -#[repr(u64)] -pub enum Method { - /// Constructor for Storage Power Actor - Constructor = METHOD_CONSTRUCTOR, - Persist = frc42_dispatch::method_hash!("Persist"), -} - -pub struct Actor; - -impl Actor { - /// Constructor for SCA actor - fn constructor(rt: &mut impl Runtime) -> Result<(), ActorError> { - rt.validate_immediate_caller_is(std::iter::once(&INIT_ACTOR_ADDR))?; - let st = State::new(rt.store()).map_err(|e| { - e.downcast_default(ExitCode::USR_ILLEGAL_STATE, "Failed to create actor state") - })?; - rt.create(&st)?; - Ok(()) - } - - /// Persists some bytes to storage - fn persist(rt: &mut impl Runtime, param: UserPersistParam) -> Result<(), ActorError> { - let caller = rt.message().caller(); - - rt.validate_immediate_caller_accept_any()?; - - rt.transaction(|st: &mut State, rt| { - st.upsert_user(&caller, param.name, rt.store()) - .map_err(|e| { - e.downcast_default( - ExitCode::USR_ILLEGAL_STATE, - "Failed to create SCA actor state", - ) - })?; - Ok(()) - })?; - - Ok(()) - } -} - -impl ActorCode for Actor { - type Methods = Method; - actor_dispatch! { - Constructor => constructor, - Persist => persist, - } -} - -#[cfg(test)] -mod test { - use crate::{Actor, Method, State, UserPersistParam}; - use fil_actors_runtime::test_utils::{MockRuntime, INIT_ACTOR_CODE_ID}; - use fil_actors_runtime::INIT_ACTOR_ADDR; - use fvm_ipld_encoding::ipld_block::IpldBlock; - use fvm_shared::address::Address; - use fvm_shared::MethodNum; - - #[test] - fn constructor_works() { - let mut rt = new_runtime(); - - rt.set_caller(*INIT_ACTOR_CODE_ID, INIT_ACTOR_ADDR); - rt.expect_validate_caller_addr(vec![INIT_ACTOR_ADDR]); - - rt.call::(Method::Constructor as MethodNum, None) - .unwrap(); - - rt.verify() - } - - #[test] - fn persists_works() { - let mut rt = new_runtime(); - - rt.set_caller(*INIT_ACTOR_CODE_ID, INIT_ACTOR_ADDR); - rt.expect_validate_caller_addr(vec![INIT_ACTOR_ADDR]); - - rt.call::(Method::Constructor as MethodNum, None) - .unwrap(); - - rt.expect_validate_caller_any(); - rt.call::( - Method::Persist as MethodNum, - IpldBlock::serialize_cbor(&UserPersistParam { - name: String::from("sample"), - }) - .unwrap(), - ) - .unwrap(); - - rt.verify(); - let state: State = rt.get_state(); - assert_eq!(state.call_count, 1); - } - - fn new_runtime() -> MockRuntime { - MockRuntime { - receiver: Address::new_id(1), - caller: INIT_ACTOR_ADDR, - ..Default::default() - } - } -} diff --git a/fvm-utils/example/src/state.rs b/fvm-utils/example/src/state.rs deleted file mode 100644 index ab736898f..000000000 --- a/fvm-utils/example/src/state.rs +++ /dev/null @@ -1,57 +0,0 @@ -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_hamt::BytesKey; -use fvm_shared::address::Address; -use primitives::{TCid, THamt}; -use serde::{Deserialize, Serialize}; - -/// Sample struct for user persistence -#[derive(Serialize, Deserialize)] -pub struct UserPersistParam { - pub name: String, -} - -/// User data storage struct -#[derive(Serialize, Deserialize, PartialEq, Eq, Clone)] -pub struct User { - pub name: String, - pub owner: Address, -} - -/// The state storage struct, persisted in BlockStore -#[derive(Serialize, Deserialize)] -pub struct State { - pub call_count: usize, - pub typed_hamt: TCid>, -} - -impl State { - pub fn new(store: &BS) -> anyhow::Result { - Ok(State { - call_count: 0, - typed_hamt: TCid::new_hamt(store)?, - }) - } - - pub fn upsert_user( - &mut self, - address: &Address, - name: String, - store: &BS, - ) -> anyhow::Result<()> { - let key = BytesKey::from(address.to_bytes()); - let mut hamt = self.typed_hamt.load(store)?; - hamt.set( - key, - User { - owner: *address, - name, - }, - )?; - - self.call_count += 1; - self.typed_hamt.flush(hamt)?; - - Ok(()) - } -} diff --git a/fvm-utils/primitives/Cargo.toml b/fvm-utils/primitives/Cargo.toml deleted file mode 100644 index a6524f530..000000000 --- a/fvm-utils/primitives/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -description = "The primitive types for fvm" -edition = "2021" -name = "primitives" -version = "0.1.0" - -[dependencies] -fil_actors_runtime = {path = "../runtime", features = ["fil-actor"]} -fvm_ipld_blockstore = "0.1.1" -fvm_ipld_encoding = "0.3.3" -fvm_ipld_hamt = "0.5.1" -fvm_shared = {version = "=3.2.0", default-features = false} - -anyhow = "1.0.56" -cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]} -hex = "0.4.3" -indexmap = {version = "1.8.0", features = ["serde-1"]} -integer-encoding = {version = "3.0.3", default-features = false} -lazy_static = "1.4.0" -log = "0.4.14" -num-derive = "0.3.3" -num-traits = "0.2.14" -serde = {version = "1.0.136", features = ["derive"]} -uint = {version = "0.9.3", default-features = false} diff --git a/fvm-utils/runtime/Cargo.toml b/fvm-utils/runtime/Cargo.toml deleted file mode 100644 index ee24887f8..000000000 --- a/fvm-utils/runtime/Cargo.toml +++ /dev/null @@ -1,84 +0,0 @@ -[package] -authors = ["ChainSafe Systems ", "Protocol Labs", "Filecoin Core Devs"] -description = "System actors for the Filecoin protocol" -edition = "2021" -license = "MIT OR Apache-2.0" -name = "fil_actors_runtime" -repository = "https://github.com/filecoin-project/builtin-actors" -version = "0.0.1" - -[dependencies] -base64 = "0.13.0" -byteorder = "1.4.3" -castaway = "0.2.2" -cid = {version = "0.8.3", default-features = false, features = ["serde-codec"]} -frc42_dispatch = "3.0.0" -fvm_ipld_amt = {version = "0.4.2", features = ["go-interop"]} -fvm_ipld_hamt = "0.5.1" -fvm_shared = {version = "=3.2.0", default-features = false} -indexmap = {version = "1.8.0", features = ["serde-1"]} -integer-encoding = {version = "3.0.3", default-features = false} -lazy_static = "1.4.0" -log = "0.4.14" -num-derive = "0.3.3" -num-traits = "0.2.14" -serde = {version = "1.0.136", features = ["derive"]} -thiserror = "1.0.30" -unsigned-varint = "0.7.1" -# enforce wasm compat -anyhow = "1.0.56" -blake2b_simd = "1.0" -fvm_ipld_blockstore = "0.1.1" -fvm_ipld_encoding = "0.3.3" -fvm_sdk = {version = "=3.2.0", optional = true} -getrandom = {version = "0.2.3", features = ["js"]} -hex = {version = "0.4.3", optional = true} -itertools = "0.10" -multihash = {version = "0.16.1", default-features = false} -paste = "1.0.9" -rand = "0.7.3" -regex = "1" -serde_repr = "0.1.8" -serde_tuple = "0.5.0" - -[dependencies.sha2] -version = "0.10" - -[dev-dependencies] -derive_builder = "0.10.2" -hex = "0.4.3" - -[features] -default = [] -fil-actor = ["fvm_sdk"] - -# Enable 2k sectors -sector-2k = [] -# Enable 8m sectors -sector-8m = [] -# Enable 512m sectors -sector-512m = [] -# Enable 32g sectors -sector-32g = [] -# Enable 64g sectors -sector-64g = [] -# Enable the "default" sectors types. -sector-default = ["sector-64g", "sector-32g"] - -# Reduce min verified deal size from 1MiB to 256B -small-deals = [] -# Reduce pre-commit delay from 150 epochs, to 10. -short-precommit = [] - -# Lower the minimum power requirement to 2k -min-power-2k = [] -# Lower the minimum power requirement to 2g -min-power-2g = [] - -# no collateral for deals (for testing) -no-provider-deal-collateral = [] - -# fake proofs (for testing) -fake-proofs = [] - -test_utils = ["hex", "multihash/sha2"] diff --git a/fvm-utils/runtime/README.md b/fvm-utils/runtime/README.md deleted file mode 100644 index 9c96a4340..000000000 --- a/fvm-utils/runtime/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Runtime -This crate contains the `runtime` wrapper for `fvm`. It provides a wrapper around low level -`fvm` calls, providing functions such as transactions and verifications. \ No newline at end of file diff --git a/fvm-utils/runtime/src/actor_error.rs b/fvm-utils/runtime/src/actor_error.rs deleted file mode 100644 index 3a196c17e..000000000 --- a/fvm-utils/runtime/src/actor_error.rs +++ /dev/null @@ -1,346 +0,0 @@ -use fvm_ipld_encoding::de::DeserializeOwned; -use fvm_ipld_encoding::ipld_block::IpldBlock; -use std::fmt::Display; - -use fvm_shared::error::ExitCode; -use thiserror::Error; - -/// The error type returned by actor method calls. -#[derive(Error, Debug, Clone, PartialEq, Eq)] -#[error("ActorError(exit_code: {exit_code:?}, msg: {msg})")] -pub struct ActorError { - /// The exit code for this invocation. - /// Codes less than `FIRST_USER_EXIT_CODE` are prohibited and will be overwritten by the VM. - exit_code: ExitCode, - /// Optional exit data - data: Option, - /// Message for debugging purposes, - msg: String, -} - -impl ActorError { - /// Creates a new ActorError. This method does not check that the code is in the - /// range of valid actor abort codes. - pub fn unchecked(code: ExitCode, msg: String) -> Self { - Self { - exit_code: code, - msg, - data: None, - } - } - - pub fn unchecked_with_data(code: ExitCode, msg: String, data: Option) -> Self { - Self { - exit_code: code, - msg, - data, - } - } - - /// Creates a new ActorError. This method checks if the exit code is within the allowed range, - /// and automatically converts it into a user code. - pub fn checked(code: ExitCode, msg: String, data: Option) -> Self { - let exit_code = match code { - // This means the called actor did something wrong. We can't "make up" a - // reasonable exit code. - ExitCode::SYS_MISSING_RETURN - | ExitCode::SYS_ILLEGAL_INSTRUCTION - | ExitCode::SYS_ILLEGAL_EXIT_CODE => ExitCode::USR_UNSPECIFIED, - // We don't expect any other system errors. - code if code.is_system_error() => ExitCode::USR_ASSERTION_FAILED, - // Otherwise, pass it through. - code => code, - }; - Self { - exit_code, - msg, - data, - } - } - - pub fn illegal_argument(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_ILLEGAL_ARGUMENT, - msg, - data: None, - } - } - pub fn not_found(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_NOT_FOUND, - msg, - data: None, - } - } - pub fn forbidden(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_FORBIDDEN, - msg, - data: None, - } - } - pub fn insufficient_funds(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_INSUFFICIENT_FUNDS, - msg, - data: None, - } - } - pub fn illegal_state(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_ILLEGAL_STATE, - msg, - data: None, - } - } - pub fn serialization(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_SERIALIZATION, - msg, - data: None, - } - } - pub fn unhandled_message(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_UNHANDLED_MESSAGE, - msg, - data: None, - } - } - pub fn unspecified(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_UNSPECIFIED, - msg, - data: None, - } - } - pub fn assertion_failed(msg: String) -> Self { - Self { - exit_code: ExitCode::USR_ASSERTION_FAILED, - msg, - data: None, - } - } - - /// Returns the exit code of the error. - pub fn exit_code(&self) -> ExitCode { - self.exit_code - } - - /// Error message of the actor error. - pub fn msg(&self) -> &str { - &self.msg - } - - /// Extracts the optional associated data without copying. - pub fn take_data(&mut self) -> Option { - std::mem::take(&mut self.data) - } - - /// Prefix error message with a string message. - pub fn wrap(mut self, msg: impl AsRef) -> Self { - self.msg = format!("{}: {}", msg.as_ref(), self.msg); - self - } -} - -/// Converts a raw encoding error into an ErrSerialization. -impl From for ActorError { - fn from(e: fvm_ipld_encoding::Error) -> Self { - Self { - exit_code: ExitCode::USR_SERIALIZATION, - msg: e.to_string(), - data: None, - } - } -} - -/// Converts an actor deletion error into an actor error with the appropriate exit code. This -/// facilitates propagation. -#[cfg(feature = "fil-actor")] -impl From for ActorError { - fn from(e: fvm_sdk::error::ActorDeleteError) -> Self { - Self { - exit_code: ExitCode::USR_ILLEGAL_ARGUMENT, - msg: e.to_string(), - data: None, - } - } -} - -/// Converts a state-read error into an an actor error with the appropriate exit code (illegal actor). -/// This facilitates propagation. -#[cfg(feature = "fil-actor")] -impl From for ActorError { - fn from(e: fvm_sdk::error::StateReadError) -> Self { - Self { - exit_code: ExitCode::USR_ILLEGAL_STATE, - data: None, - msg: e.to_string(), - } - } -} - -/// Converts a state update error into an an actor error with the appropriate exit code. -/// This facilitates propagation. -#[cfg(feature = "fil-actor")] -impl From for ActorError { - fn from(e: fvm_sdk::error::StateUpdateError) -> Self { - Self { - exit_code: match e { - fvm_sdk::error::StateUpdateError::ActorDeleted => ExitCode::USR_ILLEGAL_STATE, - fvm_sdk::error::StateUpdateError::ReadOnly => ExitCode::USR_READ_ONLY, - }, - data: None, - msg: e.to_string(), - } - } -} - -/// Convenience macro for generating Actor Errors -#[macro_export] -macro_rules! actor_error { - // Error with only one stringable expression - ( $code:ident; $msg:expr ) => { $crate::ActorError::$code($msg.to_string()) }; - - // String with positional arguments - ( $code:ident; $msg:literal $(, $ex:expr)+ ) => { - $crate::ActorError::$code(format!($msg, $($ex,)*)) - }; - - // Error with only one stringable expression, with comma separator - ( $code:ident, $msg:expr ) => { $crate::actor_error!($code; $msg) }; - - // String with positional arguments, with comma separator - ( $code:ident, $msg:literal $(, $ex:expr)+ ) => { - $crate::actor_error!($code; $msg $(, $ex)*) - }; -} - -// Adds context to an actor error's descriptive message. -pub trait ActorContext { - fn context(self, context: C) -> Result - where - C: Display + 'static; - - fn with_context(self, f: F) -> Result - where - C: Display + 'static, - F: FnOnce() -> C; -} - -impl ActorContext for Result { - fn context(self, context: C) -> Result - where - C: Display + 'static, - { - self.map_err(|mut err| { - err.msg = format!("{}: {}", context, err.msg); - err - }) - } - - fn with_context(self, f: F) -> Result - where - C: Display + 'static, - F: FnOnce() -> C, - { - self.map_err(|mut err| { - err.msg = format!("{}: {}", f(), err.msg); - err - }) - } -} - -// Adapts a target into an actor error. -pub trait AsActorError: Sized { - fn exit_code(self, code: ExitCode) -> Result; - - fn context_code(self, code: ExitCode, context: C) -> Result - where - C: Display + 'static; - - fn with_context_code(self, code: ExitCode, f: F) -> Result - where - C: Display + 'static, - F: FnOnce() -> C; -} - -// Note: E should be std::error::Error, revert to this after anyhow:Error is no longer used. -impl AsActorError for Result { - fn exit_code(self, code: ExitCode) -> Result { - self.map_err(|err| ActorError { - exit_code: code, - msg: err.to_string(), - data: None, - }) - } - - fn context_code(self, code: ExitCode, context: C) -> Result - where - C: Display + 'static, - { - self.map_err(|err| ActorError { - exit_code: code, - msg: format!("{context}: {err}"), - data: None, - }) - } - - fn with_context_code(self, code: ExitCode, f: F) -> Result - where - C: Display + 'static, - F: FnOnce() -> C, - { - self.map_err(|err| ActorError { - exit_code: code, - msg: format!("{}: {}", f(), err), - data: None, - }) - } -} - -impl AsActorError for Option { - fn exit_code(self, code: ExitCode) -> Result { - self.ok_or_else(|| ActorError { - exit_code: code, - msg: "None".to_string(), - data: None, - }) - } - - fn context_code(self, code: ExitCode, context: C) -> Result - where - C: Display + 'static, - { - self.ok_or_else(|| ActorError { - exit_code: code, - msg: context.to_string(), - data: None, - }) - } - - fn with_context_code(self, code: ExitCode, f: F) -> Result - where - C: Display + 'static, - F: FnOnce() -> C, - { - self.ok_or_else(|| ActorError { - exit_code: code, - msg: f().to_string(), - data: None, - }) - } -} - -pub fn deserialize_block(ret: Option) -> Result -where - T: DeserializeOwned, -{ - ret.context_code( - ExitCode::USR_ASSERTION_FAILED, - "return expected".to_string(), - )? - .deserialize() - .exit_code(ExitCode::USR_SERIALIZATION) -} diff --git a/fvm-utils/runtime/src/builtin/mod.rs b/fvm-utils/runtime/src/builtin/mod.rs deleted file mode 100644 index aa671256b..000000000 --- a/fvm-utils/runtime/src/builtin/mod.rs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -pub use self::network::*; -pub use self::shared::*; -pub use self::singletons::*; -use num_derive::FromPrimitive; - -pub mod network; -pub mod shared; -pub mod singletons; -pub mod types; - -pub const CALLER_TYPES_SIGNABLE: &[Type] = &[Type::Account, Type::Multisig]; - -/// Identifies the builtin actor types for usage with the -/// actor::resolve_builtin_actor_type syscall. -/// Note that there is a mirror of this enum in the FVM SDK src/actors/builtins.rs. -/// These must be kept in sync for the syscall to work correctly, without either side -/// importing the other. -#[derive(PartialEq, Eq, Clone, Copy, PartialOrd, Ord, FromPrimitive, Debug)] -#[repr(i32)] -pub enum Type { - System = 1, - Init = 2, - Cron = 3, - Account = 4, - Power = 5, - Miner = 6, - Market = 7, - PaymentChannel = 8, - Multisig = 9, - Reward = 10, - VerifiedRegistry = 11, - DataCap = 12, -} - -impl Type { - pub fn from_i32(u: i32) -> Self { - match u { - 1 => Type::System, - 2 => Type::Init, - 3 => Type::Cron, - 4 => Type::Account, - 5 => Type::Power, - 6 => Type::Miner, - 7 => Type::Market, - 8 => Type::PaymentChannel, - 9 => Type::Multisig, - 10 => Type::Reward, - 11 => Type::VerifiedRegistry, - _ => Type::DataCap, - } - } - - pub fn name(&self) -> &'static str { - match *self { - Type::System => "system", - Type::Init => "init", - Type::Cron => "cron", - Type::Account => "account", - Type::Power => "storagepower", - Type::Miner => "storageminer", - Type::Market => "storagemarket", - Type::PaymentChannel => "paymentchannel", - Type::Multisig => "multisig", - Type::Reward => "reward", - Type::VerifiedRegistry => "verifiedregistry", - Type::DataCap => "datacap", - } - } -} diff --git a/fvm-utils/runtime/src/builtin/network.rs b/fvm-utils/runtime/src/builtin/network.rs deleted file mode 100644 index 13a0df1d1..000000000 --- a/fvm-utils/runtime/src/builtin/network.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fvm_shared::clock::EPOCH_DURATION_SECONDS; -pub use fvm_shared::BLOCKS_PER_EPOCH as EXPECTED_LEADERS_PER_EPOCH; - -pub const SECONDS_IN_HOUR: i64 = 3600; -pub const SECONDS_IN_DAY: i64 = 86400; -pub const SECONDS_IN_YEAR: i64 = 31556925; -pub const EPOCHS_IN_HOUR: i64 = SECONDS_IN_HOUR / EPOCH_DURATION_SECONDS; -pub const EPOCHS_IN_DAY: i64 = SECONDS_IN_DAY / EPOCH_DURATION_SECONDS; -pub const EPOCHS_IN_YEAR: i64 = SECONDS_IN_YEAR / EPOCH_DURATION_SECONDS; - -// 1 NanoFIL -pub const ONE_NANO_FIL: u64 = 10u64.pow(9); diff --git a/fvm-utils/runtime/src/builtin/shared.rs b/fvm-utils/runtime/src/builtin/shared.rs deleted file mode 100644 index dba7ebbc5..000000000 --- a/fvm-utils/runtime/src/builtin/shared.rs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fvm_shared::address::Address; -use fvm_shared::{MethodNum, METHOD_SEND}; - -use crate::runtime::Runtime; -use crate::{actor_error, ActorError}; - -pub const HAMT_BIT_WIDTH: u32 = 5; - -/// ResolveToIDAddr resolves the given address to it's ID address form. -/// If an ID address for the given address dosen't exist yet, it tries to create one by sending -/// a zero balance to the given address. -pub fn resolve_to_id_addr(rt: &mut impl Runtime, address: &Address) -> anyhow::Result
{ - // if we are able to resolve it to an ID address, return the resolved address - if let Some(addr) = rt.resolve_address(address) { - return Ok(addr); - } - - // send 0 balance to the account so an ID address for it is created and then try to resolve - rt.send(address, METHOD_SEND, Default::default(), Default::default()) - .map_err(|e| e.wrap(format!("failed to send zero balance to address {address}",)))?; - - rt.resolve_address(address).ok_or_else(|| { - anyhow::anyhow!( - "failed to resolve address {} to ID address even after sending zero balance", - address, - ) - }) -} - -// The lowest FRC-42 method number. -pub const FIRST_EXPORTED_METHOD_NUMBER: MethodNum = 1 << 24; - -// Checks whether the caller is allowed to invoke some method number. -// All method numbers below the FRC-42 range are restricted to built-in actors -// (including the account and multisig actors). -// Methods may subsequently enforce tighter restrictions. -pub fn restrict_internal_api(rt: &mut RT, method: MethodNum) -> Result<(), ActorError> -where - RT: Runtime, -{ - if method >= FIRST_EXPORTED_METHOD_NUMBER { - return Ok(()); - } - let caller = rt.message().caller(); - let code_cid = rt.get_actor_code_cid(&caller.id().unwrap()); - match code_cid { - None => { - return Err( - actor_error!(forbidden; "no code for caller {} of method {}", caller, method), - ) - } - Some(code_cid) => { - let builtin_type = rt.resolve_builtin_actor_type(&code_cid); - if builtin_type.is_none() { - return Err( - actor_error!(forbidden; "caller {} of method {} must be built-in", caller, method), - ); - } - } - } - Ok(()) -} diff --git a/fvm-utils/runtime/src/builtin/singletons.rs b/fvm-utils/runtime/src/builtin/singletons.rs deleted file mode 100644 index a1d036d06..000000000 --- a/fvm-utils/runtime/src/builtin/singletons.rs +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0, MIT - -use fvm_shared::address::Address; -use fvm_shared::ActorID; - -use paste::paste; - -macro_rules! define_singletons { - ($($name:ident = $id:literal,)*) => { - $( - paste! { - pub const [<$name _ID>]: ActorID = $id; - pub const [<$name _ADDR>]: Address = Address::new_id([<$name _ID>]); - } - )* - } -} - -define_singletons! { - SYSTEM_ACTOR = 0, - INIT_ACTOR = 1, - REWARD_ACTOR = 2, - CRON_ACTOR = 3, - STORAGE_POWER_ACTOR = 4, - STORAGE_MARKET_ACTOR = 5, - VERIFIED_REGISTRY_ACTOR = 6, - DATACAP_TOKEN_ACTOR = 7, - EAM_ACTOR = 10, - BURNT_FUNDS_ACTOR = 99, -} - -/// Defines first available ID address after builtin actors -pub const FIRST_NON_SINGLETON_ADDR: ActorID = 100; diff --git a/fvm-utils/runtime/src/builtin/types.rs b/fvm-utils/runtime/src/builtin/types.rs deleted file mode 100644 index 0a722934a..000000000 --- a/fvm-utils/runtime/src/builtin/types.rs +++ /dev/null @@ -1,33 +0,0 @@ -use cid::Cid; -use fvm_ipld_encoding::tuple::{Deserialize_tuple, Serialize_tuple}; -use fvm_ipld_encoding::RawBytes; -use fvm_shared::address::Address; -use fvm_shared::MethodNum; - -/// Init actor Exec Params, see https://github.com/filecoin-project/builtin-actors/blob/master/actors/init/src/types.rs#L17 -#[derive(Serialize_tuple, Deserialize_tuple, Debug)] -pub struct InitExecParams { - pub code_cid: Cid, - pub constructor_params: RawBytes, -} - -/// Init actor Exec Params, see https://github.com/filecoin-project/builtin-actors/blob/master/actors/init/src/types.rs -#[derive(Debug, Serialize_tuple, Deserialize_tuple)] -pub struct InitExecReturn { - /// ID based address for created actor - pub id_address: Address, - /// Reorg safe address for actor - pub robust_address: Address, -} - -impl Default for InitExecReturn { - fn default() -> Self { - Self { - id_address: Address::new_id(0), - robust_address: Address::new_id(0), - } - } -} - -/// Init actor exec method number, see https://github.com/filecoin-project/builtin-actors/blob/fb759f87fcd5de0a98cb61966cd27f680df83364/actors/init/src/lib.rs#L32 -pub const INIT_EXEC_METHOD_NUM: MethodNum = 2; diff --git a/fvm-utils/runtime/src/dispatch.rs b/fvm-utils/runtime/src/dispatch.rs deleted file mode 100644 index 5fd0e0db4..000000000 --- a/fvm-utils/runtime/src/dispatch.rs +++ /dev/null @@ -1,180 +0,0 @@ -use castaway::cast; -use std::marker::PhantomData; - -use fvm_ipld_encoding::ipld_block::IpldBlock; -use serde::{Deserialize, Serialize}; - -use crate::ActorError; - -/// Implement actor method dispatch: -/// -/// ```ignore -/// type Actor; -/// #[derive(FromPrimitive)] -/// #[repr(u64)] -/// enum Method { -/// Constructor = 1, -/// } -/// impl ActorCode for Actor { -/// type Methods = Method; -/// actor_dispatch! { -/// Constructor => constructor, -/// } -/// } -/// ``` -#[macro_export] -macro_rules! actor_dispatch { - ($($method:ident => $func:ident,)*) => { - fn invoke_method( - rt: &mut RT, - method: MethodNum, - args: Option, - ) -> Result, ActorError> - where - RT: Runtime, - RT::Blockstore: Clone, - { - restrict_internal_api(rt, method)?; - match FromPrimitive::from_u64(method) { - $(Some(Self::Methods::$method) => $crate::dispatch(rt, Self::$func, &args),)* - None => Err(actor_error!(unhandled_message; "invalid method: {}", method)), - } - } - }; -} - -pub trait Dispatch<'de, RT> { - fn call( - self, - rt: &mut RT, - args: &'de Option, - ) -> Result, ActorError>; -} - -pub struct Dispatcher { - func: F, - _marker: PhantomData, -} - -impl Dispatcher { - const fn new(f: F) -> Self { - Dispatcher { - func: f, - _marker: PhantomData, - } - } -} - -/// Dispatch an actor method, deserializing the input and re-serializing the output. -/// -/// This method automatically handles: -/// -/// - Dispatching None/Some based on the number of parameters (0/1). -/// - Returning None if the return type is `Result<(), ActorError>`. -pub fn dispatch<'de, F, A, RT>( - rt: &mut RT, - func: F, - arg: &'de Option, -) -> Result, ActorError> -where - Dispatcher: Dispatch<'de, RT>, -{ - Dispatcher::new(func).call(rt, arg) -} - -/// Convert the passed value into an IPLD Block, or None if it's `()`. -fn maybe_into_block(v: T) -> Result, ActorError> { - if cast!(&v, &()).is_ok() { - Ok(None) - } else { - Ok(IpldBlock::serialize_cbor(&v)?) - } -} - -impl<'de, F, R, RT> Dispatch<'de, RT> for Dispatcher -where - F: FnOnce(&mut RT) -> Result, - R: Serialize, -{ - fn call( - self, - rt: &mut RT, - args: &'de Option, - ) -> Result, ActorError> { - match args { - None => maybe_into_block((self.func)(rt)?), - Some(_) => Err(ActorError::illegal_argument( - "method expects no arguments".into(), - )), - } - } -} - -impl<'de, F, A, R, RT> Dispatch<'de, RT> for Dispatcher -where - F: FnOnce(&mut RT, A) -> Result, - A: Deserialize<'de>, - R: Serialize, -{ - fn call( - self, - rt: &mut RT, - args: &'de Option, - ) -> Result, ActorError> { - match args { - None => Err(ActorError::illegal_argument( - "method expects arguments".into(), - )), - Some(arg) => maybe_into_block((self.func)(rt, arg.deserialize()?)?), - } - } -} - -#[test] -fn test_dispatch() { - use crate::ActorError; - use fvm_ipld_encoding::ipld_block::IpldBlock; - use serde::{Deserialize, Serialize}; - - #[derive(Serialize, Deserialize)] - struct SomeArgs { - foo: String, - } - - trait Runtime {} - struct MockRuntime; - impl Runtime for MockRuntime {} - - fn with_arg(_: &mut impl Runtime, foo: SomeArgs) -> Result<(), ActorError> { - assert_eq!(foo.foo, "foo"); - Ok(()) - } - - fn with_arg_ret(_: &mut impl Runtime, foo: SomeArgs) -> Result { - Ok(foo) - } - - fn without_arg(_: &mut impl Runtime) -> Result<(), ActorError> { - Ok(()) - } - - let mut rt = MockRuntime; - let arg = IpldBlock::serialize_cbor(&SomeArgs { foo: "foo".into() }) - .expect("failed to serialize arguments"); - - // Correct dispatch - assert!(dispatch(&mut rt, with_arg, &arg) - .expect("failed to dispatch") - .is_none()); - assert!(dispatch(&mut rt, without_arg, &None) - .expect("failed to dispatch") - .is_none()); - assert_eq!( - dispatch(&mut rt, with_arg_ret, &arg).expect("failed to dispatch"), - arg - ); - - // Incorrect dispatch - let _ = dispatch(&mut rt, with_arg, &None).expect_err("should have required an argument"); - let _ = dispatch(&mut rt, without_arg, &arg).expect_err("should have required an argument"); -} diff --git a/fvm-utils/runtime/src/lib.rs b/fvm-utils/runtime/src/lib.rs deleted file mode 100644 index d6e777a94..000000000 --- a/fvm-utils/runtime/src/lib.rs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -// TODO: disable everything else when not using runtime-wasm - -#[macro_use] -extern crate lazy_static; -// workaround for a compiler bug, see https://github.com/rust-lang/rust/issues/55779 -extern crate serde; - -use builtin::HAMT_BIT_WIDTH; -use cid::Cid; -use fvm_ipld_amt::Amt; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_hamt::{BytesKey, Error as HamtError, Hamt}; -pub use fvm_shared::BLOCKS_PER_EPOCH as EXPECTED_LEADERS_PER_EPOCH; -use serde::de::DeserializeOwned; -use serde::Serialize; -use unsigned_varint::decode::Error as UVarintError; -pub use {fvm_ipld_amt, fvm_ipld_hamt}; - -pub use self::actor_error::*; -pub use self::builtin::*; -pub use self::util::*; -use crate::runtime::Runtime; - -pub mod actor_error; -pub mod builtin; -pub mod runtime; -pub mod util; - -mod dispatch; -pub use dispatch::dispatch; - -#[cfg(feature = "test_utils")] -pub mod test_utils; - -#[macro_export] -macro_rules! wasm_trampoline { - ($target:ty) => { - #[no_mangle] - pub extern "C" fn invoke(param: u32) -> u32 { - $crate::runtime::fvm::trampoline::<$target>(param) - } - }; -} - -/// Map type to be used within actors. The underlying type is a HAMT. -pub type Map<'bs, BS, V> = Hamt<&'bs BS, V, BytesKey>; - -/// Array type used within actors. The underlying type is an AMT. -pub type Array<'bs, V, BS> = Amt; - -/// Create a hamt with a custom bitwidth. -#[inline] -pub fn make_empty_map(store: &'_ BS, bitwidth: u32) -> Map<'_, BS, V> -where - BS: Blockstore, - V: DeserializeOwned + Serialize, -{ - Map::<_, V>::new_with_bit_width(store, bitwidth) -} - -/// Create a map with a root cid. -#[inline] -pub fn make_map_with_root<'bs, BS, V>( - root: &Cid, - store: &'bs BS, -) -> Result, HamtError> -where - BS: Blockstore, - V: DeserializeOwned + Serialize, -{ - Map::<_, V>::load_with_bit_width(root, store, HAMT_BIT_WIDTH) -} - -/// Create a map with a root cid. -#[inline] -pub fn make_map_with_root_and_bitwidth<'bs, BS, V>( - root: &Cid, - store: &'bs BS, - bitwidth: u32, -) -> Result, HamtError> -where - BS: Blockstore, - V: DeserializeOwned + Serialize, -{ - Map::<_, V>::load_with_bit_width(root, store, bitwidth) -} - -pub fn u64_key(k: u64) -> BytesKey { - let mut bz = unsigned_varint::encode::u64_buffer(); - let slice = unsigned_varint::encode::u64(k, &mut bz); - slice.into() -} - -pub fn parse_uint_key(s: &[u8]) -> Result { - let (v, _) = unsigned_varint::decode::u64(s)?; - Ok(v) -} diff --git a/fvm-utils/runtime/src/runtime/actor_blockstore.rs b/fvm-utils/runtime/src/runtime/actor_blockstore.rs deleted file mode 100644 index 497efd0bd..000000000 --- a/fvm-utils/runtime/src/runtime/actor_blockstore.rs +++ /dev/null @@ -1,48 +0,0 @@ -use std::convert::TryFrom; - -use anyhow::Result; -use cid::multihash::Code; -use cid::Cid; -use fvm_ipld_blockstore::Block; -use fvm_sdk as fvm; - -use crate::actor_error; - -/// A blockstore suitable for use within actors. -/// -/// Cloning simply clones a reference and does not copy the underlying blocks. -#[derive(Debug, Clone)] -pub struct ActorBlockstore; - -/// Implements a blockstore delegating to IPLD syscalls. -impl fvm_ipld_blockstore::Blockstore for ActorBlockstore { - fn get(&self, cid: &Cid) -> Result>> { - // If this fails, the _CID_ is invalid. I.e., we have a bug. - fvm::ipld::get(cid).map(Some).map_err(|c| { - actor_error!(illegal_state; "get failed with {:?} on CID '{}'", c, cid).into() - }) - } - - fn put_keyed(&self, k: &Cid, block: &[u8]) -> Result<()> { - let code = Code::try_from(k.hash().code()) - .map_err(|e| actor_error!(serialization, e.to_string()))?; - let k2 = self.put(code, &Block::new(k.codec(), block))?; - if k != &k2 { - Err(actor_error!(serialization; "put block with cid {} but has cid {}", k, k2).into()) - } else { - Ok(()) - } - } - - fn put(&self, code: Code, block: &Block) -> Result - where - D: AsRef<[u8]>, - { - // TODO: Don't hard-code the size. Unfortunately, there's no good way to get it from the - // codec at the moment. - const SIZE: u32 = 32; - let k = fvm::ipld::put(code.into(), SIZE, block.codec, block.data.as_ref()) - .map_err(|c| actor_error!(illegal_state; "put failed with {:?}", c))?; - Ok(k) - } -} diff --git a/fvm-utils/runtime/src/runtime/actor_code.rs b/fvm-utils/runtime/src/runtime/actor_code.rs deleted file mode 100644 index b899fdd23..000000000 --- a/fvm-utils/runtime/src/runtime/actor_code.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_encoding::ipld_block::IpldBlock; -use fvm_shared::MethodNum; - -use crate::{ActorError, Runtime}; - -/// Interface for invoking methods on an Actor -pub trait ActorCode { - type Methods; - /// Invokes method with runtime on the actor's code. Method number will match one - /// defined by the Actor, and parameters will be serialized and used in execution - fn invoke_method( - rt: &mut RT, - method: MethodNum, - params: Option, - ) -> Result, ActorError> - where - // TODO: remove the clone requirement on the blockstore when we fix "replica update" to not - // hold onto state between transactions. - // https://github.com/filecoin-project/builtin-actors/issues/133 - RT: Runtime, - RT::Blockstore: Blockstore + Clone; -} diff --git a/fvm-utils/runtime/src/runtime/empty.rs b/fvm-utils/runtime/src/runtime/empty.rs deleted file mode 100644 index 05256ed60..000000000 --- a/fvm-utils/runtime/src/runtime/empty.rs +++ /dev/null @@ -1,40 +0,0 @@ -use std::mem; - -use cid::multihash::Multihash; -use cid::Cid; -use fvm_ipld_encoding::DAG_CBOR; -use fvm_shared::crypto::hash::SupportedHashes; - -const fn const_unwrap(r: Result) -> T { - let v = match r { - Ok(r) => r, - Err(_) => panic!(), - }; - mem::forget(r); - v -} - -// 45b0cfc220ceec5b7c1c62c4d4193d38e4eba48e8815729ce75f9c0ab0e4c1c0 -const EMPTY_ARR_HASH_DIGEST: &[u8] = &[ - 0x45, 0xb0, 0xcf, 0xc2, 0x20, 0xce, 0xec, 0x5b, 0x7c, 0x1c, 0x62, 0xc4, 0xd4, 0x19, 0x3d, 0x38, - 0xe4, 0xeb, 0xa4, 0x8e, 0x88, 0x15, 0x72, 0x9c, 0xe7, 0x5f, 0x9c, 0x0a, 0xb0, 0xe4, 0xc1, 0xc0, -]; - -// bafy2bzacebc3bt6cedhoyw34drrmjvazhu4oj25er2ebk4u445pzycvq4ta4a -pub const EMPTY_ARR_CID: Cid = Cid::new_v1( - DAG_CBOR, - const_unwrap(Multihash::wrap( - SupportedHashes::Blake2b256 as u64, - EMPTY_ARR_HASH_DIGEST, - )), -); - -#[test] -fn test_empty_arr_cid() { - use cid::multihash::{Code, MultihashDigest}; - use fvm_ipld_encoding::to_vec; - - let empty = to_vec::<[(); 0]>(&[]).unwrap(); - let expected = Cid::new_v1(DAG_CBOR, Code::Blake2b256.digest(&empty)); - assert_eq!(EMPTY_ARR_CID, expected); -} diff --git a/fvm-utils/runtime/src/runtime/fvm.rs b/fvm-utils/runtime/src/runtime/fvm.rs deleted file mode 100644 index c529787c0..000000000 --- a/fvm-utils/runtime/src/runtime/fvm.rs +++ /dev/null @@ -1,467 +0,0 @@ -use anyhow::Error; -use cid::multihash::{Code, MultihashDigest}; -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_encoding::ipld_block::IpldBlock; -use fvm_ipld_encoding::{to_vec, CborStore, DAG_CBOR}; -use fvm_sdk as fvm; -use fvm_sdk::NO_DATA_BLOCK_ID; -use fvm_shared::address::{Address, Protocol}; -use fvm_shared::clock::ChainEpoch; -use fvm_shared::crypto::signature::Signature; -use fvm_shared::econ::TokenAmount; -use fvm_shared::error::{ErrorNumber, ExitCode}; -use fvm_shared::sys::SendFlags; -use fvm_shared::version::NetworkVersion; -use fvm_shared::{ActorID, MethodNum}; -use num_traits::Zero; -use serde::de::DeserializeOwned; -use serde::Serialize; - -use crate::runtime::actor_blockstore::ActorBlockstore; -use crate::runtime::{ActorCode, MessageInfo, Primitives}; -use crate::{actor_error, deserialize_block, ActorError, Runtime, Type}; - -pub const PUBKEY_ADDRESS_METHOD: u64 = 2; -// The original method is `2`, but we have a custom account actor -// with a public function for public address resolution so it can be -// called from non-builtin actors -pub const PUBLIC_RESOLVE_ADDRESS_METHOD: u64 = frc42_dispatch::method_hash!("ResolvePubKeyAddress"); - -lazy_static! { - /// Cid of the empty array Cbor bytes (`EMPTY_ARR_BYTES`). - pub static ref EMPTY_ARR_CID: Cid = { - let empty = to_vec::<[(); 0]>(&[]).unwrap(); - Cid::new_v1(DAG_CBOR, Code::Blake2b256.digest(&empty)) - }; -} - -/// A runtime that bridges to the FVM environment through the FVM SDK. -pub struct FvmRuntime { - blockstore: B, - /// Indicates whether we are in a state transaction. During such, sending - /// messages is prohibited. - in_transaction: bool, - /// Indicates that the caller has been validated. - caller_validated: bool, -} - -impl Default for FvmRuntime { - fn default() -> Self { - FvmRuntime { - blockstore: ActorBlockstore, - in_transaction: false, - caller_validated: false, - } - } -} - -impl FvmRuntime { - fn assert_not_validated(&mut self) -> Result<(), ActorError> { - if self.caller_validated { - return Err(actor_error!( - assertion_failed, - "Method must validate caller identity exactly once" - )); - } - Ok(()) - } -} - -/// A stub MessageInfo implementation performing FVM syscalls to obtain its fields. -struct FvmMessage; - -impl MessageInfo for FvmMessage { - fn caller(&self) -> Address { - Address::new_id(fvm::message::caller()) - } - - fn receiver(&self) -> Address { - Address::new_id(fvm::message::receiver()) - } - - fn value_received(&self) -> TokenAmount { - fvm::message::value_received() - } -} - -impl Runtime for FvmRuntime -where - B: Blockstore, -{ - type Blockstore = B; - - fn network_version(&self) -> NetworkVersion { - fvm::network::version() - } - - fn message(&self) -> &dyn MessageInfo { - &FvmMessage - } - - fn curr_epoch(&self) -> ChainEpoch { - fvm::network::curr_epoch() - } - - fn validate_immediate_caller_accept_any(&mut self) -> Result<(), ActorError> { - self.assert_not_validated()?; - self.caller_validated = true; - Ok(()) - } - - fn validate_immediate_caller_is<'a, I>(&mut self, addresses: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.assert_not_validated()?; - let caller_addr = self.message().caller(); - if addresses.into_iter().any(|a| *a == caller_addr) { - self.caller_validated = true; - Ok(()) - } else { - Err(actor_error!(forbidden; - "caller {} is not one of supported", caller_addr - )) - } - } - - fn validate_immediate_caller_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.assert_not_validated()?; - let caller_cid = { - let caller_addr = self.message().caller(); - self.get_actor_code_cid(&caller_addr.id().unwrap()) - .expect("failed to lookup caller code") - }; - - match self.resolve_builtin_actor_type(&caller_cid) { - Some(typ) if types.into_iter().any(|t| *t == typ) => { - self.caller_validated = true; - Ok(()) - } - _ => Err(actor_error!(forbidden; - "caller cid type {} not one of supported", caller_cid)), - } - } - - fn validate_immediate_caller_not_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.assert_not_validated()?; - let caller_cid = { - let caller_addr = self.message().caller(); - self.get_actor_code_cid(&caller_addr.id().unwrap()) - .expect("failed to lookup caller code") - }; - - match self.resolve_builtin_actor_type(&caller_cid) { - Some(typ) if types.into_iter().any(|t| *t == typ) => Err(actor_error!(forbidden; - "caller cid type {} is one of the not supported", caller_cid)), - _ => { - self.caller_validated = true; - Ok(()) - } - } - } - - fn current_balance(&self) -> TokenAmount { - fvm::sself::current_balance() - } - - fn resolve_address(&self, address: &Address) -> Option
{ - fvm::actor::resolve_address(address).map(Address::new_id) - } - - fn get_actor_code_cid(&self, id: &ActorID) -> Option { - fvm::actor::get_actor_code_cid(&Address::new_id(*id)) - } - - fn create(&mut self, obj: &T) -> Result<(), ActorError> { - let root = fvm::sself::root()?; - if root != *EMPTY_ARR_CID { - return Err( - actor_error!(illegal_state; "failed to create state; expected empty array CID, got: {}", root), - ); - } - let new_root = ActorBlockstore.put_cbor(obj, Code::Blake2b256) - .map_err(|e| actor_error!(illegal_argument; "failed to write actor state during creation: {}", e.to_string()))?; - fvm::sself::set_root(&new_root)?; - Ok(()) - } - - fn state(&self) -> Result { - let root = fvm::sself::root()?; - Ok(ActorBlockstore - .get_cbor(&root) - .map_err(|_| actor_error!(illegal_argument; "failed to get actor for Readonly state"))? - .expect("State does not exist for actor state root")) - } - - fn transaction(&mut self, f: F) -> Result - where - S: Serialize + DeserializeOwned, - F: FnOnce(&mut S, &mut Self) -> Result, - { - let state_cid = fvm::sself::root() - .map_err(|_| actor_error!(illegal_argument; "failed to get actor root state CID"))?; - - log::debug!("getting cid: {}", state_cid); - - let mut state = ActorBlockstore - .get_cbor::(&state_cid) - .map_err(|_| actor_error!(illegal_argument; "failed to get actor state"))? - .expect("State does not exist for actor state root"); - - self.in_transaction = true; - let result = f(&mut state, self); - self.in_transaction = false; - - let ret = result?; - let new_root = ActorBlockstore.put_cbor(&state, Code::Blake2b256) - .map_err(|e| actor_error!(illegal_argument; "failed to write actor state in transaction: {}", e.to_string()))?; - fvm::sself::set_root(&new_root)?; - Ok(ret) - } - - fn store(&self) -> &B { - &self.blockstore - } - - fn send( - &self, - to: &Address, - method: MethodNum, - params: Option, - value: TokenAmount, - ) -> Result, ActorError> { - if self.in_transaction { - return Err(actor_error!(assertion_failed; "send is not allowed during transaction")); - } - match fvm::send::send(to, method, params, value, None, SendFlags::empty()) { - Ok(ret) => { - if ret.exit_code.is_success() { - Ok(ret.return_data) - } else { - Err(ActorError::checked( - ret.exit_code, - format!( - "send to {} method {} aborted with code {}", - to, method, ret.exit_code - ), - ret.return_data, - )) - } - } - Err(err) => Err(match err { - // Some of these errors are from operations in the Runtime or SDK layer - // before or after the underlying VM send syscall. - ErrorNumber::NotFound => { - // This means that the receiving actor doesn't exist. - // TODO: we can't reasonably determine the correct "exit code" here. - actor_error!(unspecified; "receiver not found") - } - ErrorNumber::InsufficientFunds => { - // This means that the send failed because we have insufficient funds. We will - // get a _syscall error_, not an exit code, because the target actor will not - // run (and therefore will not exit). - actor_error!(insufficient_funds; "not enough funds") - } - ErrorNumber::LimitExceeded => { - // This means we've exceeded the recursion limit. - // TODO: Define a better exit code. - actor_error!(assertion_failed; "recursion limit exceeded") - } - err => { - // We don't expect any other syscall exit codes. - actor_error!(assertion_failed; "unexpected error: {}", err) - } - }), - } - } - - fn new_actor_address(&mut self) -> Result { - Ok(fvm::actor::next_actor_address()) - } - - fn create_actor(&mut self, code_id: Cid, actor_id: ActorID) -> Result<(), ActorError> { - if self.in_transaction { - return Err( - actor_error!(assertion_failed; "create_actor is not allowed during transaction"), - ); - } - fvm::actor::create_actor(actor_id, &code_id, None).map_err(|e| match e { - ErrorNumber::IllegalArgument => { - ActorError::illegal_argument("failed to create actor".into()) - } - _ => actor_error!(assertion_failed; "create failed with unknown error: {}", e), - }) - } - - fn delete_actor(&mut self, beneficiary: &Address) -> Result<(), ActorError> { - if self.in_transaction { - return Err( - actor_error!(assertion_failed; "delete_actor is not allowed during transaction"), - ); - } - Ok(fvm::sself::self_destruct(beneficiary)?) - } - - fn resolve_builtin_actor_type(&self, code_id: &Cid) -> Option { - fvm::actor::get_builtin_actor_type(code_id).map(Type::from_i32) - } - - fn get_code_cid_for_type(&self, typ: Type) -> Cid { - fvm::actor::get_code_cid_for_type(typ as i32) - } - - fn total_fil_circ_supply(&self) -> TokenAmount { - fvm::network::total_fil_circ_supply() - } - - fn charge_gas(&mut self, name: &'static str, compute: i64) { - fvm::gas::charge(name, compute as u64) - } - - fn base_fee(&self) -> TokenAmount { - fvm::network::base_fee() - } -} - -impl Primitives for FvmRuntime -where - B: Blockstore, -{ - fn hash_blake2b(&self, data: &[u8]) -> [u8; 32] { - fvm::crypto::hash_blake2b(data) - } - - fn verify_signature( - &self, - signature: &Signature, - signer: &Address, - plaintext: &[u8], - ) -> Result<(), Error> { - match fvm::crypto::verify_signature(signature, signer, plaintext) { - Ok(true) => Ok(()), - Ok(false) | Err(_) => Err(Error::msg("invalid signature")), - } - } -} - -/// A convenience function that built-in actors can delegate their execution to. -/// -/// The trampoline takes care of boilerplate: -/// -/// 0. Initialize logging if debugging is enabled. -/// 1. Obtains the parameter data from the FVM by fetching the parameters block. -/// 2. Obtains the method number for the invocation. -/// 3. Creates an FVM runtime shim. -/// 4. Invokes the target method. -/// 5a. In case of error, aborts the execution with the emitted exit code, or -/// 5b. In case of success, stores the return data as a block and returns the latter. -pub fn trampoline(params: u32) -> u32 { - init_logging(); - - std::panic::set_hook(Box::new(|info| { - fvm::vm::abort( - ExitCode::USR_ASSERTION_FAILED.value(), - Some(&format!("{info}")), - ) - })); - - let method = fvm::message::method_number(); - let params = fvm::message::params_raw(params).expect("params block invalid"); - - // Construct a new runtime. - let mut rt = FvmRuntime::default(); - // Invoke the method, aborting if the actor returns an errored exit code. - let ret = C::invoke_method(&mut rt, method, params) - .unwrap_or_else(|err| fvm::vm::abort(err.exit_code().value(), Some(err.msg()))); - - // Abort with "assertion failed" if the actor failed to validate the caller somewhere. - // We do this after handling the error, because the actor may have encountered an error before - // it even could validate the caller. - if !rt.caller_validated { - fvm::vm::abort( - ExitCode::USR_ASSERTION_FAILED.value(), - Some("failed to validate caller"), - ) - } - - // Then handle the return value. - match ret { - None => NO_DATA_BLOCK_ID, - Some(ret_block) => fvm::ipld::put_block(ret_block.codec, ret_block.data.as_slice()) - .expect("failed to write result"), - } -} - -/// If debugging is enabled in the VM, installs a logger that sends messages to the FVM log syscall. -/// Messages are prefixed with "[LEVEL] ". -/// If debugging is not enabled, no logger will be installed which means that log!() and -/// similar calls will be dropped without either formatting args or making a syscall. -/// Note that, when debugging, the log syscalls will charge gas that wouldn't be charged -/// when debugging is not enabled. -/// -/// Note: this is similar to fvm::debug::init_logging() from the FVM SDK, but -/// that doesn't work (at FVM SDK v2.2). -fn init_logging() { - struct Logger; - - impl log::Log for Logger { - fn enabled(&self, _: &log::Metadata) -> bool { - true - } - - fn log(&self, record: &log::Record) { - // Note the log system won't automatically call enabled() before this, - // so it's canonical to check it here. - // But logging must have been enabled at initialisation time in order for - // the logger to be installed. - // There's currently no use for dynamically disabling logging, so just skip checking. - let msg = format!("[{}] {}", record.level(), record.args()); - fvm::debug::log(msg); - } - - fn flush(&self) {} - } -} - -/// Resolves the SECP or BLS public key of an account actor ID address. -pub fn resolve_secp_bls(rt: &mut impl Runtime, addr: &Address) -> Result { - // return directly if it is already a public key - match addr.protocol() { - Protocol::Secp256k1 | Protocol::BLS => Ok(*addr), - Protocol::ID => { - let ret = rt.send( - addr, - PUBLIC_RESOLVE_ADDRESS_METHOD, - None, - TokenAmount::zero(), - )?; - deserialize_block(ret) - } - _ => Err(ActorError::illegal_argument(String::from( - "address type not compatible", - ))), - } -} - -pub fn equal_account_id(rt: &mut impl Runtime, a: &Address, b: &Address) -> bool { - let a_id = match rt.resolve_address(a) { - Some(id) => id, - None => { - return false; - } - }; - let b_id = match rt.resolve_address(b) { - Some(id) => id, - None => { - return false; - } - }; - a_id == b_id -} diff --git a/fvm-utils/runtime/src/runtime/mod.rs b/fvm-utils/runtime/src/runtime/mod.rs deleted file mode 100644 index 171773ea5..000000000 --- a/fvm-utils/runtime/src/runtime/mod.rs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_shared::address::Address; -use fvm_shared::clock::ChainEpoch; -use fvm_shared::consensus::ConsensusFault; -use fvm_shared::crypto::signature::Signature; -use fvm_shared::econ::TokenAmount; -use fvm_shared::sector::{ - AggregateSealVerifyProofAndInfos, ReplicaUpdateInfo, SealVerifyInfo, WindowPoStVerifyInfo, -}; -use fvm_shared::version::NetworkVersion; -use fvm_shared::{ActorID, MethodNum}; -use serde::de::DeserializeOwned; -use serde::Serialize; - -pub use self::actor_code::*; -use crate::{ActorError, Type}; - -mod actor_code; - -#[cfg(feature = "fil-actor")] -pub mod fvm; - -#[cfg(feature = "fil-actor")] -mod actor_blockstore; - -pub(crate) mod empty; - -pub use empty::EMPTY_ARR_CID; -use fvm_ipld_encoding::ipld_block::IpldBlock; - -/// Runtime is the VM's internal runtime object. -/// this is everything that is accessible to actors, beyond parameters. -pub trait Runtime: Primitives { - type Blockstore: Blockstore; - - /// The network protocol version number at the current epoch. - fn network_version(&self) -> NetworkVersion; - - /// Information related to the current message being executed. - fn message(&self) -> &dyn MessageInfo; - - /// The current chain epoch number. The genesis block has epoch zero. - fn curr_epoch(&self) -> ChainEpoch; - - /// Validates the caller against some predicate. - /// Exported actor methods must invoke at least one caller validation before returning. - fn validate_immediate_caller_accept_any(&mut self) -> Result<(), ActorError>; - fn validate_immediate_caller_is<'a, I>(&mut self, addresses: I) -> Result<(), ActorError> - where - I: IntoIterator; - fn validate_immediate_caller_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator; - fn validate_immediate_caller_not_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator; - - /// The balance of the receiver. - fn current_balance(&self) -> TokenAmount; - - /// Resolves an address of any protocol to an ID address (via the Init actor's table). - /// This allows resolution of externally-provided SECP, BLS, or actor addresses to the canonical form. - /// If the argument is an ID address it is returned directly. - fn resolve_address(&self, address: &Address) -> Option
; - - /// Look up the code ID at an actor address. - fn get_actor_code_cid(&self, id: &ActorID) -> Option; - - /// Initializes the state object. - /// This is only valid when the state has not yet been initialized. - /// NOTE: we should also limit this to being invoked during the constructor method - fn create(&mut self, obj: &T) -> Result<(), ActorError>; - - /// Loads a readonly copy of the state of the receiver into the argument. - fn state(&self) -> Result; - - /// Loads a mutable copy of the state of the receiver, passes it to `f`, - /// and after `f` completes puts the state object back to the store and sets it as - /// the receiver's state root. - /// - /// During the call to `f`, execution is protected from side-effects, (including message send). - /// - /// Returns the result of `f`. - fn transaction(&mut self, f: F) -> Result - where - T: Serialize + DeserializeOwned, - F: FnOnce(&mut T, &mut Self) -> Result; - - /// Returns reference to blockstore - fn store(&self) -> &Self::Blockstore; - - /// Sends a message to another actor, returning the exit code and return value envelope. - /// If the invoked method does not return successfully, its state changes - /// (and that of any messages it sent in turn) will be rolled back. - /// Note that the current return type cannot distinguish between a successful invocation - /// that returns an error code, and an error originating from the syscall prior to - /// invoking the target actor/method. - fn send( - &self, - to: &Address, - method: MethodNum, - params: Option, - value: TokenAmount, - ) -> Result, ActorError>; - - /// Computes an address for a new actor. The returned address is intended to uniquely refer to - /// the actor even in the event of a chain re-org (whereas an ID-address might refer to a - /// different actor after messages are re-ordered). - /// Always an ActorExec address. - fn new_actor_address(&mut self) -> Result; - - /// Creates an actor with code `codeID` and address `address`, with empty state. - /// May only be called by Init actor. - fn create_actor(&mut self, code_id: Cid, address: ActorID) -> Result<(), ActorError>; - - /// Deletes the executing actor from the state tree, transferring any balance to beneficiary. - /// Aborts if the beneficiary does not exist. - /// May only be called by the actor itself. - fn delete_actor(&mut self, beneficiary: &Address) -> Result<(), ActorError>; - - /// Returns whether the specified CodeCID belongs to a built-in actor. - fn resolve_builtin_actor_type(&self, code_id: &Cid) -> Option; - - /// Returns the CodeCID for a built-in actor type. The kernel will abort - /// if the supplied type is invalid. - fn get_code_cid_for_type(&self, typ: Type) -> Cid; - - /// Returns the total token supply in circulation at the beginning of the current epoch. - /// The circulating supply is the sum of: - /// - rewards emitted by the reward actor, - /// - funds vested from lock-ups in the genesis state, - /// less the sum of: - /// - funds burnt, - /// - pledge collateral locked in storage miner actors (recorded in the storage power actor) - /// - deal collateral locked by the storage market actor - fn total_fil_circ_supply(&self) -> TokenAmount; - - /// ChargeGas charges specified amount of `gas` for execution. - /// `name` provides information about gas charging point - fn charge_gas(&mut self, name: &'static str, compute: i64); - - fn base_fee(&self) -> TokenAmount; -} - -/// Message information available to the actor about executing message. -pub trait MessageInfo { - /// The address of the immediate calling actor. Always an ID-address. - fn caller(&self) -> Address; - - /// The address of the actor receiving the message. Always an ID-address. - fn receiver(&self) -> Address; - - /// The value attached to the message being processed, implicitly - /// added to current_balance() before method invocation. - fn value_received(&self) -> TokenAmount; -} - -/// Pure functions implemented as primitives by the runtime. -pub trait Primitives { - /// Hashes input data using blake2b with 256 bit output. - fn hash_blake2b(&self, data: &[u8]) -> [u8; 32]; - - /// Verifies that a signature is valid for an address and plaintext. - fn verify_signature( - &self, - signature: &Signature, - signer: &Address, - plaintext: &[u8], - ) -> Result<(), anyhow::Error>; -} - -/// filcrypto verification primitives provided by the runtime -pub trait Verifier { - /// Verifies a sector seal proof. - fn verify_seal(&self, vi: &SealVerifyInfo) -> Result<(), anyhow::Error>; - - /// Verifies a window proof of spacetime. - fn verify_post(&self, verify_info: &WindowPoStVerifyInfo) -> Result<(), anyhow::Error>; - - /// Verifies that two block headers provide proof of a consensus fault: - /// - both headers mined by the same actor - /// - headers are different - /// - first header is of the same or lower epoch as the second - /// - at least one of the headers appears in the current chain at or after epoch `earliest` - /// - the headers provide evidence of a fault (see the spec for the different fault types). - /// The parameters are all serialized block headers. The third "extra" parameter is consulted only for - /// the "parent grinding fault", in which case it must be the sibling of h1 (same parent tipset) and one of the - /// blocks in the parent of h2 (i.e. h2's grandparent). - /// Returns nil and an error if the headers don't prove a fault. - fn verify_consensus_fault( - &self, - h1: &[u8], - h2: &[u8], - extra: &[u8], - ) -> Result, anyhow::Error>; - - fn batch_verify_seals(&self, batch: &[SealVerifyInfo]) -> anyhow::Result>; - - fn verify_aggregate_seals( - &self, - aggregate: &AggregateSealVerifyProofAndInfos, - ) -> Result<(), anyhow::Error>; - - fn verify_replica_update(&self, replica: &ReplicaUpdateInfo) -> Result<(), anyhow::Error>; -} diff --git a/fvm-utils/runtime/src/test_utils.rs b/fvm-utils/runtime/src/test_utils.rs deleted file mode 100644 index 34ebd98f6..000000000 --- a/fvm-utils/runtime/src/test_utils.rs +++ /dev/null @@ -1,945 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use core::fmt; -use std::cell::RefCell; -use std::collections::{BTreeMap, HashMap, VecDeque}; -use std::rc::Rc; - -use cid::multihash::{Code, Multihash as OtherMultihash}; -use cid::Cid; -use fvm_ipld_blockstore::{Blockstore, MemoryBlockstore}; -use fvm_ipld_encoding::de::DeserializeOwned; -use fvm_ipld_encoding::ipld_block::IpldBlock; -use fvm_ipld_encoding::CborStore; -use fvm_shared::address::{Address, Protocol}; -use fvm_shared::clock::ChainEpoch; -use serde::Serialize; - -use fvm_shared::commcid::{FIL_COMMITMENT_SEALED, FIL_COMMITMENT_UNSEALED}; -use fvm_shared::crypto::signature::Signature; -use fvm_shared::econ::TokenAmount; -use fvm_shared::error::ExitCode; -use fvm_shared::version::NetworkVersion; -use fvm_shared::{ActorID, MethodNum}; - -use multihash::derive::Multihash; -use multihash::MultihashDigest; - -use rand::prelude::*; - -use crate::runtime::{ActorCode, MessageInfo, Primitives, Runtime}; -use crate::{actor_error, ActorError, Type}; - -type Func = dyn Fn(&[u8]) -> [u8; 32]; - -lazy_static! { - pub static ref SYSTEM_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/system"); - pub static ref INIT_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/init"); - pub static ref CRON_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/cron"); - pub static ref ACCOUNT_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/account"); - pub static ref POWER_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/storagepower"); - pub static ref MINER_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/storageminer"); - pub static ref MARKET_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/storagemarket"); - pub static ref PAYCH_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/paymentchannel"); - pub static ref MULTISIG_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/multisig"); - pub static ref REWARD_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/reward"); - pub static ref VERIFREG_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/verifiedregistry"); - pub static ref SCA_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/sca"); - pub static ref SUBNET_ACTOR_CODE_ID: Cid = make_builtin(b"fil/test/subnet"); - pub static ref ACTOR_TYPES: BTreeMap = { - let mut map = BTreeMap::new(); - map.insert(*SYSTEM_ACTOR_CODE_ID, Type::System); - map.insert(*INIT_ACTOR_CODE_ID, Type::Init); - map.insert(*CRON_ACTOR_CODE_ID, Type::Cron); - map.insert(*ACCOUNT_ACTOR_CODE_ID, Type::Account); - map.insert(*POWER_ACTOR_CODE_ID, Type::Power); - map.insert(*MINER_ACTOR_CODE_ID, Type::Miner); - map.insert(*MARKET_ACTOR_CODE_ID, Type::Market); - map.insert(*PAYCH_ACTOR_CODE_ID, Type::PaymentChannel); - map.insert(*MULTISIG_ACTOR_CODE_ID, Type::Multisig); - map.insert(*REWARD_ACTOR_CODE_ID, Type::Reward); - map.insert(*VERIFREG_ACTOR_CODE_ID, Type::VerifiedRegistry); - map - }; - pub static ref CALLER_TYPES_SIGNABLE: Vec = - vec![*ACCOUNT_ACTOR_CODE_ID, *MULTISIG_ACTOR_CODE_ID]; - pub static ref NON_SINGLETON_CODES: BTreeMap = { - let mut map = BTreeMap::new(); - map.insert(*ACCOUNT_ACTOR_CODE_ID, ()); - map.insert(*PAYCH_ACTOR_CODE_ID, ()); - map.insert(*MULTISIG_ACTOR_CODE_ID, ()); - map.insert(*MINER_ACTOR_CODE_ID, ()); - map - }; -} - -const IPLD_RAW: u64 = 0x55; - -/// Returns an identity CID for bz. -pub fn make_builtin(bz: &[u8]) -> Cid { - Cid::new_v1( - IPLD_RAW, - OtherMultihash::wrap(0, bz).expect("name too long"), - ) -} - -pub struct MockRuntime { - pub epoch: ChainEpoch, - pub miner: Address, - pub base_fee: TokenAmount, - pub id_addresses: HashMap, - pub actor_code_cids: HashMap, - pub new_actor_addr: Option
, - pub receiver: Address, - pub caller: Address, - pub caller_type: Cid, - pub value_received: TokenAmount, - pub hash_func: Box, - pub network_version: NetworkVersion, - - // Actor State - pub state: Option, - pub balance: RefCell, - - // VM Impl - pub in_call: bool, - pub store: Rc, - pub in_transaction: bool, - - // Expectations - pub expectations: RefCell, - - pub circulating_supply: TokenAmount, -} - -impl MockRuntime { - pub fn new(store: BS) -> Self { - Self { - epoch: Default::default(), - miner: Address::new_id(0), - base_fee: Default::default(), - id_addresses: Default::default(), - actor_code_cids: Default::default(), - new_actor_addr: Default::default(), - receiver: Address::new_id(0), - caller: Address::new_id(0), - caller_type: Default::default(), - value_received: Default::default(), - hash_func: Box::new(blake2b_256), - network_version: NetworkVersion::V0, - state: Default::default(), - balance: Default::default(), - in_call: Default::default(), - store: Rc::new(store), - in_transaction: Default::default(), - expectations: Default::default(), - circulating_supply: Default::default(), - } - } -} - -#[derive(Default)] -pub struct Expectations { - pub expect_validate_caller_any: bool, - pub expect_validate_caller_addr: Option>, - pub expect_validate_caller_type: Option>, - pub expect_validate_caller_not_type: Option>, - pub expect_sends: VecDeque, - pub expect_create_actor: Option, - pub expect_delete_actor: Option
, - pub expect_verify_sigs: VecDeque, - pub expect_gas_charge: VecDeque, -} - -impl Expectations { - fn reset(&mut self) { - *self = Default::default(); - } - - fn verify(&mut self) { - assert!( - !self.expect_validate_caller_any, - "expected ValidateCallerAny, not received" - ); - assert!( - self.expect_validate_caller_addr.is_none(), - "expected ValidateCallerAddr {:?}, not received", - self.expect_validate_caller_addr - ); - assert!( - self.expect_validate_caller_type.is_none(), - "expected ValidateCallerType {:?}, not received", - self.expect_validate_caller_type - ); - assert!( - self.expect_sends.is_empty(), - "expected all message to be send, unsent messages {:?}", - self.expect_sends - ); - assert!( - self.expect_create_actor.is_none(), - "expected actor to be created, uncreated actor: {:?}", - self.expect_create_actor - ); - assert!( - self.expect_delete_actor.is_none(), - "expected actor to be deleted: {:?}", - self.expect_delete_actor - ); - assert!( - self.expect_verify_sigs.is_empty(), - "expect_verify_sigs: {:?}, not received", - self.expect_verify_sigs - ); - assert!( - self.expect_gas_charge.is_empty(), - "expect_gas_charge {:?}, not received", - self.expect_gas_charge - ); - } -} - -impl Default for MockRuntime { - fn default() -> Self { - Self { - epoch: Default::default(), - miner: Address::new_id(0), - base_fee: Default::default(), - id_addresses: Default::default(), - actor_code_cids: Default::default(), - new_actor_addr: Default::default(), - receiver: Address::new_id(0), - caller: Address::new_id(0), - caller_type: Default::default(), - value_received: Default::default(), - hash_func: Box::new(blake2b_256), - network_version: NetworkVersion::V0, - state: Default::default(), - balance: Default::default(), - in_call: Default::default(), - store: Default::default(), - in_transaction: Default::default(), - expectations: Default::default(), - circulating_supply: Default::default(), - } - } -} - -#[derive(Clone, Debug)] -pub struct ExpectCreateActor { - pub code_id: Cid, - pub actor_id: ActorID, -} - -#[derive(Clone, Debug)] -pub struct ExpectedMessage { - pub to: Address, - pub method: MethodNum, - pub params: Option, - pub value: TokenAmount, - - // returns from applying expectedMessage - pub send_return: Option, - pub exit_code: ExitCode, -} - -#[derive(Debug)] -pub struct ExpectedVerifySig { - pub sig: Signature, - pub signer: Address, - pub plaintext: Vec, - pub result: Result<(), anyhow::Error>, -} - -#[derive(Clone, Debug)] -pub struct ExpectRandomness {} - -pub fn expect_empty(res: Option) { - assert!(res.is_none()); -} - -pub fn expect_abort_contains_message( - expect_exit_code: ExitCode, - expect_msg: &str, - res: Result, -) { - let err = res.expect_err(&format!( - "expected abort with exit code {expect_exit_code}, but call succeeded" - )); - assert_eq!( - err.exit_code(), - expect_exit_code, - "expected failure with exit code {}, but failed with exit code {}; error message: {}", - expect_exit_code, - err.exit_code(), - err.msg(), - ); - let err_msg = err.msg(); - assert!( - err.msg().contains(expect_msg), - "expected err message '{err_msg}' to contain '{expect_msg}'", - ); -} - -pub fn expect_abort(exit_code: ExitCode, res: Result) { - expect_abort_contains_message(exit_code, "", res); -} - -impl MockRuntime { - ///// Runtime access for tests ///// - - pub fn get_state(&self) -> T { - self.store_get(self.state.as_ref().unwrap()) - } - - pub fn replace_state(&mut self, obj: &T) { - self.state = Some(self.store_put(obj)); - } - - pub fn set_balance(&mut self, amount: TokenAmount) { - *self.balance.get_mut() = amount; - } - - pub fn get_balance(&self) -> TokenAmount { - self.balance.borrow().to_owned() - } - - pub fn add_balance(&mut self, amount: TokenAmount) { - *self.balance.get_mut() += amount; - } - - pub fn set_value(&mut self, value: TokenAmount) { - self.value_received = value; - } - - pub fn set_caller(&mut self, code_id: Cid, address: Address) { - self.caller = address; - self.caller_type = code_id; - self.actor_code_cids.insert(address, code_id); - } - - pub fn set_address_actor_type(&mut self, address: Address, actor_type: Cid) { - self.actor_code_cids.insert(address, actor_type); - } - - pub fn get_id_address(&self, address: &Address) -> Option
{ - if address.protocol() == Protocol::ID { - return Some(*address); - } - self.id_addresses.get(address).cloned() - } - - pub fn add_id_address(&mut self, source: Address, target: Address) { - assert_eq!( - target.protocol(), - Protocol::ID, - "target must use ID address protocol" - ); - self.id_addresses.insert(source, target); - } - - pub fn call( - &mut self, - method_num: MethodNum, - params: Option, - ) -> Result, ActorError> { - self.in_call = true; - let prev_state = self.state; - let res = A::invoke_method(self, method_num, params); - - if res.is_err() { - self.state = prev_state; - } - self.in_call = false; - res - } - - /// Method to use when we need to call something in the test that requires interacting - /// with the runtime in a read-only fashion, but it's not an actor invocation. - pub fn call_fn(&mut self, f: F) -> anyhow::Result - where - F: FnOnce(&mut Self) -> anyhow::Result, - { - self.in_call = true; - let res = f(self); - self.in_call = false; - res - } - - /// Verifies that all mock expectations have been met. - pub fn verify(&mut self) { - self.expectations.borrow_mut().verify() - } - - /// Clears all mock expectations. - pub fn reset(&mut self) { - self.expectations.borrow_mut().reset(); - } - - ///// Mock expectations ///// - - #[allow(dead_code)] - pub fn expect_validate_caller_addr(&mut self, addr: Vec
) { - assert!(!addr.is_empty(), "addrs must be non-empty"); - self.expectations.get_mut().expect_validate_caller_addr = Some(addr); - } - - #[allow(dead_code)] - pub fn expect_verify_signature(&self, exp: ExpectedVerifySig) { - self.expectations - .borrow_mut() - .expect_verify_sigs - .push_back(exp); - } - - #[allow(dead_code)] - pub fn expect_validate_caller_type(&mut self, types: Vec) { - assert!(!types.is_empty(), "addrs must be non-empty"); - self.expectations.borrow_mut().expect_validate_caller_type = Some(types); - } - - #[allow(dead_code)] - pub fn expect_validate_caller_not_type(&mut self, types: Vec) { - // we add type as an expectation to ensure that we did the type check - // and then perform the explicit "not_type" check in the validate of - // the MockRuntime - self.expectations - .borrow_mut() - .expect_validate_caller_not_type = Some(types); - } - - #[allow(dead_code)] - pub fn expect_validate_caller_any(&self) { - self.expectations.borrow_mut().expect_validate_caller_any = true; - } - - #[allow(dead_code)] - pub fn expect_delete_actor(&mut self, beneficiary: Address) { - self.expectations.borrow_mut().expect_delete_actor = Some(beneficiary); - } - - #[allow(dead_code)] - pub fn expect_send( - &mut self, - to: Address, - method: MethodNum, - params: Option, - value: TokenAmount, - send_return: Option, - exit_code: ExitCode, - ) { - self.expectations - .borrow_mut() - .expect_sends - .push_back(ExpectedMessage { - to, - method, - params, - value, - send_return, - exit_code, - }) - } - - #[allow(dead_code)] - pub fn expect_create_actor(&mut self, code_id: Cid, actor_id: ActorID) { - let a = ExpectCreateActor { code_id, actor_id }; - self.expectations.borrow_mut().expect_create_actor = Some(a); - } - - #[allow(dead_code)] - pub fn set_received(&mut self, amount: TokenAmount) { - self.value_received = amount; - } - - #[allow(dead_code)] - pub fn set_base_fee(&mut self, base_fee: TokenAmount) { - self.base_fee = base_fee; - } - - #[allow(dead_code)] - pub fn set_circulating_supply(&mut self, circ_supply: TokenAmount) { - self.circulating_supply = circ_supply; - } - - #[allow(dead_code)] - pub fn set_epoch(&mut self, epoch: ChainEpoch) { - self.epoch = epoch; - } - - #[allow(dead_code)] - pub fn expect_gas_charge(&mut self, value: i64) { - self.expectations - .borrow_mut() - .expect_gas_charge - .push_back(value); - } - - ///// Private helpers ///// - - fn require_in_call(&self) { - assert!( - self.in_call, - "invalid runtime invocation outside of method call" - ) - } - - fn store_put(&self, o: &T) -> Cid { - self.store.put_cbor(&o, Code::Blake2b256).unwrap() - } - - fn store_get(&self, cid: &Cid) -> T { - self.store.get_cbor(cid).unwrap().unwrap() - } -} - -impl MessageInfo for MockRuntime { - fn caller(&self) -> Address { - self.caller - } - fn receiver(&self) -> Address { - self.receiver - } - fn value_received(&self) -> TokenAmount { - self.value_received.clone() - } -} - -impl Runtime for MockRuntime { - type Blockstore = Rc; - - fn network_version(&self) -> NetworkVersion { - self.network_version - } - - fn message(&self) -> &dyn MessageInfo { - self.require_in_call(); - self - } - - fn curr_epoch(&self) -> ChainEpoch { - self.require_in_call(); - self.epoch - } - - fn validate_immediate_caller_accept_any(&mut self) -> Result<(), ActorError> { - self.require_in_call(); - assert!( - self.expectations.borrow_mut().expect_validate_caller_any, - "unexpected validate-caller-any" - ); - self.expectations.borrow_mut().expect_validate_caller_any = false; - Ok(()) - } - - fn validate_immediate_caller_is<'a, I>(&mut self, addresses: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.require_in_call(); - - let addrs: Vec
= addresses.into_iter().cloned().collect(); - - let mut expectations = self.expectations.borrow_mut(); - assert!( - expectations.expect_validate_caller_addr.is_some(), - "unexpected validate caller addrs" - ); - - let expected_addrs = expectations.expect_validate_caller_addr.as_ref().unwrap(); - assert_eq!( - &addrs, expected_addrs, - "unexpected validate caller addrs {:?}, expected {:?}", - addrs, &expectations.expect_validate_caller_addr - ); - - for expected in &addrs { - if self.message().caller() == *expected { - expectations.expect_validate_caller_addr = None; - return Ok(()); - } - } - expectations.expect_validate_caller_addr = None; - Err(actor_error!(forbidden; - "caller address {:?} forbidden, allowed: {:?}", - self.message().caller(), &addrs - )) - } - - fn validate_immediate_caller_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.require_in_call(); - assert!( - self.expectations - .borrow_mut() - .expect_validate_caller_type - .is_some(), - "unexpected validate caller code" - ); - - let find_by_type = |typ| { - (*ACTOR_TYPES) - .iter() - .find_map(|(cid, t)| if t == typ { Some(cid) } else { None }) - .cloned() - .unwrap() - }; - let types: Vec = types.into_iter().map(find_by_type).collect(); - let expected_caller_type = self - .expectations - .borrow_mut() - .expect_validate_caller_type - .clone() - .unwrap(); - assert_eq!( - &types, &expected_caller_type, - "unexpected validate caller code {types:?}, expected {expected_caller_type:?}" - ); - - for expected in &types { - if &self.caller_type == expected { - self.expectations.borrow_mut().expect_validate_caller_type = None; - return Ok(()); - } - } - - self.expectations.borrow_mut().expect_validate_caller_type = None; - Err( - actor_error!(forbidden; "caller type {:?} forbidden, allowed: {:?}", - self.caller_type, types), - ) - } - - fn validate_immediate_caller_not_type<'a, I>(&mut self, types: I) -> Result<(), ActorError> - where - I: IntoIterator, - { - self.require_in_call(); - - // still requires the caller type to be set otherwise we cannot check against not type - assert!( - self.expectations - .borrow_mut() - .expect_validate_caller_not_type - .is_some(), - "unexpected validate caller code" - ); - - let find_by_type = |typ| { - (*ACTOR_TYPES) - .iter() - .find_map(|(cid, t)| if t == typ { Some(cid) } else { None }) - .cloned() - .unwrap() - }; - let types: Vec = types.into_iter().map(find_by_type).collect(); - - let expect_validate_caller_not_type = self - .expectations - .borrow_mut() - .expect_validate_caller_not_type - .clone() - .unwrap(); - - let mut r = Ok(()); - for unexpected in &types { - if !expect_validate_caller_not_type.contains(unexpected) { - r = Err(actor_error!(forbidden; "caller type {:?} not expected", unexpected)); - break; - } - } - - self.expectations - .borrow_mut() - .expect_validate_caller_not_type = None; - r - } - - fn current_balance(&self) -> TokenAmount { - self.require_in_call(); - self.balance.borrow().clone() - } - - fn resolve_address(&self, address: &Address) -> Option
{ - self.require_in_call(); - if address.protocol() == Protocol::ID { - return Some(*address); - } - self.id_addresses.get(address).cloned() - } - - fn get_actor_code_cid(&self, id: &ActorID) -> Option { - self.require_in_call(); - self.actor_code_cids.get(&Address::new_id(*id)).cloned() - } - - fn create(&mut self, obj: &T) -> Result<(), ActorError> { - if self.state.is_some() { - return Err(actor_error!(illegal_state; "state already constructed")); - } - self.state = Some(self.store_put(obj)); - Ok(()) - } - - fn state(&self) -> Result { - Ok(self.store_get(self.state.as_ref().unwrap())) - } - - fn transaction(&mut self, f: F) -> Result - where - T: Serialize + DeserializeOwned, - F: FnOnce(&mut T, &mut Self) -> Result, - { - if self.in_transaction { - return Err(actor_error!(assertion_failed; "nested transaction")); - } - let mut read_only = self.state()?; - self.in_transaction = true; - let ret = f(&mut read_only, self); - if ret.is_ok() { - self.state = Some(self.store_put(&read_only)); - } - self.in_transaction = false; - ret - } - - fn store(&self) -> &Rc { - &self.store - } - - fn send( - &self, - to: &Address, - method: MethodNum, - params: Option, - value: TokenAmount, - ) -> Result, ActorError> { - self.require_in_call(); - if self.in_transaction { - return Err(actor_error!(assertion_failed; "side-effect within transaction")); - } - - assert!( - !self.expectations.borrow_mut().expect_sends.is_empty(), - "unexpected message to: {to:?} method: {method:?}, value: {value:?}, params: {params:?}" - ); - - let expected_msg = self - .expectations - .borrow_mut() - .expect_sends - .pop_front() - .unwrap(); - - assert_eq!(expected_msg.to, *to); - assert_eq!(expected_msg.method, method); - assert_eq!(expected_msg.params, params); - assert_eq!(expected_msg.value, value); - - { - let mut balance = self.balance.borrow_mut(); - if value > *balance { - return Err(ActorError::unchecked( - ExitCode::SYS_SENDER_STATE_INVALID, - format!( - "cannot send value: {:?} exceeds balance: {:?}", - value, *balance - ), - )); - } - *balance -= value; - } - - match expected_msg.exit_code { - ExitCode::OK => Ok(expected_msg.send_return), - x => Err(ActorError::unchecked( - x, - "Expected message Fail".to_string(), - )), - } - } - - fn new_actor_address(&mut self) -> Result { - self.require_in_call(); - let ret = *self - .new_actor_addr - .as_ref() - .expect("unexpected call to new actor address"); - self.new_actor_addr = None; - Ok(ret) - } - - fn create_actor(&mut self, code_id: Cid, actor_id: ActorID) -> Result<(), ActorError> { - self.require_in_call(); - if self.in_transaction { - return Err(actor_error!(assertion_failed; "side-effect within transaction")); - } - let expect_create_actor = self - .expectations - .borrow_mut() - .expect_create_actor - .take() - .expect("unexpected call to create actor"); - - assert!(expect_create_actor.code_id == code_id && expect_create_actor.actor_id == actor_id, "unexpected actor being created, expected code: {:?} address: {:?}, actual code: {:?} address: {:?}", expect_create_actor.code_id, expect_create_actor.actor_id, code_id, actor_id); - Ok(()) - } - - fn delete_actor(&mut self, addr: &Address) -> Result<(), ActorError> { - self.require_in_call(); - if self.in_transaction { - return Err(actor_error!(assertion_failed; "side-effect within transaction")); - } - let exp_act = self.expectations.borrow_mut().expect_delete_actor.take(); - if exp_act.is_none() { - panic!("unexpected call to delete actor: {addr}"); - } - if exp_act.as_ref().unwrap() != addr { - panic!( - "attempt to delete wrong actor. Expected: {}, got: {}", - exp_act.unwrap(), - addr - ); - } - Ok(()) - } - - fn resolve_builtin_actor_type(&self, code_id: &Cid) -> Option { - self.require_in_call(); - (*ACTOR_TYPES).get(code_id).cloned() - } - - fn get_code_cid_for_type(&self, typ: Type) -> Cid { - self.require_in_call(); - (*ACTOR_TYPES) - .iter() - .find_map(|(cid, t)| if *t == typ { Some(cid) } else { None }) - .cloned() - .unwrap() - } - - fn total_fil_circ_supply(&self) -> TokenAmount { - self.circulating_supply.clone() - } - - fn charge_gas(&mut self, _: &'static str, value: i64) { - let mut exs = self.expectations.borrow_mut(); - assert!( - !exs.expect_gas_charge.is_empty(), - "unexpected gas charge {value:?}" - ); - let expected = exs.expect_gas_charge.pop_front().unwrap(); - assert_eq!( - expected, value, - "expected gas charge {expected:?}, actual {value:?}" - ); - } - - fn base_fee(&self) -> TokenAmount { - self.base_fee.clone() - } -} - -impl Primitives for MockRuntime { - fn verify_signature( - &self, - signature: &Signature, - signer: &Address, - plaintext: &[u8], - ) -> anyhow::Result<()> { - if self.expectations.borrow_mut().expect_verify_sigs.is_empty() { - panic!( - "Unexpected signature verification sig: {:?}, signer: {}, plaintext: {}", - signature, - signer, - hex::encode(plaintext) - ); - } - let exp = self - .expectations - .borrow_mut() - .expect_verify_sigs - .pop_front(); - if let Some(exp) = exp { - if exp.sig != *signature || exp.signer != *signer || &exp.plaintext[..] != plaintext { - panic!( - "unexpected signature verification\n\ - sig: {:?}, signer: {}, plaintext: {}\n\ - expected sig: {:?}, signer: {}, plaintext: {}", - signature, - signer, - hex::encode(plaintext), - exp.sig, - exp.signer, - hex::encode(exp.plaintext) - ) - } - exp.result? - } else { - panic!( - "unexpected syscall to verify signature: {:?}, signer: {}, plaintext: {}", - signature, - signer, - hex::encode(plaintext) - ) - } - Ok(()) - } - - fn hash_blake2b(&self, data: &[u8]) -> [u8; 32] { - (*self.hash_func)(data) - } -} - -pub fn blake2b_256(data: &[u8]) -> [u8; 32] { - blake2b_simd::Params::new() - .hash_length(32) - .to_state() - .update(data) - .finalize() - .as_bytes() - .try_into() - .unwrap() -} - -// multihash library doesn't support poseidon hashing, so we fake it -#[derive(Clone, Copy, Debug, Eq, Multihash, PartialEq)] -#[mh(alloc_size = 64)] -enum MhCode { - #[mh(code = 0xb401, hasher = multihash::Sha2_256)] - PoseidonFake, - #[mh(code = 0x1012, hasher = multihash::Sha2_256)] - Sha256TruncPaddedFake, -} - -fn make_cid(input: &[u8], prefix: u64, hash: MhCode) -> Cid { - let hash = hash.digest(input); - Cid::new_v1(prefix, hash) -} - -pub fn make_cid_sha(input: &[u8], prefix: u64) -> Cid { - make_cid(input, prefix, MhCode::Sha256TruncPaddedFake) -} - -pub fn make_cid_poseidon(input: &[u8], prefix: u64) -> Cid { - make_cid(input, prefix, MhCode::PoseidonFake) -} - -pub fn make_piece_cid(input: &[u8]) -> Cid { - make_cid_sha(input, FIL_COMMITMENT_UNSEALED) -} - -pub fn make_sealed_cid(input: &[u8]) -> Cid { - make_cid_poseidon(input, FIL_COMMITMENT_SEALED) -} - -pub fn new_bls_addr(s: u8) -> Address { - let seed = [s; 32]; - let mut rng: StdRng = SeedableRng::from_seed(seed); - let mut key = [0u8; 48]; - rng.fill_bytes(&mut key); - Address::new_bls(&key).unwrap() -} diff --git a/fvm-utils/runtime/src/util/cbor.rs b/fvm-utils/runtime/src/util/cbor.rs deleted file mode 100644 index 3c01fb556..000000000 --- a/fvm-utils/runtime/src/util/cbor.rs +++ /dev/null @@ -1,34 +0,0 @@ -use fvm_ipld_encoding::{to_vec, RawBytes}; -use serde::{de, ser}; - -use crate::ActorError; - -/// Serializes a structure as a CBOR vector of bytes, returning a serialization error on failure. -/// `desc` is a noun phrase for the object being serialized, included in any error message. -pub fn serialize_vec(value: &T, desc: &str) -> Result, ActorError> -where - T: ser::Serialize + ?Sized, -{ - to_vec(value).map_err(|e| ActorError::serialization(format!("failed to serialize {desc}: {e}"))) -} - -/// Serializes a structure as CBOR bytes, returning a serialization error on failure. -/// `desc` is a noun phrase for the object being serialized, included in any error message. -pub fn serialize(value: &T, desc: &str) -> Result -where - T: ser::Serialize + ?Sized, -{ - Ok(RawBytes::new(serialize_vec(value, desc)?)) -} - -/// Deserialises CBOR-encoded bytes as a structure, returning a serialization error on failure. -/// `desc` is a noun phrase for the object being deserialized, included in any error message. -pub fn deserialize(v: &RawBytes, desc: &str) -> Result { - v.deserialize() - .map_err(|e| ActorError::serialization(format!("failed to deserialize {desc}: {e}"))) -} - -/// Deserialises CBOR-encoded bytes as a method parameters object. -pub fn deserialize_params(params: &RawBytes) -> Result { - deserialize(params, "method parameters") -} diff --git a/fvm-utils/runtime/src/util/downcast.rs b/fvm-utils/runtime/src/util/downcast.rs deleted file mode 100644 index b03ed3480..000000000 --- a/fvm-utils/runtime/src/util/downcast.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use anyhow::anyhow; -use fvm_ipld_amt::Error as AmtError; -use fvm_ipld_encoding::Error as EncodingError; -use fvm_ipld_hamt::Error as HamtError; -use fvm_shared::error::ExitCode; - -use crate::ActorError; - -/// Trait to allow multiple error types to be able to be downcasted into an `ActorError`. -pub trait ActorDowncast { - /// Downcast a dynamic std Error into an `ActorError`. If the error cannot be downcasted - /// into an ActorError automatically, use the provided `ExitCode` to generate a new error. - fn downcast_default(self, default_exit_code: ExitCode, msg: impl AsRef) -> ActorError; - - /// Wrap the error with a message, without overwriting an exit code. - fn downcast_wrap(self, msg: impl AsRef) -> anyhow::Error; -} - -impl ActorDowncast for anyhow::Error { - fn downcast_default(self, default_exit_code: ExitCode, msg: impl AsRef) -> ActorError { - match downcast_util(self) { - Ok(actor_error) => actor_error.wrap(msg), - Err(other) => { - ActorError::unchecked(default_exit_code, format!("{}: {}", msg.as_ref(), other)) - } - } - } - fn downcast_wrap(self, msg: impl AsRef) -> anyhow::Error { - match downcast_util(self) { - Ok(actor_error) => anyhow!(actor_error.wrap(msg)), - Err(other) => anyhow!("{}: {}", msg.as_ref(), other), - } - } -} - -impl ActorDowncast for AmtError { - fn downcast_default(self, default_exit_code: ExitCode, msg: impl AsRef) -> ActorError { - match self { - AmtError::Dynamic(e) => e.downcast_default(default_exit_code, msg), - other => { - ActorError::unchecked(default_exit_code, format!("{}: {}", msg.as_ref(), other)) - } - } - } - fn downcast_wrap(self, msg: impl AsRef) -> anyhow::Error { - match self { - AmtError::Dynamic(e) => e.downcast_wrap(msg), - other => anyhow!("{}: {}", msg.as_ref(), other), - } - } -} - -impl ActorDowncast for HamtError { - fn downcast_default(self, default_exit_code: ExitCode, msg: impl AsRef) -> ActorError { - match self { - HamtError::Dynamic(e) => e.downcast_default(default_exit_code, msg), - other => { - ActorError::unchecked(default_exit_code, format!("{}: {}", msg.as_ref(), other)) - } - } - } - fn downcast_wrap(self, msg: impl AsRef) -> anyhow::Error { - match self { - HamtError::Dynamic(e) => e.downcast_wrap(msg), - other => anyhow!("{}: {}", msg.as_ref(), other), - } - } -} - -/// Attempts to downcast a `Box` into an actor error. -/// Returns `Ok` with the actor error if it can be downcasted automatically -/// and returns `Err` with the original error if it cannot. -fn downcast_util(error: anyhow::Error) -> anyhow::Result { - // Check if error is ActorError, return as such - let error = match error.downcast::() { - Ok(actor_err) => return Ok(actor_err), - Err(other) => other, - }; - - // Check if error is Encoding error, if so return `ErrSerialization` - let error = match error.downcast::() { - Ok(enc_error) => { - return Ok(ActorError::unchecked( - ExitCode::USR_SERIALIZATION, - enc_error.to_string(), - )) - } - Err(other) => other, - }; - - // Dynamic errors can come from Array and Hamt through blockstore usages, check them. - let error = match error.downcast::() { - Ok(amt_err) => match amt_err { - AmtError::Dynamic(de) => match downcast_util(de) { - Ok(a) => return Ok(a), - Err(other) => other, - }, - other => anyhow!(other), - }, - Err(other) => other, - }; - let error = match error.downcast::() { - Ok(amt_err) => match amt_err { - HamtError::Dynamic(de) => match downcast_util(de) { - Ok(a) => return Ok(a), - Err(other) => other, - }, - other => anyhow!(other), - }, - Err(other) => other, - }; - - // Could not be downcasted automatically to actor error, return initial dynamic error. - Err(error) -} diff --git a/fvm-utils/runtime/src/util/message_accumulator.rs b/fvm-utils/runtime/src/util/message_accumulator.rs deleted file mode 100644 index 151b2a968..000000000 --- a/fvm-utils/runtime/src/util/message_accumulator.rs +++ /dev/null @@ -1,175 +0,0 @@ -use itertools::Itertools; -use std::{cell::RefCell, fmt::Display, rc::Rc}; - -use regex::Regex; - -/// Accumulates a sequence of messages (e.g. validation failures). -#[derive(Debug, Default)] -pub struct MessageAccumulator { - /// Accumulated messages. - /// This is a `Rc` to support accumulators derived from `with_prefix()` accumulating to - /// the same underlying collection. - msgs: Rc>>, - /// Optional prefix to all new messages, e.g. describing higher level context. - prefix: String, -} - -impl MessageAccumulator { - /// Returns a new accumulator backed by the same collection, that will prefix each new message with - /// a formatted string. - pub fn with_prefix>(&self, prefix: S) -> Self { - MessageAccumulator { - msgs: self.msgs.clone(), - prefix: self.prefix.to_owned() + prefix.as_ref(), - } - } - - pub fn is_empty(&self) -> bool { - self.msgs.borrow().is_empty() - } - - pub fn messages(&self) -> Vec { - self.msgs.borrow().to_owned() - } - - /// Returns the number of accumulated messages - pub fn len(&self) -> usize { - self.msgs.borrow().len() - } - - /// Adds a message to the accumulator - pub fn add>(&self, msg: S) { - self.msgs - .borrow_mut() - .push(format!("{}{}", self.prefix, msg.as_ref())); - } - - /// Adds messages from another accumulator to this one - pub fn add_all(&self, other: &Self) { - self.msgs - .borrow_mut() - .extend_from_slice(&other.msgs.borrow()); - } - - /// Adds a message if predicate is false - pub fn require>(&self, predicate: bool, msg: S) { - if !predicate { - self.add(msg); - } - } - - /// Adds a message if result is `Err`. Underlying error must be `Display`. - pub fn require_no_error>(&self, result: Result, msg: S) { - if let Err(e) = result { - self.add(format!("{}: {e}", msg.as_ref())); - } - } - - /// Panic if the accumulator isn't empty. The acculumated messages are included in the panic message. - #[track_caller] - pub fn assert_empty(&self) { - assert!(self.is_empty(), "{}", self.messages().join("\n")) - } - - /// Asserts the accumulator contains messages matching provided pattern *in the given order*. - #[track_caller] - pub fn assert_expected(&self, expected_patterns: &[Regex]) { - let messages = self.messages(); - assert!( - messages.len() == expected_patterns.len(), - "Incorrect number of accumulator messages. Actual: {}.\nExpected: {}", - messages.join("\n"), - expected_patterns - .iter() - .map(|regex| regex.as_str()) - .join("\n") - ); - - messages - .iter() - .zip(expected_patterns) - .for_each(|(message, pattern)| { - assert!( - pattern.is_match(message), - "message does not match. Actual: {}, expected: {}", - message, - pattern.as_str() - ); - }); - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn adds_messages() { - let acc = MessageAccumulator::default(); - acc.add("Cthulhu"); - assert_eq!(acc.len(), 1); - - let msgs = acc.messages(); - assert_eq!(msgs, vec!["Cthulhu"]); - - acc.add("Azathoth"); - assert_eq!(acc.len(), 2); - - let msgs = acc.messages(); - assert_eq!(msgs, vec!["Cthulhu", "Azathoth"]); - } - - #[test] - fn adds_on_predicate() { - let acc = MessageAccumulator::default(); - acc.require(true, "Cthulhu"); - - assert_eq!(acc.len(), 0); - assert!(acc.is_empty()); - - acc.require(false, "Azathoth"); - let msgs = acc.messages(); - assert_eq!(acc.len(), 1); - assert_eq!(msgs, vec!["Azathoth"]); - assert!(!acc.is_empty()); - } - - #[test] - fn require_no_error() { - let fiasco: Result<(), String> = Err("fiasco".to_owned()); - let acc = MessageAccumulator::default(); - acc.require_no_error(fiasco, "Cthulhu says"); - - let msgs = acc.messages(); - assert_eq!(acc.len(), 1); - assert_eq!(msgs, vec!["Cthulhu says: fiasco"]); - } - - #[test] - fn prefixes() { - let acc = MessageAccumulator::default(); - acc.add("peasant"); - - let gods_acc = acc.with_prefix("elder god -> "); - gods_acc.add("Cthulhu"); - - assert_eq!(acc.messages(), vec!["peasant", "elder god -> Cthulhu"]); - assert_eq!(gods_acc.messages(), vec!["peasant", "elder god -> Cthulhu"]); - } - - #[test] - fn add_all() { - let acc1 = MessageAccumulator::default(); - acc1.add("Cthulhu"); - - let acc2 = MessageAccumulator::default(); - acc2.add("Azathoth"); - - let acc3 = MessageAccumulator::default(); - acc3.add_all(&acc1); - acc3.add_all(&acc2); - - assert_eq!(2, acc3.len()); - assert_eq!(acc3.messages(), vec!["Cthulhu", "Azathoth"]); - } -} diff --git a/fvm-utils/runtime/src/util/mod.rs b/fvm-utils/runtime/src/util/mod.rs deleted file mode 100644 index 576ba26cc..000000000 --- a/fvm-utils/runtime/src/util/mod.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -pub use self::downcast::*; -pub use self::message_accumulator::MessageAccumulator; -pub use self::multimap::*; -pub use self::set::Set; -pub use self::set_multimap::SetMultimap; - -pub mod cbor; -mod downcast; -mod message_accumulator; -mod multimap; -mod set; -mod set_multimap; diff --git a/fvm-utils/runtime/src/util/multimap.rs b/fvm-utils/runtime/src/util/multimap.rs deleted file mode 100644 index d3bce1082..000000000 --- a/fvm-utils/runtime/src/util/multimap.rs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_hamt::Error; -use serde::de::DeserializeOwned; -use serde::Serialize; - -use crate::{make_empty_map, make_map_with_root_and_bitwidth, Array, BytesKey, Map}; - -/// Multimap stores multiple values per key in a Hamt of Amts. -/// The order of insertion of values for each key is retained. -pub struct Multimap<'a, BS>(Map<'a, BS, Cid>, u32); -impl<'a, BS> Multimap<'a, BS> -where - BS: Blockstore, -{ - /// Initializes a new empty multimap. - /// The outer_bitwidth is the width of the HAMT and the - /// inner_bitwidth is the width of the AMTs inside of it. - pub fn new(bs: &'a BS, outer_bitwidth: u32, inner_bitwidth: u32) -> Self { - Self(make_empty_map(bs, outer_bitwidth), inner_bitwidth) - } - - /// Initializes a multimap from a root Cid - pub fn from_root( - bs: &'a BS, - cid: &Cid, - outer_bitwidth: u32, - inner_bitwidth: u32, - ) -> Result { - Ok(Self( - make_map_with_root_and_bitwidth(cid, bs, outer_bitwidth)?, - inner_bitwidth, - )) - } - - /// Retrieve root from the multimap. - #[inline] - pub fn root(&mut self) -> Result { - self.0.flush() - } - - /// Adds a value for a key. - pub fn add(&mut self, key: BytesKey, value: V) -> Result<(), Error> - where - V: Serialize + DeserializeOwned, - { - // Get construct amt from retrieved cid or create new - let mut arr = self - .get::(&key)? - .unwrap_or_else(|| Array::new_with_bit_width(self.0.store(), self.1)); - - // Set value at next index - arr.set(arr.count(), value) - .map_err(|e| anyhow::anyhow!(e))?; - - // flush to get new array root to put in hamt - let new_root = arr.flush().map_err(|e| anyhow::anyhow!(e))?; - - // Set hamt node to array root - self.0.set(key, new_root)?; - Ok(()) - } - - /// Gets the Array of value type `V` using the multimap store. - #[inline] - pub fn get(&self, key: &[u8]) -> Result>, Error> - where - V: DeserializeOwned + Serialize, - { - match self.0.get(key)? { - Some(cid) => Ok(Some( - Array::load(cid, *self.0.store()).map_err(|e| anyhow::anyhow!(e))?, - )), - None => Ok(None), - } - } - - /// Removes all values for a key. - #[inline] - pub fn remove_all(&mut self, key: &[u8]) -> Result<(), Error> { - // Remove entry from table - self.0 - .delete(key)? - .ok_or("failed to delete from multimap")?; - - Ok(()) - } - - /// Iterates through all values in the array at a given key. - pub fn for_each(&self, key: &[u8], f: F) -> Result<(), Error> - where - V: Serialize + DeserializeOwned, - F: FnMut(u64, &V) -> anyhow::Result<()>, - { - if let Some(amt) = self.get::(key)? { - amt.for_each(f).map_err(|e| anyhow::anyhow!(e))?; - } - - Ok(()) - } - - /// Iterates through all arrays in the multimap - pub fn for_all(&self, mut f: F) -> Result<(), Error> - where - V: Serialize + DeserializeOwned, - F: FnMut(&BytesKey, &Array) -> anyhow::Result<()>, - { - self.0.for_each::<_>(|key, arr_root| { - let arr = Array::load(arr_root, *self.0.store())?; - f(key, &arr) - })?; - - Ok(()) - } -} diff --git a/fvm-utils/runtime/src/util/set.rs b/fvm-utils/runtime/src/util/set.rs deleted file mode 100644 index 67f0faca3..000000000 --- a/fvm-utils/runtime/src/util/set.rs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_hamt::Error; -use fvm_shared::HAMT_BIT_WIDTH; - -use crate::{make_empty_map, make_map_with_root, BytesKey, Map}; - -/// Set is a Hamt with empty values for the purpose of acting as a hash set. -#[derive(Debug)] -pub struct Set<'a, BS>(Map<'a, BS, ()>); - -impl<'a, BS: Blockstore> PartialEq for Set<'a, BS> { - fn eq(&self, other: &Self) -> bool { - self.0 == other.0 - } -} - -impl<'a, BS> Set<'a, BS> -where - BS: Blockstore, -{ - /// Initializes a new empty Set with the default bitwidth. - pub fn new(bs: &'a BS) -> Self { - Self(make_empty_map(bs, HAMT_BIT_WIDTH)) - } - - /// Initializes a new empty Set given a bitwidth. - pub fn new_set_with_bitwidth(bs: &'a BS, bitwidth: u32) -> Self { - Self(make_empty_map(bs, bitwidth)) - } - - /// Initializes a Set from a root Cid. - pub fn from_root(bs: &'a BS, cid: &Cid) -> Result { - Ok(Self(make_map_with_root(cid, bs)?)) - } - - /// Retrieve root from the Set. - #[inline] - pub fn root(&mut self) -> Result { - self.0.flush() - } - - /// Adds key to the set. - #[inline] - pub fn put(&mut self, key: BytesKey) -> Result<(), Error> { - // Set hamt node to array root - self.0.set(key, ())?; - Ok(()) - } - - /// Checks if key exists in the set. - #[inline] - pub fn has(&self, key: &[u8]) -> Result { - self.0.contains_key(key) - } - - /// Deletes key from set. - #[inline] - pub fn delete(&mut self, key: &[u8]) -> Result, Error> { - match self.0.delete(key)? { - Some(_) => Ok(Some(())), - None => Ok(None), - } - } - - /// Iterates through all keys in the set. - pub fn for_each(&self, mut f: F) -> Result<(), Error> - where - F: FnMut(&BytesKey) -> anyhow::Result<()>, - { - // Calls the for each function on the hamt with ignoring the value - self.0.for_each(|s, _: &()| f(s)) - } - - /// Collects all keys from the set into a vector. - pub fn collect_keys(&self) -> Result, Error> { - let mut ret_keys = Vec::new(); - - self.for_each(|k| { - ret_keys.push(k.clone()); - Ok(()) - })?; - - Ok(ret_keys) - } -} diff --git a/fvm-utils/runtime/src/util/set_multimap.rs b/fvm-utils/runtime/src/util/set_multimap.rs deleted file mode 100644 index f2686e4d6..000000000 --- a/fvm-utils/runtime/src/util/set_multimap.rs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use std::borrow::Borrow; - -use cid::Cid; -use fvm_ipld_blockstore::Blockstore; -use fvm_ipld_hamt::Error; -use fvm_shared::clock::ChainEpoch; -use fvm_shared::deal::DealID; -use fvm_shared::HAMT_BIT_WIDTH; - -use super::Set; -use crate::{make_empty_map, make_map_with_root, parse_uint_key, u64_key, Map}; - -/// SetMultimap is a hamt with values that are also a hamt but are of the set variant. -/// This allows hash sets to be indexable by an address. -pub struct SetMultimap<'a, BS>(pub Map<'a, BS, Cid>); - -impl<'a, BS> SetMultimap<'a, BS> -where - BS: Blockstore, -{ - /// Initializes a new empty SetMultimap. - pub fn new(bs: &'a BS) -> Self { - Self(make_empty_map(bs, HAMT_BIT_WIDTH)) - } - - /// Initializes a SetMultimap from a root Cid. - pub fn from_root(bs: &'a BS, cid: &Cid) -> Result { - Ok(Self(make_map_with_root(cid, bs)?)) - } - - /// Retrieve root from the SetMultimap. - #[inline] - pub fn root(&mut self) -> Result { - self.0.flush() - } - - /// Puts the DealID in the hash set of the key. - pub fn put(&mut self, key: ChainEpoch, value: DealID) -> Result<(), Error> { - // Get construct amt from retrieved cid or create new - let mut set = self.get(key)?.unwrap_or_else(|| Set::new(self.0.store())); - - set.put(u64_key(value))?; - - // Save and calculate new root - let new_root = set.root()?; - - // Set hamt node to set new root - self.0.set(u64_key(key as u64), new_root)?; - Ok(()) - } - - /// Puts slice of DealIDs in the hash set of the key. - pub fn put_many(&mut self, key: ChainEpoch, values: &[DealID]) -> Result<(), Error> { - // Get construct amt from retrieved cid or create new - let mut set = self.get(key)?.unwrap_or_else(|| Set::new(self.0.store())); - - for &v in values { - set.put(u64_key(v))?; - } - - // Save and calculate new root - let new_root = set.root()?; - - // Set hamt node to set new root - self.0.set(u64_key(key as u64), new_root)?; - Ok(()) - } - - /// Gets the set at the given index of the `SetMultimap` - #[inline] - pub fn get(&self, key: ChainEpoch) -> Result>, Error> { - match self.0.get(&u64_key(key as u64))? { - Some(cid) => Ok(Some(Set::from_root(*self.0.store(), cid)?)), - None => Ok(None), - } - } - - /// Removes a DealID from a key hash set. - #[inline] - pub fn remove(&mut self, key: ChainEpoch, v: DealID) -> Result<(), Error> { - // Get construct amt from retrieved cid and return if no set exists - let mut set = match self.get(key)? { - Some(s) => s, - None => return Ok(()), - }; - - set.delete(u64_key(v).borrow())?; - - // Save and calculate new root - let new_root = set.root()?; - self.0.set(u64_key(key as u64), new_root)?; - Ok(()) - } - - /// Removes set at index. - #[inline] - pub fn remove_all(&mut self, key: ChainEpoch) -> Result<(), Error> { - // Remove entry from table - self.0.delete(&u64_key(key as u64))?; - - Ok(()) - } - - /// Iterates through keys and converts them to a DealID to call a function on each. - pub fn for_each(&self, key: ChainEpoch, mut f: F) -> Result<(), Error> - where - F: FnMut(DealID) -> Result<(), Error>, - { - // Get construct amt from retrieved cid and return if no set exists - let set = match self.get(key)? { - Some(s) => s, - None => return Ok(()), - }; - - set.for_each(|k| { - let v = parse_uint_key(k) - .map_err(|e| anyhow::anyhow!("Could not parse key: {:?}, ({})", &k.0, e))?; - - // Run function on all parsed keys - Ok(f(v)?) - }) - } -} diff --git a/fvm-utils/runtime/tests/multimap_test.rs b/fvm-utils/runtime/tests/multimap_test.rs deleted file mode 100644 index d54a4fe79..000000000 --- a/fvm-utils/runtime/tests/multimap_test.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fil_actors_runtime::{parse_uint_key, u64_key, Multimap}; -use fvm_ipld_amt::Amt; -use fvm_ipld_blockstore::MemoryBlockstore; -use fvm_shared::address::Address; -use fvm_shared::HAMT_BIT_WIDTH; - -#[test] -fn basic_add() { - let store = MemoryBlockstore::default(); - let mut mm = Multimap::new(&store, HAMT_BIT_WIDTH, 3); - - let addr = Address::new_id(100); - assert_eq!(mm.get::(&addr.to_bytes()).unwrap(), None); - - mm.add(addr.to_bytes().into(), 8).unwrap(); - let arr: Amt = mm.get(&addr.to_bytes()).unwrap().unwrap(); - assert_eq!(arr.get(0).unwrap(), Some(&8)); - - mm.add(addr.to_bytes().into(), 2).unwrap(); - mm.add(addr.to_bytes().into(), 78).unwrap(); -} - -#[test] -fn for_each() { - let store = MemoryBlockstore::default(); - let mut mm = Multimap::new(&store, HAMT_BIT_WIDTH, 3); - - let addr = Address::new_id(100); - assert_eq!(mm.get::(&addr.to_bytes()).unwrap(), None); - - mm.add(addr.to_bytes().into(), 8).unwrap(); - mm.add(addr.to_bytes().into(), 2).unwrap(); - mm.add(addr.to_bytes().into(), 3).unwrap(); - mm.add("Some other string".into(), 7).unwrap(); - - let mut vals: Vec<(u64, u64)> = Vec::new(); - mm.for_each(&addr.to_bytes(), |i, v| { - vals.push((i, *v)); - Ok(()) - }) - .unwrap(); - - assert_eq!(&vals, &[(0, 8), (1, 2), (2, 3)]) -} - -#[test] -fn remove_all() { - let store = MemoryBlockstore::default(); - let mut mm = Multimap::new(&store, HAMT_BIT_WIDTH, 3); - - let addr1 = Address::new_id(100); - let addr2 = Address::new_id(101); - - mm.add(addr1.to_bytes().into(), 8).unwrap(); - mm.add(addr1.to_bytes().into(), 88).unwrap(); - mm.add(addr2.to_bytes().into(), 1).unwrap(); - - let arr: Amt = mm.get(&addr1.to_bytes()).unwrap().unwrap(); - assert_eq!(arr.get(1).unwrap(), Some(&88)); - - mm.remove_all(&addr1.to_bytes()).unwrap(); - assert_eq!(mm.get::(&addr1.to_bytes()).unwrap(), None); - - assert!(mm.get::(&addr2.to_bytes()).unwrap().is_some()); - mm.remove_all(&addr2.to_bytes()).unwrap(); - assert_eq!(mm.get::(&addr2.to_bytes()).unwrap(), None); -} - -#[test] -fn varint_key() { - let k = u64_key(1); - let out = parse_uint_key(&k).unwrap(); - assert_eq!(1, out); -} diff --git a/fvm-utils/runtime/tests/set_multimap_test.rs b/fvm-utils/runtime/tests/set_multimap_test.rs deleted file mode 100644 index 47278e74b..000000000 --- a/fvm-utils/runtime/tests/set_multimap_test.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fil_actors_runtime::{u64_key, SetMultimap}; -use fvm_ipld_blockstore::MemoryBlockstore; -use fvm_shared::clock::ChainEpoch; - -#[test] -fn put_remove() { - let store = MemoryBlockstore::default(); - let mut smm = SetMultimap::new(&store); - - let epoch: ChainEpoch = 100; - assert_eq!(smm.get(epoch).unwrap(), None); - - smm.put(epoch, 8).unwrap(); - smm.put(epoch, 2).unwrap(); - smm.remove(epoch, 2).unwrap(); - - let set = smm.get(epoch).unwrap().unwrap(); - assert!(set.has(&u64_key(8)).unwrap()); - assert!(!set.has(&u64_key(2)).unwrap()); - - smm.remove_all(epoch).unwrap(); - assert_eq!(smm.get(epoch).unwrap(), None); -} - -#[test] -fn for_each() { - let store = MemoryBlockstore::default(); - let mut smm = SetMultimap::new(&store); - - let epoch: ChainEpoch = 100; - assert_eq!(smm.get(epoch).unwrap(), None); - - smm.put(epoch, 8).unwrap(); - smm.put(epoch, 3).unwrap(); - smm.put(epoch, 2).unwrap(); - smm.put(epoch, 8).unwrap(); - - let mut vals: Vec = Vec::new(); - smm.for_each(epoch, |i| { - vals.push(i); - Ok(()) - }) - .unwrap(); - - assert_eq!(vals.len(), 3); -} diff --git a/fvm-utils/runtime/tests/set_test.rs b/fvm-utils/runtime/tests/set_test.rs deleted file mode 100644 index ba3c2b886..000000000 --- a/fvm-utils/runtime/tests/set_test.rs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2019-2022 ChainSafe Systems -// SPDX-License-Identifier: Apache-2.0, MIT - -use fil_actors_runtime::Set; - -#[test] -fn put() { - let store = fvm_ipld_blockstore::MemoryBlockstore::new(); - let mut set = Set::new(&store); - - let key = "test".as_bytes(); - assert!(!set.has(key).unwrap()); - - set.put(key.into()).unwrap(); - assert!(set.has(key).unwrap()); -} - -#[test] -fn collect_keys() { - let store = fvm_ipld_blockstore::MemoryBlockstore::new(); - let mut set = Set::new(&store); - - set.put("0".into()).unwrap(); - - assert_eq!(set.collect_keys().unwrap(), ["0".into()]); - - set.put("1".into()).unwrap(); - set.put("2".into()).unwrap(); - set.put("3".into()).unwrap(); - - assert_eq!(set.collect_keys().unwrap().len(), 4); -} - -#[test] -fn delete() { - let store = fvm_ipld_blockstore::MemoryBlockstore::new(); - let mut set = Set::new(&store); - - let key = "0".as_bytes(); - - assert!(!set.has(key).unwrap()); - set.put(key.into()).unwrap(); - assert!(set.has(key).unwrap()); - set.delete(key).unwrap(); - assert!(!set.has(key).unwrap()); - - // Test delete when doesn't exist doesn't error - set.delete(key).unwrap(); -} diff --git a/fvm-utils/src/lib.rs b/fvm-utils/src/lib.rs deleted file mode 100644 index fcd34ea6c..000000000 --- a/fvm-utils/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub use fil_actors_runtime as runtime; -pub use primitives; diff --git a/ipc/Cargo.lock b/ipc/Cargo.lock deleted file mode 100644 index c8bd9a529..000000000 --- a/ipc/Cargo.lock +++ /dev/null @@ -1,5793 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array 0.14.7", -] - -[[package]] -name = "aes" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom 0.2.11", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" -dependencies = [ - "cfg-if", - "getrandom 0.2.11", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "anstream" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" - -[[package]] -name = "anstyle-parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - -[[package]] -name = "anyhow" -version = "1.0.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" - -[[package]] -name = "argon2" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ba4cac0a46bc1d2912652a751c47f2a9f3a7fe89bcae2275d418f5270402f9" -dependencies = [ - "base64ct", - "blake2", - "cpufeatures", - "password-hash 0.5.0", -] - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-trait" -version = "0.1.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version", -] - -[[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bellperson" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a8623f815c0b1fd89efd9b5f4afbb937f91f51c1ebe3f6dda399c69fa938f3" -dependencies = [ - "bincode", - "blake2s_simd 1.0.2", - "blstrs", - "byteorder", - "crossbeam-channel", - "digest 0.10.7", - "ec-gpu", - "ec-gpu-gen", - "ff 0.12.1", - "group 0.12.1", - "log", - "memmap2", - "pairing", - "rand 0.8.5", - "rand_core 0.6.4", - "rayon", - "rustversion", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "blake2b_simd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", -] - -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq 0.1.5", -] - -[[package]] -name = "blake2s_simd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "constant_time_eq 0.3.0", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "block-padding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "bls-signatures" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1659e487883b92123806f16ff3568dd57563991231d187d29b23eea5d910e800" -dependencies = [ - "blst", - "blstrs", - "ff 0.12.1", - "group 0.12.1", - "pairing", - "rand_core 0.6.4", - "subtle", - "thiserror", -] - -[[package]] -name = "blst" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "blstrs" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff3694b352ece02eb664a09ffb948ee69b35afa2e6ac444a6b8cb9d515deebd" -dependencies = [ - "blst", - "byte-slice-cast", - "ec-gpu", - "ff 0.12.1", - "group 0.12.1", - "pairing", - "rand_core 0.6.4", - "serde", - "subtle", -] - -[[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" -dependencies = [ - "sha2 0.10.8", - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "castaway" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a17ed5635fc8536268e5d4de1e22e81ac34419e5f052d4d51f4e01dcc263fcc" -dependencies = [ - "rustversion", -] - -[[package]] -name = "cbc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" -dependencies = [ - "cipher", -] - -[[package]] -name = "cbor4ii" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544cf8c89359205f4f990d0e6f3828db42df85b5dac95d09157a250eb0749c4" -dependencies = [ - "serde", -] - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" -dependencies = [ - "num-traits", -] - -[[package]] -name = "cid" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" -dependencies = [ - "core2", - "multibase", - "multihash", - "serde", - "serde_bytes", - "unsigned-varint", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", - "zeroize", -] - -[[package]] -name = "clap" -version = "4.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_complete" -version = "4.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" -dependencies = [ - "clap", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac 0.12.1", - "k256", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.5", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array 0.14.7", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2 0.10.8", - "sha3", - "thiserror", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "concurrent-queue" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "config" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ad70579325f1a38ea4c13412b82241c5900700a69785d73e2736bd65a33f86" -dependencies = [ - "async-trait", - "lazy_static", - "nom", - "pathdiff", - "serde", - "toml 0.5.11", -] - -[[package]] -name = "const-hex" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2801af0d36612ae591caa9568261fddce32ce6e08a7275ea334a06a4ad021a2c" -dependencies = [ - "cfg-if", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - -[[package]] -name = "cs_serde_bytes" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc673ddabf48214550526b068dc28065a75f05e21e452880095247c635b1d91" -dependencies = [ - "serde", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "data-encoding" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" - -[[package]] -name = "data-encoding-macro" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3" -dependencies = [ - "data-encoding", - "syn 1.0.109", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "ec-gpu" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd63582de2b59ea1aa48d7c1941b5d87618d95484397521b3acdfa0e1e9f5e45" - -[[package]] -name = "ec-gpu-gen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd09bf9d5313ad60379f70250590bccc10f7a04e2773062ac13255a37022584e" -dependencies = [ - "bitvec", - "crossbeam-channel", - "ec-gpu", - "execute", - "ff 0.12.1", - "group 0.12.1", - "hex", - "log", - "num_cpus", - "once_cell", - "rayon", - "sha2 0.10.8", - "thiserror", - "yastl", -] - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff 0.13.0", - "generic-array 0.14.7", - "group 0.13.0", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "ena" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" -dependencies = [ - "log", -] - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "enr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" -dependencies = [ - "base64 0.21.5", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", -] - -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "sha2 0.10.8", - "sha3", - "thiserror", - "uuid", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5344eea9b20effb5efeaad29418215c4d27017639fd1f908260f59cbbd226e" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c405f24ea3a517899ba7985385c43dc4a7eb1209af3b1e0a1a32d7dcc7f8d09" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0111ead599d17a7bff6985fd5756f39ca7033edc79a31b23026a8d5d64fa95cd" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51258120c6b47ea9d9bec0d90f9e8af71c977fbefbef8213c91bfed385fe45eb" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest", - "serde", - "serde_json", - "syn 2.0.39", - "toml 0.8.8", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e7a0f1197cee2b62dc89f63eff3201dbf87c283ff7e18d86d38f83b845483" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.39", -] - -[[package]] -name = "ethers-core" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f03e0bdc216eeb9e355b90cf610ef6c5bb8aca631f97b5ae9980ce34ea7878d" -dependencies = [ - "arrayvec 0.7.4", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array 0.14.7", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum 0.25.0", - "syn 2.0.39", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-etherscan" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbac2c890bdbe0f1b8e549a53b00e2c4c1de86bb077c1094d1f38cdf9381a56" -dependencies = [ - "chrono", - "ethers-core", - "reqwest", - "semver", - "serde", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681ece6eb1d10f7cf4f873059a77c04ff1de4f35c63dd7bccde8f438374fcb93" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.5", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite 0.20.1", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb1b714e227bbd2d8c53528adb580b203009728b17d0d0e4119353aa9bc5532" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2 0.10.8", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-solc" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64f710586d147864cff66540a6d64518b9ff37d73ef827fee430538265b595f" -dependencies = [ - "cfg-if", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "execute" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a82608ee96ce76aeab659e9b8d3c2b787bffd223199af88c674923d861ada10" -dependencies = [ - "execute-command-macro", - "execute-command-tokens", - "generic-array 1.0.0", -] - -[[package]] -name = "execute-command-macro" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90dec53d547564e911dc4ff3ecb726a64cf41a6fa01a2370ebc0d95175dd08bd" -dependencies = [ - "execute-command-macro-impl", -] - -[[package]] -name = "execute-command-macro-impl" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce8cd46a041ad005ab9c71263f9a0ff5b529eac0fe4cc9b4a20f4f0765d8cf4b" -dependencies = [ - "execute-command-tokens", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "execute-command-tokens" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69dc321eb6be977f44674620ca3aa21703cb20ffbe560e1ae97da08401ffbcad" - -[[package]] -name = "eyre" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "fdlimit" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" -dependencies = [ - "libc", -] - -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "bitvec", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fil_actors_runtime" -version = "0.0.1" -source = "git+https://github.com/consensus-shipyard/fvm-utils#368ad258a82204d0004b7321f1015373fb4d17b9" -dependencies = [ - "anyhow", - "base64 0.13.1", - "blake2b_simd", - "byteorder", - "castaway", - "cid", - "frc42_dispatch", - "fvm_ipld_amt", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.5.1", - "fvm_sdk", - "fvm_shared", - "getrandom 0.2.11", - "indexmap 1.9.3", - "integer-encoding", - "itertools 0.10.5", - "lazy_static", - "log", - "multihash", - "num-derive", - "num-traits", - "paste", - "rand 0.7.3", - "regex", - "serde", - "serde_repr", - "serde_tuple", - "sha2 0.10.8", - "thiserror", - "unsigned-varint", -] - -[[package]] -name = "fil_pasta_curves" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3303ea3c462ab949ab95b49f6e6d255d8d9396ebd4f1626ccb34c7037615aa8f" -dependencies = [ - "blake2b_simd", - "ff 0.12.1", - "group 0.12.1", - "lazy_static", - "rand 0.8.5", - "static_assertions", - "subtle", -] - -[[package]] -name = "filecoin-hashers" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d7e656d4f01d7772ef2dd0f59854c8f904370a946053cf37ef420c854d9a35" -dependencies = [ - "anyhow", - "bellperson", - "blstrs", - "ff 0.12.1", - "generic-array 0.14.7", - "hex", - "lazy_static", - "merkletree", - "neptune", - "rand 0.8.5", - "serde", - "sha2 0.10.8", -] - -[[package]] -name = "filecoin-proofs" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e00449c0e89be0922127e7e927e578247825450abdaf0da2fc30b733cb0e535b" -dependencies = [ - "anyhow", - "bellperson", - "bincode", - "blake2b_simd", - "blstrs", - "filecoin-hashers", - "fr32", - "generic-array 0.14.7", - "hex", - "lazy_static", - "log", - "memmap2", - "merkletree", - "once_cell", - "rand 0.8.5", - "rayon", - "serde", - "serde_json", - "sha2 0.10.8", - "storage-proofs-core", - "storage-proofs-porep", - "storage-proofs-post", - "storage-proofs-update", - "typenum", -] - -[[package]] -name = "filecoin-proofs-api" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347a43603e12b147cc3d8285fee27771e1e9702d90f1f8e5018b8dd96b5da467" -dependencies = [ - "anyhow", - "bellperson", - "bincode", - "blstrs", - "filecoin-hashers", - "filecoin-proofs", - "fr32", - "lazy_static", - "serde", - "storage-proofs-core", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" -dependencies = [ - "spin 0.9.8", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "forest_hash_utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb061ad769411763a5d6ae39d596696657472b25a66387fbb0ba8c133bb6575" -dependencies = [ - "cs_serde_bytes", - "serde", -] - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fr32" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4f07b8a600b8c699f8ddc5f520231bc2aac03e944c64055eccfd9a959c3fd60" -dependencies = [ - "anyhow", - "blstrs", - "byte-slice-cast", - "byteorder", - "ff 0.12.1", - "thiserror", -] - -[[package]] -name = "frc42_dispatch" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fda233581861602b8c1c0922a44d79977cb0f56cfe1c3b71eafb589d1da749" -dependencies = [ - "frc42_hasher", - "frc42_macros", - "fvm_ipld_encoding 0.3.3", - "fvm_sdk", - "fvm_shared", - "thiserror", -] - -[[package]] -name = "frc42_hasher" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1cf7cebdc57c39906ba8b1148cde4a633cd76614131b983eb4c07f35c735d0" -dependencies = [ - "fvm_sdk", - "fvm_shared", - "thiserror", -] - -[[package]] -name = "frc42_macros" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9479347c6b83b53f1c041045e9954e3213bb6d1cfc9d2f2927340765a1aabd58" -dependencies = [ - "blake2b_simd", - "frc42_hasher", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" - -[[package]] -name = "futures-executor" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" - -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - -[[package]] -name = "futures-macro" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "futures-sink" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" - -[[package]] -name = "futures-task" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" - -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - -[[package]] -name = "futures-util" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fvm_ipld_amt" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d09e5aa7de45452676d18fcb70b750acd65faae7a4fe18fe784b4c85f869fb" -dependencies = [ - "ahash 0.7.7", - "anyhow", - "cid", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.2.3", - "itertools 0.10.5", - "once_cell", - "serde", - "thiserror", -] - -[[package]] -name = "fvm_ipld_blockstore" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee8c75be2b58943e1a9755802d34d4c3934f6ea151b6be192ff98f644e515bd" -dependencies = [ - "anyhow", - "cid", - "multihash", -] - -[[package]] -name = "fvm_ipld_encoding" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1ff5ba581625ab38cf2829fbd04ac232c6277466fdbe0270b42dcb976902d5" -dependencies = [ - "anyhow", - "cid", - "cs_serde_bytes", - "fvm_ipld_blockstore", - "multihash", - "serde", - "serde_ipld_dagcbor", - "serde_repr", - "serde_tuple", - "thiserror", -] - -[[package]] -name = "fvm_ipld_encoding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0816a2a6df4853de08a723d261110d56a121aa313bc570fe9d248f0a4bc5288" -dependencies = [ - "anyhow", - "cid", - "fvm_ipld_blockstore", - "multihash", - "serde", - "serde_ipld_dagcbor", - "serde_repr", - "serde_tuple", - "thiserror", -] - -[[package]] -name = "fvm_ipld_hamt" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65b5c939897aa1bfd63e7cb9c458ba10689371af3278ff20d66c6f8ca152c6c0" -dependencies = [ - "anyhow", - "byteorder", - "cid", - "cs_serde_bytes", - "forest_hash_utils", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.2.3", - "libipld-core 0.13.1", - "multihash", - "once_cell", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "fvm_ipld_hamt" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c942494dde990aeac314311bde34c787be99cab7d0836397a75556cbaa2c3e7" -dependencies = [ - "anyhow", - "byteorder", - "cid", - "forest_hash_utils", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "libipld-core 0.14.0", - "multihash", - "once_cell", - "serde", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "fvm_sdk" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8ac1214ca6c31bcbb4e2e7461cd17af18e0496b9053547d465f15c8d8429a7" -dependencies = [ - "cid", - "fvm_ipld_encoding 0.3.3", - "fvm_shared", - "lazy_static", - "log", - "num-traits", - "thiserror", -] - -[[package]] -name = "fvm_shared" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e86afc2ce02808d24f578296f105b13c23300e60e0eac331c4c1575beabb5" -dependencies = [ - "anyhow", - "bitflags 1.3.2", - "blake2b_simd", - "bls-signatures", - "cid", - "data-encoding", - "data-encoding-macro", - "filecoin-proofs-api", - "fvm_ipld_encoding 0.3.3", - "lazy_static", - "libsecp256k1", - "multihash", - "num-bigint", - "num-derive", - "num-integer", - "num-traits", - "serde", - "serde_tuple", - "thiserror", - "unsigned-varint", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "generic-array" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe739944a5406424e080edccb6add95685130b9f160d5407c639c7df0c5836b0" -dependencies = [ - "typenum", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand 0.8.5", - "rand_core 0.6.4", - "rand_xorshift", - "subtle", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff 0.13.0", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 2.1.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.7", - "hmac 0.8.1", -] - -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "http" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2 0.4.10", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "indoc" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "block-padding", - "generic-array 0.14.7", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "ipc-cli" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-channel", - "async-trait", - "base64 0.21.5", - "bytes", - "cid", - "clap", - "clap_complete", - "env_logger 0.10.1", - "ethers", - "ethers-contract", - "fil_actors_runtime", - "futures-util", - "fvm_ipld_encoding 0.3.3", - "fvm_shared", - "hex", - "ipc-identity", - "ipc-provider", - "ipc-sdk", - "libsecp256k1", - "log", - "num-derive", - "num-traits", - "primitives", - "reqwest", - "serde", - "serde_bytes", - "serde_json", - "serde_tuple", - "strum 0.24.1", - "thiserror", - "tokio", - "tokio-tungstenite 0.18.0", - "toml 0.7.8", - "url", - "zeroize", -] - -[[package]] -name = "ipc-identity" -version = "0.1.0" -dependencies = [ - "ahash 0.8.6", - "anyhow", - "argon2", - "base64 0.21.5", - "blake2b_simd", - "bls-signatures", - "ethers", - "fvm_shared", - "hex", - "libc", - "libsecp256k1", - "log", - "primitives", - "quickcheck", - "quickcheck_macros", - "rand 0.8.5", - "serde", - "serde_ipld_dagcbor", - "serde_json", - "tempfile", - "thiserror", - "tokio", - "xsalsa20poly1305", - "zeroize", -] - -[[package]] -name = "ipc-provider" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-channel", - "async-trait", - "base64 0.21.5", - "bytes", - "cid", - "dirs", - "ethers", - "ethers-contract", - "fil_actors_runtime", - "futures-util", - "fvm_ipld_encoding 0.3.3", - "fvm_shared", - "hex", - "indoc", - "ipc-identity", - "ipc-sdk", - "ipc_actors_abis", - "log", - "num-derive", - "num-traits", - "primitives", - "reqwest", - "serde", - "serde_bytes", - "serde_json", - "serde_tuple", - "strum 0.24.1", - "tempfile", - "thiserror", - "tokio", - "tokio-tungstenite 0.18.0", - "toml 0.7.8", - "url", - "zeroize", -] - -[[package]] -name = "ipc-sdk" -version = "0.1.0" -dependencies = [ - "anyhow", - "cid", - "ethers", - "fil_actors_runtime", - "fnv", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.6.1", - "fvm_shared", - "integer-encoding", - "ipc_actors_abis", - "lazy_static", - "log", - "num-traits", - "primitives", - "serde", - "serde_json", - "serde_tuple", - "thiserror", -] - -[[package]] -name = "ipc_actors_abis" -version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/ipc-solidity-actors.git?branch=dev#ae9edfbf9ca41fbf31f28b8428229f091ada0917" -dependencies = [ - "anyhow", - "ethers", - "fvm_shared", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.5", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "k256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lalrpop" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" -dependencies = [ - "ascii-canvas", - "bit-set", - "diff", - "ena", - "is-terminal", - "itertools 0.10.5", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax 0.7.5", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libipld-core" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdd758764f9680a818af33c31db733eb7c45224715d8816b9dcf0548c75f7c5" -dependencies = [ - "anyhow", - "cid", - "core2", - "multibase", - "multihash", - "serde", - "thiserror", -] - -[[package]] -name = "libipld-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44790246ec6b7314cba745992c23d479d018073e66d49ae40ae1b64e5dd8eb5" -dependencies = [ - "anyhow", - "cid", - "core2", - "multibase", - "multihash", - "serde", - "thiserror", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.1", - "libc", - "redox_syscall", -] - -[[package]] -name = "libsecp256k1" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" -dependencies = [ - "arrayref", - "base64 0.13.1", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.8.5", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest 0.10.7", -] - -[[package]] -name = "memchr" -version = "2.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "merkletree" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d348b5b0d1707be1c8a727b7078daa08e2a3051d63b35715a19c35a324d2aaac" -dependencies = [ - "anyhow", - "arrayref", - "log", - "memmap2", - "positioned-io", - "rayon", - "serde", - "tempfile", - "typenum", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - -[[package]] -name = "multibase" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" -dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", -] - -[[package]] -name = "multihash" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" -dependencies = [ - "blake2b_simd", - "core2", - "digest 0.10.7", - "multihash-derive", - "ripemd", - "serde", - "serde-big-array", - "sha2 0.10.8", - "sha3", - "unsigned-varint", -] - -[[package]] -name = "multihash-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "neptune" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dedb261f1b35ddfd867295eacbc25eb78b4b5b63b08b1c0dc4c1b5ef0e5b2c2" -dependencies = [ - "bellperson", - "blake2s_simd 0.5.11", - "blstrs", - "byteorder", - "ff 0.12.1", - "fil_pasta_curves", - "generic-array 0.14.7", - "itertools 0.8.2", - "lazy_static", - "log", - "trait-set", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" -dependencies = [ - "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "object" -version = "0.32.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec 0.7.4", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "openssl" -version = "0.10.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.96" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "pairing" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135590d8bdba2b31346f9cd1fb2a912329f5135e832a4f422942eb6ead8b6b3b" -dependencies = [ - "group 0.12.1", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" -dependencies = [ - "proc-macro-crate 2.0.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "password-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", - "password-hash 0.4.2", - "sha2 0.10.8", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", -] - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.1.0", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "positioned-io" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccabfeeb89c73adf4081f0dca7f8e28dbda90981a222ceea37f619e93ea6afe9" -dependencies = [ - "byteorder", - "libc", - "winapi", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "prettyplease" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn 2.0.39", -] - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "primitives" -version = "0.1.0" -source = "git+https://github.com/consensus-shipyard/fvm-utils#368ad258a82204d0004b7321f1015373fb4d17b9" -dependencies = [ - "anyhow", - "cid", - "fil_actors_runtime", - "fvm_ipld_blockstore", - "fvm_ipld_encoding 0.3.3", - "fvm_ipld_hamt 0.5.1", - "fvm_shared", - "hex", - "indexmap 1.9.3", - "integer-encoding", - "lazy_static", - "log", - "num-derive", - "num-traits", - "serde", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" -dependencies = [ - "thiserror", - "toml 0.5.11", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bitflags 2.4.1", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift", - "regex-syntax 0.8.2", - "unarray", -] - -[[package]] -name = "quickcheck" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" -dependencies = [ - "env_logger 0.8.4", - "log", - "rand 0.8.5", -] - -[[package]] -name = "quickcheck_macros" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "quote" -version = "1.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.11", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom 0.2.11", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" -dependencies = [ - "base64 0.21.5", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac 0.12.1", - "subtle", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" -dependencies = [ - "cc", - "getrandom 0.2.11", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.48.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rlp-derive", - "rustc-hex", -] - -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" -dependencies = [ - "bitflags 2.4.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustls" -version = "0.21.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" -dependencies = [ - "log", - "ring 0.17.6", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.5", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.6", - "untrusted 0.9.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "schannel" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac 0.12.1", - "pbkdf2 0.11.0", - "salsa20", - "sha2 0.10.8", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.6", - "untrusted 0.9.0", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" -dependencies = [ - "serde", -] - -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - -[[package]] -name = "serde" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-big-array" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.193" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_ipld_dagcbor" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e23de7a4a18dff77ab9531f279a882500b8cf3549fde044d4e10481b411f1e" -dependencies = [ - "cbor4ii", - "cid", - "scopeguard", - "serde", -] - -[[package]] -name = "serde_json" -version = "1.0.108" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "serde_spanned" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_tuple" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f025b91216f15a2a32aa39669329a475733590a015835d1783549a56d09427" -dependencies = [ - "serde", - "serde_tuple_macros", -] - -[[package]] -name = "serde_tuple_macros" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4076151d1a2b688e25aaf236997933c66e18b870d0369f8b248b8ab2be630d7e" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", - "sha2-asm", -] - -[[package]] -name = "sha2-asm" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27ba7066011e3fb30d808b51affff34f0a66d3a03a58edd787c6e420e40e44e" -dependencies = [ - "cc", -] - -[[package]] -name = "sha2raw" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1ec45c74ebb91d25e61e14cfc1925e7571723ae14a38fc6c8bd0b2e516db101" -dependencies = [ - "byteorder", - "cpufeatures", - "digest 0.10.7", - "fake-simd", - "lazy_static", - "opaque-debug", - "sha2-asm", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "solang-parser" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" -dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "storage-proofs-core" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f756ef2dd06efda2eb30bf6806399d493072d8469b0a724f1905dc051fea59c1" -dependencies = [ - "aes", - "anyhow", - "bellperson", - "blake2b_simd", - "blstrs", - "byteorder", - "cbc", - "config", - "ff 0.12.1", - "filecoin-hashers", - "fr32", - "fs2", - "generic-array 0.14.7", - "itertools 0.10.5", - "lazy_static", - "log", - "memmap2", - "merkletree", - "num_cpus", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rayon", - "semver", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "storage-proofs-porep" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2450a62eb009602a4a4d697a027ab1025657cd76b325a99dfeb8d263d44b1c5c" -dependencies = [ - "anyhow", - "bellperson", - "bincode", - "blstrs", - "byte-slice-cast", - "byteorder", - "crossbeam", - "fdlimit", - "ff 0.12.1", - "filecoin-hashers", - "fr32", - "generic-array 0.14.7", - "hex", - "lazy_static", - "libc", - "log", - "memmap2", - "merkletree", - "neptune", - "num-bigint", - "num-traits", - "num_cpus", - "pretty_assertions", - "rayon", - "rustversion", - "serde", - "serde_json", - "sha2 0.10.8", - "sha2raw", - "storage-proofs-core", - "yastl", -] - -[[package]] -name = "storage-proofs-post" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e034a55f3c5137120c4cd1abb717cd397c660447c4393c2550be3ee5b070c4" -dependencies = [ - "anyhow", - "bellperson", - "blake2b_simd", - "blstrs", - "byteorder", - "ff 0.12.1", - "filecoin-hashers", - "fr32", - "generic-array 0.14.7", - "hex", - "log", - "rayon", - "serde", - "sha2 0.10.8", - "storage-proofs-core", -] - -[[package]] -name = "storage-proofs-update" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3433b2832153e2744bfa87176dcb0b587392b57fd1bd770804d366c98822285a" -dependencies = [ - "anyhow", - "bellperson", - "blstrs", - "ff 0.12.1", - "filecoin-hashers", - "fr32", - "generic-array 0.14.7", - "lazy_static", - "log", - "memmap2", - "merkletree", - "neptune", - "rayon", - "serde", - "storage-proofs-core", - "storage-proofs-porep", -] - -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.39", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "svm-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20689c7d03b6461b502d0b95d6c24874c7d24dea2688af80486a130a06af3b07" -dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest", - "semver", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "url", - "zip", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" -dependencies = [ - "cfg-if", - "fastrand", - "redox_syscall", - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" -dependencies = [ - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.5", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" -dependencies = [ - "futures-util", - "log", - "native-tls", - "tokio", - "tokio-native-tls", - "tungstenite 0.18.0", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls", - "tokio", - "tokio-rustls", - "tungstenite 0.20.1", - "webpki-roots", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.21.0", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap 2.1.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "trait-set" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b79e2e9c9ab44c6d7c20d5976961b47e8f49ac199154daa514b77cd1ab536625" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "try-lock" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" - -[[package]] -name = "tungstenite" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "native-tls", - "rand 0.8.5", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http", - "httparse", - "log", - "rand 0.8.5", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - -[[package]] -name = "unsigned-varint" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.11", - "serde", -] - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" - -[[package]] -name = "web-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "xsalsa20poly1305" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a6dad357567f81cd78ee75f7c61f1b30bb2fe4390be8fb7c69e2ac8dffb6c7" -dependencies = [ - "aead", - "poly1305", - "salsa20", - "subtle", - "zeroize", -] - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "yastl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca6c5a4d66c1a9ea261811cf4773c27343de7e5033e1b75ea3f297dc7db3c1a" -dependencies = [ - "flume", - "scopeguard", -] - -[[package]] -name = "zerocopy" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq 0.1.5", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac 0.12.1", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/ipc/Cargo.toml b/ipc/Cargo.toml deleted file mode 100644 index 0b763788e..000000000 --- a/ipc/Cargo.toml +++ /dev/null @@ -1,66 +0,0 @@ -[workspace] -resolver = "2" -members = [ - "ipc/cli", - "ipc/provider", - "ipc/identity", - "ipc/sdk", -] - -[workspace.package] -authors = ["Protocol Labs"] -edition = "2021" -license-file = "LICENSE" - -[workspace.dependencies] -anyhow = "1.0" -reqwest = { version = "0.11.13", features = ["json"] } -async-trait = "0.1.73" -async-channel = "1.8.0" -url = { version = "2.3.1", features = ["serde"] } -num-traits = "0.2.15" -base64 = "0.21.0" -lazy_static = "1.4" -log = "0.4" -env_logger = "0.10" -cid = { version = "0.8.3", default-features = false, features = ["serde-codec"] } -futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } -prometheus = "0.13" -serde = { version = "1.0", features = ["derive"] } -serde_tuple = "0.5.0" -tokio = { version = "1.16", features = ["full"] } -tokio-tungstenite = { version = "0.18.0", features = ["native-tls"] } -thiserror = "1.0.38" -quickcheck = "1" -quickcheck_macros = "1" -blake2b_simd = "1.0" -rand = "0.8" -hex = "0.4.3" -tempfile = "3.4.0" -serde_json = { version = "1.0.91", features = ["raw_value"] } - -ipc_actors_abis = { git = "https://github.com/consensus-shipyard/ipc-solidity-actors.git", branch = "dev" } - -libipld = { version = "0.14", default-features = false, features = ["dag-cbor"] } -libsecp256k1 = "0.7" -ethers = "2.0.8" -ethers-contract = "2.0.8" - -ipc-sdk = { path = "./ipc/sdk" } - -fvm_ipld_blockstore = "0.1.1" -fvm_ipld_encoding = "0.3.3" -fvm_ipld_hamt = "0.6" -fvm_shared = { version = "=3.2.0", default-features = false, features = ["crypto"] } -fil_actors_runtime = { git = "https://github.com/consensus-shipyard/fvm-utils", features = [ - "fil-actor", -] } -primitives = { git = "https://github.com/consensus-shipyard/fvm-utils" } - -# Uncomment to point to you local versions -# [patch."https://github.com/consensus-shipyard/fvm-utils"] -# primitives = { path = "../fvm-utils/primitives" } -# fil_actors_runtime = { path = "../fvm-utils/runtime" } - -# [patch."https://github.com/consensus-shipyard/ipc-solidity-actors.git"] -# ipc_actors_abis = { path = "../ipc-solidity-actors/binding" } diff --git a/ipc/ipc/cli/Cargo.toml b/ipc/cli/Cargo.toml similarity index 90% rename from ipc/ipc/cli/Cargo.toml rename to ipc/cli/Cargo.toml index 30f5996a1..bb8eb5148 100644 --- a/ipc/ipc/cli/Cargo.toml +++ b/ipc/cli/Cargo.toml @@ -42,6 +42,6 @@ fil_actors_runtime = { workspace = true } fvm_ipld_encoding = { workspace = true } primitives = { workspace = true } -ipc-identity = { path = "../identity", features = ["with-ethers"] } -ipc-provider = { path = "../provider" } -ipc-sdk = { path = "../sdk" } \ No newline at end of file +ipc-identity = { workspace = true, features = ["with-ethers"] } +ipc-provider = { workspace = true } +ipc-sdk = { workspace = true } \ No newline at end of file diff --git a/ipc/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs b/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/bottomup_bundles.rs rename to ipc/cli/src/commands/checkpoint/bottomup_bundles.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/bottomup_height.rs b/ipc/cli/src/commands/checkpoint/bottomup_height.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/bottomup_height.rs rename to ipc/cli/src/commands/checkpoint/bottomup_height.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/bottomup_submitted.rs b/ipc/cli/src/commands/checkpoint/bottomup_submitted.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/bottomup_submitted.rs rename to ipc/cli/src/commands/checkpoint/bottomup_submitted.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/list_checkpoints.rs b/ipc/cli/src/commands/checkpoint/list_checkpoints.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/list_checkpoints.rs rename to ipc/cli/src/commands/checkpoint/list_checkpoints.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/list_validator_changes.rs b/ipc/cli/src/commands/checkpoint/list_validator_changes.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/list_validator_changes.rs rename to ipc/cli/src/commands/checkpoint/list_validator_changes.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/mod.rs b/ipc/cli/src/commands/checkpoint/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/mod.rs rename to ipc/cli/src/commands/checkpoint/mod.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/quorum_reached.rs b/ipc/cli/src/commands/checkpoint/quorum_reached.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/quorum_reached.rs rename to ipc/cli/src/commands/checkpoint/quorum_reached.rs diff --git a/ipc/ipc/cli/src/commands/checkpoint/relayer.rs b/ipc/cli/src/commands/checkpoint/relayer.rs similarity index 100% rename from ipc/ipc/cli/src/commands/checkpoint/relayer.rs rename to ipc/cli/src/commands/checkpoint/relayer.rs diff --git a/ipc/ipc/cli/src/commands/config/init.rs b/ipc/cli/src/commands/config/init.rs similarity index 100% rename from ipc/ipc/cli/src/commands/config/init.rs rename to ipc/cli/src/commands/config/init.rs diff --git a/ipc/ipc/cli/src/commands/config/mod.rs b/ipc/cli/src/commands/config/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/config/mod.rs rename to ipc/cli/src/commands/config/mod.rs diff --git a/ipc/ipc/cli/src/commands/crossmsg/fund.rs b/ipc/cli/src/commands/crossmsg/fund.rs similarity index 100% rename from ipc/ipc/cli/src/commands/crossmsg/fund.rs rename to ipc/cli/src/commands/crossmsg/fund.rs diff --git a/ipc/ipc/cli/src/commands/crossmsg/mod.rs b/ipc/cli/src/commands/crossmsg/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/crossmsg/mod.rs rename to ipc/cli/src/commands/crossmsg/mod.rs diff --git a/ipc/ipc/cli/src/commands/crossmsg/propagate.rs b/ipc/cli/src/commands/crossmsg/propagate.rs similarity index 100% rename from ipc/ipc/cli/src/commands/crossmsg/propagate.rs rename to ipc/cli/src/commands/crossmsg/propagate.rs diff --git a/ipc/ipc/cli/src/commands/crossmsg/release.rs b/ipc/cli/src/commands/crossmsg/release.rs similarity index 100% rename from ipc/ipc/cli/src/commands/crossmsg/release.rs rename to ipc/cli/src/commands/crossmsg/release.rs diff --git a/ipc/ipc/cli/src/commands/crossmsg/topdown_cross.rs b/ipc/cli/src/commands/crossmsg/topdown_cross.rs similarity index 100% rename from ipc/ipc/cli/src/commands/crossmsg/topdown_cross.rs rename to ipc/cli/src/commands/crossmsg/topdown_cross.rs diff --git a/ipc/ipc/cli/src/commands/daemon.rs b/ipc/cli/src/commands/daemon.rs similarity index 100% rename from ipc/ipc/cli/src/commands/daemon.rs rename to ipc/cli/src/commands/daemon.rs diff --git a/ipc/ipc/cli/src/commands/mod.rs b/ipc/cli/src/commands/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/mod.rs rename to ipc/cli/src/commands/mod.rs diff --git a/ipc/ipc/cli/src/commands/subnet/bootstrap.rs b/ipc/cli/src/commands/subnet/bootstrap.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/bootstrap.rs rename to ipc/cli/src/commands/subnet/bootstrap.rs diff --git a/ipc/ipc/cli/src/commands/subnet/create.rs b/ipc/cli/src/commands/subnet/create.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/create.rs rename to ipc/cli/src/commands/subnet/create.rs diff --git a/ipc/ipc/cli/src/commands/subnet/genesis_epoch.rs b/ipc/cli/src/commands/subnet/genesis_epoch.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/genesis_epoch.rs rename to ipc/cli/src/commands/subnet/genesis_epoch.rs diff --git a/ipc/ipc/cli/src/commands/subnet/join.rs b/ipc/cli/src/commands/subnet/join.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/join.rs rename to ipc/cli/src/commands/subnet/join.rs diff --git a/ipc/ipc/cli/src/commands/subnet/kill.rs b/ipc/cli/src/commands/subnet/kill.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/kill.rs rename to ipc/cli/src/commands/subnet/kill.rs diff --git a/ipc/ipc/cli/src/commands/subnet/leave.rs b/ipc/cli/src/commands/subnet/leave.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/leave.rs rename to ipc/cli/src/commands/subnet/leave.rs diff --git a/ipc/ipc/cli/src/commands/subnet/list_subnets.rs b/ipc/cli/src/commands/subnet/list_subnets.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/list_subnets.rs rename to ipc/cli/src/commands/subnet/list_subnets.rs diff --git a/ipc/ipc/cli/src/commands/subnet/mod.rs b/ipc/cli/src/commands/subnet/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/mod.rs rename to ipc/cli/src/commands/subnet/mod.rs diff --git a/ipc/ipc/cli/src/commands/subnet/rpc.rs b/ipc/cli/src/commands/subnet/rpc.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/rpc.rs rename to ipc/cli/src/commands/subnet/rpc.rs diff --git a/ipc/ipc/cli/src/commands/subnet/send_value.rs b/ipc/cli/src/commands/subnet/send_value.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/send_value.rs rename to ipc/cli/src/commands/subnet/send_value.rs diff --git a/ipc/ipc/cli/src/commands/subnet/validator.rs b/ipc/cli/src/commands/subnet/validator.rs similarity index 100% rename from ipc/ipc/cli/src/commands/subnet/validator.rs rename to ipc/cli/src/commands/subnet/validator.rs diff --git a/ipc/ipc/cli/src/commands/util/f4.rs b/ipc/cli/src/commands/util/f4.rs similarity index 100% rename from ipc/ipc/cli/src/commands/util/f4.rs rename to ipc/cli/src/commands/util/f4.rs diff --git a/ipc/ipc/cli/src/commands/util/mod.rs b/ipc/cli/src/commands/util/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/util/mod.rs rename to ipc/cli/src/commands/util/mod.rs diff --git a/ipc/ipc/cli/src/commands/wallet/balances.rs b/ipc/cli/src/commands/wallet/balances.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/balances.rs rename to ipc/cli/src/commands/wallet/balances.rs diff --git a/ipc/ipc/cli/src/commands/wallet/default.rs b/ipc/cli/src/commands/wallet/default.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/default.rs rename to ipc/cli/src/commands/wallet/default.rs diff --git a/ipc/ipc/cli/src/commands/wallet/export.rs b/ipc/cli/src/commands/wallet/export.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/export.rs rename to ipc/cli/src/commands/wallet/export.rs diff --git a/ipc/ipc/cli/src/commands/wallet/import.rs b/ipc/cli/src/commands/wallet/import.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/import.rs rename to ipc/cli/src/commands/wallet/import.rs diff --git a/ipc/ipc/cli/src/commands/wallet/mod.rs b/ipc/cli/src/commands/wallet/mod.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/mod.rs rename to ipc/cli/src/commands/wallet/mod.rs diff --git a/ipc/ipc/cli/src/commands/wallet/new.rs b/ipc/cli/src/commands/wallet/new.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/new.rs rename to ipc/cli/src/commands/wallet/new.rs diff --git a/ipc/ipc/cli/src/commands/wallet/remove.rs b/ipc/cli/src/commands/wallet/remove.rs similarity index 100% rename from ipc/ipc/cli/src/commands/wallet/remove.rs rename to ipc/cli/src/commands/wallet/remove.rs diff --git a/ipc/ipc/cli/src/lib.rs b/ipc/cli/src/lib.rs similarity index 100% rename from ipc/ipc/cli/src/lib.rs rename to ipc/cli/src/lib.rs diff --git a/ipc/ipc/cli/src/main.rs b/ipc/cli/src/main.rs similarity index 100% rename from ipc/ipc/cli/src/main.rs rename to ipc/cli/src/main.rs diff --git a/ipc/ipc/identity/Cargo.toml b/ipc/identity/Cargo.toml similarity index 100% rename from ipc/ipc/identity/Cargo.toml rename to ipc/identity/Cargo.toml diff --git a/ipc/ipc/identity/src/evm/memory.rs b/ipc/identity/src/evm/memory.rs similarity index 100% rename from ipc/ipc/identity/src/evm/memory.rs rename to ipc/identity/src/evm/memory.rs diff --git a/ipc/ipc/identity/src/evm/mod.rs b/ipc/identity/src/evm/mod.rs similarity index 100% rename from ipc/ipc/identity/src/evm/mod.rs rename to ipc/identity/src/evm/mod.rs diff --git a/ipc/ipc/identity/src/evm/persistent.rs b/ipc/identity/src/evm/persistent.rs similarity index 100% rename from ipc/ipc/identity/src/evm/persistent.rs rename to ipc/identity/src/evm/persistent.rs diff --git a/ipc/ipc/identity/src/fvm/errors.rs b/ipc/identity/src/fvm/errors.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/errors.rs rename to ipc/identity/src/fvm/errors.rs diff --git a/ipc/ipc/identity/src/fvm/keystore.rs b/ipc/identity/src/fvm/keystore.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/keystore.rs rename to ipc/identity/src/fvm/keystore.rs diff --git a/ipc/ipc/identity/src/fvm/mod.rs b/ipc/identity/src/fvm/mod.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/mod.rs rename to ipc/identity/src/fvm/mod.rs diff --git a/ipc/ipc/identity/src/fvm/serialization.rs b/ipc/identity/src/fvm/serialization.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/serialization.rs rename to ipc/identity/src/fvm/serialization.rs diff --git a/ipc/ipc/identity/src/fvm/utils.rs b/ipc/identity/src/fvm/utils.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/utils.rs rename to ipc/identity/src/fvm/utils.rs diff --git a/ipc/ipc/identity/src/fvm/wallet.rs b/ipc/identity/src/fvm/wallet.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/wallet.rs rename to ipc/identity/src/fvm/wallet.rs diff --git a/ipc/ipc/identity/src/fvm/wallet_helpers.rs b/ipc/identity/src/fvm/wallet_helpers.rs similarity index 100% rename from ipc/ipc/identity/src/fvm/wallet_helpers.rs rename to ipc/identity/src/fvm/wallet_helpers.rs diff --git a/ipc/ipc/identity/src/lib.rs b/ipc/identity/src/lib.rs similarity index 100% rename from ipc/ipc/identity/src/lib.rs rename to ipc/identity/src/lib.rs diff --git a/ipc/ipc/identity/tests/keystore_encrypted_old/keystore b/ipc/identity/tests/keystore_encrypted_old/keystore similarity index 100% rename from ipc/ipc/identity/tests/keystore_encrypted_old/keystore rename to ipc/identity/tests/keystore_encrypted_old/keystore diff --git a/ipc/ipc/ipld/resolver/README.md b/ipc/ipc/ipld/resolver/README.md deleted file mode 100644 index 31f0091d5..000000000 --- a/ipc/ipc/ipld/resolver/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# IPLD Resolver - -The IPLD Resolver has been moved to its own repository at https://github.com/consensus-shipyard/ipc-ipld-resolver diff --git a/ipc/ipc/testing/e2e/.gitignore b/ipc/ipc/testing/e2e/.gitignore deleted file mode 100644 index 304dd5a38..000000000 --- a/ipc/ipc/testing/e2e/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.ipc -.make diff --git a/ipc/ipc/testing/e2e/Cargo.toml b/ipc/ipc/testing/e2e/Cargo.toml deleted file mode 100644 index 09f14c20b..000000000 --- a/ipc/ipc/testing/e2e/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "ipc_e2e" -description = "IPC end-to-end tests, which rely on an external environment set up and running." -version = "0.1.0" -authors.workspace = true -edition.workspace = true -license-file.workspace = true -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow = { workspace = true } - -fvm_shared = { workspace = true } - -ipc-agent = { path = "../../daemon" } - - -[dev-dependencies] -tokio = { workspace = true } -log = { workspace = true } diff --git a/ipc/ipc/testing/e2e/Makefile b/ipc/ipc/testing/e2e/Makefile deleted file mode 100644 index 4a2eb1c1f..000000000 --- a/ipc/ipc/testing/e2e/Makefile +++ /dev/null @@ -1,294 +0,0 @@ -# Functions to help set up the infrastructure needed to run end-to-end tests. - -# Parameters that can be set when calling make to act like named arguments, or by defining env vars. -# e.g. `make IPC_AGENT_NR=1` -IPC_AGENT_NR ?= 0 -IPC_WALLET_NR ?= 0 -IPC_NODE_NR ?= 0 -IPC_NODE_TYPE ?= eudico -IPC_PARENT_NODE_NR ?= 0 -IPC_PARENT_AGENT_NR ?= 0 -IPC_SUBNET_NAME ?= "" - -PROJECT_ROOT := ../.. -IPC_INFRA_DIR := $(PROJECT_ROOT)/bin/ipc-infra -IPC_SRC := $(shell find $(PROJECT_ROOT) -type f \( -name "*.rs" \) | grep -v target | grep -v testing) -IPC_AGENT := $(PROJECT_ROOT)/bin/ipc-agent - -IPC_NETWORK := ipc -IPC_VERSION := latest - -# Location of artifacts derived from input parameters. -IPC_AGENT_DIR := .ipc/agents/agent-$(IPC_AGENT_NR) -IPC_AGENT_CONFIG := $(IPC_AGENT_DIR)/config.toml -IPC_AGENT_SUBNETS:= $(shell find . -type f -wholename "./$(IPC_AGENT_DIR)/subnets/node-*" | sort) -IPC_AGENT_URL := http://127.0.0.1:303$(IPC_AGENT_NR)/json_rpc -IPC_NODE_DIR := .ipc/nodes/node-$(IPC_NODE_NR) - -# Find created agents and nodes -IPC_AGENTS := $(shell find . -type d -wholename "./.ipc/agents/agent-*" | awk -F '/' '{print $$4}') -IPC_NODES := $(shell find . -type d -wholename "./.ipc/nodes/node-*" | awk -F '/' '{print $$4}') - -# Don't remove artifacts created as dependencies. -.SECONDARY: - -.PHONY: clean -clean: down - docker network rm $(IPC_NETWORK) || exit 0 - rm -rf .ipc .make - - -# Stop and remove all nodes and agents. -down: \ - $(patsubst %, %/down, $(IPC_AGENTS)) \ - $(patsubst %, %/down, $(IPC_NODES)) - - -# Create composition directory agent-$(IPC_AGENT_NR) -agent: $(IPC_AGENT_DIR) $(IPC_AGENT_CONFIG) - - -# Start an agent daemon. -agent/up: agent $(IPC_AGENT_DIR)/steps/up - - -# Stop an agent daemon and remove its configuration, as if it never existed. -agent/down: - if [ -d $(IPC_AGENT_DIR) ]; then \ - cd $(IPC_AGENT_DIR) && docker-compose down && cd - && rm -rf $(IPC_AGENT_DIR); \ - fi - -# Start an agent. -agent-%/down: - $(MAKE) --no-print-directory agent/up IPC_AGENT_NR=$* - -# Stop and remove specific agent. -agent-%/down: - $(MAKE) --no-print-directory agent/down IPC_AGENT_NR=$* - - -# Reload the configuration of an agent. -agent/reload: agent/up $(IPC_AGENT) - $(IPC_AGENT) config reload --ipc-agent-url $(IPC_AGENT_URL) - - -# Create composition directory node-$(IPC_NODE_NR) -node: $(IPC_NODE_DIR) - - -# Start a node. -node/up: \ - node \ - $(IPC_NODE_DIR)/steps/pre-up \ - $(IPC_NODE_DIR)/steps/up \ - $(IPC_NODE_DIR)/steps/post-up - - -# Stop a node and remove its configuration, as if it never existed. -node/down: - if [ -d $(IPC_NODE_DIR) ]; then \ - cd $(IPC_NODE_DIR) && docker-compose down -v && cd - && rm -rf $(IPC_NODE_DIR); \ - fi - -# Start a node. -node-%/up: - $(MAKE) --no-print-directory node/up IPC_NODE_NR=$* - -# Stop and remove a specific node. -node-%/down: - $(MAKE) --no-print-directory node/down IPC_NODE_NR=$* - - -# Connect an agent to a node. Assumes the node is running, but won't start it on its own. -# A node will always be participating in a specific subnet, so this means exactly one entry in the agent's config. -# Example: `make connect IPC_AGENT_NR=0 IPC_NODE_NR=0` -connect: agent/up - ./scripts/connect.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) - $(MAKE) --no-print-directory agent/reload - - -# Create a subnet on the active node. -subnet: $(IPC_NODE_DIR)/subnets/$(IPC_SUBNET_NAME) $(IPC_AGENT) - - -# Create a wallet on the active node. -wallet: $(IPC_NODE_DIR)/wallets/wallet-$(IPC_WALLET_NR) $(IPC_AGENT) - - -# Fund a wallet on the active node. -wallet/fund: $(IPC_NODE_DIR)/wallets/wallet-$(IPC_WALLET_NR) - ./scripts/fund-wallet.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) $< $(IPC_AGENT) $(IPC_AGENT_URL) - - -# Join the subnet of the active node, on the parent node. -subnet/join: $(IPC_NODE_DIR)/steps/pre-up $(IPC_NODE_DIR)/steps/up agent/up $(IPC_AGENT) - ./scripts/join-subnet.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) $(IPC_AGENT) $(IPC_AGENT_URL) - - -# Fund the subnet of the active node, on the parent node. -# This seems to require that the subnet is active, so some validators need to join first. -subnet/fund: $(IPC_NODE_DIR)/steps/pre-up $(IPC_NODE_DIR)/steps/up agent/up $(IPC_AGENT) - ./scripts/fund-subnet.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) $(IPC_AGENT) $(IPC_AGENT_URL) - - -# Turn a topology YAML file into a script -topologies/%.sh: topologies/%.yaml scripts/topology.sh | jq yq - ./scripts/topology.sh $< - - -# Compile and execute a topology. -setup/%: topologies/%.sh - bash $< - - -# Build the IPC agent binary. -$(IPC_AGENT): $(IPC_SRC) - $(MAKE) -C $(PROJECT_ROOT) build - - -# Make sure the eudico docker image is built. -$(IPC_INFRA_DIR): - $(MAKE) -C $(PROJECT_ROOT) install-infra - - -# Initialize the agent directory. -$(IPC_AGENT_DIR): - mkdir -p $@ - cp template/agent/compose.yaml $@/compose.yaml - - @# The config.toml will be recreated from config.toml.orig plus the active subnets. - cp template/agent/config.toml $@/config.toml.orig - - @# Create .env file with overrides taken from the environment. - export IPC_VERSION=$(IPC_VERSION); \ - export IPC_NETWORK=$(IPC_NETWORK); \ - export IPC_AGENT_NR=$(IPC_AGENT_NR); \ - ./scripts/make-env.sh template/agent/.env $@/.env IPC_ - - -# Initialize the agent config. -$(IPC_AGENT_CONFIG): $(IPC_AGENT_DIR) $(IPC_AGENT_SUBNETS) - @echo "# DO NOT EDIT! Any changes will be overwritten as subnets are added. Add changes to config.toml.orig instead." > $@ - cat $(IPC_AGENT_DIR)/config.toml.orig >> $@ - for subnet in $(IPC_AGENT_SUBNETS); do cat $$subnet >> $@; done - - -# Start the IPC agent docker container. -$(IPC_AGENT_DIR)/steps/up: .make/docker/network .make/docker/images/ipc-agent - cd $(IPC_AGENT_DIR) && docker-compose up -d - mkdir -p $(dir $@) && touch $@ - - -# Initialize the node directory based on the active node type. -# If the node has a parent, make a wallet and a subnet on the parent node. -# The agent used must be one connected to the parent node. -# Assumes that the root node can use some pre-funded wallet.key file in the template genesis directory. -$(IPC_NODE_DIR): | .make/$(IPC_NODE_TYPE) template/$(IPC_NODE_TYPE)/genesis/wallet.key - mkdir -p $@ - cp template/$(IPC_NODE_TYPE)/compose.yaml $@/ - - @# Create .env file with overrides taken from the environment. - @# The IPC_SUBNET will have to be evaluated later when pre-up step has been executed. - if [ "$(IPC_PARENT_NODE_NR)" = "$(IPC_NODE_NR)" ]; then \ - export IPC_WALLET_KEY=${PWD}/template/$(IPC_NODE_TYPE)/genesis/wallet.key && \ - export IPC_SUBNET="\"echo /r31415926\""; \ - else \ - export IPC_WALLET_KEY=${PWD}/.ipc/nodes/node-$(IPC_PARENT_NODE_NR)/wallets/wallet-$(IPC_WALLET_NR)/wallet.key && \ - export IPC_SUBNET="\"cat .ipc/nodes/node-$(IPC_PARENT_NODE_NR)/subnets/$(IPC_SUBNET_NAME)/id\"" ; \ - fi && \ - export IPC_SUBNET_NAME=$(IPC_SUBNET_NAME) ; \ - export IPC_PROJECT_ROOT=${PWD}/$(PROJECT_ROOT) && \ - export IPC_NETWORK=$(IPC_NETWORK) && \ - export IPC_PARENT_NODE_NR=$(IPC_PARENT_NODE_NR) && \ - export IPC_WALLET_NR=$(IPC_WALLET_NR) && \ - export IPC_AGENT_NR=$(IPC_AGENT_NR) && \ - export IPC_NODE_NR=$(IPC_NODE_NR) && \ - export IPC_NODE_TYPE=$(IPC_NODE_TYPE) && \ - ./scripts/make-env.sh template/$(IPC_NODE_TYPE)/.env $@/.env IPC_ - - -# Dependency check to ensure we are only asking agents to perform actions on nodes they have been connected to. -$(IPC_AGENT_DIR)/subnets/node-$(IPC_NODE_NR): - @echo ERROR: agent-$(IPC_AGENT_NR) has not been connected to node-$(IPC_NODE_NR) yet; use `make connect` first - @exit 1 - - -# Tell an agent to create a wallet on a node and save it to a file. -# The agent has to be connected to the node to issue the commands. -$(IPC_NODE_DIR)/wallets/wallet-$(IPC_WALLET_NR): | $(IPC_AGENT_DIR)/subnets/node-$(IPC_NODE_NR) node/up agent/up - ./scripts/new-wallet.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) $@ $(IPC_AGENT) $(IPC_AGENT_URL) - - -# Create a new subnet on a node. -# The agent has to be connected to the node to issue the commands. -$(IPC_NODE_DIR)/subnets/$(IPC_SUBNET_NAME): | $(IPC_AGENT_DIR)/subnets/node-$(IPC_NODE_NR) node/up agent/up - ./scripts/new-subnet.sh $(IPC_AGENT_DIR) $(IPC_NODE_DIR) $@ $(IPC_AGENT) $(IPC_AGENT_URL) - - -# Set up dependencies in the parent node, e.g. create the wallet. -$(IPC_NODE_DIR)/steps/pre-up: | $(IPC_NODE_DIR) - bash -c ' \ - set -a && \ - source $(IPC_NODE_DIR)/.env && \ - set +a && \ - if [ "$${IPC_PARENT_NODE_NR}" != "$(IPC_NODE_NR)" ]; then \ - $(MAKE) --no-print-directory subnet wallet wallet/fund IPC_NODE_NR=$${IPC_PARENT_NODE_NR} IPC_AGENT_NR=$${IPC_PARENT_AGENT_NR} ; \ - fi && \ - echo IPC_SUBNET_ID=$$($${IPC_SUBNET}) >> $(IPC_NODE_DIR)/.env ; \ - ' - mkdir -p $(dir $@) && touch $@ - - -# Start the node docker containers. -$(IPC_NODE_DIR)/steps/up: | $(IPC_NODE_DIR) .make/docker/network - cd $(IPC_NODE_DIR) && docker-compose up -d - mkdir -p $(dir $@) && touch $@ - - -# Run steps that require the node to be running, e.g. join the subnet with the validator address. -# We do an extra docker-compose up in case the validator container crashed because it needs to join first. -$(IPC_NODE_DIR)/steps/post-up: | $(IPC_NODE_DIR) - bash -c ' \ - set -a && \ - source $(IPC_NODE_DIR)/.env && \ - set +a && \ - if [ "$${IPC_PARENT_NODE_NR}" != "$(IPC_NODE_NR)" ]; then \ - $(MAKE) --no-print-directory subnet/join subnet/fund IPC_AGENT_NR=$${IPC_PARENT_AGENT_NR} ; \ - cd $(IPC_NODE_DIR) && docker-compose up -d ; \ - fi \ - ' - mkdir -p $(dir $@) && touch $@ - - -# Create the docker network every container connects to. -.make/docker/network: - docker network create $(IPC_NETWORK) - mkdir -p $(dir $@) && touch $@ - - -# Build the IPC agent docker image. -.make/docker/images/ipc-agent: $(IPC_SRC) - cd $(PROJECT_ROOT) && docker build -t ipc-agent . - mkdir -p $(dir $@) && touch $@ - - -# Build eudico specific artifacts -.make/eudico: $(IPC_INFRA_DIR) - - -# Make sure `jq` is installed. Use this with the `| jq` prerequisite so it doesn't cause re-run of tasks. -.PHONY: jq -jq: - @if [ -z "$(shell which jq)" ]; then \ - echo "Please install jq. See https://stedolan.github.io/jq/"; \ - exit 1; \ - fi - - -# Make sure `yq` is installed. Use this with the `| yq` prerequisite so it doesn't cause re-run of tasks. -.PHONY: yq -yq: - @if [ -z "$(shell which yq)" ]; then \ - echo "Please install yq. See https://github.com/mikefarah/yq"; \ - exit 1; \ - fi diff --git a/ipc/ipc/testing/e2e/README.md b/ipc/ipc/testing/e2e/README.md deleted file mode 100644 index 399182016..000000000 --- a/ipc/ipc/testing/e2e/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Integration tests - -This directory includes a set of tools to perform end-to-end integration tests between the agent and the underlying subnet infrastructure.Before running the test cases, one needs to launch a `lotus` cluster and a `ipc-agent` daemon using the instructions shared in the project's [README](../../README.md). -Once the infrastructure has been setup, the integration tests can be run using: - -```shell -cargo test -p ipc_e2e --test - -# To run the subnet lifecycle test, perform: -cargo test -p ipc_e2e --test subnet_lifecycle -``` - -> Note: This is a basic skeleton to showcase how we can run automated end-to-end tests over IPC. In the future, the goal is to automate the deployment of the IPC agent and the infrastructure so all tests can be run automatically. - - -## Test environment - -The `template` directory contains `docker-compose` files for creating a test environment with varying number of agents and nodes using the commands in the `Makefile`. - -For example to start the default agent in `docker`, run the following: - -```shell -make agent/up -``` - -All artifacts created during the procedure are stored under the `.ipc` directory, which has the following structure: - -```console -❯ tree -a .ipc -.ipc -├── agents -│   └── agent-0 -│   ├── compose.yaml -│   ├── config.toml -│   ├── config.toml.orig -│   ├── .env -│   └── subnets -│   └── node-0 -└── nodes - └── node-0 - ├── compose.yaml - └── .env - -5 directories, 7 files -``` - -There can be multiple agents, and their corresponding `config.toml` files will be generated as we create more nodes and subnets. To create another agent, we would run `make agent IPC_AGENT_NR=1`. - -The main targets of the `Makefile` are: - -* `make agent`: create a configuration directory for `$IPC_AGENT_NR`; the container isn't started yet, so we could make some modifications if necessary -* `make agent/up`: start the docker container for `$IPC_AGENT_NR`; if necessary build the `ipc-agent` docker image, the configuration directory, etc. -* `make agent/down`: remove the docker container for `$IPC_AGENT_NR` and the agent configuration directory -* `make node`, `make node/up`, `make node/down`: same as for the agent -* `make down`: stop and remove all agents and nodes -* `make connect`: connect `$IPC_AGENT_NR` to `$IPC_NODE_NR` and reload the agent configuration -* `make wallet`: creates a new wallet for `$IPC_WALLET_NR` under `$IPC_NODE_NR` which we are then free to assign to anyone -* `make subnet`: creates a new subnet named `$IPC_SUBNET_NAME` under `$IPC_NODE_NR` which we can then create nodes to run -* `make setup/`: compile and execute the setup script for `topologies/.yaml` - -The recommended way to set up a test environment is to use a topology. See [example.yaml](./topologies/example.yaml) for comments. -The makefile targets are constructed in a way that it is safe to re-run the setup, perhaps after the topology has been extended (without altering existing nodes in it). You can run the steps one-by-one by running `make topologies/.sh` first to get a script you can execute line by line as well. diff --git a/ipc/ipc/testing/e2e/scripts/connect.sh b/ipc/ipc/testing/e2e/scripts/connect.sh deleted file mode 100755 index dd1316358..000000000 --- a/ipc/ipc/testing/e2e/scripts/connect.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash - -# Create a subnet configuration file to connect an agent to a node. - -set -e - -if [ $# -ne 2 ] -then - echo "usage: ./connect.sh " - exit 1 -fi - -IPC_AGENT_DIR=$1 -IPC_NODE_DIR=$2 - -source $IPC_NODE_DIR/.env -source $IPC_AGENT_DIR/.env - -# This just looks like some kind of human readable name for the subnet. -if [ -z "${IPC_SUBNET_NAME}" ]; then - IPC_SUBNET_NAME=$(basename $IPC_SUBNET_ID) -fi - -echo "[*] Connecting agent-$IPC_AGENT_NR to $IPC_NODE_TYPE node-$IPC_NODE_NR in subnet $IPC_SUBNET_ID ($IPC_SUBNET_NAME)" - -write_subnet_config() { - TOKEN=$(echo $1 | tr -d '\r\n') - WALLET=$(echo $2 | tr -d '\r\n') - - SUBNETS_DIR=$IPC_AGENT_DIR/subnets - mkdir -p $SUBNETS_DIR - - SUBNET_CONFIG=$SUBNETS_DIR/node-$IPC_NODE_NR - echo "[*] Writing subnet config to $SUBNET_CONFIG" - - # The JSON-API URL is from the perspective of one container connecting to another, - # e.g. the agent container to the eudico daemon. It needs to mach the settings in - # the compose file. - # XXX: The current JSON-RPC URL schem and expectation only works with Lotus. - cat < $SUBNET_CONFIG - -[[subnets]] -id = "${IPC_SUBNET_ID}" -gateway_addr = "t064" -# node_type = "${IPC_NODE_TYPE}" -jsonrpc_api_http = "http://node-${IPC_NODE_NR}:1234/rpc/v1" -auth_token = "${TOKEN}" - -EOF -} - - -if [ "${IPC_NODE_TYPE}" == "eudico" ]; then - # The following is based on `run-root-docker-1val.sh` - DAEMON_ID=ipc-node-${IPC_NODE_NR}-daemon - - echo "[*] Waiting for the daemon to start" - docker exec -it $DAEMON_ID eudico wait-api --timeout 350s - sleep 5 - - echo "[*] Creating admin token" - TOKEN=$(docker exec -it $DAEMON_ID eudico auth create-token --perm admin) - - # This command often fails for the first time for some reason. - set +e - n=0 - until [ "$n" -ge 5 ] - do - echo "[*] Getting default wallet" - WALLET=$(docker exec -it $DAEMON_ID eudico wallet default) && break - echo "[*] Failed; retrying a bit later" - n=$((n+1)) - sleep 10 - done - set -e - - if [[ "$WALLET" =~ ^ERROR.* ]]; then - echo $WALLET - exit 1 - fi - - write_subnet_config $TOKEN $WALLET - -else - echo "Don't know how to connect node type: $IPC_NODE_TYPE"; - exit 1; -fi diff --git a/ipc/ipc/testing/e2e/scripts/fund-subnet.sh b/ipc/ipc/testing/e2e/scripts/fund-subnet.sh deleted file mode 100755 index e824563b0..000000000 --- a/ipc/ipc/testing/e2e/scripts/fund-subnet.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# Send funds into a subnet. -# Call it on the child subnet node, so we can figure out from .env what the subnet ID is. - -set -e - -if [ $# -ne 4 ] -then - echo "usage: ./fund-subnet.sh " - exit 1 -fi - -AGENT_DIR=$1 -NODE_DIR=$2 -AGENT=$3 -AGENT_URL=$4 - -# Rest of the variables from env vars. Before sourcing more .env -SUBNET_FUNDS=${IPC_SUBNET_FUNDS:-0} - -source $NODE_DIR/.env -source $AGENT_DIR/.env - -IPC_WALLET_DIR=$(dirname $IPC_WALLET_KEY) -ADDR=$(cat $IPC_WALLET_DIR/address) - -run() { - CMD=$@ - STATUS=0 - # This command often fails for the first time for some reason. - set +e - n=0 - until [ "$n" -ge 3 ] - do - echo $CMD - $CMD - STATUS=$? - if [ $STATUS = 0 ]; then - break; - fi - echo "[*] Failed; retrying a bit later" - n=$((n+1)) - sleep 10 - done - set -e - if [ $STATUS != 0 ]; then - exit $STATUS; - fi -} - -if [ "$SUBNET_FUNDS" != "0" ]; then - echo "[*] Funding $IPC_SUBNET_ID ($IPC_SUBNET_NAME) by wallet-$IPC_WALLET_NR ($ADDR) with $SUBNET_FUNDS token(s) using agent-$IPC_AGENT_NR" - run $AGENT cross-msg fund --ipc-agent-url $AGENT_URL --subnet $IPC_SUBNET_ID --from $ADDR $SUBNET_FUNDS -else - echo "[*] Fund amount is zero; skip sneding funds to $ADDR in $IPC_SUBNET_ID" -fi diff --git a/ipc/ipc/testing/e2e/scripts/fund-wallet.sh b/ipc/ipc/testing/e2e/scripts/fund-wallet.sh deleted file mode 100755 index a7361abc3..000000000 --- a/ipc/ipc/testing/e2e/scripts/fund-wallet.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# Fund an existing wallet with funds from the default wallet of the agent. -# Call it on the node where the wallet will receive the funds. - -set -e - -if [ $# -ne 5 ] -then - echo "usage: ./fund-wallet.sh " - exit 1 -fi - -AGENT_DIR=$1 -NODE_DIR=$2 -WALLET_DIR=$3 -AGENT=$4 -AGENT_URL=$5 - -# Rest of the variables from env vars. Before sourcing more .env -WALLET_FUNDS=${IPC_WALLET_FUNDS:-0} - -ADDR=$(cat $WALLET_DIR/address) - -source $NODE_DIR/.env -source $AGENT_DIR/.env - -run() { - echo $@ - $@ -} - -if [ "$WALLET_FUNDS" != "0" ]; then - echo "[*] Funding wallet-$IPC_WALLET_NR ($ADDR) with $WALLET_FUNDS token(s) using agent-$IPC_AGENT_NR on $IPC_NODE_TYPE node-$IPC_NODE_NR under $IPC_SUBNET_ID ($IPC_SUBNET_NAME)" - run $AGENT subnet send-value --ipc-agent-url $AGENT_URL --subnet $IPC_SUBNET_ID --to $ADDR $WALLET_FUNDS -else - echo "[*] Fund amount is zero; skip funding $ADDR" -fi diff --git a/ipc/ipc/testing/e2e/scripts/join-subnet.sh b/ipc/ipc/testing/e2e/scripts/join-subnet.sh deleted file mode 100755 index 0473d5c89..000000000 --- a/ipc/ipc/testing/e2e/scripts/join-subnet.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -# Join a subnet as a validator. Call it on the $IPC_NODE_NR where we want to run the subnet, -# so that we can pick up the wallet, the subnet IDs and the validator net address, then -# execute the request on the parent. The child node needs to run at this point for the -# validator address to be available. - -set -e - -if [ $# -ne 4 ] -then - echo "usage: ./join-subnet.sh " - exit 1 -fi - -AGENT_DIR=$1 -NODE_DIR=$2 -AGENT=$3 -AGENT_URL=$4 - -# Rest of the variables from env vars. Before sourcing more .env -COLLATERAL=${IPC_COLLATERAL:-0} - -source $NODE_DIR/.env -source $AGENT_DIR/.env - - -IPC_WALLET_DIR=$(dirname $IPC_WALLET_KEY) -ADDR=$(cat $IPC_WALLET_DIR/address) - -DAEMON_ID=ipc-node-${IPC_NODE_NR}-daemon - -echo "[*] Waiting for the daemon to start" -docker exec -it $DAEMON_ID eudico wait-api --timeout 350s -sleep 10 - -echo "[*] Get the validator net address" -set +e -# On subnets the validator address should not contain the identity part, just the /ip4/... onwards. -VALIDATOR_NET_ADDR=$(docker exec -it $DAEMON_ID eudico mir validator config validator-addr \ - | grep -vE '(/ip6/)' | grep -v "127.0.0.1" | grep -E '/tcp/1347' | sed 's/^.*@//' | tr -d '\r' | tr -d '\n' ) -STATUS=$? -set -e -if [ $STATUS != 0 ]; then - echo $VALIDATOR_NET_ADDR - exit $STATUS -fi - -echo "[*] Validator net address: $VALIDATOR_NET_ADDR" - -run() { - echo $@ - $@ -} - -if [ "$COLLATERAL" != "0" ]; then - echo "[*] Joining $IPC_SUBNET_ID ($IPC_SUBNET_NAME) by wallet-$IPC_WALLET_NR ($ADDR) with $COLLATERAL token(s) using agent-$IPC_AGENT_NR" - run $AGENT subnet join --ipc-agent-url $AGENT_URL --subnet $IPC_SUBNET_ID --from $ADDR --collateral $COLLATERAL --validator-net-addr $VALIDATOR_NET_ADDR -else - echo "[*] Collateral amount is zero; skip joining by $ADDR" -fi diff --git a/ipc/ipc/testing/e2e/scripts/make-env.sh b/ipc/ipc/testing/e2e/scripts/make-env.sh deleted file mode 100755 index e9a65fd72..000000000 --- a/ipc/ipc/testing/e2e/scripts/make-env.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# Set default env values. Create overrides with `export IPC_=` before running `make ` commands, -# or override them for individual nodes e.g. `IPC_= make ` -# Captures all IPC_ env vars into the .env file so later they don't revert if we run things in another console. -# Take default values from e.g. template/agent/.env file, unless override exists in the actual env vars. - -if [ $# -ne 3 ] -then - echo "usage: ./make-env.sh " - exit 1 -fi - -ENV_IN=$1 -ENV_OUT=$2 -ENV_PREFIX=$3 - -# Read key=value pairs from the template .env file -while read kv; do - k=$(echo ${kv} | cut -d'=' -f1) - v=$(echo ${kv} | cut -d'=' -f2) - # Create env var unless it already is set. - if [ -z "${!k}" ]; then - export ${k}=${v} - fi -done < ${ENV_IN} - -# Clean out any pre-existing content. -rm -f ${ENV_OUT} - -# Write key=value pairs for all env vars starting with the prefix. -for k in $(compgen -v ${ENV_PREFIX}); do - echo ${k}=${!k} >> ${ENV_OUT} -done diff --git a/ipc/ipc/testing/e2e/scripts/new-subnet.sh b/ipc/ipc/testing/e2e/scripts/new-subnet.sh deleted file mode 100755 index 023951888..000000000 --- a/ipc/ipc/testing/e2e/scripts/new-subnet.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash - -# Create a new subnet on a node and export its ID. -# Call it on the node running the parent subnet. - -set -e - -if [ $# -ne 5 ] -then - echo "usage: ./new-subnet.sh " - exit 1 -fi - -AGENT_DIR=$1 -NODE_DIR=$2 -SUBNET_DIR=$3 -AGENT=$4 -AGENT_URL=$5 - -# Rest of the variables from env vars. -MIN_VALIDATOR_STAKE=${IPC_MIN_VALIDATOR_STAKE:-1} -MIN_VALIDATORS=${IPC_MIN_VALIDATORS:-0} -BOTTOMUP_CHECK_PERIOD=${IPC_BOTTOMUP_CHECK_PERIOD:-10} -TOPDOWN_CHECK_PERIOD=${IPC_TOPDOWN_CHECK_PERIOD:-10} - -source $NODE_DIR/.env -source $AGENT_DIR/.env - -IPC_SUBNET_NAME=$(basename $SUBNET_DIR) - -echo "[*] Creating new subnet with agent-$IPC_AGENT_NR on $IPC_NODE_TYPE node-$IPC_NODE_NR under $IPC_SUBNET_ID named $IPC_SUBNET_NAME" - -CMD=$(echo $AGENT subnet create --ipc-agent-url $AGENT_URL --parent $IPC_SUBNET_ID --name $IPC_SUBNET_NAME --min-validator-stake $MIN_VALIDATOR_STAKE --min-validators $MIN_VALIDATORS --bottomup-check-period $BOTTOMUP_CHECK_PERIOD --topdown-check-period $TOPDOWN_CHECK_PERIOD) -echo $CMD -set +e -LOG=$($CMD 2>&1) -STATUS=$? -if [ $STATUS != 0 ]; then - echo $LOG - exit 1 -fi -set -e - -# Example output from the agent: -# [2023-04-17T11:44:13Z INFO ipc_agent::cli::commands::subnet::create] created subnet actor with id: /r31415926/t01003 -IPC_SUBNET_ID=$(echo $LOG | sed 's/^.*id: \(\/r31415926\/.*\)$/\1/') - -if [ -z "$IPC_SUBNET_ID" ]; then - echo "ERROR: Could not find the subnet ID in the logs."; - exit 1 -fi - -echo "[*] Writing details for $IPC_SUBNET_NAME to $SUBNET_DIR" -mkdir -p $SUBNET_DIR -echo $IPC_SUBNET_ID > $SUBNET_DIR/id diff --git a/ipc/ipc/testing/e2e/scripts/new-wallet.sh b/ipc/ipc/testing/e2e/scripts/new-wallet.sh deleted file mode 100755 index 9444405ed..000000000 --- a/ipc/ipc/testing/e2e/scripts/new-wallet.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -# Create a new wallet and export the address and key. -# Call it on the node where the wallet will be created. - -set -e - -if [ $# -ne 5 ] -then - echo "usage: ./new-wallet.sh " - exit 1 -fi - -AGENT_DIR=$1 -NODE_DIR=$2 -WALLET_DIR=$3 -AGENT=$4 -AGENT_URL=$5 - -source $NODE_DIR/.env -source $AGENT_DIR/.env - -if [ "${IPC_NODE_TYPE}" == "eudico" ]; then - DAEMON_ID=ipc-node-${IPC_NODE_NR}-daemon - - echo "[*] Creating new wallet with agent-$IPC_AGENT_NR on $IPC_NODE_TYPE node-$IPC_NODE_NR in subnet $IPC_SUBNET_ID" - - # Example output from the agent: - # [2023-04-14T14:24:27Z INFO ipc_agent::cli::commands::wallet::new] created new wallet with address WalletNewResponse { address: "t1qn46gmcao6vnujtim7l2a4ombut2ywyhh4ccdga" } in subnet "/r31415926" - set +e - LOG=$($AGENT wallet new --ipc-agent-url $AGENT_URL --key-type secp256k1 --subnet=$IPC_SUBNET_ID 2>&1) - STATUS=$? - if [ $STATUS != 0 ]; then - echo $LOG - exit 1 - fi - set -e - ADDR=$(echo $LOG | sed 's/^.*address: "\([^"]*\)".*$/\1/') - - if [ -z "$ADDR" ]; then - echo "ERROR: Could not find the address in the logs."; - exit 1 - fi - - echo "[*] Exporting the key for address $ADDR" - WALLET_KEY=$(docker exec -it $DAEMON_ID eudico wallet export --lotus-json $ADDR) - - echo "[*] Writing the wallet key and address to $WALLET_DIR" - mkdir -p $WALLET_DIR - echo $ADDR > $WALLET_DIR/address - echo $WALLET_KEY > $WALLET_DIR/wallet.key - -else - echo "Don't know how to make a wallet for node type: $IPC_NODE_TYPE"; - exit 1; -fi diff --git a/ipc/ipc/testing/e2e/scripts/topology.sh b/ipc/ipc/testing/e2e/scripts/topology.sh deleted file mode 100755 index dcbb97f09..000000000 --- a/ipc/ipc/testing/e2e/scripts/topology.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [ $# -ne 1 ] -then - echo "usage: ./topology.sh " - exit 1 -fi - -TOPO_YAML=$1 -TOPO_JSON=$(dirname $TOPO_YAML)/$(basename $TOPO_YAML .yaml).json -TOPO_SH=$(dirname $TOPO_JSON)/$(basename $TOPO_JSON .json).sh - -echo "[*] Compiling $TOPO_YAML to $TOPO_SH" - -yq -Poj $TOPO_YAML > $TOPO_JSON - -echo "#!/usr/bin/env bash" > $TOPO_SH -echo "# Generated from $TOPO_YAML" >> $TOPO_SH -echo "set -e" >> $TOPO_SH - -echo "# Create the agent(s)" >> $TOPO_SH -cat $TOPO_JSON | jq -r ' - .agents[] - | "make --no-print-directory agent/up IPC_AGENT_NR=" + (.nr | tostring) -' >> $TOPO_SH - -echo "# Create the root node(s)" >> $TOPO_SH -cat $TOPO_JSON | jq -r ' - . as $top - | - [ - $top.agents[] - | . as $agent - | .connections[] - | { - key: .node | tostring, - value: $agent.nr | tostring - } - ] - | from_entries as $node_agent_map - | $top.nodes[] - | select((.parent_node == .nr) or (. | has("parent_node") | not)) - | ("make --no-print-directory node/up" - + " IPC_NODE_NR=" + (.nr | tostring) - + " IPC_AGENT_NR=" + ($node_agent_map[.nr | tostring]) - + " IPC_SUBNET_NAME=" + (.subnet.name | tostring) - ) -' >> $TOPO_SH - -echo "# Alternate connecting agents and creating subnets and nodes to run them" >> $TOPO_SH -cat $TOPO_JSON | jq -r ' - . as $top - | - [ - $top.agents[] - | . as $agent - | .connections[] - | { - sort_key: ((.node | tostring) + "/a"), - node: .node, - agent: $agent.nr, - cmd: ("make --no-print-directory connect" - + " IPC_NODE_NR=" + (.node | tostring) - + " IPC_AGENT_NR=" + ($agent.nr | tostring) - ) - } - ] as $connections - | $connections - | map(. | { key: .node|tostring, value: .agent|tostring }) - | from_entries as $node_agent_map - | [ - $top.nodes[] - | select(has("parent_node") and (.parent_node != .nr)) - | { - sort_key: ((.parent_node | tostring) + "/b"), - cmd: ("make --no-print-directory node/up" - + " IPC_NODE_NR=" + (.nr | tostring) - + " IPC_AGENT_NR=" + ($node_agent_map[.nr | tostring]) - + " IPC_PARENT_NODE_NR=" + (.parent_node | tostring) - + " IPC_PARENT_AGENT_NR=" + ($node_agent_map[.parent_node | tostring]) - + " IPC_WALLET_NR=" + (.wallet | tostring) - + " IPC_SUBNET_NAME=" + (.subnet.name) - + " IPC_WALLET_FUNDS=" + (.wallet_funds // 0 | tostring) - + " IPC_SUBNET_FUNDS=" + (.subnet_funds // 0 | tostring) - + " IPC_COLLATERAL=" + (.collateral // 0 | tostring) - + " IPC_MIN_VALIDATOR_STAKE=" + (.subnet.min_validator_stake // 1 | tostring) - + " IPC_MIN_VALIDATORS=" + (.subnet.min_validators // 0 | tostring) - + " IPC_BOTTOMUP_CHECK_PERIOD=" + (.subnet.bottomup_check_period // 10 | tostring) - + " IPC_TOPDOWN_CHECK_PERIOD=" + (.subnet.topdown_check_period // 10 | tostring) - ) - } - ] as $subnets - | [ - $connections | map({sort_key: .sort_key, cmd: .cmd}), - $subnets - ] - | flatten(1) - | sort_by(.sort_key) - | .[] - | .cmd -' >> $TOPO_SH - -rm $TOPO_JSON diff --git a/ipc/ipc/testing/e2e/src/lib.rs b/ipc/ipc/testing/e2e/src/lib.rs deleted file mode 100644 index 25d806c00..000000000 --- a/ipc/ipc/testing/e2e/src/lib.rs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT -use fvm_shared::address::Address; -use ipc_agent::cli::{ - CommandLineHandler, CreateSubnet, CreateSubnetArgs, GlobalArguments, JoinSubnet, - JoinSubnetArgs, KillSubnet, KillSubnetArgs, LeaveSubnet, LeaveSubnetArgs, -}; -use ipc_sdk::subnet_id::SubnetID; -use std::str::FromStr; - -pub struct TestClient { - json_rpc_url: Option, -} - -impl TestClient { - pub fn new(json_rpc_url: Option) -> Self { - Self { json_rpc_url } - } - - pub async fn create_subnet(&self, parent: &str) -> anyhow::Result
{ - let global = GlobalArguments::default(); - let args = CreateSubnetArgs { - ipc_agent_url: self.json_rpc_url.clone(), - from: None, - parent: String::from(parent), - name: "test".to_string(), - min_validator_stake: 1.0, - min_validators: 0, - bottomup_check_period: 10, - topdown_check_period: 10, - }; - - let raw = CreateSubnet::create(&global, &args).await?; - Ok(Address::from_str(&raw)?) - } - - pub async fn join_subnet( - &self, - subnet_id: &SubnetID, - validator_net_addr: String, - ) -> anyhow::Result<()> { - JoinSubnet::handle( - &GlobalArguments::default(), - &JoinSubnetArgs { - ipc_agent_url: self.json_rpc_url.clone(), - from: None, - subnet: subnet_id.to_string(), - collateral: 10.0, - validator_net_addr, - worker_addr: None, - }, - ) - .await - } - - pub async fn kill_subnet(&self, subnet_id: &SubnetID) -> anyhow::Result<()> { - KillSubnet::handle( - &GlobalArguments::default(), - &KillSubnetArgs { - ipc_agent_url: self.json_rpc_url.clone(), - from: None, - subnet: subnet_id.to_string(), - }, - ) - .await - } - - pub async fn leave_subnet(&self, subnet_id: &SubnetID) -> anyhow::Result<()> { - LeaveSubnet::handle( - &GlobalArguments::default(), - &LeaveSubnetArgs { - ipc_agent_url: self.json_rpc_url.clone(), - from: None, - subnet: subnet_id.to_string(), - }, - ) - .await - } -} diff --git a/ipc/ipc/testing/e2e/template/agent/.env b/ipc/ipc/testing/e2e/template/agent/.env deleted file mode 100644 index e69de29bb..000000000 diff --git a/ipc/ipc/testing/e2e/template/agent/compose.yaml b/ipc/ipc/testing/e2e/template/agent/compose.yaml deleted file mode 100644 index 74cbb1516..000000000 --- a/ipc/ipc/testing/e2e/template/agent/compose.yaml +++ /dev/null @@ -1,31 +0,0 @@ -networks: - # Network created externally so individual containers can be destroyed without the network being removed. - ipc: - external: true - name: ${IPC_NETWORK} - -# See https://docs.docker.com/compose/extends/ for reusing and overriding definitions. - -services: - - # IPC Agent daemon service - agent: - image: ipc-agent:${IPC_VERSION} - container_name: ipc-agent-${IPC_AGENT_NR} - hostname: agent-${IPC_AGENT_NR} - ports: - # JSON-RPC port where the ipc-agent binary on the host can issue commands. - - 303${IPC_AGENT_NR}:3030 - volumes: - # Configuration file gets refreshed as new subnets are created. - - $PWD/config.toml:/root/.ipc-agent/config.toml - networks: - - ipc - environment: - HOME: /root - env_file: - - .env - command: - - --config-path - - /root/.ipc-agent/config.toml - - daemon diff --git a/ipc/ipc/testing/e2e/template/agent/config.toml b/ipc/ipc/testing/e2e/template/agent/config.toml deleted file mode 100644 index 46d520da6..000000000 --- a/ipc/ipc/testing/e2e/template/agent/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[server] -json_rpc_address = "0.0.0.0:3030" diff --git a/ipc/ipc/testing/e2e/template/eudico/.env b/ipc/ipc/testing/e2e/template/eudico/.env deleted file mode 100644 index e69de29bb..000000000 diff --git a/ipc/ipc/testing/e2e/template/eudico/compose.yaml b/ipc/ipc/testing/e2e/template/eudico/compose.yaml deleted file mode 100644 index d57164762..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/compose.yaml +++ /dev/null @@ -1,69 +0,0 @@ -networks: - # Network created externally so individual containers can be destroyed without the network being removed. - ipc: - external: true - name: ${IPC_NETWORK} - -# Cross mounting volumes: https://github.com/docker/compose/issues/3211 -volumes: - # Volume through which the daemon and the validator will communicate. - repo_directory: {} - -services: - - # Run the daemon, which the `eudico-root-single.sh` script ran in the first tmux window. - daemon: - image: eudico:latest - # The container name could contain the ${IPC_NODE_TYPE} but that would suggest that type and number are unique together, - # whereas with the current setup the node number is unique on its own. Look at the image to tell what kind we are talking to. - container_name: ipc-node-${IPC_NODE_NR}-daemon - hostname: node-${IPC_NODE_NR} - # Ports don't really need to be exposed as all containers should just talk to each other. - ports: - # Lotus port - 1234 hardcoded in subnet-daemon.sh - - 123${IPC_NODE_NR}:1234 - # libp2p port - # - 134${IPC_NODE_NR}:1347 - volumes: - # Volume to be shared with the validator. - - repo_directory:/var/lib/lotus - # Modified versions of the infra scripts. Mounted from templates so they can be edited between restarts. - - ${IPC_PROJECT_ROOT}/testing/e2e/template/${IPC_NODE_TYPE}/scripts:/scripts - - ${IPC_PROJECT_ROOT}/testing/e2e/template/${IPC_NODE_TYPE}/genesis:/genesis - networks: - - ipc - environment: - HOME: /root - LOTUS_PATH: /var/lib/lotus - env_file: - - .env - entrypoint: - - /scripts/subnet-daemon.sh - - # Run the validator, which the `eudico-root-single.sh` script ran in the second tmux window. - validator: - image: eudico:latest - # The container name could contain the ${IPC_NODE_TYPE} but that would suggest that type and number are unique together, - # whereas with the current setup the node number is unique on its own. Look at the image to tell what kind we are talking to. - container_name: ipc-node-${IPC_NODE_NR}-validator - volumes: - # Volume to be shared with the daemon. Has to be the same, a config is not enough. - - repo_directory:/var/lib/lotus - # Modified versions of the infra scripts. Mounted from templates so they can be edited between restarts. - - ${IPC_PROJECT_ROOT}/testing/e2e/template/${IPC_NODE_TYPE}/scripts:/scripts - # Key to be imported as default - - ${IPC_WALLET_KEY}:/wallet.key - networks: - - ipc - environment: - HOME: /root - LOTUS_PATH: /var/lib/lotus - DAEMON_HOSTNAME: node-${IPC_NODE_NR} - AGENT_HOSTNAME: agent-${IPC_AGENT_NR} - env_file: - - .env - entrypoint: - - /scripts/validator-entry.sh - depends_on: - # The daemon will produce the API token under the shared LOTUS_PATH - - daemon diff --git a/ipc/ipc/testing/e2e/template/eudico/genesis/README.md b/ipc/ipc/testing/e2e/template/eudico/genesis/README.md deleted file mode 100644 index 8cf800eed..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/genesis/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Genesis files - -These are copied from https://github.com/consensus-shipyard/lotus/tree/main/eudico-core/genesis - -* `genesis.json`: Nothing has any balance -* `genesis-test.json`: The default wallet which comes in the infra scripts has a starting balance. - -The `wallet.key` file was also copied, so there's no chance for discrepancy. diff --git a/ipc/ipc/testing/e2e/template/eudico/genesis/genesis-test.json b/ipc/ipc/testing/e2e/template/eudico/genesis/genesis-test.json deleted file mode 100644 index ad7da7241..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/genesis/genesis-test.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "NetworkVersion": 18, - "Timestamp": 42, - "Accounts": [ - { - "Type": "account", - "Balance": "50000000000000000000000000", - "Meta": { - "Owner": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - } - }, - { - "Type": "account", - "Balance": "50000000000000000000000000", - "Meta": { - "Owner": "t1jlm55oqkdalh2l3akqfsaqmpjxgjd36pob34dqy" - } - }, - { - "Type": "account", - "Balance": "5000000000000000000000", - "Meta": { - "Owner": "t1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq" - } - } - ], - "Miners": [ - { - "ID": "t01000", - "Owner": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Worker": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "PeerId": "12D3KooWGnEaQeRxwJtvBQ7bNNYSP5XyFL2TZVyuswkbAJ3MakFB", - "MarketBalance": "0", - "PowerBalance": "0", - "SectorSize": 2048, - "Sectors": [ - { - "CommR": { - "/": "bagboea4b5abcbf33kvktdrl4vipsv5n2uwo3cuhagx4ldcfra4a3d3c26hxzy4b4" - }, - "CommD": { - "/": "baga6ea4seaqlikortzuo455iu3ggem62veye2kpeenftkvn4isxmgrkmxlotcma" - }, - "SectorID": 0, - "Deal": { - "PieceCID": { - "/": "baga6ea4seaqlikortzuo455iu3ggem62veye2kpeenftkvn4isxmgrkmxlotcma" - }, - "PieceSize": 2048, - "VerifiedDeal": false, - "Client": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Provider": "t01000", - "Label": "0", - "StartEpoch": 0, - "EndEpoch": 9001, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealClientKey": { - "Type": "bls", - "PrivateKey": "oAQEUxvkaogDLfgCR69XseQjDra0KdDHjzrW8UDl5Vs=", - "PublicKey": "mCev6PA2j+LRylUby9/80Vb/6RarZAd3PAg+LsLHSujMUUsTaDN/jzlrcEB900Qe", - "Address": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - }, - "ProofType": 5 - }, - { - "CommR": { - "/": "bagboea4b5abcbckyfnyxbq2vdk4bifzsiyygi3qd6cir6fxt76gyfjmroqrdhztd" - }, - "CommD": { - "/": "baga6ea4seaqebwwnv3ltxshq6mvub2jtpb7ujwdae37y3i5tybnzs6plvtwo2bq" - }, - "SectorID": 1, - "Deal": { - "PieceCID": { - "/": "baga6ea4seaqebwwnv3ltxshq6mvub2jtpb7ujwdae37y3i5tybnzs6plvtwo2bq" - }, - "PieceSize": 2048, - "VerifiedDeal": false, - "Client": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Provider": "t01000", - "Label": "1", - "StartEpoch": 0, - "EndEpoch": 9001, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealClientKey": { - "Type": "bls", - "PrivateKey": "oAQEUxvkaogDLfgCR69XseQjDra0KdDHjzrW8UDl5Vs=", - "PublicKey": "mCev6PA2j+LRylUby9/80Vb/6RarZAd3PAg+LsLHSujMUUsTaDN/jzlrcEB900Qe", - "Address": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - }, - "ProofType": 5 - } - ] - } - ], - "NetworkName": "localnet-059bb756-cde4-41ca-a3f8-3576866c469f", - "VerifregRootKey": { - "Type": "multisig", - "Balance": "0", - "Meta": { - "Signers": [ - "t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy" - ], - "Threshold": 1, - "VestingDuration": 0, - "VestingStart": 0 - } - }, - "RemainderAccount": { - "Type": "multisig", - "Balance": "0", - "Meta": { - "Signers": [ - "t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy" - ], - "Threshold": 1, - "VestingDuration": 0, - "VestingStart": 0 - } - } -} diff --git a/ipc/ipc/testing/e2e/template/eudico/genesis/genesis.json b/ipc/ipc/testing/e2e/template/eudico/genesis/genesis.json deleted file mode 100644 index 47aee2a05..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/genesis/genesis.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "NetworkVersion": 18, - "Timestamp": 42, - "Accounts": [ - { - "Type": "account", - "Balance": "50000000000000000000000000", - "Meta": { - "Owner": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - } - }, - { - "Type": "account", - "Balance": "50000000000000000000000000", - "Meta": { - "Owner": "t1jlm55oqkdalh2l3akqfsaqmpjxgjd36pob34dqy" - } - } - ], - "Miners": [ - { - "ID": "t01000", - "Owner": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Worker": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "PeerId": "12D3KooWGnEaQeRxwJtvBQ7bNNYSP5XyFL2TZVyuswkbAJ3MakFB", - "MarketBalance": "0", - "PowerBalance": "0", - "SectorSize": 2048, - "Sectors": [ - { - "CommR": { - "/": "bagboea4b5abcbf33kvktdrl4vipsv5n2uwo3cuhagx4ldcfra4a3d3c26hxzy4b4" - }, - "CommD": { - "/": "baga6ea4seaqlikortzuo455iu3ggem62veye2kpeenftkvn4isxmgrkmxlotcma" - }, - "SectorID": 0, - "Deal": { - "PieceCID": { - "/": "baga6ea4seaqlikortzuo455iu3ggem62veye2kpeenftkvn4isxmgrkmxlotcma" - }, - "PieceSize": 2048, - "VerifiedDeal": false, - "Client": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Provider": "t01000", - "Label": "0", - "StartEpoch": 0, - "EndEpoch": 9001, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealClientKey": { - "Type": "bls", - "PrivateKey": "oAQEUxvkaogDLfgCR69XseQjDra0KdDHjzrW8UDl5Vs=", - "PublicKey": "mCev6PA2j+LRylUby9/80Vb/6RarZAd3PAg+LsLHSujMUUsTaDN/jzlrcEB900Qe", - "Address": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - }, - "ProofType": 5 - }, - { - "CommR": { - "/": "bagboea4b5abcbckyfnyxbq2vdk4bifzsiyygi3qd6cir6fxt76gyfjmroqrdhztd" - }, - "CommD": { - "/": "baga6ea4seaqebwwnv3ltxshq6mvub2jtpb7ujwdae37y3i5tybnzs6plvtwo2bq" - }, - "SectorID": 1, - "Deal": { - "PieceCID": { - "/": "baga6ea4seaqebwwnv3ltxshq6mvub2jtpb7ujwdae37y3i5tybnzs6plvtwo2bq" - }, - "PieceSize": 2048, - "VerifiedDeal": false, - "Client": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a", - "Provider": "t01000", - "Label": "1", - "StartEpoch": 0, - "EndEpoch": 9001, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealClientKey": { - "Type": "bls", - "PrivateKey": "oAQEUxvkaogDLfgCR69XseQjDra0KdDHjzrW8UDl5Vs=", - "PublicKey": "mCev6PA2j+LRylUby9/80Vb/6RarZAd3PAg+LsLHSujMUUsTaDN/jzlrcEB900Qe", - "Address": "t3tat272hqg2h6fuokkun4xx742flp72iwvnsao5z4ba7c5qwhjlumyuklcnudg74phfvxaqd52ncb5vhutu2a" - }, - "ProofType": 5 - } - ] - } - ], - "NetworkName": "localnet-059bb756-cde4-41ca-a3f8-3576866c469f", - "VerifregRootKey": { - "Type": "multisig", - "Balance": "0", - "Meta": { - "Signers": [ - "t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy" - ], - "Threshold": 1, - "VestingDuration": 0, - "VestingStart": 0 - } - }, - "RemainderAccount": { - "Type": "multisig", - "Balance": "0", - "Meta": { - "Signers": [ - "t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy" - ], - "Threshold": 1, - "VestingDuration": 0, - "VestingStart": 0 - } - } -} diff --git a/ipc/ipc/testing/e2e/template/eudico/genesis/wallet.key b/ipc/ipc/testing/e2e/template/eudico/genesis/wallet.key deleted file mode 100644 index 44b2c56c8..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/genesis/wallet.key +++ /dev/null @@ -1 +0,0 @@ -{"Type":"secp256k1","PrivateKey":"3lUCCAcUXPRi0H41CR6Zamgx+PDsTVTeqhDbl7jDeV4="} \ No newline at end of file diff --git a/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-daemon.sh b/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-daemon.sh deleted file mode 100755 index a9134a1bb..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-daemon.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "[*] Populating config" - -echo ' -[ChainStore] - EnableSplitstore = true -[API] - ListenAddress = "/ip4/0.0.0.0/tcp/1234/http" -' > $LOTUS_PATH/config.toml - -echo "[*] Generate genesis for subnet deterministically" -if [[ "$IPC_SUBNET_ID" == "/r31415926" ]]; then - eudico genesis new --subnet-id=$IPC_SUBNET_ID --template=/genesis-test.json --out=subnet.car -else - eudico genesis new --subnet-id=$IPC_SUBNET_ID --template=/genesis.json --out=subnet.car -fi -echo "[*] Starting daemon" -eudico mir daemon --genesis=subnet.car --bootstrap=false diff --git a/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-validator.sh b/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-validator.sh deleted file mode 100755 index 967b55711..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/scripts/subnet-validator.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -# Based on https://github.com/consensus-shipyard/lotus/blob/main/scripts/ipc/src/r31415926-single-validator.sh - -# There is also https://github.com/consensus-shipyard/lotus/blob/main/scripts/ipc/src/subnet-validator.sh -# but it looks incomplete at the moment, not starting the validator. - -set -e - -eudico wait-api --timeout=300s -sleep 5 - -# Do not fail if the keys have already been imported, -# which would be the case if this container was restarted. -set +e - -echo "[*] Importing wallet key" -eudico wallet import --as-default --format=json-lotus /wallet.key - -echo "[*] Initializing validator config" -eudico mir validator config init - -# Find an address where the validator can be reached by others. This is going into some kind of membership file -# which should be shared with the other validators, which isn't done, there is no shared volume for that. -# The process seems to have some `--membership=onchain` parameter that might help. -validator_addr=`eudico mir validator config validator-addr | grep -vE '(/ip6/)' | grep -v "127.0.0.1" | grep -E '/tcp/1347'` - -if [ "$IPC_SUBNET_ID" != "/r31415926" ]; then - # On subnets Mir crashes if the address contains the @ part. - validator_addr=$(echo $validator_addr | sed 's/^.*@//') -fi - -echo "[*] Adding validator with address $validator_addr" -eudico mir validator config add-validator $validator_addr - -set -e - -echo "[*] Starting validator" - -if [ "$IPC_SUBNET_ID" == "/r31415926" ]; then - eudico mir validator run --nosync -else - # In the infra scripts this is called in mine-subnet.sh - # It's not clear if there is any problem launching this before the validator has joined the subnet. - eudico mir validator run --nosync --membership onchain --ipcagent-url=http://${AGENT_HOSTNAME}:3030/json_rpc -fi diff --git a/ipc/ipc/testing/e2e/template/eudico/scripts/validator-entry.sh b/ipc/ipc/testing/e2e/template/eudico/scripts/validator-entry.sh deleted file mode 100755 index c93762ad7..000000000 --- a/ipc/ipc/testing/e2e/template/eudico/scripts/validator-entry.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# After parameters are fetched the daemon will write an API token -# to LOTUS_PATH, which we need to use to contact the server. -while [ ! -f $LOTUS_PATH/token ]; do - echo "Waiting for the API token to appear..."; - sleep 5 -done - -API_TOKEN=$(cat $LOTUS_PATH/token) - -# Set the env var that Lotus is looking for. -export FULLNODE_API_INFO=${API_TOKEN}:/dns/${DAEMON_HOSTNAME}/tcp/1234/http - -echo "Running as subnet ${IPC_SUBNET_ID}" -exec /scripts/subnet-validator.sh diff --git a/ipc/ipc/testing/e2e/tests/subnet_lifecycle.rs b/ipc/ipc/testing/e2e/tests/subnet_lifecycle.rs deleted file mode 100644 index 08b3a645d..000000000 --- a/ipc/ipc/testing/e2e/tests/subnet_lifecycle.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT - -use std::str::FromStr; - -use ipc_sdk::subnet_id::SubnetID; - -use ipc_e2e::TestClient; - -const IPC_AGENT_JSON_RPC_URL_ENV: &str = "IPC_AGENT_JSON_RPC_URL"; -const DEFAULT_ROOT: &str = "/r31415926"; - -#[tokio::test] -async fn subnet_lifecycle() { - let client = TestClient::new(std::env::var(IPC_AGENT_JSON_RPC_URL_ENV).ok()); - - // step 1. create the subnet - let address = client - .create_subnet(DEFAULT_ROOT) - .await - .expect("create subnet in root failed"); - - // obtain the created subnet id - let root = SubnetID::from_str(DEFAULT_ROOT).unwrap(); - let subnet_id = SubnetID::new_from_parent(&root, address); - log::info!("created subnet: {:} in root", subnet_id); - - // step 2. join the subnet - client - .join_subnet(&subnet_id, String::from("test_validator")) - .await - .expect("cannot join subnet"); - log::info!("joined subnet: {:}", subnet_id); - - // step 3. try kill the subnet, fail because not all validators have left - let r = client.kill_subnet(&subnet_id).await; - assert!( - r.is_err(), - "should failed when killing subnet as not all validators have left" - ); - log::info!( - "expected cannot kill subnet: {:} when there are validators in subnet", - subnet_id - ); - - // step 4. leave the subnet - client - .leave_subnet(&subnet_id) - .await - .expect("cannot leave subnet"); - log::info!("left subnet: {:}", subnet_id); - - // step 5. kill the subnet works now as all validators have left - client - .kill_subnet(&subnet_id) - .await - .expect("cannot kill subnet"); -} diff --git a/ipc/ipc/testing/e2e/topologies/example.sh b/ipc/ipc/testing/e2e/topologies/example.sh deleted file mode 100644 index 936391bbf..000000000 --- a/ipc/ipc/testing/e2e/topologies/example.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# Generated from topologies/example.yaml -set -e -# Create the agent(s) -make --no-print-directory agent/up IPC_AGENT_NR=0 -make --no-print-directory agent/up IPC_AGENT_NR=1 -# Create the root node(s) -make --no-print-directory node/up IPC_NODE_NR=0 IPC_AGENT_NR=0 IPC_SUBNET_NAME=vertebrates -# Alternate connecting agents and creating subnets and nodes to run them -make --no-print-directory connect IPC_NODE_NR=0 IPC_AGENT_NR=0 -make --no-print-directory node/up IPC_NODE_NR=1 IPC_AGENT_NR=1 IPC_PARENT_NODE_NR=0 IPC_PARENT_AGENT_NR=0 IPC_WALLET_NR=0 IPC_SUBNET_NAME=warm-blooded IPC_WALLET_FUNDS=100 IPC_SUBNET_FUNDS=90 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory node/up IPC_NODE_NR=2 IPC_AGENT_NR= IPC_PARENT_NODE_NR=0 IPC_PARENT_AGENT_NR=0 IPC_WALLET_NR=1 IPC_SUBNET_NAME=cold-blooded IPC_WALLET_FUNDS=100 IPC_SUBNET_FUNDS=90 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory node/up IPC_NODE_NR=5 IPC_AGENT_NR=0 IPC_PARENT_NODE_NR=0 IPC_PARENT_AGENT_NR=0 IPC_WALLET_NR=1 IPC_SUBNET_NAME=warm-blooded IPC_WALLET_FUNDS=50 IPC_SUBNET_FUNDS=40 IPC_COLLATERAL=2 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory connect IPC_NODE_NR=1 IPC_AGENT_NR=1 -make --no-print-directory node/up IPC_NODE_NR=3 IPC_AGENT_NR= IPC_PARENT_NODE_NR=1 IPC_PARENT_AGENT_NR=1 IPC_WALLET_NR=0 IPC_SUBNET_NAME=mammals IPC_WALLET_FUNDS=10 IPC_SUBNET_FUNDS=6 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory node/up IPC_NODE_NR=4 IPC_AGENT_NR= IPC_PARENT_NODE_NR=1 IPC_PARENT_AGENT_NR=1 IPC_WALLET_NR=1 IPC_SUBNET_NAME=birds IPC_WALLET_FUNDS=10 IPC_SUBNET_FUNDS=7 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory connect IPC_NODE_NR=5 IPC_AGENT_NR=0 diff --git a/ipc/ipc/testing/e2e/topologies/example.yaml b/ipc/ipc/testing/e2e/topologies/example.yaml deleted file mode 100644 index 3bfa8c2a2..000000000 --- a/ipc/ipc/testing/e2e/topologies/example.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# SUBNET_NAME NODE_NR -# ----------------------------- -# vertebrates (0) -# |- warm-blooded (1, 5) -# | |- mammals (3) -# | |- birds (4) -# |- cold-blooded (2) - -# Every node must either have no parent, or a parent with a lower -# number than itself, so they can be created in the order of appearance. -nodes: - # The root net on node-0, with no parent. - - nr: 0 - subnet: - name: vertebrates - - # A subnet under the root; its parent is node-0, - # where a wallet-0 will be created and funded with 6 tokens, - # serving as the default wallet of node-1. - # At the end wallet-0 will join the warm-blooded subnet with 1 collateral. - - nr: 1 - subnet: - name: warm-blooded - parent_node: 0 - wallet: 0 - wallet_funds: 100 - subnet_funds: 90 - collateral: 1 - - # Another subnet under the root running on node-0, - # with a different wallet than used for the previous node. - - nr: 2 - subnet: - name: cold-blooded - parent_node: 0 - wallet: 1 - wallet_funds: 100 - subnet_funds: 90 - collateral: 1 - - # A sub-subnet /vertebrates/warm-blooded/mammals, - # running on node-3, using wallet-0 created on node-1, - # funding it with another 2 tokens. - - nr: 3 - subnet: - name: mammals - parent_node: 1 - wallet: 0 - wallet_funds: 10 - subnet_funds: 6 - collateral: 1 - - - nr: 4 - subnet: - name: birds - parent_node: 1 - wallet: 1 - wallet_funds: 10 - subnet_funds: 7 - collateral: 1 - - - nr: 5 - subnet: - name: warm-blooded - parent_node: 0 - wallet: 1 - wallet_funds: 50 - subnet_funds: 40 - collateral: 2 - -agents: - - nr: 0 - # agent-0 can issue commands to node-0 and node-5, - # using their default wallets. - connections: - - node: 0 - - node: 5 - - - nr: 1 - # agent-1 issues commands to node-1 - connections: - - node: 1 diff --git a/ipc/ipc/testing/e2e/topologies/simple.sh b/ipc/ipc/testing/e2e/topologies/simple.sh deleted file mode 100644 index 9ade3bc8b..000000000 --- a/ipc/ipc/testing/e2e/topologies/simple.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# Generated from topologies/simple.yaml -set -e -# Create the agent(s) -make --no-print-directory agent/up IPC_AGENT_NR=0 -# Create the root node(s) -make --no-print-directory node/up IPC_NODE_NR=0 IPC_AGENT_NR=0 IPC_SUBNET_NAME=head -# Alternate connecting agents and creating subnets and nodes to run them -make --no-print-directory connect IPC_NODE_NR=0 IPC_AGENT_NR=0 -make --no-print-directory node/up IPC_NODE_NR=1 IPC_AGENT_NR=0 IPC_PARENT_NODE_NR=0 IPC_PARENT_AGENT_NR=0 IPC_WALLET_NR=0 IPC_SUBNET_NAME=thorax IPC_WALLET_FUNDS=10 IPC_SUBNET_FUNDS=5 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory connect IPC_NODE_NR=1 IPC_AGENT_NR=0 -make --no-print-directory node/up IPC_NODE_NR=2 IPC_AGENT_NR=0 IPC_PARENT_NODE_NR=1 IPC_PARENT_AGENT_NR=0 IPC_WALLET_NR=0 IPC_SUBNET_NAME=abdomen IPC_WALLET_FUNDS=4 IPC_SUBNET_FUNDS=2 IPC_COLLATERAL=1 IPC_MIN_VALIDATOR_STAKE=1 IPC_MIN_VALIDATORS=0 IPC_BOTTOMUP_CHECK_PERIOD=10 IPC_TOPDOWN_CHECK_PERIOD=10 -make --no-print-directory connect IPC_NODE_NR=2 IPC_AGENT_NR=0 diff --git a/ipc/ipc/testing/e2e/topologies/simple.yaml b/ipc/ipc/testing/e2e/topologies/simple.yaml deleted file mode 100644 index e3595dd76..000000000 --- a/ipc/ipc/testing/e2e/topologies/simple.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# SUBNET_NAME NODE_NR -# ----------------------------- -# head (0) -# |- thorax (1) -# |- abdomen (2) - -nodes: - - nr: 0 - subnet: - name: head - - - nr: 1 - subnet: - name: thorax - parent_node: 0 - wallet: 0 - wallet_funds: 10 - subnet_funds: 5 - collateral: 1 - - - nr: 2 - subnet: - name: abdomen - parent_node: 1 - wallet: 0 - wallet_funds: 4 - subnet_funds: 2 - collateral: 1 - -agents: - - nr: 0 - connections: - - node: 0 - - node: 1 - - node: 2 diff --git a/ipc/ipc/testing/itest/.env.template b/ipc/ipc/testing/itest/.env.template deleted file mode 100644 index a3466a03e..000000000 --- a/ipc/ipc/testing/itest/.env.template +++ /dev/null @@ -1,23 +0,0 @@ - -# define the following env variable -# the path to eudico binary path -export EUDICO_BIN= -# the ipc root folder that contains all the configs, i.e. ~/.ipc-agent -export IPC_ROOT_FOLDER= -# the parent subnet lotus path -export PARENT_LOTUS_PATH= -# the parent subnet id -export PARENT_SUBNET_ID= -# the name of the subnet -export SUBNET_NAME= - -# start the infra that runs util kill signal -../../target/release/examples/no_tear_down - -# in another terminal, define the following variables -# the address that performs the funding and release across subnets -export FUND_ADDRESS= -# the ipc agent json rpc url -export IPC_AGENT_JSON_RPC_URL=http://localhost:3030/json_rpc -# child subnet id in string format -export CHILD_SUBNET_ID_STR= \ No newline at end of file diff --git a/ipc/ipc/testing/itest/Cargo.toml b/ipc/ipc/testing/itest/Cargo.toml deleted file mode 100644 index 1ab0391d8..000000000 --- a/ipc/ipc/testing/itest/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "itest" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -tokio = "1.28.1" -env_logger = "0.10.0" -anyhow = { workspace = true } -log = { workspace = true } -fvm_shared = { workspace = true } -serde_json = { workspace = true } -num-traits = { workspace = true } -serde = { workspace = true } - -ipc-agent = { path = "../../daemon" } -ipc-identity = { path = "../../identity" } -ipc-provider = { path = "../../provider" } \ No newline at end of file diff --git a/ipc/ipc/testing/itest/README.md b/ipc/ipc/testing/itest/README.md deleted file mode 100644 index f30d9a48f..000000000 --- a/ipc/ipc/testing/itest/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Child Subnet Infra -This is a utility script to spawn child subnet infrastructure, mainly for integration testing. - -It spawns the required number of eudico nodes and validators based on input config parameters. This would be a time saver -when testing subnet checkpoints and cross net messages. - -The `src/infra` contains the process flow for spawn subnet nodes and their validators. -The `examples` folder contains all the sample scripts to start different configurations and requirements. - -## Requirements -In order to run these scripts, one must first deploy an IPC rootnet locally, as well as an IPC agent already configured with that network. These integration tests needs access to a `eudico` compiled binary, and assuments that the rootnet is deployed in the local environment, without any kind of virtualization or remote connection. - -## Usage -Once a root net and the IPC agent have been manually configured and spawned. We can compile the itests through: -```shell -cargo build --examples --release -``` - -We'll then need to configure a set of environmental variables by exporting them manually, or configuring an `.env` file similar to the one shared in `env.template` and `source .env` in the terminal where the tests will be run. -```shell -# start the root subnet and ipc agent on your own - -# define the following env variable -# the path to eudico binary path -export EUDICO_BIN= -# the ipc root folder that contains all the configs, i.e. ~/.ipc-agent -export IPC_ROOT_FOLDER= -# the parent subnet lotus path -export PARENT_LOTUS_PATH= -# the parent subnet id -export PARENT_SUBNET_ID= -# the name of the subnet -export SUBNET_NAME= -``` - -We can then run any of the infra scripts available in the `examples` folder. This will deploy the subnet-specific infra for the subnets: -```shell -# start the infra that runs util kill signal -../../target/release/examples/no_tear_down -``` - -Finally, we can run the actual tests by exporting the specific environmental variables required for the test in the corresponding terminal (if not done in previous steps): -```shell -# in another terminal, define the following variables -# the address that performs the funding and release across subnets -export FUND_ADDRESS= -# the ipc agent json rpc url -export IPC_AGENT_JSON_RPC_URL=http://localhost:3030/json_rpc -# child subnet id in string format -export CHILD_SUBNET_ID_STR= -``` -And running the tests: -```shell -# start the tests with -cargo test -p itest --test checkpoint -- --nocapture -``` - diff --git a/ipc/ipc/testing/itest/examples/no_create_subnet.rs b/ipc/ipc/testing/itest/examples/no_create_subnet.rs deleted file mode 100644 index 884f83158..000000000 --- a/ipc/ipc/testing/itest/examples/no_create_subnet.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT -use ipc_sdk::subnet_id::SubnetID; -use itest::infra::SubnetInfra; -use itest::{infra, set_network_from_env, DEFAULT_ROOT}; -use std::str::FromStr; -use std::sync::atomic::AtomicU16; -use std::sync::Arc; -use std::thread::sleep; -use std::time::Duration; -use tokio::select; -use tokio::signal::unix::{signal, SignalKind}; - -#[tokio::main] -async fn main() { - set_network_from_env(); - run().await.unwrap(); -} - -/// This spawns the infra only and will tear down the whole setup once done. This is useful for -/// initial testing of infra scripts. This does not create the child subnet in the actors, assuming -/// it is already created -async fn run() -> anyhow::Result<()> { - env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); - - let eudico_binary_path = - std::env::var("EUDICO_BIN").unwrap_or_else(|_| "/home/admin/lotus/eudico".to_string()); - let ipc_root_folder = - std::env::var("IPC_ROOT_FOLDER").unwrap_or_else(|_| "/home/admin/.ipc-agent".to_string()); - let parent_lotus_path = std::env::var("PARENT_LOTUS_PATH") - .unwrap_or_else(|_| "/home/admin/.lotus-local-net0".to_string()); - let parent_subnet_id_str = - std::env::var("PARENT_SUBNET_ID").unwrap_or_else(|_| DEFAULT_ROOT.to_string()); - let child_subnet_id_str = - std::env::var("CHILD_SUBNET_ID").unwrap_or_else(|_| DEFAULT_ROOT.to_string()); - let subnet_name = std::env::var("SUBNET_NAME").unwrap_or_else(|_| "test-subnet".to_string()); - - let api_port_sequence = Arc::new(AtomicU16::new(10)); - let config = infra::SubnetConfig::new_with_subnet_id( - subnet_name, - "t1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq".to_string(), - parent_lotus_path, - ipc_root_folder, - 1, - eudico_binary_path, - SubnetID::from_str(&parent_subnet_id_str).unwrap(), - api_port_sequence, - SubnetID::from_str(&child_subnet_id_str)?, - ); - - let mut infra = SubnetInfra::new(config); - - infra.start_nodes()?; - infra.fund_node_wallets()?; - infra.start_validators().await?; - log::info!("nodes and validators are all up"); - - infra.update_ipc_agent_config().await?; - log::info!("ipc agent config updated"); - - // wait for the validators to be mining - sleep(Duration::from_secs(100)); - log::info!("wait for validators to be ready"); - - // forever running until kill or ctrl-c - let mut sigterm = signal(SignalKind::terminate()).unwrap(); - let mut sigint = signal(SignalKind::interrupt()).unwrap(); - loop { - select! { - _ = sigterm.recv() => { - log::info!("Recieve SIGTERM"); - break; - }, - _ = sigint.recv() => { - log::info!("Recieve SIGTERM"); - break; - }, - }; - } - - infra.tear_down()?; - log::info!("infra tear down"); - - infra.remove_from_ipc_agent_config().await?; - log::info!("removed subnet from ipc agent config"); - - infra.trigger_ipc_config_reload().await?; - log::info!("triggered ipc agent config reload"); - - Ok(()) -} diff --git a/ipc/ipc/testing/itest/examples/no_tear_down.rs b/ipc/ipc/testing/itest/examples/no_tear_down.rs deleted file mode 100644 index 235ea5d57..000000000 --- a/ipc/ipc/testing/itest/examples/no_tear_down.rs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT -use ipc_sdk::subnet_id::SubnetID; -use itest::infra::SubnetInfra; -use itest::{infra, set_network_from_env, DEFAULT_ROOT}; -use std::str::FromStr; -use std::sync::atomic::AtomicU16; -use std::sync::Arc; -use std::thread::sleep; -use std::time::Duration; -use tokio::select; -use tokio::signal::unix::{signal, SignalKind}; - -#[tokio::main] -async fn main() { - set_network_from_env(); - run().await.unwrap(); -} - -/// This spawns the infra only and will tear down the whole setup once done. This is useful for -/// initial testing of infra scripts. -async fn run() -> anyhow::Result<()> { - env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); - - let eudico_binary_path = - std::env::var("EUDICO_BIN").unwrap_or_else(|_| "/home/admin/lotus/eudico".to_string()); - let ipc_root_folder = - std::env::var("IPC_ROOT_FOLDER").unwrap_or_else(|_| "/home/admin/.ipc-agent".to_string()); - let parent_lotus_path = std::env::var("PARENT_LOTUS_PATH") - .unwrap_or_else(|_| "/home/admin/.lotus-local-net0".to_string()); - let parent_subnet_id_str = - std::env::var("PARENT_SUBNET_ID").unwrap_or_else(|_| DEFAULT_ROOT.to_string()); - let subnet_name = std::env::var("SUBNET_NAME").unwrap_or_else(|_| "test-subnet".to_string()); - - let api_port_sequence = Arc::new(AtomicU16::new(10)); - let config = infra::SubnetConfig::new( - subnet_name, - "t1cp4q4lqsdhob23ysywffg2tvbmar5cshia4rweq".to_string(), - parent_lotus_path, - ipc_root_folder, - 1, - eudico_binary_path, - SubnetID::from_str(&parent_subnet_id_str).unwrap(), - api_port_sequence, - ); - - let mut infra = SubnetInfra::new(config); - infra.create_subnet().await?; - infra.start_nodes()?; - infra.fund_node_wallets()?; - infra.start_validators().await?; - - log::info!("nodes and validators are all up"); - - infra.update_ipc_agent_config().await?; - log::info!("ipc agent config updated"); - - // wait for the validators to be mining - sleep(Duration::from_secs(100)); - log::info!("wait for validators to be ready"); - - infra.trigger_ipc_config_reload().await?; - log::info!("triggered ipc agent config reload"); - - // forever running until kill or ctrl-c - let mut sigterm = signal(SignalKind::terminate()).unwrap(); - let mut sigint = signal(SignalKind::interrupt()).unwrap(); - loop { - select! { - _ = sigterm.recv() => { - log::info!("Recieve SIGTERM"); - break; - }, - _ = sigint.recv() => { - log::info!("Recieve SIGTERM"); - break; - }, - }; - } - - infra.tear_down()?; - log::info!("infra tear down"); - - infra.remove_from_ipc_agent_config().await?; - log::info!("removed subnet from ipc agent config"); - - infra.trigger_ipc_config_reload().await?; - log::info!("triggered ipc agent config reload"); - - Ok(()) -} diff --git a/ipc/ipc/testing/itest/src/infra/mod.rs b/ipc/ipc/testing/itest/src/infra/mod.rs deleted file mode 100644 index 7d6c53cab..000000000 --- a/ipc/ipc/testing/itest/src/infra/mod.rs +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT -//! Setup infra for integration testing - -pub mod subnet; -pub mod util; - -use crate::infra::subnet::{spawn_first_node, spawn_other_nodes, SubnetNode}; -use crate::infra::util::trim_newline; -use anyhow::anyhow; -use fvm_shared::address::Address; -use ipc_agent::config::subnet::FVMSubnet; -use ipc_agent::config::{Config, Subnet}; -use ipc_sdk::subnet_id::SubnetID; -use std::str::FromStr; -use std::sync::atomic::{AtomicU16, Ordering}; -use std::sync::Arc; -use std::thread::sleep; - -const DEFAULT_IPC_AGENT_URL: &str = "http://localhost:3030/json_rpc"; -const DEFAULT_NODE_API_BASE_PORT: u16 = 1230; -const DEFAULT_MIN_STAKE: f64 = 1.0; - -/// The configuration struct for the subnet to spawn -pub struct SubnetConfig { - /// The id of the subnet. If not specified, will create a subnet first. - pub id: Option, - /// Name of the subnet - pub name: String, - /// The parent of the subnet - pub parent: SubnetID, - /// Number of nodes in the subnet - pub number_of_nodes: usize, - /// The path to eudico binary. Since most of the operations are issued from - /// command line, we need to point to the eudico binary path. - pub eudico_binary_path: String, - /// The parent subnet wallet address. This will be used to perform setups in the parent - /// subnet, such as initial fund transfer to the validators so that validators can join - /// the created subnet - pub parent_wallet_address: String, - /// The parent subnet eudico lotus path - pub parent_lotus_path: String, - /// The ipc agent root folder - pub ipc_root_folder: String, - - ipc_agent_url: Option, - - /// The monotonic sequential port number generator to assign to each validator - port_starting_seq: Arc, -} - -impl SubnetConfig { - #[allow(clippy::too_many_arguments)] - pub fn new( - name: String, - parent_wallet_address: String, - parent_lotus_path: String, - ipc_root_folder: String, - number_of_nodes: usize, - eudico_binary_path: String, - parent: SubnetID, - port_starting_seq: Arc, - ) -> Self { - Self { - id: None, - name, - number_of_nodes, - eudico_binary_path, - parent, - parent_wallet_address, - parent_lotus_path, - ipc_root_folder, - port_starting_seq, - ipc_agent_url: None, - } - } - - #[allow(clippy::too_many_arguments)] - pub fn new_with_subnet_id( - name: String, - parent_wallet_address: String, - parent_lotus_path: String, - ipc_root_folder: String, - number_of_nodes: usize, - eudico_binary_path: String, - parent: SubnetID, - port_starting_seq: Arc, - id: SubnetID, - ) -> Self { - Self { - id: Some(id), - name, - number_of_nodes, - eudico_binary_path, - parent, - parent_wallet_address, - parent_lotus_path, - ipc_root_folder, - port_starting_seq, - ipc_agent_url: None, - } - } - - pub fn ipc_agent_url(&self) -> String { - self.ipc_agent_url - .clone() - .unwrap_or_else(|| DEFAULT_IPC_AGENT_URL.to_string()) - } - - pub fn next_port(&self) -> u16 { - loop { - let r = self.port_starting_seq.load(Ordering::SeqCst); - if self - .port_starting_seq - .compare_exchange(r, r + 1, Ordering::SeqCst, Ordering::SeqCst) - .is_ok() - { - return r + DEFAULT_NODE_API_BASE_PORT; - } - } - } -} - -pub struct SubnetInfra { - pub config: SubnetConfig, - pub nodes: Option>, -} - -impl SubnetInfra { - pub fn new(config: SubnetConfig) -> Self { - Self { - config, - nodes: None, - } - } - - pub async fn create_subnet(&mut self) -> anyhow::Result<()> { - let parent = self.config.parent.to_string(); - - let actor_addr = util::create_subnet( - self.config.ipc_agent_url(), - None, - parent, - self.config.name.clone(), - self.config.number_of_nodes as u64, - ) - .await?; - - self.config.id = Some(SubnetID::new_from_parent( - &self.config.parent, - Address::from_str(&actor_addr)?, - )); - - Ok(()) - } - - pub fn start_nodes(&mut self) -> anyhow::Result<()> { - let first_node = spawn_first_node(&self.config)?; - let mut nodes = spawn_other_nodes(&self.config, &first_node)?; - - nodes.push(first_node); - - self.nodes = Some(nodes); - - Ok(()) - } - - pub async fn start_validators(&mut self) -> anyhow::Result<()> { - if self.nodes.is_none() { - return Err(anyhow!("nodes not spawned yet")); - } - - for node in self.nodes.as_mut().unwrap() { - node.config_validator()?; - log::info!( - "configured validator for node: {:?}", - node.validator.net_addr - ); - - node.export_wallet_to_ipc_key_store().await?; - node.join_subnet().await?; - log::info!( - "validator: {:?} joined subnet: {:}", - node.validator.net_addr, - node.id - ); - - sleep(std::time::Duration::from_secs(5)); - - node.spawn_validator()?; - - log::info!("validator: {:?} spawned", node.validator.net_addr); - } - - Ok(()) - } - - pub fn fund_node_wallets(&mut self) -> anyhow::Result<()> { - if self.nodes.is_none() { - return Err(anyhow!("no nodes launched")); - } - - util::fund_wallet_in_nodes( - &self.config.eudico_binary_path, - &self.config.parent_lotus_path, - self.nodes.as_ref().unwrap(), - 10, - )?; - - Ok(()) - } - - /// Tear down all nodes and validators - pub fn tear_down(&mut self) -> anyhow::Result<()> { - if self.nodes.is_none() { - return Err(anyhow!("no nodes launched")); - } - - let nodes = self.nodes.take().unwrap(); - drop(nodes); - - Ok(()) - } - - /// Add subnet info to ipc agent config - pub async fn update_ipc_agent_config(&self) -> anyhow::Result<()> { - if self.config.id.is_none() { - return Err(anyhow!("subnet id not set")); - } - - let config_path = self.ipc_config_path(); - let mut config = Config::from_file(&config_path) - .map_err(|e| anyhow!("cannot load config from {config_path:?} due to: {e:}"))?; - log::debug!("loaded config: {config:?}"); - - let subnet = self.subnet_config().await?; - log::debug!("created subnet config: {subnet:?}"); - - config.add_subnet(subnet); - config.write_to_file_async(&config_path).await - } - - /// Remove subnet info from ipc agent config - pub async fn remove_from_ipc_agent_config(&self) -> anyhow::Result<()> { - if self.config.id.is_none() { - return Err(anyhow!("subnet id not set")); - } - - let config_path = self.ipc_config_path(); - let mut config = Config::from_file(&config_path)?; - - config.remove_subnet(self.config.id.as_ref().unwrap()); - config.write_to_file_async(&config_path).await?; - - Ok(()) - } - - pub async fn trigger_ipc_config_reload(&self) -> anyhow::Result<()> { - let config_path = self.ipc_config_path(); - util::reload_config(self.config.ipc_agent_url(), Some(config_path)).await - } - - fn ipc_config_path(&self) -> String { - format!("{:}/{:}", self.config.ipc_root_folder, "config.toml") - } - - async fn subnet_config(&self) -> anyhow::Result { - if self.nodes.is_none() { - return Err(anyhow!("nodes not up")); - } - if self.config.id.is_none() { - return Err(anyhow!("subnet id not set")); - } - - let accounts = self - .nodes - .as_ref() - .unwrap() - .iter() - .map(|n| { - if n.wallet_address.is_none() { - return Err(anyhow!("node wallet node setup")); - } - let address = Address::from_str(n.wallet_address.as_ref().unwrap())?; - Ok(address) - }) - .collect::, _>>()?; - - let mut admin_token = self.nodes.as_ref().unwrap()[0].create_admin_token().await?; - trim_newline(&mut admin_token); - - Ok(Subnet { - id: self.config.id.clone().unwrap(), - network_name: self.config.name.clone(), - config: ipc_agent::config::subnet::SubnetConfig::Fvm(FVMSubnet { - gateway_addr: Address::from_str("t064")?, - jsonrpc_api_http: format!( - "http://127.0.0.1:{:}/rpc/v1", - self.nodes.as_ref().unwrap()[0].node.tcp_port - ) - .parse()?, - auth_token: Some(admin_token), - accounts, - }), - }) - } -} diff --git a/ipc/ipc/testing/itest/src/infra/subnet.rs b/ipc/ipc/testing/itest/src/infra/subnet.rs deleted file mode 100644 index 7e222b946..000000000 --- a/ipc/ipc/testing/itest/src/infra/subnet.rs +++ /dev/null @@ -1,504 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT - -use crate::infra::util::import_wallet; -use crate::infra::{util, SubnetConfig, DEFAULT_MIN_STAKE}; -use anyhow::{anyhow, Result}; -use ipc_sdk::subnet_id::SubnetID; -use std::fs; -use std::fs::File; -use std::path::Path; -use std::process::{Child, Command}; -use std::thread::sleep; - -const DEFAULT_LOG_DIR: &str = "./logs"; - -fn node_from_topology(topology: &SubnetConfig) -> SubnetNode { - SubnetNode::new( - topology.id.clone().unwrap(), - topology.ipc_root_folder.clone(), - topology.next_port(), - topology.next_port(), - topology.next_port(), - topology.next_port(), - topology.eudico_binary_path.clone(), - topology.ipc_agent_url(), - ) -} - -/// Spawn the first node, then subsequent node will connect to this node. -pub(crate) fn spawn_first_node(topology: &SubnetConfig) -> anyhow::Result { - let mut node = node_from_topology(topology); - node.gen_genesis()?; - node.spawn_node()?; - - util::create_wallet(&mut node)?; - node.config_default_wallet()?; - Ok(node) -} - -pub(crate) fn spawn_other_nodes( - topology: &SubnetConfig, - first: &SubnetNode, -) -> anyhow::Result> { - let mut nodes = vec![]; - for _ in 1..topology.number_of_nodes { - let mut node = node_from_topology(topology); - - node.spawn_node()?; - - util::create_wallet(&mut node)?; - - node.config_default_wallet()?; - - nodes.push(node); - } - - let addrs = loop { - match first.network_addresses() { - Ok(s) => { - break s; - } - Err(e) => { - log::warn!("first node not up, wait: {e:}"); - sleep(std::time::Duration::from_secs(5)); - } - } - }; - - let mut first_node_addr = util::tcp_address(addrs)?; - util::trim_newline(&mut first_node_addr); - - log::info!("first node net addr: {:?}", first_node_addr); - - for node in &nodes { - node.connect_peer(&first_node_addr)?; - } - - Ok(nodes) -} - -pub struct SubnetNode { - pub id: SubnetID, - pub ipc_root_folder: String, - /// The node info - pub node: NodeInfo, - /// The info of the validator - pub validator: NodeInfo, - pub eudico_binary_path: String, - pub ipc_agent_url: String, - pub wallet_address: Option, -} - -pub struct NodeInfo { - pub tcp_port: u16, - pub quic_port: u16, - pub status: SubnetNodeSpawnStatus, - pub net_addr: Option, -} - -/// The subnet node spawn status -pub enum SubnetNodeSpawnStatus { - Running { process: Child }, - Idle, -} - -impl SubnetNode { - #[allow(clippy::too_many_arguments)] - pub fn new( - id: SubnetID, - ipc_root_folder: String, - node_tcp_port: u16, - node_quic_port: u16, - validator_tcp_port: u16, - validator_quic_port: u16, - eudico_binary_path: String, - ipc_agent_url: String, - ) -> Self { - Self { - id, - ipc_root_folder, - node: NodeInfo { - tcp_port: node_tcp_port, - quic_port: node_quic_port, - status: SubnetNodeSpawnStatus::Idle, - net_addr: None, - }, - validator: NodeInfo { - tcp_port: validator_tcp_port, - quic_port: validator_quic_port, - status: SubnetNodeSpawnStatus::Idle, - net_addr: None, - }, - eudico_binary_path, - ipc_agent_url, - wallet_address: None, - } - } - - fn subnet_id_cli_string(&self) -> String { - self.id.to_string().replacen('/', "_", 1000) - } - - fn lotus_path(&self) -> String { - format!( - "{:}/.lotus_subnet{:}_{:}", - std::env::var("HOME").unwrap(), - self.subnet_id_cli_string(), - self.node.tcp_port - ) - } - - fn genesis_path(&self) -> String { - format!( - "{:}/subnet{:}.car", - self.ipc_root_folder, - self.subnet_id_cli_string() - ) - } - - fn network_addresses(&self) -> Result> { - let output = Command::new(&self.eudico_binary_path) - .args(["net", "listen"]) - .env("LOTUS_PATH", self.lotus_path()) - .output()?; - - if output.status.success() { - let s: String = String::from_utf8_lossy(&output.stdout).parse()?; - Ok(s.split('\n').into_iter().map(|s| s.to_string()).collect()) - } else { - Err(anyhow!( - "cannot get network addresses admin token in subnet:{:} with status: {:?}", - self.id, - output.status - )) - } - } - - pub fn new_wallet_address(&mut self) -> Result<()> { - if self.wallet_address.is_some() { - return Ok(()); - } - - let output = Command::new(&self.eudico_binary_path) - .args(["wallet", "new"]) - .env("LOTUS_PATH", self.lotus_path()) - .output()?; - - log::debug!("wallet create status: {:?}", output.status); - - if output.status.success() { - let mut wallet = String::from_utf8_lossy(&output.stdout).parse()?; - util::trim_newline(&mut wallet); - self.wallet_address = Some(wallet); - Ok(()) - } else { - Err(anyhow!( - "cannot create new wallet address in subnet:{:} with error: {:?}", - self.id, - String::from_utf8_lossy(&output.stderr).parse::()? - )) - } - } - - pub async fn export_wallet_to_ipc_key_store(&mut self) -> Result<()> { - if self.wallet_address.is_none() { - return Err(anyhow!("wallet not created")); - } - - let output = Command::new(&self.eudico_binary_path) - .args([ - "wallet", - "export", - "--lotus-json", - self.wallet_address.as_ref().unwrap(), - ]) - .env("LOTUS_PATH", self.lotus_path()) - .output()?; - - log::debug!("wallet export status: {:?}", output.status); - - if output.status.success() { - let mut private_key_json: String = String::from_utf8_lossy(&output.stdout).parse()?; - util::trim_newline(&mut private_key_json); - import_wallet(&self.ipc_agent_url, private_key_json).await - } else { - Err(anyhow!( - "cannot create new wallet address in subnet:{:} with error: {:?}", - self.id, - String::from_utf8_lossy(&output.stderr).parse::()? - )) - } - } - - pub fn config_default_wallet(&self) -> Result<()> { - if self.wallet_address.is_none() { - return Err(anyhow!("wallet not created yet")); - } - - log::info!( - "setting wallet: {:} as default", - self.wallet_address.as_ref().unwrap() - ); - - let status = Command::new(&self.eudico_binary_path) - .args([ - "wallet", - "set-default", - self.wallet_address.as_ref().unwrap(), - ]) - .env("LOTUS_PATH", self.lotus_path()) - .status()?; - - if status.success() { - log::info!( - "set wallet: {:} as default", - self.wallet_address.as_ref().unwrap() - ); - Ok(()) - } else { - Err(anyhow!( - "cannot set default wallet address in subnet:{:}", - self.id - )) - } - } - - pub fn gen_genesis(&self) -> Result<()> { - let genesis_path = self.genesis_path(); - if fs::metadata(&genesis_path).is_ok() { - return Ok(()); - } - - let status = Command::new(&self.eudico_binary_path) - .args([ - "genesis", - "new", - "--subnet-id", - &self.id.to_string(), - "-out", - &self.genesis_path(), - ]) - .env("LOTUS_PATH", self.lotus_path()) - .status()?; - - log::debug!( - "generate genesis for subnet: {:} with status: {:?}", - self.id, - status - ); - - if !status.success() { - let msg = format!( - "generate genesis for subnet: {:} failed with status: {:?}", - self.id, status - ); - return Err(anyhow!(msg)); - } - Ok(()) - } - - pub fn spawn_node(&mut self) -> Result<()> { - if !matches!(self.node.status, SubnetNodeSpawnStatus::Idle) { - return Err(anyhow!( - "subnet node: {:} already running", - self.id.to_string() - )); - } - - let subnet_id = self.subnet_id_cli_string(); - - let base_path = Path::new(DEFAULT_LOG_DIR); - fs::create_dir_all(base_path)?; - let node_std_out = File::create(Path::join( - base_path, - format!("./{subnet_id:}_node_{:}.log", self.node.tcp_port), - ))?; - let node_std_err = File::create(Path::join( - base_path, - format!("./{subnet_id:}_node_{:}.err", self.node.tcp_port), - ))?; - - log::info!( - "spawning node with api: {:}, genesis: {:}, lotus path: {:}", - self.node.tcp_port, - self.genesis_path(), - self.lotus_path() - ); - - let child = Command::new(&self.eudico_binary_path) - .args([ - "mir", - "daemon", - &format!("--genesis={:}", self.genesis_path()), - &format!("--api={:}", self.node.tcp_port), - "--bootstrap=false", - ]) - .stdout(node_std_out) - .stderr(node_std_err) - .env("LOTUS_PATH", self.lotus_path()) - .spawn()?; - - self.node.status = SubnetNodeSpawnStatus::Running { process: child }; - - log::debug!("node spawn for subnet: {:}", self.id); - - Ok(()) - } - - pub fn connect_peer(&self, peer: &str) -> Result<()> { - let status = Command::new(&self.eudico_binary_path) - .args(["net", "connect", peer]) - .env("LOTUS_PATH", self.lotus_path()) - .status()?; - - if !status.success() { - let msg = format!( - "cannot connect to peer {peer:} genesis for subnet: {:} failed with status: {:}", - self.id, status - ); - return Err(anyhow!(msg)); - } - Ok(()) - } - - pub async fn join_subnet(&self) -> Result<()> { - util::join_subnet( - self.ipc_agent_url.clone(), - None, - Some(self.wallet_address.clone().unwrap()), - self.id.to_string(), - DEFAULT_MIN_STAKE, - self.validator.net_addr.clone().unwrap(), - ) - .await - } - - pub fn config_validator(&mut self) -> Result<()> { - let status = Command::new(&self.eudico_binary_path) - .args([ - "mir", - "validator", - "config", - "init", - "--quic-libp2p-port", - &self.validator.quic_port.to_string(), - "--tcp-libp2p-port", - &self.validator.tcp_port.to_string(), - "-f", - ]) - .env("LOTUS_PATH", self.lotus_path()) - .status()?; - - if !status.success() { - return Err(anyhow!("cannot init validator in subnet:{:}", self.id)); - } - - let output = Command::new(&self.eudico_binary_path) - .args(["mir", "validator", "config", "validator-addr"]) - .env("LOTUS_PATH", self.lotus_path()) - .output()?; - - if output.status.success() { - let raw_addresses = String::from_utf8_lossy(&output.stdout).to_string(); - - log::debug!("raw addresses: {:?}", raw_addresses); - - let addresses = raw_addresses.lines().map(|s| s.to_string()).collect(); - - let mut tcp_addr = util::tcp_address(addresses)?; - util::trim_newline(&mut tcp_addr); - - // the net address starts with wallet address, need to trim it - let parts = tcp_addr.split('@').collect::>(); - self.validator.net_addr = Some(parts[1].to_string()); - - Ok(()) - } else { - Err(anyhow!( - "cannot get validator addresses in subnet:{:}", - self.id - )) - } - } - - pub fn spawn_validator(&mut self) -> Result<()> { - if !matches!(self.validator.status, SubnetNodeSpawnStatus::Idle) { - return Err(anyhow!( - "subnet node: {:} already running", - self.id.to_string() - )); - } - - let subnet_id = self.subnet_id_cli_string(); - - let validator_std_out = File::create(format!( - "./{subnet_id:}_validator_{:}.log", - self.validator.tcp_port - ))?; - let validator_std_err = File::create(format!( - "./{subnet_id:}_validator_{:}.err", - self.validator.tcp_port - ))?; - - let child = Command::new(&self.eudico_binary_path) - .args([ - "mir", - "validator", - "run", - "--membership=onchain", - "--nosync", - &format!("--ipcagent-url={:}", self.ipc_agent_url), - ]) - .env("LOTUS_PATH", self.lotus_path()) - .stdout(validator_std_out) - .stderr(validator_std_err) - .spawn()?; - - self.validator.status = SubnetNodeSpawnStatus::Running { process: child }; - - log::debug!("validator spawn for subnet: {:}", self.id); - - Ok(()) - } - - pub async fn create_admin_token(&self) -> Result { - let output = Command::new(&self.eudico_binary_path) - .args(["auth", "create-token", "--perm", "admin"]) - .env("LOTUS_PATH", self.lotus_path()) - .output()?; - - if output.status.success() { - Ok(String::from_utf8_lossy(&output.stdout).parse()?) - } else { - Err(anyhow!("cannot create admin token in subnet:{:}", self.id)) - } - } - - pub fn stop_validator(&mut self) -> anyhow::Result<()> { - match &mut self.validator.status { - SubnetNodeSpawnStatus::Running { process, .. } => { - process.kill()?; - } - SubnetNodeSpawnStatus::Idle => {} - }; - Ok(()) - } - - pub fn stop_node(&mut self) -> anyhow::Result<()> { - match &mut self.node.status { - SubnetNodeSpawnStatus::Running { process, .. } => { - process.kill()?; - } - SubnetNodeSpawnStatus::Idle => {} - }; - Ok(()) - } -} - -impl Drop for SubnetNode { - fn drop(&mut self) { - let _ = self.stop_validator(); - let _ = self.stop_node(); - } -} diff --git a/ipc/ipc/testing/itest/src/infra/util.rs b/ipc/ipc/testing/itest/src/infra/util.rs deleted file mode 100644 index bf8441dcd..000000000 --- a/ipc/ipc/testing/itest/src/infra/util.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT - -use crate::infra::subnet::SubnetNode; -use crate::infra::DEFAULT_MIN_STAKE; -use anyhow::anyhow; -use ipc_agent::sdk::{IpcAgentClient, LotusJsonKeyType}; -use ipc_agent::server::create::CreateSubnetParams; -use ipc_agent::server::join::JoinSubnetParams; -use ipc_provider::jsonrpc::JsonRpcClientImpl; -use std::process::Command; -use std::str::FromStr; -use std::thread::sleep; -use std::time::Duration; - -fn client_from_url(url: String) -> anyhow::Result> { - let url = url.parse()?; - Ok(IpcAgentClient::default_from_url(url)) -} - -/// Create a new subnet in the actor -pub async fn create_subnet( - ipc_agent_url: String, - from: Option, - parent: String, - name: String, - min_validators: u64, -) -> anyhow::Result { - let client = client_from_url(ipc_agent_url)?; - let params = CreateSubnetParams { - from, - parent, - name, - min_validator_stake: DEFAULT_MIN_STAKE, - min_validators, - bottomup_check_period: 10, - topdown_check_period: 10, - }; - client.create_subnet(params).await -} - -/// Join the subnet -pub async fn join_subnet( - ipc_agent_url: String, - from: Option, - worker_addr: Option, - subnet: String, - collateral: f64, - validator_net_addr: String, -) -> anyhow::Result<()> { - let client = client_from_url(ipc_agent_url)?; - let params = JoinSubnetParams { - subnet, - from, - collateral, - validator_net_addr, - worker_addr, - }; - client.join_subnet(params).await -} - -pub async fn reload_config( - ipc_agent_url: String, - config_path: Option, -) -> anyhow::Result<()> { - let client = client_from_url(ipc_agent_url)?; - client.reload_config(config_path).await -} - -/// Send token to the target address. Not that the `from` wallet address is not specified as it is -/// implied from the `lotus_path`. -pub fn send_token( - eudico_binary_path: &str, - lotus_path: &str, - addr: &str, - amount: u8, -) -> anyhow::Result<()> { - let status = Command::new(eudico_binary_path) - .args(["send", addr, &amount.to_string()]) - .env("LOTUS_PATH", lotus_path) - .status()?; - - if status.success() { - log::info!("funded wallet: {:} with amount: {:} fvm", addr, amount); - Ok(()) - } else { - Err(anyhow!("cannot send token to wallet:{:}", addr)) - } -} - -/// Fund the wallet addresses associated with the nodes -pub fn fund_wallet_in_nodes( - eudico_binary_path: &str, - lotus_path: &str, - nodes: &[SubnetNode], - amount: u8, -) -> anyhow::Result<()> { - for node in nodes.iter() { - send_token( - eudico_binary_path, - lotus_path, - node.wallet_address.as_ref().unwrap(), - amount, - )?; - // for nonce to be updated - sleep(Duration::from_secs(5)); - } - Ok(()) -} - -/// Create a new wallet address for the node -pub fn create_wallet(node: &mut SubnetNode) -> anyhow::Result<()> { - loop { - match node.new_wallet_address() { - Ok(_) => { - log::info!("one wallet created in node: {:?}", node.id); - break; - } - Err(e) => { - log::warn!("cannot create wallet: {e:}, wait and sleep to retry"); - sleep(Duration::from_secs(10)) - } - } - } - - Ok(()) -} - -pub async fn import_wallet(ipc_agent_url: &str, private_key: String) -> anyhow::Result<()> { - let params = LotusJsonKeyType::from_str(&private_key)?; - let client = client_from_url(ipc_agent_url.to_string())?; - client.import_lotus_json(params).await?; - Ok(()) -} - -/// Filter and get the tcp address, input must contain tcp address -pub fn tcp_address(addrs: Vec) -> anyhow::Result { - addrs - .into_iter() - .find(|a| a.contains("tcp")) - .ok_or_else(|| anyhow!("no tcp address found")) -} - -pub fn trim_newline(s: &mut String) { - if s.ends_with('\n') { - s.pop(); - if s.ends_with('\r') { - s.pop(); - } - } -} diff --git a/ipc/ipc/testing/itest/src/lib.rs b/ipc/ipc/testing/itest/src/lib.rs deleted file mode 100644 index 7341b6f56..000000000 --- a/ipc/ipc/testing/itest/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT - -use fvm_shared::address::{set_current_network, Network}; -use num_traits::cast::FromPrimitive; - -pub const DEFAULT_ROOT: &str = "/r31415926"; - -/// Sets the type of network from an environmental variable. -/// This is key to set the right network prefixes on string -/// representation of addresses. -pub fn set_network_from_env() { - let network_raw: u8 = std::env::var("LOTUS_NETWORK") - // default to testnet - .unwrap_or_else(|_| String::from("1")) - .parse() - .unwrap(); - let network = Network::from_u8(network_raw).unwrap(); - set_current_network(network); -} - -pub mod infra; diff --git a/ipc/ipc/testing/itest/tests/checkpoint.rs b/ipc/ipc/testing/itest/tests/checkpoint.rs deleted file mode 100644 index fb974e02b..000000000 --- a/ipc/ipc/testing/itest/tests/checkpoint.rs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2022-2023 Protocol Labs -// SPDX-License-Identifier: MIT - -use ipc_agent::sdk::IpcAgentClient; -use std::thread::sleep; -use std::time::Duration; - -const IPC_AGENT_JSON_RPC_URL_ENV: &str = "IPC_AGENT_JSON_RPC_URL"; -const CHILD_SUBNET_ID_STR_ENV: &str = "CHILD_SUBNET_ID_STR"; -const FUND_ADDRESS_ENV: &str = "FUND_ADDRESS"; - -/// Checks the checkpoints are submitted -#[tokio::test] -async fn verify_checkpoints_submitted() { - let url = std::env::var(IPC_AGENT_JSON_RPC_URL_ENV) - .unwrap() - .parse() - .unwrap(); - let subnet = std::env::var(CHILD_SUBNET_ID_STR_ENV).unwrap(); - - let ipc_client = IpcAgentClient::default_from_url(url); - - let epoch = ipc_client.last_top_down_executed(&subnet).await.unwrap(); - assert!(epoch > 0, "no top down message executed yet"); - - // at least get the first 10 epoches, this should be the very first bottome up checkpoints - let checkpoints = ipc_client - .list_bottom_up_checkpoints(&subnet, 0, 10) - .await - .unwrap(); - assert!( - !checkpoints.is_empty(), - "no bottom up checkpoints executed yet" - ); -} - -/// Test fund and release across the parent and child subnets -#[tokio::test] -async fn test_fund_and_release() { - let url = std::env::var(IPC_AGENT_JSON_RPC_URL_ENV) - .unwrap() - .parse() - .unwrap(); - let ipc_client = IpcAgentClient::default_from_url(url); - - let subnet = std::env::var(CHILD_SUBNET_ID_STR_ENV).unwrap(); - let addr = std::env::var(FUND_ADDRESS_ENV).unwrap(); - let amount = 2.5; - - let fund_epoch = ipc_client - .fund(&subnet, Some(addr.clone()), Some(addr.clone()), amount) - .await - .unwrap(); - println!("fund epoch: {fund_epoch:}"); - loop { - let epoch = ipc_client.last_top_down_executed(&subnet).await.unwrap(); - if epoch > fund_epoch { - println!("fund epoch reached: {fund_epoch:}"); - break; - } - sleep(Duration::from_secs(30)); - } - - let epoch = ipc_client - .release(&subnet, Some(addr.clone()), Some(addr.clone()), amount) - .await - .unwrap(); - println!("release epoch: {epoch:}"); - loop { - let checkpoints = ipc_client - .list_bottom_up_checkpoints(&subnet, epoch, epoch) - .await - .unwrap(); - if !checkpoints.is_empty() { - println!("released in epoch: {epoch:}"); - break; - } - sleep(Duration::from_secs(30)); - } -} diff --git a/ipld-resolver/.github/workflows/ci.yaml b/ipc/ipld-resolver/.github/workflows/ci.yaml similarity index 100% rename from ipld-resolver/.github/workflows/ci.yaml rename to ipc/ipld-resolver/.github/workflows/ci.yaml diff --git a/ipld-resolver/.gitignore b/ipc/ipld-resolver/.gitignore similarity index 100% rename from ipld-resolver/.gitignore rename to ipc/ipld-resolver/.gitignore diff --git a/ipc/ipld-resolver/Cargo.toml b/ipc/ipld-resolver/Cargo.toml new file mode 100644 index 000000000..eb0509537 --- /dev/null +++ b/ipc/ipld-resolver/Cargo.toml @@ -0,0 +1,61 @@ +[package] +name = "ipc_ipld_resolver" +version = "0.1.0" +description = "P2P library to resolve IPLD content across IPC subnets." +authors = ["Protocol Labs"] +edition = "2021" +license-file = "LICENSE" + +[dependencies] +anyhow = { workspace = true } +base64 = { workspace = true } +blake2b_simd = { workspace = true } +bloom = "0.3" +gcra = "0.4" +lazy_static = { workspace = true } +libipld = { workspace = true, default-features = false, features = ["dag-cbor"] } +libp2p = { version = "0.50", default-features = false, features = [ + "gossipsub", + "kad", + "identify", + "ping", + "noise", + "yamux", + "tcp", + "dns", + "mplex", + "request-response", + "metrics", + "tokio", + "macros", + "serde", + "secp256k1", + "plaintext", +] } +libp2p-bitswap = "0.25.1" +log = { workspace = true } +prometheus = { workspace = true } +quickcheck = { workspace = true, optional = true } +rand = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, features = ["raw_value"] } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["full"] } + +fvm_ipld_encoding ={ workspace = true } +fvm_shared = { workspace = true, default-features = false, features = ["crypto"], optional = true } +fvm_ipld_blockstore = { workspace = true, optional = true } + +ipc-sdk = { workspace = true } + +[dev-dependencies] +quickcheck_macros = { workspace = true } +env_logger = { workspace = true } +fvm_ipld_hamt = { workspace = true } + +ipc_ipld_resolver = { path = ".", features = ["arb"] } + +[features] +default = ["arb", "missing_blocks"] +arb = ["quickcheck", "fvm_shared/arb"] +missing_blocks = ["fvm_ipld_blockstore"] diff --git a/ipc/LICENSE b/ipc/ipld-resolver/LICENSE similarity index 100% rename from ipc/LICENSE rename to ipc/ipld-resolver/LICENSE diff --git a/ipld-resolver/Makefile b/ipc/ipld-resolver/Makefile similarity index 100% rename from ipld-resolver/Makefile rename to ipc/ipld-resolver/Makefile diff --git a/ipld-resolver/README.md b/ipc/ipld-resolver/README.md similarity index 100% rename from ipld-resolver/README.md rename to ipc/ipld-resolver/README.md diff --git a/ipld-resolver/docs/README.md b/ipc/ipld-resolver/docs/README.md similarity index 100% rename from ipld-resolver/docs/README.md rename to ipc/ipld-resolver/docs/README.md diff --git a/ipld-resolver/docs/diagrams/Makefile b/ipc/ipld-resolver/docs/diagrams/Makefile similarity index 100% rename from ipld-resolver/docs/diagrams/Makefile rename to ipc/ipld-resolver/docs/diagrams/Makefile diff --git a/ipld-resolver/docs/diagrams/checkpoint_schema.png b/ipc/ipld-resolver/docs/diagrams/checkpoint_schema.png similarity index 100% rename from ipld-resolver/docs/diagrams/checkpoint_schema.png rename to ipc/ipld-resolver/docs/diagrams/checkpoint_schema.png diff --git a/ipld-resolver/docs/diagrams/checkpoint_schema.puml b/ipc/ipld-resolver/docs/diagrams/checkpoint_schema.puml similarity index 100% rename from ipld-resolver/docs/diagrams/checkpoint_schema.puml rename to ipc/ipld-resolver/docs/diagrams/checkpoint_schema.puml diff --git a/ipld-resolver/docs/diagrams/checkpoint_submission.png b/ipc/ipld-resolver/docs/diagrams/checkpoint_submission.png similarity index 100% rename from ipld-resolver/docs/diagrams/checkpoint_submission.png rename to ipc/ipld-resolver/docs/diagrams/checkpoint_submission.png diff --git a/ipld-resolver/docs/diagrams/checkpoint_submission.puml b/ipc/ipld-resolver/docs/diagrams/checkpoint_submission.puml similarity index 100% rename from ipld-resolver/docs/diagrams/checkpoint_submission.puml rename to ipc/ipld-resolver/docs/diagrams/checkpoint_submission.puml diff --git a/ipld-resolver/docs/diagrams/ipld_resolver.png b/ipc/ipld-resolver/docs/diagrams/ipld_resolver.png similarity index 100% rename from ipld-resolver/docs/diagrams/ipld_resolver.png rename to ipc/ipld-resolver/docs/diagrams/ipld_resolver.png diff --git a/ipld-resolver/docs/diagrams/ipld_resolver.puml b/ipc/ipld-resolver/docs/diagrams/ipld_resolver.puml similarity index 100% rename from ipld-resolver/docs/diagrams/ipld_resolver.puml rename to ipc/ipld-resolver/docs/diagrams/ipld_resolver.puml diff --git a/ipld-resolver/rust-toolchain.toml b/ipc/ipld-resolver/rust-toolchain.toml similarity index 100% rename from ipld-resolver/rust-toolchain.toml rename to ipc/ipld-resolver/rust-toolchain.toml diff --git a/ipld-resolver/scripts/add_license.sh b/ipc/ipld-resolver/scripts/add_license.sh similarity index 100% rename from ipld-resolver/scripts/add_license.sh rename to ipc/ipld-resolver/scripts/add_license.sh diff --git a/ipld-resolver/scripts/copyright.txt b/ipc/ipld-resolver/scripts/copyright.txt similarity index 100% rename from ipld-resolver/scripts/copyright.txt rename to ipc/ipld-resolver/scripts/copyright.txt diff --git a/ipld-resolver/src/arb.rs b/ipc/ipld-resolver/src/arb.rs similarity index 100% rename from ipld-resolver/src/arb.rs rename to ipc/ipld-resolver/src/arb.rs diff --git a/ipld-resolver/src/behaviour/content.rs b/ipc/ipld-resolver/src/behaviour/content.rs similarity index 100% rename from ipld-resolver/src/behaviour/content.rs rename to ipc/ipld-resolver/src/behaviour/content.rs diff --git a/ipld-resolver/src/behaviour/discovery.rs b/ipc/ipld-resolver/src/behaviour/discovery.rs similarity index 100% rename from ipld-resolver/src/behaviour/discovery.rs rename to ipc/ipld-resolver/src/behaviour/discovery.rs diff --git a/ipld-resolver/src/behaviour/membership.rs b/ipc/ipld-resolver/src/behaviour/membership.rs similarity index 100% rename from ipld-resolver/src/behaviour/membership.rs rename to ipc/ipld-resolver/src/behaviour/membership.rs diff --git a/ipld-resolver/src/behaviour/mod.rs b/ipc/ipld-resolver/src/behaviour/mod.rs similarity index 100% rename from ipld-resolver/src/behaviour/mod.rs rename to ipc/ipld-resolver/src/behaviour/mod.rs diff --git a/ipld-resolver/src/client.rs b/ipc/ipld-resolver/src/client.rs similarity index 100% rename from ipld-resolver/src/client.rs rename to ipc/ipld-resolver/src/client.rs diff --git a/ipld-resolver/src/hash.rs b/ipc/ipld-resolver/src/hash.rs similarity index 100% rename from ipld-resolver/src/hash.rs rename to ipc/ipld-resolver/src/hash.rs diff --git a/ipld-resolver/src/lib.rs b/ipc/ipld-resolver/src/lib.rs similarity index 100% rename from ipld-resolver/src/lib.rs rename to ipc/ipld-resolver/src/lib.rs diff --git a/ipld-resolver/src/limiter.rs b/ipc/ipld-resolver/src/limiter.rs similarity index 100% rename from ipld-resolver/src/limiter.rs rename to ipc/ipld-resolver/src/limiter.rs diff --git a/ipld-resolver/src/missing_blocks.rs b/ipc/ipld-resolver/src/missing_blocks.rs similarity index 100% rename from ipld-resolver/src/missing_blocks.rs rename to ipc/ipld-resolver/src/missing_blocks.rs diff --git a/ipld-resolver/src/provider_cache.rs b/ipc/ipld-resolver/src/provider_cache.rs similarity index 100% rename from ipld-resolver/src/provider_cache.rs rename to ipc/ipld-resolver/src/provider_cache.rs diff --git a/ipld-resolver/src/provider_record.rs b/ipc/ipld-resolver/src/provider_record.rs similarity index 100% rename from ipld-resolver/src/provider_record.rs rename to ipc/ipld-resolver/src/provider_record.rs diff --git a/ipld-resolver/src/service.rs b/ipc/ipld-resolver/src/service.rs similarity index 100% rename from ipld-resolver/src/service.rs rename to ipc/ipld-resolver/src/service.rs diff --git a/ipld-resolver/src/signed_record.rs b/ipc/ipld-resolver/src/signed_record.rs similarity index 100% rename from ipld-resolver/src/signed_record.rs rename to ipc/ipld-resolver/src/signed_record.rs diff --git a/ipld-resolver/src/stats.rs b/ipc/ipld-resolver/src/stats.rs similarity index 100% rename from ipld-resolver/src/stats.rs rename to ipc/ipld-resolver/src/stats.rs diff --git a/ipld-resolver/src/timestamp.rs b/ipc/ipld-resolver/src/timestamp.rs similarity index 100% rename from ipld-resolver/src/timestamp.rs rename to ipc/ipld-resolver/src/timestamp.rs diff --git a/ipld-resolver/src/vote_record.rs b/ipc/ipld-resolver/src/vote_record.rs similarity index 100% rename from ipld-resolver/src/vote_record.rs rename to ipc/ipld-resolver/src/vote_record.rs diff --git a/ipld-resolver/tests/smoke.rs b/ipc/ipld-resolver/tests/smoke.rs similarity index 100% rename from ipld-resolver/tests/smoke.rs rename to ipc/ipld-resolver/tests/smoke.rs diff --git a/ipld-resolver/tests/store/mod.rs b/ipc/ipld-resolver/tests/store/mod.rs similarity index 100% rename from ipld-resolver/tests/store/mod.rs rename to ipc/ipld-resolver/tests/store/mod.rs diff --git a/ipc/primitives/Cargo.toml b/ipc/primitives/Cargo.toml new file mode 100644 index 000000000..ce538d2ac --- /dev/null +++ b/ipc/primitives/Cargo.toml @@ -0,0 +1,24 @@ +[package] +description = "The primitive types for fvm" +edition = "2021" +name = "primitives" +version = "0.1.0" + +[dependencies] +fil_actors_runtime = { workspace = true, features = ["fil-actor"] } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } +fvm_ipld_hamt = { workspace = true } +fvm_shared = { workspace = true , default-features = false} + +anyhow = { workspace = true } +cid = { workspace = true, default-features = false, features = ["serde-codec"]} +hex = { workspace = true } +indexmap = {version = "1.8.0", features = ["serde-1"]} +integer-encoding = { workspace = true, default-features = false} +lazy_static = { workspace = true } +log = { workspace = true } +num-derive = "0.3.3" +num-traits = { workspace = true } +serde = { workspace = true, features = ["derive"] } +uint = { version = "0.9.3", default-features = false } diff --git a/fvm-utils/primitives/README.md b/ipc/primitives/README.md similarity index 100% rename from fvm-utils/primitives/README.md rename to ipc/primitives/README.md diff --git a/fvm-utils/primitives/src/amt.rs b/ipc/primitives/src/amt.rs similarity index 100% rename from fvm-utils/primitives/src/amt.rs rename to ipc/primitives/src/amt.rs diff --git a/fvm-utils/primitives/src/ethaddr.rs b/ipc/primitives/src/ethaddr.rs similarity index 100% rename from fvm-utils/primitives/src/ethaddr.rs rename to ipc/primitives/src/ethaddr.rs diff --git a/fvm-utils/primitives/src/hamt.rs b/ipc/primitives/src/hamt.rs similarity index 100% rename from fvm-utils/primitives/src/hamt.rs rename to ipc/primitives/src/hamt.rs diff --git a/fvm-utils/primitives/src/lib.rs b/ipc/primitives/src/lib.rs similarity index 100% rename from fvm-utils/primitives/src/lib.rs rename to ipc/primitives/src/lib.rs diff --git a/fvm-utils/primitives/src/link.rs b/ipc/primitives/src/link.rs similarity index 100% rename from fvm-utils/primitives/src/link.rs rename to ipc/primitives/src/link.rs diff --git a/fvm-utils/primitives/src/taddress.rs b/ipc/primitives/src/taddress.rs similarity index 100% rename from fvm-utils/primitives/src/taddress.rs rename to ipc/primitives/src/taddress.rs diff --git a/fvm-utils/primitives/src/uints.rs b/ipc/primitives/src/uints.rs similarity index 100% rename from fvm-utils/primitives/src/uints.rs rename to ipc/primitives/src/uints.rs diff --git a/ipc/ipc/provider/Cargo.toml b/ipc/provider/Cargo.toml similarity index 100% rename from ipc/ipc/provider/Cargo.toml rename to ipc/provider/Cargo.toml diff --git a/ipc/ipc/provider/src/checkpoint.rs b/ipc/provider/src/checkpoint.rs similarity index 100% rename from ipc/ipc/provider/src/checkpoint.rs rename to ipc/provider/src/checkpoint.rs diff --git a/ipc/ipc/provider/src/config/deserialize.rs b/ipc/provider/src/config/deserialize.rs similarity index 100% rename from ipc/ipc/provider/src/config/deserialize.rs rename to ipc/provider/src/config/deserialize.rs diff --git a/ipc/ipc/provider/src/config/mod.rs b/ipc/provider/src/config/mod.rs similarity index 100% rename from ipc/ipc/provider/src/config/mod.rs rename to ipc/provider/src/config/mod.rs diff --git a/ipc/ipc/provider/src/config/reload.rs b/ipc/provider/src/config/reload.rs similarity index 100% rename from ipc/ipc/provider/src/config/reload.rs rename to ipc/provider/src/config/reload.rs diff --git a/ipc/ipc/provider/src/config/serialize.rs b/ipc/provider/src/config/serialize.rs similarity index 100% rename from ipc/ipc/provider/src/config/serialize.rs rename to ipc/provider/src/config/serialize.rs diff --git a/ipc/ipc/provider/src/config/subnet.rs b/ipc/provider/src/config/subnet.rs similarity index 100% rename from ipc/ipc/provider/src/config/subnet.rs rename to ipc/provider/src/config/subnet.rs diff --git a/ipc/ipc/provider/src/config/tests.rs b/ipc/provider/src/config/tests.rs similarity index 100% rename from ipc/ipc/provider/src/config/tests.rs rename to ipc/provider/src/config/tests.rs diff --git a/ipc/ipc/provider/src/jsonrpc/mod.rs b/ipc/provider/src/jsonrpc/mod.rs similarity index 100% rename from ipc/ipc/provider/src/jsonrpc/mod.rs rename to ipc/provider/src/jsonrpc/mod.rs diff --git a/ipc/ipc/provider/src/jsonrpc/tests.rs b/ipc/provider/src/jsonrpc/tests.rs similarity index 100% rename from ipc/ipc/provider/src/jsonrpc/tests.rs rename to ipc/provider/src/jsonrpc/tests.rs diff --git a/ipc/ipc/provider/src/lib.rs b/ipc/provider/src/lib.rs similarity index 100% rename from ipc/ipc/provider/src/lib.rs rename to ipc/provider/src/lib.rs diff --git a/ipc/ipc/provider/src/lotus/client.rs b/ipc/provider/src/lotus/client.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/client.rs rename to ipc/provider/src/lotus/client.rs diff --git a/ipc/ipc/provider/src/lotus/json.rs b/ipc/provider/src/lotus/json.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/json.rs rename to ipc/provider/src/lotus/json.rs diff --git a/ipc/ipc/provider/src/lotus/message/chain.rs b/ipc/provider/src/lotus/message/chain.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/chain.rs rename to ipc/provider/src/lotus/message/chain.rs diff --git a/ipc/ipc/provider/src/lotus/message/deserialize.rs b/ipc/provider/src/lotus/message/deserialize.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/deserialize.rs rename to ipc/provider/src/lotus/message/deserialize.rs diff --git a/ipc/ipc/provider/src/lotus/message/ipc.rs b/ipc/provider/src/lotus/message/ipc.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/ipc.rs rename to ipc/provider/src/lotus/message/ipc.rs diff --git a/ipc/ipc/provider/src/lotus/message/mod.rs b/ipc/provider/src/lotus/message/mod.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/mod.rs rename to ipc/provider/src/lotus/message/mod.rs diff --git a/ipc/ipc/provider/src/lotus/message/mpool.rs b/ipc/provider/src/lotus/message/mpool.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/mpool.rs rename to ipc/provider/src/lotus/message/mpool.rs diff --git a/ipc/ipc/provider/src/lotus/message/serialize.rs b/ipc/provider/src/lotus/message/serialize.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/serialize.rs rename to ipc/provider/src/lotus/message/serialize.rs diff --git a/ipc/ipc/provider/src/lotus/message/state.rs b/ipc/provider/src/lotus/message/state.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/state.rs rename to ipc/provider/src/lotus/message/state.rs diff --git a/ipc/ipc/provider/src/lotus/message/tests.rs b/ipc/provider/src/lotus/message/tests.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/tests.rs rename to ipc/provider/src/lotus/message/tests.rs diff --git a/ipc/ipc/provider/src/lotus/message/wallet.rs b/ipc/provider/src/lotus/message/wallet.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/message/wallet.rs rename to ipc/provider/src/lotus/message/wallet.rs diff --git a/ipc/ipc/provider/src/lotus/mod.rs b/ipc/provider/src/lotus/mod.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/mod.rs rename to ipc/provider/src/lotus/mod.rs diff --git a/ipc/ipc/provider/src/lotus/tests.rs b/ipc/provider/src/lotus/tests.rs similarity index 100% rename from ipc/ipc/provider/src/lotus/tests.rs rename to ipc/provider/src/lotus/tests.rs diff --git a/ipc/ipc/provider/src/manager/evm/manager.rs b/ipc/provider/src/manager/evm/manager.rs similarity index 100% rename from ipc/ipc/provider/src/manager/evm/manager.rs rename to ipc/provider/src/manager/evm/manager.rs diff --git a/ipc/ipc/provider/src/manager/evm/mod.rs b/ipc/provider/src/manager/evm/mod.rs similarity index 100% rename from ipc/ipc/provider/src/manager/evm/mod.rs rename to ipc/provider/src/manager/evm/mod.rs diff --git a/ipc/ipc/provider/src/manager/mod.rs b/ipc/provider/src/manager/mod.rs similarity index 100% rename from ipc/ipc/provider/src/manager/mod.rs rename to ipc/provider/src/manager/mod.rs diff --git a/ipc/ipc/provider/src/manager/subnet.rs b/ipc/provider/src/manager/subnet.rs similarity index 100% rename from ipc/ipc/provider/src/manager/subnet.rs rename to ipc/provider/src/manager/subnet.rs diff --git a/ipc/scripts/install_infra.sh b/ipc/scripts/install_infra.sh deleted file mode 100755 index acb6a4df1..000000000 --- a/ipc/scripts/install_infra.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# -# Installs and builds all the infrastructure required -# to run Fendermint-based subnets. - -set -e - -PWD=$(pwd) -infra_path="$PWD/bin/ipc-infra" -git_repo_url="https://github.com/consensus-shipyard/fendermint.git" - -if ! command -v cargo-make &> /dev/null -then - echo "[*] 'cargo make' not found. Installing..." - cargo install cargo-make -else - echo "[*] 'cargo make' is already installed." -fi - -build_infra() { - cd $PWD - - echo "[*] Updating infra scripts..." - cp -r $infra_path/fendermint/infra/* $infra_path -} - -# Function to display help message -function show_help() { - echo "Usage: ./scripts/install-infra.sh [options]" - echo "Options:" - echo " -h Show help message" - echo " -f Force the build of the infra" -} - -# Main script logic -if [ "$1" == "-h" ]; then - show_help - exit 0 -fi - -# Check if infra path exists -if [ ! -d "$infra_path" ]; then - echo "[*] Infra directory doesn't exist, creating infra path" - mkdir -p $infra_path -fi - - -if [[ "$#" -gt 0 && "$1" == "-f" ]]; then - echo "[*] -f is set. Force pulling the Fendermint repo again, and pulling latest scripts" - rm -rf $infra_path/fendermint -fi - - -# Check if fendermint exists -if [ ! -d "$infra_path/fendermint" ]; then - cd "$infra_path" - echo "[*] Fendermint directory doesn't exist, cloning code" - git clone https://github.com/consensus-shipyard/fendermint.git fendermint - build_infra - exit 0 -else - echo "[*] Infra scripts already installed." -fi diff --git a/ipc/ipc/sdk/Cargo.toml b/ipc/sdk/Cargo.toml similarity index 93% rename from ipc/ipc/sdk/Cargo.toml rename to ipc/sdk/Cargo.toml index a6561c8a4..e17d26df1 100644 --- a/ipc/ipc/sdk/Cargo.toml +++ b/ipc/sdk/Cargo.toml @@ -15,7 +15,7 @@ fvm_ipld_blockstore = { workspace = true } fvm_ipld_encoding = { workspace = true } fvm_ipld_hamt = { workspace = true } fvm_shared = { workspace = true } -integer-encoding = { version = "3.0.3", default-features = false } +integer-encoding = { workspace = true, default-features = false } lazy_static = { workspace = true } log = { workspace = true } cid = { workspace = true } diff --git a/ipc/ipc/sdk/src/address.rs b/ipc/sdk/src/address.rs similarity index 100% rename from ipc/ipc/sdk/src/address.rs rename to ipc/sdk/src/address.rs diff --git a/ipc/ipc/sdk/src/checkpoint.rs b/ipc/sdk/src/checkpoint.rs similarity index 100% rename from ipc/ipc/sdk/src/checkpoint.rs rename to ipc/sdk/src/checkpoint.rs diff --git a/ipc/ipc/sdk/src/cross.rs b/ipc/sdk/src/cross.rs similarity index 100% rename from ipc/ipc/sdk/src/cross.rs rename to ipc/sdk/src/cross.rs diff --git a/ipc/ipc/sdk/src/error.rs b/ipc/sdk/src/error.rs similarity index 100% rename from ipc/ipc/sdk/src/error.rs rename to ipc/sdk/src/error.rs diff --git a/ipc/ipc/sdk/src/evm.rs b/ipc/sdk/src/evm.rs similarity index 100% rename from ipc/ipc/sdk/src/evm.rs rename to ipc/sdk/src/evm.rs diff --git a/ipc/ipc/sdk/src/gateway.rs b/ipc/sdk/src/gateway.rs similarity index 100% rename from ipc/ipc/sdk/src/gateway.rs rename to ipc/sdk/src/gateway.rs diff --git a/ipc/ipc/sdk/src/lib.rs b/ipc/sdk/src/lib.rs similarity index 100% rename from ipc/ipc/sdk/src/lib.rs rename to ipc/sdk/src/lib.rs diff --git a/ipc/ipc/sdk/src/runtime.rs b/ipc/sdk/src/runtime.rs similarity index 100% rename from ipc/ipc/sdk/src/runtime.rs rename to ipc/sdk/src/runtime.rs diff --git a/ipc/ipc/sdk/src/staking.rs b/ipc/sdk/src/staking.rs similarity index 100% rename from ipc/ipc/sdk/src/staking.rs rename to ipc/sdk/src/staking.rs diff --git a/ipc/ipc/sdk/src/subnet.rs b/ipc/sdk/src/subnet.rs similarity index 100% rename from ipc/ipc/sdk/src/subnet.rs rename to ipc/sdk/src/subnet.rs diff --git a/ipc/ipc/sdk/src/subnet_id.rs b/ipc/sdk/src/subnet_id.rs similarity index 100% rename from ipc/ipc/sdk/src/subnet_id.rs rename to ipc/sdk/src/subnet_id.rs diff --git a/ipc/ipc/sdk/src/validator.rs b/ipc/sdk/src/validator.rs similarity index 100% rename from ipc/ipc/sdk/src/validator.rs rename to ipc/sdk/src/validator.rs diff --git a/ipld-resolver/Cargo.toml b/ipld-resolver/Cargo.toml deleted file mode 100644 index 3263ec61f..000000000 --- a/ipld-resolver/Cargo.toml +++ /dev/null @@ -1,67 +0,0 @@ -[package] -name = "ipc_ipld_resolver" -version = "0.1.0" -description = "P2P library to resolve IPLD content across IPC subnets." -authors = ["Protocol Labs"] -edition = "2021" -license-file = "LICENSE" - -[dependencies] -anyhow = "1.0" -base64 = "0.21.0" -blake2b_simd = "1.0" -bloom = "0.3" -gcra = "0.4" -lazy_static = "1.4" -libipld = { version = "0.14", default-features = false, features = ["dag-cbor"] } -libp2p = { version = "0.50", default-features = false, features = [ - "gossipsub", - "kad", - "identify", - "ping", - "noise", - "yamux", - "tcp", - "dns", - "mplex", - "request-response", - "metrics", - "tokio", - "macros", - "serde", - "secp256k1", - "plaintext", -] } -libp2p-bitswap = "0.25.1" -log = "0.4" -prometheus = "0.13" -quickcheck = { version = "1", optional = true } -rand = "0.8" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0.91", features = ["raw_value"] } -thiserror = "1.0.38" -tokio = { version = "1.16", features = ["full"] } - -fvm_ipld_encoding = "0.3" -fvm_shared = { version = "~3.2", default-features = false, features = ["crypto"], optional = true } -fvm_ipld_blockstore = { version = "0.1", optional = true } - -# Using the IPC SDK without the `fil-actor` feature so as not to depend on the actor `Runtime`. -# Using the `main` branch instead of the highest available tag `v0.3.0` because the latter doesn't have a feature flag for the `Runtime`. -ipc-sdk = { git = "https://github.com/consensus-shipyard/ipc.git", default-features = false, branch = "dev" } - -[dev-dependencies] -quickcheck_macros = "1" -env_logger = "0.10" -fvm_ipld_hamt = "0.6" - -ipc_ipld_resolver = { path = ".", features = ["arb"] } - -[features] -default = ["arb", "missing_blocks"] -arb = ["quickcheck", "fvm_shared/arb"] -missing_blocks = ["fvm_ipld_blockstore"] - -[patch.crates-io] -# Use stable-only features. -gcra = { git = "https://github.com/consensus-shipyard/gcra-rs.git", branch = "main" } diff --git a/ipld-resolver/LICENSE b/ipld-resolver/LICENSE deleted file mode 100644 index 11df919e1..000000000 --- a/ipld-resolver/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 ConsensusLab - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/ipc/rust-toolchain.toml b/rust-toolchain.toml similarity index 100% rename from ipc/rust-toolchain.toml rename to rust-toolchain.toml diff --git a/fendermint/rustfmt.toml b/rustfmt.toml similarity index 53% rename from fendermint/rustfmt.toml rename to rustfmt.toml index bcd716995..855e997e0 100644 --- a/fendermint/rustfmt.toml +++ b/rustfmt.toml @@ -1,4 +1,4 @@ edition = "2021" # Ignore auto-generated files. -ignore = ["fendermint/vm/ipc_actors"] +ignore = ["fendermint/src/vm/ipc_actors"] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 000000000..e7a11a969 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} From 75611d95ec6ae767d47d94fb1cc6962f2e3e32f3 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Thu, 7 Dec 2023 14:07:43 +0100 Subject: [PATCH 2/6] wip: upgrading libp2p --- Cargo.lock | 1368 +++++++--------------------------- Cargo.toml | 9 +- ipc/ipld-resolver/Cargo.toml | 3 +- ipc/primitives/Cargo.toml | 2 +- 4 files changed, 291 insertions(+), 1091 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index faf22fc70..824221dc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,25 +36,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] - [[package]] name = "aead" version = "0.5.2" @@ -65,29 +46,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug", -] - [[package]] name = "aes" version = "0.8.3" @@ -95,58 +53,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle", -] - [[package]] name = "aes-gcm" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", + "aead", + "aes", + "cipher", + "ctr", + "ghash", "subtle", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug", -] - [[package]] name = "ahash" version = "0.7.7" @@ -279,12 +203,6 @@ dependencies = [ "arbitrary", ] -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "argon2" version = "0.5.2" @@ -324,29 +242,13 @@ dependencies = [ "term", ] -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", @@ -356,18 +258,6 @@ dependencies = [ "time", ] -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -499,12 +389,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "atty" version = "0.2.14" @@ -825,19 +709,6 @@ dependencies = [ "constant_time_eq 0.3.0", ] -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "cc", - "cfg-if", - "constant_time_eq 0.3.0", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -856,22 +727,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "block-padding" version = "0.3.3" @@ -1088,7 +943,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1110,17 +965,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -1143,7 +987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] @@ -1153,9 +997,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", - "cipher 0.4.4", + "cipher", "poly1305", "zeroize", ] @@ -1204,24 +1048,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1455,7 +1281,7 @@ dependencies = [ "fendermint_vm_interpreter", "fendermint_vm_message", "fvm", - "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_blockstore", "fvm_shared", "hex", "ipc-sdk", @@ -1622,21 +1448,6 @@ dependencies = [ "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1690,7 +1501,7 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] @@ -1764,16 +1575,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - [[package]] name = "cs_serde_bytes" version = "0.12.2" @@ -1802,22 +1603,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", -] - [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1874,38 +1666,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1922,24 +1690,13 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.3", + "darling_core", "quote", "syn 2.0.39", ] @@ -1999,7 +1756,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", - "pem-rfc7468", "zeroize", ] @@ -2013,27 +1769,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "der-parser" version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -2052,37 +1794,6 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -2328,8 +2039,6 @@ dependencies = [ "ff 0.12.1", "generic-array 0.14.7", "group 0.12.1", - "hkdf", - "pem-rfc7468", "pkcs8 0.9.0", "rand_core 0.6.4", "sec1 0.3.0", @@ -2458,8 +2167,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ - "aes 0.8.3", - "ctr 0.9.2", + "aes", + "ctr", "digest 0.10.7", "hex", "hmac 0.12.1", @@ -2926,9 +2635,9 @@ dependencies = [ "fendermint_vm_snapshot", "fendermint_vm_topdown", "fvm", - "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_blockstore", "fvm_ipld_car", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-provider", @@ -2936,7 +2645,7 @@ dependencies = [ "ipc_ipld_resolver", "k256 0.11.6", "libipld", - "libp2p", + "libp2p 0.51.4", "libp2p-bitswap", "literally", "multiaddr 0.16.0", @@ -2969,7 +2678,7 @@ dependencies = [ "cid 0.10.1", "clap 4.4.11", "fendermint_vm_actor_interface", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-sdk", @@ -2989,7 +2698,7 @@ dependencies = [ "dirs", "fendermint_vm_encoding", "fendermint_vm_topdown", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "ipc-provider", "ipc-sdk", @@ -3026,7 +2735,7 @@ dependencies = [ "fendermint_vm_actor_interface", "fendermint_vm_message", "futures", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "jsonrpc-v2", @@ -3064,8 +2773,8 @@ dependencies = [ "anyhow", "cid 0.10.1", "fendermint_storage", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "num_cpus", "quickcheck", "rocksdb", @@ -3089,7 +2798,7 @@ dependencies = [ "fendermint_vm_actor_interface", "fendermint_vm_genesis", "fendermint_vm_message", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "lazy_static", @@ -3108,7 +2817,7 @@ dependencies = [ name = "fendermint_storage" version = "0.1.0" dependencies = [ - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "im", "quickcheck", "quickcheck_macros", @@ -3125,7 +2834,7 @@ dependencies = [ "cid 0.10.1", "ethers", "fendermint_testing", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-sdk", @@ -3148,8 +2857,8 @@ dependencies = [ "fendermint_crypto", "fendermint_vm_genesis", "fil_actors_evm_shared", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "hex", @@ -3206,7 +2915,7 @@ dependencies = [ "fendermint_vm_core", "fendermint_vm_encoding", "fendermint_vm_genesis", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-sdk", @@ -3242,9 +2951,9 @@ dependencies = [ "futures-core", "futures-util", "fvm", - "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_blockstore", "fvm_ipld_car", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-sdk", @@ -3282,7 +2991,7 @@ dependencies = [ "fendermint_vm_actor_interface", "fendermint_vm_encoding", "fendermint_vm_message", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-sdk", @@ -3325,9 +3034,9 @@ dependencies = [ "fendermint_vm_snapshot", "futures", "fvm", - "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_blockstore", "fvm_ipld_car", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "im", "multihash 0.16.3", @@ -3354,7 +3063,7 @@ dependencies = [ "cid 0.10.1", "clap 4.4.11", "ethers", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "ipc-provider", "ipc-sdk", @@ -3403,7 +3112,7 @@ version = "12.0.0" source = "git+https://github.com/filecoin-project/builtin-actors?tag=v12.0.0#b86938e410daebf27f9397fd622370a16b24f58b" dependencies = [ "fil_actors_runtime", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "serde", @@ -3422,10 +3131,9 @@ dependencies = [ "cid 0.10.1", "fvm_ipld_amt", "fvm_ipld_bitfield", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", - "fvm_sdk", "fvm_shared", "integer-encoding", "itertools 0.10.5", @@ -3779,8 +3487,8 @@ dependencies = [ "filecoin-proofs-api", "fvm-wasm-instrument", "fvm_ipld_amt", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "lazy_static", @@ -3824,8 +3532,8 @@ checksum = "5fea333475130094f27ce67809aae3f69eb5247541d835950b7c5da733dbbb34" dependencies = [ "anyhow", "cid 0.10.1", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "itertools 0.11.0", "once_cell", "serde", @@ -3838,23 +3546,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da94287cafa663c2e295fe45c4c9dbf5ab7b52f648568f9ae3823deaf9873a89" dependencies = [ - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "serde", "thiserror", "unsigned-varint", ] -[[package]] -name = "fvm_ipld_blockstore" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee8c75be2b58943e1a9755802d34d4c3934f6ea151b6be192ff98f644e515bd" -dependencies = [ - "anyhow", - "cid 0.8.6", - "multihash 0.16.3", -] - [[package]] name = "fvm_ipld_blockstore" version = "0.2.0" @@ -3868,34 +3565,17 @@ dependencies = [ [[package]] name = "fvm_ipld_car" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c60423568393a284de6d7c342cd664690611f27d223eb78629fa568ddd4e7951" +checksum = "6190f03442b67b21a3d4e115c4d4dd3468aed24e27ebb074218822c1b3df41ba" dependencies = [ - "cid 0.8.6", + "cid 0.10.1", "futures", - "fvm_ipld_blockstore 0.1.2", - "fvm_ipld_encoding 0.3.3", - "integer-encoding", - "serde", - "thiserror", -] - -[[package]] -name = "fvm_ipld_encoding" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0816a2a6df4853de08a723d261110d56a121aa313bc570fe9d248f0a4bc5288" -dependencies = [ - "anyhow", - "cid 0.8.6", - "fvm_ipld_blockstore 0.1.2", - "multihash 0.16.3", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "serde", - "serde_ipld_dagcbor 0.2.2", - "serde_repr", - "serde_tuple", "thiserror", + "unsigned-varint", ] [[package]] @@ -3906,7 +3586,7 @@ checksum = "90608092e31d9a06236268c58f7c36668ab4b2a48afafe3a97e08f094ad7ae50" dependencies = [ "anyhow", "cid 0.10.1", - "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_blockstore", "multihash 0.18.1", "serde", "serde_ipld_dagcbor 0.4.2", @@ -3925,8 +3605,8 @@ dependencies = [ "byteorder", "cid 0.10.1", "forest_hash_utils", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "libipld-core 0.16.0", "multihash 0.18.1", "once_cell", @@ -3936,37 +3616,21 @@ dependencies = [ ] [[package]] -name = "fvm_sdk" +name = "fvm_shared" version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258cfc9a2e5dcb28ffcadd4abed504893996d31238488a07ef7d2a6a6e80e1ec" +checksum = "c3a19ef48bbc1b22742002667b82944237cfdebc38e946c216aa8de1192392ea" dependencies = [ - "byteorder", - "cid 0.10.1", - "fvm_ipld_encoding 0.4.0", - "fvm_shared", - "lazy_static", - "log", - "num-traits", - "thiserror", -] - -[[package]] -name = "fvm_shared" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a19ef48bbc1b22742002667b82944237cfdebc38e946c216aa8de1192392ea" -dependencies = [ - "anyhow", - "arbitrary", - "bitflags 2.4.1", - "blake2b_simd", - "bls-signatures 0.15.0", + "anyhow", + "arbitrary", + "bitflags 2.4.1", + "blake2b_simd", + "bls-signatures 0.15.0", "cid 0.10.1", "data-encoding", "data-encoding-macro", "filecoin-proofs-api", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "lazy_static", "libsecp256k1", "multihash 0.18.1", @@ -4057,16 +3721,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug", - "polyval 0.5.3", -] - [[package]] name = "ghash" version = "0.5.0" @@ -4074,7 +3728,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug", - "polyval 0.6.1", + "polyval", ] [[package]] @@ -4275,32 +3929,13 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - [[package]] name = "hmac" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac", "digest 0.9.0", ] @@ -4643,7 +4278,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding 0.3.3", + "block-padding", "generic-array 0.14.7", ] @@ -4661,29 +4296,6 @@ name = "integer-encoding" version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -dependencies = [ - "async-trait", - "futures-util", -] - -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] [[package]] name = "iowrap" @@ -4711,7 +4323,7 @@ dependencies = [ "ethers-contract", "fil_actors_runtime", "futures-util", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "ipc-identity", @@ -4781,7 +4393,7 @@ dependencies = [ "ethers-contract", "fil_actors_runtime", "futures-util", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_encoding", "fvm_shared", "hex", "indoc", @@ -4816,8 +4428,8 @@ dependencies = [ "ethers", "fil_actors_runtime", "fnv", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "integer-encoding", @@ -4850,8 +4462,8 @@ dependencies = [ "blake2b_simd", "bloom", "env_logger 0.10.1", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "gcra", @@ -4859,7 +4471,7 @@ dependencies = [ "ipc_ipld_resolver", "lazy_static", "libipld", - "libp2p", + "libp2p 0.51.4", "libp2p-bitswap", "log", "prometheus", @@ -5186,26 +4798,57 @@ dependencies = [ "getrandom 0.2.11", "instant", "libp2p-core 0.38.0", + "libp2p-request-response 0.23.0", + "libp2p-swarm 0.41.1", + "multiaddr 0.16.0", + "parking_lot 0.12.1", + "pin-project", + "smallvec", +] + +[[package]] +name = "libp2p" +version = "0.51.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" +dependencies = [ + "bytes", + "futures", + "futures-timer", + "getrandom 0.2.11", + "instant", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core 0.39.2", "libp2p-dns", "libp2p-gossipsub", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-plaintext", "libp2p-quic", - "libp2p-request-response", - "libp2p-swarm", + "libp2p-request-response 0.24.1", + "libp2p-swarm 0.42.2", "libp2p-tcp", - "libp2p-webrtc", "libp2p-yamux", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "multiaddr 0.17.1", "pin-project", - "smallvec", +] + +[[package]] +name = "libp2p-allow-block-list" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", + "void", ] [[package]] @@ -5219,13 +4862,25 @@ dependencies = [ "futures", "lazy_static", "libipld", - "libp2p", + "libp2p 0.50.1", "prometheus", "thiserror", "tracing", "unsigned-varint", ] +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", + "void", +] + [[package]] name = "libp2p-core" version = "0.38.0" @@ -5240,7 +4895,6 @@ dependencies = [ "futures", "futures-timer", "instant", - "libsecp256k1", "log", "multiaddr 0.16.0", "multihash 0.16.3", @@ -5253,7 +4907,6 @@ dependencies = [ "rand 0.8.5", "rw-stream-sink", "sec1 0.3.0", - "serde", "sha2 0.10.8", "smallvec", "thiserror", @@ -5284,6 +4937,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "rw-stream-sink", + "serde", "smallvec", "thiserror", "unsigned-varint", @@ -5292,12 +4946,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", "log", "parking_lot 0.12.1", "smallvec", @@ -5306,25 +4960,26 @@ dependencies = [ [[package]] name = "libp2p-gossipsub" -version = "0.43.0" +version = "0.44.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a173171c71c29bb156f98886c7c4824596de3903dadf01e2e79d2ccdcf38cd9f" +checksum = "70b34b6da8165c0bde35c82db8efda39b824776537e73973549e76cadb3a77c5" dependencies = [ "asynchronous-codec", - "base64 0.13.1", + "base64 0.21.5", "byteorder", "bytes", + "either", "fnv", "futures", "hex_fmt", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", "log", "prometheus-client", - "prost", - "prost-build", - "prost-codec", + "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "regex", "serde", @@ -5332,25 +4987,27 @@ dependencies = [ "smallvec", "thiserror", "unsigned-varint", + "void", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", "log", "lru", - "prost", - "prost-build", - "prost-codec", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -5362,13 +5019,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ + "asn1_der", "bs58 0.4.0", "ed25519-dalek 2.1.0", + "libsecp256k1", "log", "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", + "serde", "sha2 0.10.8", "thiserror", "zeroize", @@ -5376,9 +5036,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -5388,11 +5048,11 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "serde", "sha2 0.10.8", @@ -5405,15 +5065,16 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", "log", "rand 0.8.5", "smallvec", @@ -5425,71 +5086,54 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-swarm", + "libp2p-swarm 0.42.2", "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", "snow", "static_assertions", "thiserror", - "x25519-dalek 1.1.1", + "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-core 0.39.2", + "libp2p-swarm 0.42.2", "log", "rand 0.8.5", "void", @@ -5497,32 +5141,33 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.38.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c43ab37fb4102682ae9a248dc2e6a8e7b941ec75cf24aed103060a788e0fd15" +checksum = "2ff582c0b74ffda004b716b97bc9cfe7f39960204877758b876dde86093beaa8" dependencies = [ "asynchronous-codec", "bytes", "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", + "libp2p-identity", "log", - "prost", - "prost-build", + "quick-protobuf", "unsigned-varint", "void", ] [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", + "libp2p-identity", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -5544,13 +5189,29 @@ dependencies = [ "futures", "instant", "libp2p-core 0.38.0", - "libp2p-swarm", + "libp2p-swarm 0.41.1", "log", "rand 0.8.5", "smallvec", "unsigned-varint", ] +[[package]] +name = "libp2p-request-response" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +dependencies = [ + "async-trait", + "futures", + "instant", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm 0.42.2", + "rand 0.8.5", + "smallvec", +] + [[package]] name = "libp2p-swarm" version = "0.41.1" @@ -5563,21 +5224,40 @@ dependencies = [ "futures-timer", "instant", "libp2p-core 0.38.0", - "libp2p-swarm-derive", "log", "pin-project", "rand 0.8.5", "smallvec", "thiserror", + "void", +] + +[[package]] +name = "libp2p-swarm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +dependencies = [ + "either", + "fnv", + "futures", + "futures-timer", + "instant", + "libp2p-core 0.39.2", + "libp2p-identity", + "libp2p-swarm-derive", + "log", + "rand 0.8.5", + "smallvec", "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck 0.4.1", "quote", @@ -5586,15 +5266,15 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", "log", "socket2 0.4.10", "tokio", @@ -5610,56 +5290,24 @@ dependencies = [ "futures-rustls", "libp2p-core 0.39.2", "libp2p-identity", - "rcgen 0.10.0", + "rcgen", "ring 0.16.20", "rustls 0.20.9", "thiserror", "webpki 0.22.4", - "x509-parser 0.14.0", + "x509-parser", "yasna", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core 0.38.0", - "libp2p-noise", - "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util 0.7.10", - "webrtc", -] - [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core 0.39.2", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] @@ -5786,11 +5434,11 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -5879,15 +5527,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -6024,16 +5663,12 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" dependencies = [ - "blake2b_simd", - "blake2s_simd 1.0.2", - "blake3", "core2", "digest 0.10.7", "multihash-derive", "serde", "serde-big-array", "sha2 0.10.8", - "sha3", "unsigned-varint", ] @@ -6045,6 +5680,8 @@ checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "core2", "multihash-derive", + "serde", + "serde-big-array", "unsigned-varint", ] @@ -6222,7 +5859,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] @@ -6416,22 +6052,13 @@ dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - [[package]] name = "oid-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] @@ -6547,28 +6174,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "pairing" version = "0.22.0" @@ -6806,15 +6411,6 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -7023,19 +6619,7 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug", - "universal-hash 0.5.1", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] @@ -7047,7 +6631,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] @@ -7124,8 +6708,8 @@ dependencies = [ "anyhow", "cid 0.10.1", "fil_actors_runtime", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "hex", @@ -7208,25 +6792,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -7277,19 +6861,6 @@ dependencies = [ "which", ] -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost", - "thiserror", - "unsigned-varint", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -7342,6 +6913,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quickcheck" version = "1.0.3" @@ -7506,19 +7090,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "x509-parser 0.13.2", - "yasna", -] - [[package]] name = "rcgen" version = "0.10.0" @@ -7780,44 +7351,19 @@ dependencies = [ "serde", ] -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", -] - [[package]] name = "rtnetlink" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" -dependencies = [ - "futures", - "log", - "netlink-packet-route", - "netlink-proto", - "nix", - "thiserror", - "tokio", -] - -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", +checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" +dependencies = [ + "futures", + "log", + "netlink-packet-route", + "netlink-proto", + "nix", "thiserror", - "webrtc-util", + "tokio", ] [[package]] @@ -7988,7 +7534,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -8071,18 +7617,6 @@ dependencies = [ "untrusted 0.9.0", ] -[[package]] -name = "sdp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - [[package]] name = "sec1" version = "0.3.0" @@ -8313,25 +7847,12 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.3", + "darling", "proc-macro2", "quote", "syn 2.0.39", ] -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - [[package]] name = "sha1" version = "0.10.6" @@ -8516,7 +8037,7 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.10.3", + "aes-gcm", "blake2", "chacha20poly1305", "curve25519-dalek 4.1.1", @@ -8620,7 +8141,7 @@ version = "16.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "568106d9e94bd28082551873fe36e0295de24770e67cecdd25f345a1b39664f7" dependencies = [ - "aes 0.8.3", + "aes", "anyhow", "bellperson", "blake2b_simd", @@ -8831,39 +8352,11 @@ dependencies = [ "syn 2.0.39", ] -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", -] - -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-encoding" @@ -9251,16 +8744,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -9779,25 +9262,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "typenum" version = "1.17.0" @@ -9867,16 +9331,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -9920,6 +9374,7 @@ dependencies = [ "form_urlencoded", "idna 0.5.0", "percent-encoding", + "serde", ] [[package]] @@ -9961,9 +9416,6 @@ name = "uuid" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" -dependencies = [ - "getrandom 0.2.11", -] [[package]] name = "valuable" @@ -9996,8 +9448,8 @@ source = "git+https://github.com/filecoin-project/builtin-actors?tag=v12.0.0#b86 dependencies = [ "anyhow", "cid 0.10.1", - "fvm_ipld_blockstore 0.2.0", - "fvm_ipld_encoding 0.4.0", + "fvm_ipld_blockstore", + "fvm_ipld_encoding", "fvm_ipld_hamt", "fvm_shared", "num-derive 0.3.3", @@ -10013,15 +9465,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "walkdir" version = "2.4.0" @@ -10356,7 +9799,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.9.0", + "memoffset", "paste", "rand 0.8.5", "rustix", @@ -10437,214 +9880,6 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.8", - "stun", - "thiserror", - "time", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.3", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.8", - "signature 1.6.4", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid 1.6.1", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.10", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", -] - [[package]] name = "which" version = "4.4.2" @@ -10903,50 +10138,19 @@ dependencies = [ "zeroize", ] -[[package]] -name = "x25519-dalek" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" -dependencies = [ - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", - "serde", - "zeroize", -] - -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", "time", @@ -10958,7 +10162,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02a6dad357567f81cd78ee75f7c61f1b30bb2fe4390be8fb7c69e2ac8dffb6c7" dependencies = [ - "aead 0.5.2", + "aead", "poly1305", "salsa20", "subtle", @@ -11059,7 +10263,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes 0.8.3", + "aes", "byteorder", "bzip2", "constant_time_eq 0.1.5", diff --git a/Cargo.toml b/Cargo.toml index 2975f417b..e266c6eae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ jsonrpc-v2 = { version = "0.11", default-features = false, features = ["bytes-v1 k256 = "0.11" # Same as tendermint-rs lazy_static = "1.4" libipld = { version = "0.14", default-features = false, features = ["dag-cbor"] } -libp2p = "0.50" +libp2p = { version = "0.51", default-features = false } libp2p-bitswap = "0.25.1" lru_time_cache = "0.11" merkle-tree-rs = "0.1.0" @@ -95,7 +95,7 @@ tokio-stream = "0.1.14" tokio-util = { version = "0.7.8", features = ["compat"] } tracing = "0.1" tracing-subscriber = "0.3" -url = "2.4.1" +url = { version = "2.4.1", features = ["serde"] } zeroize = "1.6" trace4rs = "0.5.1" literally = "0.1.3" @@ -124,7 +124,7 @@ fvm = { version = "4.0.0-alpha.1", default-features = false } fvm_shared = { version = "4.0.0-alpha.1", default-features = false, features = ["crypto"] } fvm_ipld_blockstore = "0.2.0" -fvm_ipld_car = "0.6" +fvm_ipld_car = "0.7.1" fvm_ipld_encoding = "0.4.0" fvm_ipld_hamt = "0.8.0" @@ -143,9 +143,6 @@ fvm_ipld_hamt = "0.8.0" fil_actors_evm_shared = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v12.0.0" } fil_actors_runtime = { git = "https://github.com/filecoin-project/builtin-actors", tag = "v12.0.0" } -# Using 0.8 because of ref-fvm. -# 0.9 would be better because of its updated quickcheck dependency. -# 0.10 breaks some API. cid = { version = "0.10.1", default-features = false, features = ["serde-codec", "std"] } # Depending on the release cycle, this dependency might want an earlier version of the FVM. diff --git a/ipc/ipld-resolver/Cargo.toml b/ipc/ipld-resolver/Cargo.toml index eb0509537..d7ed5e1dc 100644 --- a/ipc/ipld-resolver/Cargo.toml +++ b/ipc/ipld-resolver/Cargo.toml @@ -14,7 +14,7 @@ bloom = "0.3" gcra = "0.4" lazy_static = { workspace = true } libipld = { workspace = true, default-features = false, features = ["dag-cbor"] } -libp2p = { version = "0.50", default-features = false, features = [ +libp2p = { workspace = true, default-features = false, features = [ "gossipsub", "kad", "identify", @@ -23,7 +23,6 @@ libp2p = { version = "0.50", default-features = false, features = [ "yamux", "tcp", "dns", - "mplex", "request-response", "metrics", "tokio", diff --git a/ipc/primitives/Cargo.toml b/ipc/primitives/Cargo.toml index ce538d2ac..a9e046bb8 100644 --- a/ipc/primitives/Cargo.toml +++ b/ipc/primitives/Cargo.toml @@ -5,7 +5,7 @@ name = "primitives" version = "0.1.0" [dependencies] -fil_actors_runtime = { workspace = true, features = ["fil-actor"] } +fil_actors_runtime = { workspace = true } fvm_ipld_blockstore = { workspace = true } fvm_ipld_encoding = { workspace = true } fvm_ipld_hamt = { workspace = true } From 66934f88c7363ac01259e919018bf6f259f434b0 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Thu, 7 Dec 2023 17:51:04 +0100 Subject: [PATCH 3/6] wip: upgrading libp2p to latest version --- Cargo.lock | 764 +++++++++++------- Cargo.toml | 2 +- ipc/ipld-resolver/src/behaviour/content.rs | 67 +- ipc/ipld-resolver/src/behaviour/discovery.rs | 106 +-- ipc/ipld-resolver/src/behaviour/membership.rs | 100 ++- ipc/ipld-resolver/src/limiter.rs | 2 +- ipc/ipld-resolver/src/service.rs | 25 +- 7 files changed, 645 insertions(+), 421 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 824221dc3..f25d1f5f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -104,6 +104,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -334,7 +340,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d329f9e3620d0987cddea11769a8ef3ce6f60d794b891ced477033ecc6c8310e" dependencies = [ - "parking_lot 0.12.1", + "parking_lot", "tokio", ] @@ -389,6 +395,30 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "asynchronous-codec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" +dependencies = [ + "bytes", + "futures-sink", + "futures-util", + "memchr", + "pin-project-lite", +] + +[[package]] +name = "attohttpc" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" +dependencies = [ + "http", + "log", + "url", +] + [[package]] name = "atty" version = "0.2.14" @@ -1028,7 +1058,7 @@ dependencies = [ "multihash 0.16.3", "serde", "serde_bytes", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -1045,7 +1075,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_bytes", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -1711,7 +1741,7 @@ dependencies = [ "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.9", + "parking_lot_core", ] [[package]] @@ -2103,14 +2133,14 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -2645,7 +2675,7 @@ dependencies = [ "ipc_ipld_resolver", "k256 0.11.6", "libipld", - "libp2p 0.51.4", + "libp2p 0.53.1", "libp2p-bitswap", "literally", "multiaddr 0.16.0", @@ -3148,7 +3178,7 @@ dependencies = [ "serde_repr", "sha2 0.10.8", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", "vm_api", ] @@ -3356,6 +3386,16 @@ dependencies = [ "futures-util", ] +[[package]] +name = "futures-bounded" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e2774cc104e198ef3d3e1ff4ab40f86fa3245d6cb6a3a46174f21463cee173" +dependencies = [ + "futures-timer", + "futures-util", +] + [[package]] name = "futures-channel" version = "0.3.29" @@ -3423,13 +3463,12 @@ dependencies = [ [[package]] name = "futures-rustls" -version = "0.22.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" +checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" dependencies = [ "futures-io", - "rustls 0.20.9", - "webpki 0.22.4", + "rustls 0.21.9", ] [[package]] @@ -3444,6 +3483,17 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +[[package]] +name = "futures-ticker" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9763058047f713632a52e916cc7f6a4b3fc6e9fc1ff8c5b1dc49e5a89041682e" +dependencies = [ + "futures", + "futures-timer", + "instant", +] + [[package]] name = "futures-timer" version = "3.0.2" @@ -3549,7 +3599,7 @@ dependencies = [ "fvm_ipld_encoding", "serde", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -3575,7 +3625,7 @@ dependencies = [ "fvm_ipld_encoding", "serde", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -3642,7 +3692,7 @@ dependencies = [ "serde", "serde_tuple", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -3840,6 +3890,10 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.6", + "allocator-api2", +] [[package]] name = "hashers" @@ -3929,6 +3983,61 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +[[package]] +name = "hickory-proto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "socket2 0.5.5", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +dependencies = [ + "hmac 0.12.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -4138,11 +4247,10 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -4186,6 +4294,25 @@ dependencies = [ "windows", ] +[[package]] +name = "igd-next" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57e065e90a518ab5fedf79aa1e4b784e10f8e484a834f6bda85c42633a2cb7af" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http", + "hyper", + "log", + "rand 0.8.5", + "tokio", + "url", + "xmltree", +] + [[package]] name = "im" version = "15.1.0" @@ -4471,7 +4598,7 @@ dependencies = [ "ipc_ipld_resolver", "lazy_static", "libipld", - "libp2p 0.51.4", + "libp2p 0.53.1", "libp2p-bitswap", "log", "prometheus", @@ -4606,7 +4733,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ "base64 0.21.5", - "pem", + "pem 1.1.1", "ring 0.16.20", "serde", "serde_json", @@ -4717,7 +4844,7 @@ dependencies = [ "libipld-macro", "log", "multihash 0.16.3", - "parking_lot 0.12.1", + "parking_lot", "thiserror", ] @@ -4801,25 +4928,26 @@ dependencies = [ "libp2p-request-response 0.23.0", "libp2p-swarm 0.41.1", "multiaddr 0.16.0", - "parking_lot 0.12.1", + "parking_lot", "pin-project", "smallvec", ] [[package]] name = "libp2p" -version = "0.51.4" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" +checksum = "1252a34c693386829c34d44ccfbce86679d2a9a2c61f582863649bbf57f26260" dependencies = [ "bytes", + "either", "futures", "futures-timer", "getrandom 0.2.11", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-dns", "libp2p-gossipsub", "libp2p-identify", @@ -4831,23 +4959,26 @@ dependencies = [ "libp2p-ping", "libp2p-plaintext", "libp2p-quic", - "libp2p-request-response 0.24.1", - "libp2p-swarm 0.42.2", + "libp2p-request-response 0.26.0", + "libp2p-swarm 0.44.0", "libp2p-tcp", + "libp2p-upnp", "libp2p-yamux", - "multiaddr 0.17.1", + "multiaddr 0.18.1", "pin-project", + "rw-stream-sink 0.4.0", + "thiserror", ] [[package]] name = "libp2p-allow-block-list" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" +checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" dependencies = [ - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", + "libp2p-swarm 0.44.0", "void", ] @@ -4866,18 +4997,18 @@ dependencies = [ "prometheus", "thiserror", "tracing", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] name = "libp2p-connection-limits" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +checksum = "f2af4b1e1a1d6c5005a59b42287c0a526bcce94d8d688e2e9233b18eb843ceb4" dependencies = [ - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", + "libp2p-swarm 0.44.0", "void", ] @@ -4898,28 +5029,28 @@ dependencies = [ "log", "multiaddr 0.16.0", "multihash 0.16.3", - "multistream-select", + "multistream-select 0.12.1", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "pin-project", "prost", "prost-build", "rand 0.8.5", - "rw-stream-sink", + "rw-stream-sink 0.3.0", "sec1 0.3.0", "sha2 0.10.8", "smallvec", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", "zeroize", ] [[package]] name = "libp2p-core" -version = "0.39.2" +version = "0.41.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" +checksum = "8130a8269e65a2554d55131c770bdf4bcd94d2b8d4efb24ca23699be65066c05" dependencies = [ "either", "fnv", @@ -4927,56 +5058,59 @@ dependencies = [ "futures-timer", "instant", "libp2p-identity", - "log", - "multiaddr 0.17.1", - "multihash 0.17.0", - "multistream-select", + "multiaddr 0.18.1", + "multihash 0.19.1", + "multistream-select 0.13.0", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "pin-project", "quick-protobuf", "rand 0.8.5", - "rw-stream-sink", + "rw-stream-sink 0.4.0", "serde", "smallvec", "thiserror", - "unsigned-varint", + "tracing", + "unsigned-varint 0.8.0", "void", ] [[package]] name = "libp2p-dns" -version = "0.39.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" +checksum = "d17cbcf7160ff35c3e8e560de4a068fe9d6cb777ea72840e48eb76ff9576c4b6" dependencies = [ + "async-trait", "futures", - "libp2p-core 0.39.2", - "log", - "parking_lot 0.12.1", + "hickory-resolver", + "libp2p-core 0.41.2", + "libp2p-identity", + "parking_lot", "smallvec", - "trust-dns-resolver", + "tracing", ] [[package]] name = "libp2p-gossipsub" -version = "0.44.4" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b34b6da8165c0bde35c82db8efda39b824776537e73973549e76cadb3a77c5" +checksum = "201f0626acd8985fae7fdd318e86c954574b9eef2e5dec433936a19a0338393d" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "base64 0.21.5", "byteorder", "bytes", "either", "fnv", "futures", + "futures-ticker", + "getrandom 0.2.11", "hex_fmt", "instant", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", - "log", + "libp2p-swarm 0.44.0", "prometheus-client", "quick-protobuf", "quick-protobuf-codec", @@ -4985,132 +5119,139 @@ dependencies = [ "serde", "sha2 0.10.8", "smallvec", - "thiserror", - "unsigned-varint", + "tracing", + "unsigned-varint 0.7.2", "void", - "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.42.2" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" +checksum = "0544703553921214556f7567278b4f00cdd5052d29b0555ab88290cbfe54d81c" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "either", "futures", + "futures-bounded", "futures-timer", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", - "log", + "libp2p-swarm 0.44.0", "lru", "quick-protobuf", "quick-protobuf-codec", "smallvec", "thiserror", + "tracing", "void", ] [[package]] name = "libp2p-identity" -version = "0.1.3" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" +checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ "asn1_der", - "bs58 0.4.0", + "bs58 0.5.0", "ed25519-dalek 2.1.0", + "hkdf", "libsecp256k1", - "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multihash 0.19.1", "quick-protobuf", "rand 0.8.5", "serde", "sha2 0.10.8", "thiserror", + "tracing", "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.43.3" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" +checksum = "8cd9ae9180fbe425f14e5558b0dfcb3ae8a76075b0eefb7792076902fbb63a14" dependencies = [ "arrayvec 0.7.4", - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", - "log", + "libp2p-swarm 0.44.0", "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "serde", "sha2 0.10.8", "smallvec", "thiserror", + "tracing", "uint", - "unsigned-varint", + "unsigned-varint 0.7.2", "void", ] [[package]] name = "libp2p-mdns" -version = "0.43.1" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" +checksum = "49007d9a339b3e1d7eeebc4d67c05dbf23d300b7d091193ec2d3f26802d7faf2" dependencies = [ "data-encoding", "futures", + "hickory-proto", "if-watch", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", - "log", + "libp2p-swarm 0.44.0", "rand 0.8.5", "smallvec", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", - "trust-dns-proto", + "tracing", "void", ] [[package]] name = "libp2p-metrics" -version = "0.12.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" +checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" dependencies = [ - "libp2p-core 0.39.2", + "futures", + "instant", + "libp2p-core 0.41.2", "libp2p-gossipsub", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-ping", - "libp2p-swarm 0.42.2", + "libp2p-swarm 0.44.0", + "pin-project", "prometheus-client", ] [[package]] name = "libp2p-noise" -version = "0.42.2" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" +checksum = "8ecd0545ce077f6ea5434bcb76e8d0fe942693b4380aaad0d34a358c2bd05793" dependencies = [ + "asynchronous-codec 0.7.0", "bytes", - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.1", "futures", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "log", + "multiaddr 0.18.1", + "multihash 0.19.1", "once_cell", "quick-protobuf", "rand 0.8.5", @@ -5118,64 +5259,67 @@ dependencies = [ "snow", "static_assertions", "thiserror", + "tracing", "x25519-dalek", "zeroize", ] [[package]] name = "libp2p-ping" -version = "0.42.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" +checksum = "76b94ee41bd8c294194fe608851e45eb98de26fe79bc7913838cbffbfe8c7ce2" dependencies = [ "either", "futures", "futures-timer", "instant", - "libp2p-core 0.39.2", - "libp2p-swarm 0.42.2", - "log", + "libp2p-core 0.41.2", + "libp2p-identity", + "libp2p-swarm 0.44.0", "rand 0.8.5", + "tracing", "void", ] [[package]] name = "libp2p-plaintext" -version = "0.39.1" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ff582c0b74ffda004b716b97bc9cfe7f39960204877758b876dde86093beaa8" +checksum = "67330af40b67217e746d42551913cfb7ad04c74fa300fb329660a56318590b3f" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "futures", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "log", "quick-protobuf", - "unsigned-varint", - "void", + "quick-protobuf-codec", + "tracing", ] [[package]] name = "libp2p-quic" -version = "0.7.0-alpha.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" +checksum = "c02570b9effbc7c33331803104a8e9e53af7f2bdb4a2b61be420d6667545a0f5" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", "libp2p-tls", - "log", - "parking_lot 0.12.1", - "quinn-proto", + "parking_lot", + "quinn", "rand 0.8.5", - "rustls 0.20.9", + "ring 0.16.20", + "rustls 0.21.9", + "socket2 0.5.5", "thiserror", "tokio", + "tracing", ] [[package]] @@ -5193,23 +5337,27 @@ dependencies = [ "log", "rand 0.8.5", "smallvec", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] name = "libp2p-request-response" -version = "0.24.1" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" +checksum = "198a07e045ca23ad3cdb0f54ef3dfb5750056e63af06803d189b0393f865f461" dependencies = [ "async-trait", "futures", + "futures-bounded", + "futures-timer", "instant", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", - "libp2p-swarm 0.42.2", + "libp2p-swarm 0.44.0", "rand 0.8.5", "smallvec", + "tracing", + "void", ] [[package]] @@ -5234,81 +5382,101 @@ dependencies = [ [[package]] name = "libp2p-swarm" -version = "0.42.2" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" +checksum = "643ce11d87db56387631c9757b61b83435b434f94dc52ec267c1666e560e78b0" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", "libp2p-swarm-derive", - "log", + "multistream-select 0.13.0", + "once_cell", "rand 0.8.5", "smallvec", "tokio", + "tracing", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.32.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" +checksum = "9b27d257436d01433a21da8da7688c83dba35826726161a328ff0989cd7af2dd" dependencies = [ "heck 0.4.1", + "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] name = "libp2p-tcp" -version = "0.39.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" +checksum = "8b2460fc2748919adff99ecbc1aab296e4579e41f374fb164149bd2c9e529d4c" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.39.2", - "log", - "socket2 0.4.10", + "libp2p-core 0.41.2", + "libp2p-identity", + "socket2 0.5.5", "tokio", + "tracing", ] [[package]] name = "libp2p-tls" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core 0.41.2", "libp2p-identity", "rcgen", "ring 0.16.20", - "rustls 0.20.9", + "rustls 0.21.9", + "rustls-webpki", "thiserror", - "webpki 0.22.4", "x509-parser", "yasna", ] +[[package]] +name = "libp2p-upnp" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963eb8a174f828f6a51927999a9ab5e45dfa9aa2aa5fed99aa65f79de6229464" +dependencies = [ + "futures", + "futures-timer", + "igd-next", + "libp2p-core 0.41.2", + "libp2p-swarm 0.44.0", + "tokio", + "tracing", + "void", +] + [[package]] name = "libp2p-yamux" -version = "0.43.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" +checksum = "751f4778f71bc3db1ccf2451e7f4484463fec7f00c1ac2680e39c8368c23aae8" dependencies = [ "futures", - "libp2p-core 0.39.2", - "log", + "libp2p-core 0.41.2", "thiserror", + "tracing", "yamux", ] @@ -5320,7 +5488,7 @@ checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ "bitflags 2.4.1", "libc", - "redox_syscall 0.4.1", + "redox_syscall", ] [[package]] @@ -5434,11 +5602,11 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.10.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.3", ] [[package]] @@ -5481,12 +5649,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "matchit" version = "0.7.3" @@ -5623,26 +5785,26 @@ dependencies = [ "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] [[package]] name = "multiaddr" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +checksum = "8b852bc02a2da5feed68cd14fa50d0774b92790a5bdbfa932a813926c8472070" dependencies = [ "arrayref", "byteorder", "data-encoding", - "log", + "libp2p-identity", "multibase", - "multihash 0.17.0", + "multihash 0.19.1", "percent-encoding", "serde", "static_assertions", - "unsigned-varint", + "unsigned-varint 0.7.2", "url", ] @@ -5669,20 +5831,7 @@ dependencies = [ "serde", "serde-big-array", "sha2 0.10.8", - "unsigned-varint", -] - -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "multihash-derive", - "serde", - "serde-big-array", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -5703,7 +5852,18 @@ dependencies = [ "serde-big-array", "sha2 0.10.8", "sha3", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "serde", + "unsigned-varint 0.7.2", ] [[package]] @@ -5737,7 +5897,21 @@ dependencies = [ "log", "pin-project", "smallvec", - "unsigned-varint", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multistream-select" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" +dependencies = [ + "bytes", + "futures", + "log", + "pin-project", + "smallvec", + "unsigned-varint 0.7.2", ] [[package]] @@ -6224,17 +6398,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -6242,21 +6405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -6267,7 +6416,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] @@ -6411,6 +6560,16 @@ dependencies = [ "base64 0.13.1", ] +[[package]] +name = "pem" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923" +dependencies = [ + "base64 0.21.5", + "serde", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -6785,20 +6944,20 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot", "protobuf", "thiserror", ] [[package]] name = "prometheus-client" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" +checksum = "510c4f1c9d81d556458f94c98f857748130ea9737bbd6053da497503b26ea63c" dependencies = [ "dtoa", "itoa", - "parking_lot 0.12.1", + "parking_lot", "prometheus-client-derive-encode", ] @@ -6915,15 +7074,15 @@ dependencies = [ [[package]] name = "quick-protobuf-codec" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +checksum = "f8ededb1cd78531627244d51dd0c7139fbe736c7d57af0092a76f0ffb2f56e98" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "quick-protobuf", "thiserror", - "unsigned-varint", + "unsigned-varint 0.7.2", ] [[package]] @@ -6948,22 +7107,52 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "quinn" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +dependencies = [ + "bytes", + "futures-io", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.21.9", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "quinn-proto" -version = "0.9.6" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.20.9", + "rustls 0.21.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.4", +] + +[[package]] +name = "quinn-udp" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +dependencies = [ + "bytes", + "libc", + "socket2 0.5.5", + "tracing", + "windows-sys 0.48.0", ] [[package]] @@ -7092,25 +7281,16 @@ dependencies = [ [[package]] name = "rcgen" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6" dependencies = [ - "pem", + "pem 3.0.2", "ring 0.16.20", "time", "yasna", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -7522,6 +7702,17 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "rw-stream-sink" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c9026ff5d2f23da5e45bbc283f156383001bfb09c4e44256d02c1a685fe9a1" +dependencies = [ + "futures", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.15" @@ -8267,7 +8458,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "phf_shared 0.10.0", "precomputed-hash", ] @@ -8474,7 +8665,7 @@ checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.4.1", + "redox_syscall", "rustix", "windows-sys 0.48.0", ] @@ -8770,7 +8961,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.5", @@ -9041,7 +9232,7 @@ dependencies = [ "literally", "log", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "path-absolutize", "regex", "rustversion", @@ -9168,52 +9359,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "trust-dns-proto" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "rand 0.8.5", - "smallvec", - "socket2 0.4.10", - "thiserror", - "tinyvec", - "tokio", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lazy_static", - "lru-cache", - "parking_lot 0.12.1", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "tracing", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.4" @@ -9347,12 +9492,18 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ - "asynchronous-codec", + "asynchronous-codec 0.6.2", "bytes", "futures-io", "futures-util", ] +[[package]] +name = "unsigned-varint" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" + [[package]] name = "untrusted" version = "0.7.1" @@ -9384,7 +9535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7f5187fd6893d08fecb6cdcb09badfbd5a187bf947fc12abc36c7bcb88dcd51" dependencies = [ "once_cell", - "parking_lot 0.12.1", + "parking_lot", "thiserror", "time", ] @@ -9586,21 +9737,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmparser" version = "0.95.0" @@ -10129,23 +10265,23 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "1.1.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", + "curve25519-dalek 4.1.1", + "rand_core 0.6.4", + "serde", "zeroize", ] [[package]] name = "x509-parser" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" dependencies = [ "asn1-rs", - "base64 0.13.1", "data-encoding", "der-parser", "lazy_static", @@ -10156,6 +10292,21 @@ dependencies = [ "time", ] +[[package]] +name = "xml-rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + [[package]] name = "xsalsa20poly1305" version = "0.9.1" @@ -10180,14 +10331,15 @@ dependencies = [ [[package]] name = "yamux" -version = "0.10.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" +checksum = "9ed0164ae619f2dc144909a9f082187ebb5893693d8c0196e8085283ccd4b776" dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot", + "pin-project", "rand 0.8.5", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index e266c6eae..8198d03b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,7 @@ jsonrpc-v2 = { version = "0.11", default-features = false, features = ["bytes-v1 k256 = "0.11" # Same as tendermint-rs lazy_static = "1.4" libipld = { version = "0.14", default-features = false, features = ["dag-cbor"] } -libp2p = { version = "0.51", default-features = false } +libp2p = { version = "0.53", default-features = false } libp2p-bitswap = "0.25.1" lru_time_cache = "0.11" merkle-tree-rs = "0.1.0" diff --git a/ipc/ipld-resolver/src/behaviour/content.rs b/ipc/ipld-resolver/src/behaviour/content.rs index 3a2e9caa1..877862bd3 100644 --- a/ipc/ipld-resolver/src/behaviour/content.rs +++ b/ipc/ipld-resolver/src/behaviour/content.rs @@ -9,14 +9,14 @@ use std::{ use libipld::{store::StoreParams, Cid}; use libp2p::{ - core::ConnectedPoint, + core::{ConnectedPoint, Endpoint}, futures::channel::oneshot, multiaddr::Protocol, - request_response::handler::RequestResponseHandlerEvent, + request_response, swarm::{ derive_prelude::{ConnectionId, FromSwarm}, - ConnectionHandler, IntoConnectionHandler, NetworkBehaviour, NetworkBehaviourAction, - PollParameters, + ConnectionDenied, ConnectionHandler, NetworkBehaviour, THandler, THandlerInEvent, + THandlerOutEvent, ToSwarm, }, Multiaddr, PeerId, }; @@ -181,17 +181,9 @@ impl Behaviour

{ impl NetworkBehaviour for Behaviour

{ type ConnectionHandler = as NetworkBehaviour>::ConnectionHandler; - type OutEvent = Event; + type ToSwarm = Event; - fn new_handler(&mut self) -> Self::ConnectionHandler { - self.inner.new_handler() - } - - fn addresses_of_peer(&mut self, peer_id: &PeerId) -> Vec { - self.inner.addresses_of_peer(peer_id) - } - - fn on_swarm_event(&mut self, event: FromSwarm) { + fn on_swarm_event(&mut self, event: FromSwarm) { // Store the remote address. match &event { FromSwarm::ConnectionEstablished(c) => { @@ -226,10 +218,10 @@ impl NetworkBehaviour for Behaviour

{ &mut self, peer_id: PeerId, connection_id: ConnectionId, - event: <::Handler as ConnectionHandler>::OutEvent, + event: THandlerOutEvent, ) { match event { - RequestResponseHandlerEvent::Request { + request_response::Event::Request { request_id, request, sender, @@ -241,7 +233,7 @@ impl NetworkBehaviour for Behaviour

{ } // We need to hijack the response channel to record the size, otherwise it goes straight to the handler. let (tx, rx) = libp2p::futures::channel::oneshot::channel(); - let event = RequestResponseHandlerEvent::Request { + let event = request_response::Event::Request { request_id, request, sender: tx, @@ -266,21 +258,20 @@ impl NetworkBehaviour for Behaviour

{ fn poll( &mut self, cx: &mut Context<'_>, - params: &mut impl PollParameters, - ) -> Poll> { + ) -> Poll>> { // Emit own events first. if let Some(ev) = self.outbox.pop_front() { - return Poll::Ready(NetworkBehaviourAction::GenerateEvent(ev)); + return Poll::Ready(ToSwarm::GenerateEvent(ev)); } // Poll Bitswap. - while let Poll::Ready(ev) = self.inner.poll(cx, params) { + while let Poll::Ready(ev) = self.inner.poll(cx) { match ev { - NetworkBehaviourAction::GenerateEvent(ev) => match ev { + ToSwarm::GenerateEvent(ev) => match ev { BitswapEvent::Progress(_, _) => {} BitswapEvent::Complete(id, result) => { stats::CONTENT_RESOLVE_RUNNING.dec(); let out = Event::Complete(id, result); - return Poll::Ready(NetworkBehaviourAction::GenerateEvent(out)); + return Poll::Ready(ToSwarm::GenerateEvent(out)); } }, other => { @@ -291,6 +282,36 @@ impl NetworkBehaviour for Behaviour

{ Poll::Pending } + + fn handle_established_inbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + local_addr: &Multiaddr, + remote_addr: &Multiaddr, + ) -> Result, ConnectionDenied> { + self.inner.handle_established_inbound_connection( + connection_id, + peer, + local_addr, + remote_addr, + ) + } + + fn handle_pending_outbound_connection( + &mut self, + connection_id: ConnectionId, + maybe_peer: Option, + addresses: &[Multiaddr], + effective_role: Endpoint, + ) -> Result, ConnectionDenied> { + self.inner.handle_pending_outbound_connection( + connection_id, + maybe_peer, + addresses, + effective_role, + ) + } } /// Get rid of parts of an address which are considered ephemeral, diff --git a/ipc/ipld-resolver/src/behaviour/discovery.rs b/ipc/ipld-resolver/src/behaviour/discovery.rs index 875154707..db079c59f 100644 --- a/ipc/ipld-resolver/src/behaviour/discovery.rs +++ b/ipc/ipld-resolver/src/behaviour/discovery.rs @@ -10,18 +10,15 @@ use std::{ }; use libp2p::{ - core::connection::ConnectionId, + core::Endpoint, identify::Info, - kad::{ - handler::KademliaHandlerProto, store::MemoryStore, InboundRequest, Kademlia, - KademliaConfig, KademliaEvent, KademliaStoreInserts, QueryId, QueryResult, - }, + kad::{self, store::MemoryStore, InboundRequest}, multiaddr::Protocol, swarm::{ - behaviour::toggle::{Toggle, ToggleIntoConnectionHandler}, + behaviour::toggle::{Toggle, ToggleConnectionHandler}, derive_prelude::FromSwarm, - ConnectionHandler, IntoConnectionHandler, NetworkBehaviour, NetworkBehaviourAction, - PollParameters, + ConnectionDenied, ConnectionHandler, ConnectionId, NetworkBehaviour, THandler, + THandlerInEvent, THandlerOutEvent, ToSwarm, }, Multiaddr, PeerId, }; @@ -82,7 +79,7 @@ pub struct Behaviour { /// Name of the peer discovery protocol. protocol_name: String, /// Kademlia behaviour, if enabled. - inner: Toggle>, + inner: Toggle>, /// Number of current connections. num_connections: usize, /// Number of connections where further lookups are paused. @@ -120,16 +117,16 @@ impl Behaviour { let mut bootstrap_buffer = None; let kademlia_opt = if dc.enable_kademlia { - let mut kad_config = KademliaConfig::default(); + let mut kad_config = kad::Config::default(); kad_config.set_protocol_names(vec![Cow::Owned(protocol_name.as_bytes().to_vec())]); // Disable inserting records into the memory store, so peers cannot send `PutRecord` // messages to store content in the memory of our node. - kad_config.set_record_filtering(KademliaStoreInserts::FilterBoth); + kad_config.set_record_filtering(kad::StoreInserts::FilterBoth); let store = MemoryStore::new(nc.local_peer_id()); - let mut kademlia = Kademlia::with_config(nc.local_peer_id(), store, kad_config); + let mut kademlia = kad::Behaviour::with_config(nc.local_peer_id(), store, kad_config); // Bootstrap from the seeds. The first seed to stand up might have nobody to bootstrap from, // although ideally there would be at least another peer, so we can easily restart it and come back. @@ -214,27 +211,13 @@ impl Behaviour { } impl NetworkBehaviour for Behaviour { - type ConnectionHandler = ToggleIntoConnectionHandler>; - - type OutEvent = Event; + type ConnectionHandler = ToggleConnectionHandler< + as NetworkBehaviour>::ConnectionHandler, + >; - fn new_handler(&mut self) -> Self::ConnectionHandler { - self.inner.new_handler() - } + type ToSwarm = Event; - fn addresses_of_peer(&mut self, peer_id: &PeerId) -> Vec { - let mut addrs = self - .static_addresses - .iter() - .filter(|(p, _)| p == peer_id) - .map(|(_, a)| a.clone()) - .collect::>(); - - addrs.extend(self.inner.addresses_of_peer(peer_id)); - addrs - } - - fn on_swarm_event(&mut self, event: FromSwarm) { + fn on_swarm_event(&mut self, event: FromSwarm) { match &event { FromSwarm::ConnectionEstablished(e) => { if e.other_established == 0 { @@ -253,24 +236,47 @@ impl NetworkBehaviour for Behaviour { self.inner.on_swarm_event(event) } + fn handle_established_inbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + local_addr: &Multiaddr, + remote_addr: &Multiaddr, + ) -> Result, ConnectionDenied> { + self.inner + .handle_established_inbound_connection(connection_id, peer, local_addr, remote_addr) + .into() + } + fn on_connection_handler_event( &mut self, peer_id: PeerId, - connection_id: ConnectionId, - event: <::Handler as ConnectionHandler>::OutEvent, + connection: ConnectionId, + event: THandlerOutEvent, ) { self.inner - .on_connection_handler_event(peer_id, connection_id, event) + .on_connection_handler_event(peer_id, connection, event); + } + + fn handle_established_outbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + addr: &Multiaddr, + role_override: Endpoint, + ) -> Result, ConnectionDenied> { + self.inner + .handle_established_outbound_connection(connection_id, peer, addr, role_override) + .into() } fn poll( &mut self, cx: &mut Context<'_>, - params: &mut impl PollParameters, - ) -> std::task::Poll> { + ) -> Poll>> { // Emit own events first. if let Some(ev) = self.outbox.pop_front() { - return Poll::Ready(NetworkBehaviourAction::GenerateEvent(ev)); + return Poll::Ready(ToSwarm::GenerateEvent(ev)); } // Trigger periodic queries. @@ -293,25 +299,24 @@ impl NetworkBehaviour for Behaviour { } // Poll Kademlia. - while let Poll::Ready(ev) = self.inner.poll(cx, params) { + while let Poll::Ready(ev) = self.inner.poll(cx) { match ev { - NetworkBehaviourAction::GenerateEvent(ev) => { + ToSwarm::GenerateEvent(ev) => { match ev { // We get this event for inbound connections, where the remote address may be ephemeral. - KademliaEvent::UnroutablePeer { peer } => { + kad::Event::UnroutablePeer { peer } => { debug!("{peer} unroutable from {}", self.peer_id); } - KademliaEvent::InboundRequest { + kad::Event::InboundRequest { request: InboundRequest::PutRecord { source, .. }, } => { warn!("disallowed Kademlia requests from {source}",) } // Information only. - KademliaEvent::InboundRequest { .. } => {} + kad::Event::InboundRequest { .. } => {} // Finish bootstrapping. - KademliaEvent::OutboundQueryProgressed { result, step, .. } => match result - { - QueryResult::Bootstrap(result) if step.last => { + kad::Event::OutboundQueryProgressed { result, step, .. } => match result { + kad::QueryResult::Bootstrap(result) if step.last => { debug!("Bootstrapping finished with {result:?}"); if let Some(buffer) = self.bootstrap_buffer.take() { debug!("Adding {} self-identified peers.", buffer.len()); @@ -325,17 +330,22 @@ impl NetworkBehaviour for Behaviour { // The config ensures peers are added to the table if there's room. // We're not emitting these as known peers because the address will probably not be returned by `addresses_of_peer`, // so the outside service would have to keep track, which is not what we want. - KademliaEvent::RoutablePeer { peer, .. } => { + kad::Event::RoutablePeer { peer, .. } => { debug!("Kademlia in manual mode or bucket full, cannot add {peer}"); } // Unfortunately, looking at the Kademlia behaviour, it looks like when it goes from pending to active, // it won't emit another event, so we might as well tentatively emit an event here. - KademliaEvent::PendingRoutablePeer { peer, address } => { + kad::Event::PendingRoutablePeer { peer, address } => { debug!("{peer} pending to the routing table of {}", self.peer_id); self.outbox.push_back(Event::Added(peer, vec![address])) } + kad::Event::ModeChanged { new_mode } => { + debug!("Kademlia mode changed to {new_mode:?}"); + // for now do nothing if we change modes, although in the future + // we may want to propagate this info to other modules in the peer. + } // This event should ensure that we will be able to answer address lookups later. - KademliaEvent::RoutingUpdated { + kad::Event::RoutingUpdated { peer, addresses, old_peer, diff --git a/ipc/ipld-resolver/src/behaviour/membership.rs b/ipc/ipld-resolver/src/behaviour/membership.rs index 0923459a1..7c9f49e0b 100644 --- a/ipc/ipld-resolver/src/behaviour/membership.rs +++ b/ipc/ipld-resolver/src/behaviour/membership.rs @@ -6,19 +6,19 @@ use std::time::Duration; use anyhow::anyhow; use ipc_sdk::subnet_id::SubnetID; -use libp2p::core::connection::ConnectionId; -use libp2p::gossipsub::error::SubscriptionError; +use libp2p::core::Endpoint; use libp2p::gossipsub::{ - GossipsubConfigBuilder, GossipsubEvent, GossipsubMessage, IdentTopic, MessageAuthenticity, - MessageId, Sha256Topic, Topic, TopicHash, + self, IdentTopic, MessageAuthenticity, MessageId, Sha256Topic, SubscriptionError, Topic, + TopicHash, }; use libp2p::identity::Keypair; use libp2p::swarm::derive_prelude::FromSwarm; -use libp2p::swarm::{NetworkBehaviourAction, PollParameters}; +use libp2p::swarm::{ + ConnectionDenied, ConnectionId, THandler, THandlerInEvent, THandlerOutEvent, ToSwarm, +}; use libp2p::Multiaddr; use libp2p::{ - gossipsub::Gossipsub, - swarm::{ConnectionHandler, IntoConnectionHandler, NetworkBehaviour}, + swarm::{ConnectionHandler, NetworkBehaviour}, PeerId, }; use log::{debug, error, warn}; @@ -89,7 +89,7 @@ pub enum ConfigError { /// peer is able to resolve CIDs in different subnets. pub struct Behaviour { /// [`Gossipsub`] behaviour to spread the information about subnet membership. - inner: Gossipsub, + inner: gossipsub::Behaviour, /// Events to return when polled. outbox: VecDeque, /// [`Keypair`] used to sign [`SignedProviderRecord`] instances. @@ -128,10 +128,10 @@ impl Behaviour { } let membership_topic = Topic::new(format!("{}/{}", PUBSUB_MEMBERSHIP, nc.network_name)); - let mut gossipsub_config = GossipsubConfigBuilder::default(); + let mut gossipsub_config = gossipsub::ConfigBuilder::default(); // Set the maximum message size to 2MB. gossipsub_config.max_transmit_size(2 << 20); - gossipsub_config.message_id_fn(|msg: &GossipsubMessage| { + gossipsub_config.message_id_fn(|msg: &gossipsub::Message| { let s = blake2b_256(&msg.data); MessageId::from(s) }); @@ -140,7 +140,7 @@ impl Behaviour { .build() .map_err(|s| ConfigError::InvalidGossipsubConfig(s.into()))?; - let mut gossipsub = Gossipsub::new( + let mut gossipsub = gossipsub::Behaviour::new( MessageAuthenticity::Signed(nc.local_key.clone()), gossipsub_config, ) @@ -383,7 +383,7 @@ impl Behaviour { /// then raise domain event to let the rest of the application know about a /// provider. Also update all the book keeping in the behaviour that we use /// to answer future queries about the topic. - fn handle_message(&mut self, msg: GossipsubMessage) { + fn handle_message(&mut self, msg: gossipsub::Message) { if msg.topic == self.membership_topic.hash() { match SignedProviderRecord::from_bytes(&msg.data).map(|r| r.into_record()) { Ok(record) => self.handle_provider_record(record), @@ -501,18 +501,61 @@ impl Behaviour { } impl NetworkBehaviour for Behaviour { - type ConnectionHandler = ::ConnectionHandler; - type OutEvent = Event; + type ConnectionHandler = ::ConnectionHandler; + type ToSwarm = Event; - fn new_handler(&mut self) -> Self::ConnectionHandler { - self.inner.new_handler() + fn handle_pending_inbound_connection( + &mut self, + connection_id: ConnectionId, + local_addr: &Multiaddr, + remote_addr: &Multiaddr, + ) -> Result<(), ConnectionDenied> { + self.inner + .handle_pending_inbound_connection(connection_id, local_addr, remote_addr) + } + + fn handle_established_inbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + local_addr: &Multiaddr, + remote_addr: &Multiaddr, + ) -> Result, ConnectionDenied> { + self.inner.handle_established_inbound_connection( + connection_id, + peer, + local_addr, + remote_addr, + ) } - fn addresses_of_peer(&mut self, peer_id: &PeerId) -> Vec { - self.inner.addresses_of_peer(peer_id) + fn handle_pending_outbound_connection( + &mut self, + connection_id: ConnectionId, + maybe_peer: Option, + addresses: &[Multiaddr], + effective_role: Endpoint, + ) -> Result, ConnectionDenied> { + self.inner.handle_pending_outbound_connection( + connection_id, + maybe_peer, + addresses, + effective_role, + ) + } + + fn handle_established_outbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + addr: &Multiaddr, + role_override: Endpoint, + ) -> Result, ConnectionDenied> { + self.inner + .handle_established_outbound_connection(connection_id, peer, addr, role_override) } - fn on_swarm_event(&mut self, event: FromSwarm) { + fn on_swarm_event(&mut self, event: FromSwarm) { self.inner.on_swarm_event(event) } @@ -520,7 +563,7 @@ impl NetworkBehaviour for Behaviour { &mut self, peer_id: PeerId, connection_id: ConnectionId, - event: <::Handler as ConnectionHandler>::OutEvent, + event: THandlerOutEvent, ) { self.inner .on_connection_handler_event(peer_id, connection_id, event) @@ -529,11 +572,10 @@ impl NetworkBehaviour for Behaviour { fn poll( &mut self, cx: &mut Context<'_>, - params: &mut impl PollParameters, - ) -> std::task::Poll> { + ) -> Poll>> { // Emit own events first. if let Some(ev) = self.outbox.pop_front() { - return Poll::Ready(NetworkBehaviourAction::GenerateEvent(ev)); + return Poll::Ready(ToSwarm::GenerateEvent(ev)); } // Republish our current peer record snapshot and prune old records. @@ -546,9 +588,9 @@ impl NetworkBehaviour for Behaviour { // Poll Gossipsub for events; this is where we can handle Gossipsub messages and // store the associations from peers to subnets. - while let Poll::Ready(ev) = self.inner.poll(cx, params) { + while let Poll::Ready(ev) = self.inner.poll(cx) { match ev { - NetworkBehaviourAction::GenerateEvent(ev) => { + ToSwarm::GenerateEvent(ev) => { match ev { // NOTE: We could (ab)use the Gossipsub mechanism itself to signal subnet membership, // however I think the information would only spread to our nearest neighbours we are @@ -558,16 +600,16 @@ impl NetworkBehaviour for Behaviour { // insignificant. For this reason I oped to use messages instead, and let the content // carry the information, spreading through the Gossipsub network regardless of the // number of connected peers. - GossipsubEvent::Subscribed { peer_id, topic } => { + gossipsub::Event::Subscribed { peer_id, topic } => { self.handle_subscriber(peer_id, topic) } - GossipsubEvent::Unsubscribed { .. } => {} + gossipsub::Event::Unsubscribed { .. } => {} // Log potential misconfiguration. - GossipsubEvent::GossipsubNotSupported { peer_id } => { + gossipsub::Event::GossipsubNotSupported { peer_id } => { debug!("peer {peer_id} doesn't support gossipsub"); } - GossipsubEvent::Message { message, .. } => { + gossipsub::Event::Message { message, .. } => { self.handle_message(message); } } diff --git a/ipc/ipld-resolver/src/limiter.rs b/ipc/ipld-resolver/src/limiter.rs index 438aa10ee..1f4237b51 100644 --- a/ipc/ipld-resolver/src/limiter.rs +++ b/ipc/ipld-resolver/src/limiter.rs @@ -5,7 +5,7 @@ use std::time::{Duration, Instant}; use gcra::GcraState; pub use gcra::RateLimit; -use libp2p::gossipsub::time_cache::TimeCache; +use libp2p::gossipsub::TimeCache; /// Track the rate limit of resources (e.g. bytes) consumed per key. /// diff --git a/ipc/ipld-resolver/src/service.rs b/ipc/ipld-resolver/src/service.rs index a88890f2a..828ebf98e 100644 --- a/ipc/ipld-resolver/src/service.rs +++ b/ipc/ipld-resolver/src/service.rs @@ -8,16 +8,16 @@ use bloom::{BloomFilter, ASMS}; use ipc_sdk::subnet_id::SubnetID; use libipld::store::StoreParams; use libipld::Cid; +use libp2p::connection_limits::ConnectionLimits; +use libp2p::core::transport::upgrade::Multiplex; use libp2p::futures::StreamExt; use libp2p::swarm::SwarmEvent; use libp2p::{ core::{muxing::StreamMuxerBox, transport::Boxed}, identity::Keypair, - mplex, noise, - swarm::{ConnectionLimits, SwarmBuilder}, - yamux, Multiaddr, PeerId, Swarm, Transport, + noise, yamux, Multiaddr, PeerId, Swarm, Transport, }; -use libp2p::{identify, ping}; +use libp2p::{identify, ping, SwarmBuilder}; use libp2p_bitswap::{BitswapResponse, BitswapStore}; use log::{debug, error, info, trace, warn}; use prometheus::Registry; @@ -286,7 +286,7 @@ impl Service

{ fn handle_ping_event(&mut self, event: ping::Event) { let peer_id = event.peer.to_base58(); match event.result { - Ok(ping::Success::Ping { rtt }) => { + Ok(ping::Event::Success::Ping { rtt }) => { stats::PING_SUCCESS.inc(); stats::PING_RTT.observe(rtt.as_millis() as f64); trace!( @@ -296,7 +296,7 @@ impl Service

{ rtt.as_millis() ); } - Ok(ping::Success::Pong) => { + Ok(ping::Event::Success::Pong) => { trace!("PingSuccess::Pong from {peer_id} to {}", self.peer_id); } Err(ping::Failure::Timeout) => { @@ -556,20 +556,19 @@ fn send_resolve_result(tx: Sender, res: ResolveResult) { pub fn build_transport(local_key: Keypair) -> Boxed<(PeerId, StreamMuxerBox)> { let tcp_transport = || libp2p::tcp::tokio::Transport::new(libp2p::tcp::Config::new().nodelay(true)); - let transport = libp2p::dns::TokioDnsConfig::system(tcp_transport()).unwrap(); + let transport = libp2p::dns::tokio::Transport::system(tcp_transport()).unwrap(); let auth_config = { - let dh_keys = noise::Keypair::::new() - .into_authentic(&local_key) - .expect("Noise key generation failed"); + let dh_keys = noise::Config::new(&local_key).expect("Noise key generation failed"); - noise::NoiseConfig::xx(dh_keys).into_authenticated() + noise::Config::xx(dh_keys).into_authenticated() }; let mplex_config = { - let mut mplex_config = mplex::MplexConfig::new(); + let mut mplex_config = Multiplex::MplexConfig::new(); mplex_config.set_max_buffer_size(usize::MAX); - let mut yamux_config = yamux::YamuxConfig::default(); + // FIXME: Yamux will end up beaing deprecated. + let mut yamux_config = yamux::Config::default(); yamux_config.set_max_buffer_size(16 * 1024 * 1024); yamux_config.set_receive_window_size(16 * 1024 * 1024); // yamux_config.set_window_update_mode(WindowUpdateMode::OnRead); From 797a4f51c87f4e1ad5958b1d3570066833446869 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Fri, 8 Dec 2023 16:59:09 +0100 Subject: [PATCH 4/6] wip: fixing ipld-resolver with upgraded bitswap dep --- Cargo.lock | 629 ++++++--------------- Cargo.toml | 7 +- ipc/ipld-resolver/Cargo.toml | 2 +- ipc/ipld-resolver/src/behaviour/content.rs | 43 +- ipc/ipld-resolver/src/behaviour/mod.rs | 7 + ipc/ipld-resolver/src/limiter.rs | 123 ++-- 6 files changed, 286 insertions(+), 525 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f25d1f5f9..9345a54a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,7 +77,7 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom", "once_cell", "version_check", ] @@ -89,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -601,8 +601,8 @@ dependencies = [ "log", "memmap2", "pairing 0.23.0", - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", "rayon", "rustversion", "serde", @@ -631,7 +631,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.15", + "prettyplease", "proc-macro2", "quote", "regex", @@ -786,7 +786,7 @@ dependencies = [ "ff 0.12.1", "group 0.12.1", "pairing 0.22.0", - "rand_core 0.6.4", + "rand_core", "subtle", "thiserror", ] @@ -802,7 +802,7 @@ dependencies = [ "ff 0.13.0", "group 0.13.0", "pairing 0.23.0", - "rand_core 0.6.4", + "rand_core", "subtle", "thiserror", ] @@ -830,7 +830,7 @@ dependencies = [ "ff 0.12.1", "group 0.12.1", "pairing 0.22.0", - "rand_core 0.6.4", + "rand_core", "serde", "subtle", ] @@ -847,17 +847,11 @@ dependencies = [ "ff 0.13.0", "group 0.13.0", "pairing 0.23.0", - "rand_core 0.6.4", + "rand_core", "serde", "subtle", ] -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - [[package]] name = "bs58" version = "0.5.0" @@ -916,16 +910,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "cached" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4dfac631a8e77b2f327f7852bb6172771f5279c4512efe79fad6067b37be3d" -dependencies = [ - "hashbrown 0.11.2", - "once_cell", -] - [[package]] name = "camino" version = "1.1.6" @@ -1061,6 +1045,19 @@ dependencies = [ "unsigned-varint 0.7.2", ] +[[package]] +name = "cid" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" +dependencies = [ + "core2", + "multibase", + "multihash 0.17.0", + "serde", + "unsigned-varint 0.7.2", +] + [[package]] name = "cid" version = "0.10.1" @@ -1072,7 +1069,7 @@ dependencies = [ "multibase", "multihash 0.18.1", "quickcheck", - "rand 0.8.5", + "rand", "serde", "serde_bytes", "unsigned-varint 0.7.2", @@ -1170,7 +1167,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "bs58 0.5.0", + "bs58", "coins-core", "digest 0.10.7", "hmac 0.12.1", @@ -1191,7 +1188,7 @@ dependencies = [ "hmac 0.12.1", "once_cell", "pbkdf2 0.12.2", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", ] @@ -1204,7 +1201,7 @@ checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ "base64 0.21.5", "bech32", - "bs58 0.5.0", + "bs58", "digest 0.10.7", "generic-array 0.14.7", "hex", @@ -1316,7 +1313,7 @@ dependencies = [ "hex", "ipc-sdk", "ipc_actors_abis", - "rand 0.8.5", + "rand", "tendermint-rpc", "tokio", ] @@ -1567,7 +1564,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1579,7 +1576,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -1591,7 +1588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", + "rand_core", "typenum", ] @@ -1642,19 +1639,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "4.1.1" @@ -1691,7 +1675,7 @@ checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core 0.6.4", + "rand_core", "subtle-ng", "zeroize", ] @@ -1989,15 +1973,6 @@ dependencies = [ "spki 0.7.3", ] -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", -] - [[package]] name = "ed25519" version = "2.2.3" @@ -2016,21 +1991,7 @@ checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" dependencies = [ "curve25519-dalek-ng", "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", + "rand_core", "sha2 0.9.9", "zeroize", ] @@ -2041,9 +2002,9 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.1.1", - "ed25519 2.2.3", - "rand_core 0.6.4", + "curve25519-dalek", + "ed25519", + "rand_core", "serde", "sha2 0.10.8", "subtle", @@ -2070,7 +2031,7 @@ dependencies = [ "generic-array 0.14.7", "group 0.12.1", "pkcs8 0.9.0", - "rand_core 0.6.4", + "rand_core", "sec1 0.3.0", "subtle", "zeroize", @@ -2089,7 +2050,7 @@ dependencies = [ "generic-array 0.14.7", "group 0.13.0", "pkcs8 0.10.2", - "rand_core 0.6.4", + "rand_core", "sec1 0.7.3", "subtle", "zeroize", @@ -2124,7 +2085,7 @@ dependencies = [ "hex", "k256 0.13.2", "log", - "rand 0.8.5", + "rand", "rlp", "serde", "sha3", @@ -2203,7 +2164,7 @@ dependencies = [ "hex", "hmac 0.12.1", "pbkdf2 0.11.0", - "rand 0.8.5", + "rand", "scrypt", "serde", "serde_json", @@ -2320,7 +2281,7 @@ dependencies = [ "ethers-core", "ethers-etherscan", "eyre", - "prettyplease 0.2.15", + "prettyplease", "proc-macro2", "quote", "regex", @@ -2366,7 +2327,7 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand 0.8.5", + "rand", "rlp", "serde", "serde_json", @@ -2472,7 +2433,7 @@ dependencies = [ "elliptic-curve 0.13.8", "eth-keystore", "ethers-core", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", "tracing", @@ -2675,7 +2636,7 @@ dependencies = [ "ipc_ipld_resolver", "k256 0.11.6", "libipld", - "libp2p 0.53.1", + "libp2p", "libp2p-bitswap", "literally", "multiaddr 0.16.0", @@ -2684,7 +2645,7 @@ dependencies = [ "prost", "quickcheck", "quickcheck_macros", - "rand_chacha 0.3.1", + "rand_chacha", "serde", "serde_json", "serde_with", @@ -2743,7 +2704,7 @@ name = "fendermint_crypto" version = "0.1.0" dependencies = [ "libsecp256k1", - "rand 0.8.5", + "rand", "zeroize", ] @@ -2774,7 +2735,7 @@ dependencies = [ "paste", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_json", "tendermint 0.31.1", @@ -2871,7 +2832,7 @@ dependencies = [ "lazy_static", "num-bigint", "quickcheck", - "rand 0.8.5", + "rand", "serde", "serde_json", ] @@ -2899,7 +2860,7 @@ dependencies = [ "paste", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_tuple", "tracing", @@ -2952,7 +2913,7 @@ dependencies = [ "num-traits", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_json", "serde_with", @@ -3029,7 +2990,7 @@ dependencies = [ "num-traits", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_tuple", "serde_with", @@ -3115,7 +3076,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "bitvec", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3126,7 +3087,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "bitvec", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -3197,7 +3158,7 @@ dependencies = [ "lazy_static", "merkletree", "neptune", - "rand 0.8.5", + "rand", "serde", "sha2 0.10.8", ] @@ -3224,7 +3185,7 @@ dependencies = [ "memmap2", "merkletree", "once_cell", - "rand 0.8.5", + "rand", "rayon", "serde", "serde_json", @@ -3261,7 +3222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3549,7 +3510,7 @@ dependencies = [ "num_cpus", "once_cell", "quickcheck", - "rand 0.8.5", + "rand", "rayon", "replace_with", "serde", @@ -3747,17 +3708,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.11" @@ -3823,8 +3773,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", "rand_xorshift", "subtle", ] @@ -3836,8 +3786,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", - "rand 0.8.5", - "rand_core 0.6.4", + "rand", + "rand_core", "rand_xorshift", "subtle", ] @@ -3861,12 +3811,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - [[package]] name = "hashbrown" version = "0.12.3" @@ -3999,7 +3943,7 @@ dependencies = [ "idna 0.4.0", "ipnet", "once_cell", - "rand 0.8.5", + "rand", "socket2 0.5.5", "thiserror", "tinyvec", @@ -4021,7 +3965,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot", - "rand 0.8.5", + "rand", "resolv-conf", "smallvec", "thiserror", @@ -4307,7 +4251,7 @@ dependencies = [ "http", "hyper", "log", - "rand 0.8.5", + "rand", "tokio", "url", "xmltree", @@ -4320,7 +4264,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ "bitmaps", - "rand_core 0.6.4", + "rand_core", "rand_xoshiro", "sized-chunks", "typenum", @@ -4494,7 +4438,7 @@ dependencies = [ "primitives", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_ipld_dagcbor 0.2.2", "serde_json", @@ -4598,13 +4542,13 @@ dependencies = [ "ipc_ipld_resolver", "lazy_static", "libipld", - "libp2p 0.53.1", + "libp2p", "libp2p-bitswap", "log", "prometheus", "quickcheck", "quickcheck_macros", - "rand 0.8.5", + "rand", "serde", "serde_json", "thiserror", @@ -4832,44 +4776,41 @@ checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libipld" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9c3aa309c260aa2f174bac968901eddc546e9d85950c28eae6a7bec402f926" +checksum = "a20e38e0ad9a2fd600476691fa0780421931a198279985e398a3a0851903e1b2" dependencies = [ - "async-trait", - "cached", "fnv", "libipld-cbor", - "libipld-core 0.14.0", + "libipld-core 0.15.0", "libipld-macro", "log", - "multihash 0.16.3", - "parking_lot", + "multihash 0.17.0", "thiserror", ] [[package]] name = "libipld-cbor" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd1ab68c9d26f20c7d0dfea6eecbae8c00359875210001b33ca27d4a02f3d09" +checksum = "4b75370e27e0745910a9991c83f365cdae58027acf0502aa7987ac538a8a4744" dependencies = [ "byteorder", - "libipld-core 0.14.0", + "libipld-core 0.15.0", "thiserror", ] [[package]] name = "libipld-core" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44790246ec6b7314cba745992c23d479d018073e66d49ae40ae1b64e5dd8eb5" +checksum = "b7a704ba3b25dee9e7a2361fae2c7c19defae2a92e69ae96ffb203996705cd7c" dependencies = [ "anyhow", - "cid 0.8.6", + "cid 0.9.0", "core2", "multibase", - "multihash 0.16.3", + "multihash 0.17.0", "thiserror", ] @@ -4890,11 +4831,11 @@ dependencies = [ [[package]] name = "libipld-macro" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852c011562ae5059b67c3a917f9f5945af5a68df8e39ede4444fff33274d25e2" +checksum = "d4c7ccd89e54f2796cf3f99aabeea7a7751d418df504926544f28348d3c890c7" dependencies = [ - "libipld-core 0.14.0", + "libipld-core 0.15.0", ] [[package]] @@ -4913,26 +4854,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libp2p" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" -dependencies = [ - "bytes", - "futures", - "futures-timer", - "getrandom 0.2.11", - "instant", - "libp2p-core 0.38.0", - "libp2p-request-response 0.23.0", - "libp2p-swarm 0.41.1", - "multiaddr 0.16.0", - "parking_lot", - "pin-project", - "smallvec", -] - [[package]] name = "libp2p" version = "0.53.1" @@ -4943,11 +4864,11 @@ dependencies = [ "either", "futures", "futures-timer", - "getrandom 0.2.11", + "getrandom", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-dns", "libp2p-gossipsub", "libp2p-identify", @@ -4959,14 +4880,14 @@ dependencies = [ "libp2p-ping", "libp2p-plaintext", "libp2p-quic", - "libp2p-request-response 0.26.0", - "libp2p-swarm 0.44.0", + "libp2p-request-response", + "libp2p-swarm", "libp2p-tcp", "libp2p-upnp", "libp2p-yamux", "multiaddr 0.18.1", "pin-project", - "rw-stream-sink 0.4.0", + "rw-stream-sink", "thiserror", ] @@ -4976,24 +4897,23 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "107b238b794cb83ab53b74ad5dcf7cca3200899b72fe662840cfb52f5b0a32e6" dependencies = [ - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", + "libp2p-swarm", "void", ] [[package]] name = "libp2p-bitswap" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd2eb1045efb4abdf827e27985400133a419648ee88175499fcaa29b4c29431" +version = "0.25.0" +source = "git+https://github.com/consensus-shipyard/libp2p-bitswap?branch=chore-upgrade-libp2p#d2eccf6f8dc16f3592b0948d680719f8edb0e564" dependencies = [ "async-trait", "fnv", "futures", "lazy_static", "libipld", - "libp2p 0.50.1", + "libp2p", "prometheus", "thiserror", "tracing", @@ -5006,44 +4926,10 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2af4b1e1a1d6c5005a59b42287c0a526bcce94d8d688e2e9233b18eb843ceb4" dependencies = [ - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", - "void", -] - -[[package]] -name = "libp2p-core" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" -dependencies = [ - "asn1_der", - "bs58 0.4.0", - "ed25519-dalek 1.0.1", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select 0.12.1", - "once_cell", - "parking_lot", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink 0.3.0", - "sec1 0.3.0", - "sha2 0.10.8", - "smallvec", - "thiserror", - "unsigned-varint 0.7.2", + "libp2p-swarm", "void", - "zeroize", ] [[package]] @@ -5060,13 +4946,13 @@ dependencies = [ "libp2p-identity", "multiaddr 0.18.1", "multihash 0.19.1", - "multistream-select 0.13.0", + "multistream-select", "once_cell", "parking_lot", "pin-project", "quick-protobuf", - "rand 0.8.5", - "rw-stream-sink 0.4.0", + "rand", + "rw-stream-sink", "serde", "smallvec", "thiserror", @@ -5084,7 +4970,7 @@ dependencies = [ "async-trait", "futures", "hickory-resolver", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "parking_lot", "smallvec", @@ -5105,16 +4991,16 @@ dependencies = [ "fnv", "futures", "futures-ticker", - "getrandom 0.2.11", + "getrandom", "hex_fmt", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", + "libp2p-swarm", "prometheus-client", "quick-protobuf", "quick-protobuf-codec", - "rand 0.8.5", + "rand", "regex", "serde", "sha2 0.10.8", @@ -5135,9 +5021,9 @@ dependencies = [ "futures", "futures-bounded", "futures-timer", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", + "libp2p-swarm", "lru", "quick-protobuf", "quick-protobuf-codec", @@ -5154,13 +5040,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ "asn1_der", - "bs58 0.5.0", - "ed25519-dalek 2.1.0", + "bs58", + "ed25519-dalek", "hkdf", "libsecp256k1", "multihash 0.19.1", "quick-protobuf", - "rand 0.8.5", + "rand", "serde", "sha2 0.10.8", "thiserror", @@ -5182,12 +5068,12 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", + "libp2p-swarm", "quick-protobuf", "quick-protobuf-codec", - "rand 0.8.5", + "rand", "serde", "sha2 0.10.8", "smallvec", @@ -5208,10 +5094,10 @@ dependencies = [ "futures", "hickory-proto", "if-watch", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", - "rand 0.8.5", + "libp2p-swarm", + "rand", "smallvec", "socket2 0.5.5", "tokio", @@ -5227,13 +5113,13 @@ checksum = "fdac91ae4f291046a3b2660c039a2830c931f84df2ee227989af92f7692d3357" dependencies = [ "futures", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-gossipsub", "libp2p-identify", "libp2p-identity", "libp2p-kad", "libp2p-ping", - "libp2p-swarm 0.44.0", + "libp2p-swarm", "pin-project", "prometheus-client", ] @@ -5246,15 +5132,15 @@ checksum = "8ecd0545ce077f6ea5434bcb76e8d0fe942693b4380aaad0d34a358c2bd05793" dependencies = [ "asynchronous-codec 0.7.0", "bytes", - "curve25519-dalek 4.1.1", + "curve25519-dalek", "futures", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "multiaddr 0.18.1", "multihash 0.19.1", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", @@ -5274,10 +5160,10 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", - "rand 0.8.5", + "libp2p-swarm", + "rand", "tracing", "void", ] @@ -5291,7 +5177,7 @@ dependencies = [ "asynchronous-codec 0.6.2", "bytes", "futures", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "quick-protobuf", "quick-protobuf-codec", @@ -5308,12 +5194,12 @@ dependencies = [ "futures", "futures-timer", "if-watch", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "libp2p-tls", "parking_lot", "quinn", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustls 0.21.9", "socket2 0.5.5", @@ -5322,24 +5208,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "libp2p-request-response" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" -dependencies = [ - "async-trait", - "bytes", - "futures", - "instant", - "libp2p-core 0.38.0", - "libp2p-swarm 0.41.1", - "log", - "rand 0.8.5", - "smallvec", - "unsigned-varint 0.7.2", -] - [[package]] name = "libp2p-request-response" version = "0.26.0" @@ -5351,35 +5219,15 @@ dependencies = [ "futures-bounded", "futures-timer", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", - "libp2p-swarm 0.44.0", - "rand 0.8.5", + "libp2p-swarm", + "rand", "smallvec", "tracing", "void", ] -[[package]] -name = "libp2p-swarm" -version = "0.41.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" -dependencies = [ - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "libp2p-core 0.38.0", - "log", - "pin-project", - "rand 0.8.5", - "smallvec", - "thiserror", - "void", -] - [[package]] name = "libp2p-swarm" version = "0.44.0" @@ -5391,12 +5239,12 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "libp2p-swarm-derive", - "multistream-select 0.13.0", + "multistream-select", "once_cell", - "rand 0.8.5", + "rand", "smallvec", "tokio", "tracing", @@ -5425,7 +5273,7 @@ dependencies = [ "futures-timer", "if-watch", "libc", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "socket2 0.5.5", "tokio", @@ -5440,7 +5288,7 @@ checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.41.2", + "libp2p-core", "libp2p-identity", "rcgen", "ring 0.16.20", @@ -5460,8 +5308,8 @@ dependencies = [ "futures", "futures-timer", "igd-next", - "libp2p-core 0.41.2", - "libp2p-swarm 0.44.0", + "libp2p-core", + "libp2p-swarm", "tokio", "tracing", "void", @@ -5474,7 +5322,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "751f4778f71bc3db1ccf2451e7f4484463fec7f00c1ac2680e39c8368c23aae8" dependencies = [ "futures", - "libp2p-core 0.41.2", + "libp2p-core", "thiserror", "tracing", "yamux", @@ -5520,7 +5368,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -5826,11 +5674,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" dependencies = [ "core2", - "digest 0.10.7", "multihash-derive", "serde", "serde-big-array", - "sha2 0.10.8", + "unsigned-varint 0.7.2", +] + +[[package]] +name = "multihash" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +dependencies = [ + "core2", + "multihash-derive", "unsigned-varint 0.7.2", ] @@ -5846,7 +5703,7 @@ dependencies = [ "digest 0.10.7", "multihash-derive", "quickcheck", - "rand 0.8.5", + "rand", "ripemd", "serde", "serde-big-array", @@ -5880,26 +5737,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "multistream-select" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" -dependencies = [ - "bytes", - "futures", - "log", - "pin-project", - "smallvec", - "unsigned-varint 0.7.2", -] - [[package]] name = "multistream-select" version = "0.13.0" @@ -6428,7 +6265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -6439,7 +6276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -6454,7 +6291,7 @@ dependencies = [ "group 0.13.0", "hex", "lazy_static", - "rand 0.8.5", + "rand", "serde", "static_assertions", "subtle", @@ -6658,7 +6495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared 0.11.2", - "rand 0.8.5", + "rand", ] [[package]] @@ -6826,16 +6663,6 @@ dependencies = [ "yansi", ] -[[package]] -name = "prettyplease" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" -dependencies = [ - "proc-macro2", - "syn 1.0.109", -] - [[package]] name = "prettyplease" version = "0.2.15" @@ -6981,8 +6808,8 @@ dependencies = [ "bitflags 2.4.1", "lazy_static", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_xorshift", "regex-syntax 0.8.2", "unarray", @@ -6998,28 +6825,6 @@ dependencies = [ "prost-derive", ] -[[package]] -name = "prost-build" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" -dependencies = [ - "bytes", - "heck 0.4.1", - "itertools 0.10.5", - "lazy_static", - "log", - "multimap", - "petgraph", - "prettyplease 0.1.25", - "prost", - "prost-types", - "regex", - "syn 1.0.109", - "tempfile", - "which", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -7093,7 +6898,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ "env_logger 0.8.4", "log", - "rand 0.8.5", + "rand", ] [[package]] @@ -7132,7 +6937,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.21.9", @@ -7170,19 +6975,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -7190,18 +6982,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -7211,16 +6993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -7229,16 +7002,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -7247,7 +7011,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -7256,7 +7020,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" dependencies = [ - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -7306,7 +7070,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom", "libredox", "thiserror", ] @@ -7472,7 +7236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7691,17 +7455,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "rw-stream-sink" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" -dependencies = [ - "futures", - "pin-project", - "static_assertions", -] - [[package]] name = "rw-stream-sink" version = "0.4.0" @@ -8145,7 +7898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -8155,7 +7908,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -8231,8 +7984,8 @@ dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", + "curve25519-dalek", + "rand_core", "ring 0.17.7", "rustc_version", "sha2 0.10.8", @@ -8351,8 +8104,8 @@ dependencies = [ "memmap2", "merkletree", "num_cpus", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rayon", "semver", "serde", @@ -8678,7 +8431,7 @@ checksum = "a1b58bdb6c44a2621b8b6bd0585d5912ba32546317604130a42410bcc813ef16" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.3", + "ed25519", "ed25519-consensus", "flex-error", "futures", @@ -8709,7 +8462,7 @@ checksum = "7c35fe4fd24a7715571814c22416dbc40ec0f2a6e3cce75d73e19699faecd246" dependencies = [ "bytes", "digest 0.10.7", - "ed25519 2.2.3", + "ed25519", "ed25519-consensus", "flex-error", "futures", @@ -8805,7 +8558,7 @@ dependencies = [ "bytes", "flex-error", "futures", - "getrandom 0.2.11", + "getrandom", "http", "hyper", "hyper-proxy", @@ -9182,7 +8935,7 @@ dependencies = [ "indexmap 1.9.3", "pin-project", "pin-project-lite", - "rand 0.8.5", + "rand", "slab", "tokio", "tokio-util 0.7.10", @@ -9378,7 +9131,7 @@ dependencies = [ "httparse", "log", "native-tls", - "rand 0.8.5", + "rand", "rustls 0.20.9", "sha1", "thiserror", @@ -9399,7 +9152,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "rustls 0.21.9", "sha1", "thiserror", @@ -9558,7 +9311,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.11", + "getrandom", "serde", ] @@ -9605,8 +9358,8 @@ dependencies = [ "fvm_shared", "num-derive 0.3.3", "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "serde", ] @@ -9641,12 +9394,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9937,7 +9684,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand 0.8.5", + "rand", "rustix", "sptr", "wasm-encoder 0.31.1", @@ -10016,18 +9763,6 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "widestring" version = "1.0.2" @@ -10269,8 +10004,8 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.1", - "rand_core 0.6.4", + "curve25519-dalek", + "rand_core", "serde", "zeroize", ] @@ -10340,7 +10075,7 @@ dependencies = [ "nohash-hasher", "parking_lot", "pin-project", - "rand 0.8.5", + "rand", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index 8198d03b4..001c96003 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,9 +59,8 @@ im = "15.1.0" jsonrpc-v2 = { version = "0.11", default-features = false, features = ["bytes-v10"] } k256 = "0.11" # Same as tendermint-rs lazy_static = "1.4" -libipld = { version = "0.14", default-features = false, features = ["dag-cbor"] } +libipld = { version = "0.15.0", default-features = false, features = ["dag-cbor"] } libp2p = { version = "0.53", default-features = false } -libp2p-bitswap = "0.25.1" lru_time_cache = "0.11" merkle-tree-rs = "0.1.0" multiaddr = "0.16" @@ -128,6 +127,10 @@ fvm_ipld_car = "0.7.1" fvm_ipld_encoding = "0.4.0" fvm_ipld_hamt = "0.8.0" +# Using our fork of bitswap +libp2p-bitswap = { git = "https://github.com/consensus-shipyard/libp2p-bitswap", branch = "chore-upgrade-libp2p"} +# libp2p-bitswap = { path = "../libp2p-bitswap" } + # Local FVM debuggin # fvm = { path = "../ref-fvm/fvm", default-features = false } # fvm_ipld_blockstore = { path = "../ref-fvm/ipld/blockstore" } diff --git a/ipc/ipld-resolver/Cargo.toml b/ipc/ipld-resolver/Cargo.toml index d7ed5e1dc..03bd8c254 100644 --- a/ipc/ipld-resolver/Cargo.toml +++ b/ipc/ipld-resolver/Cargo.toml @@ -31,7 +31,7 @@ libp2p = { workspace = true, default-features = false, features = [ "secp256k1", "plaintext", ] } -libp2p-bitswap = "0.25.1" +libp2p-bitswap = { workspace = true } log = { workspace = true } prometheus = { workspace = true } quickcheck = { workspace = true, optional = true } diff --git a/ipc/ipld-resolver/src/behaviour/content.rs b/ipc/ipld-resolver/src/behaviour/content.rs index 877862bd3..a9e4dd7bf 100644 --- a/ipc/ipld-resolver/src/behaviour/content.rs +++ b/ipc/ipld-resolver/src/behaviour/content.rs @@ -84,7 +84,7 @@ pub struct Behaviour { /// on the address, and not on the peer ID which they can change easily. peer_addresses: HashMap, /// Limit the amount of data served by remote address. - rate_limiter: RateLimiter, + rate_limiter: RateLimiter, /* T: */ rate_limit_period: Duration, rate_limit: Option, outbox: VecDeque, @@ -183,6 +183,32 @@ impl NetworkBehaviour for Behaviour

{ type ConnectionHandler = as NetworkBehaviour>::ConnectionHandler; type ToSwarm = Event; + fn handle_established_inbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + local_addr: &Multiaddr, + remote_addr: &Multiaddr, + ) -> Result, ConnectionDenied> { + self.inner.handle_established_inbound_connection( + connection_id, + peer, + local_addr, + remote_addr, + ) + } + + fn handle_established_outbound_connection( + &mut self, + connection_id: ConnectionId, + peer: PeerId, + addr: &Multiaddr, + role_override: Endpoint, + ) -> Result, ConnectionDenied> { + self.inner + .handle_established_outbound_connection(connection_id, peer, addr, role_override) + } + fn on_swarm_event(&mut self, event: FromSwarm) { // Store the remote address. match &event { @@ -283,21 +309,6 @@ impl NetworkBehaviour for Behaviour

{ Poll::Pending } - fn handle_established_inbound_connection( - &mut self, - connection_id: ConnectionId, - peer: PeerId, - local_addr: &Multiaddr, - remote_addr: &Multiaddr, - ) -> Result, ConnectionDenied> { - self.inner.handle_established_inbound_connection( - connection_id, - peer, - local_addr, - remote_addr, - ) - } - fn handle_pending_outbound_connection( &mut self, connection_id: ConnectionId, diff --git a/ipc/ipld-resolver/src/behaviour/mod.rs b/ipc/ipld-resolver/src/behaviour/mod.rs index a94339761..4d974637f 100644 --- a/ipc/ipld-resolver/src/behaviour/mod.rs +++ b/ipc/ipld-resolver/src/behaviour/mod.rs @@ -57,11 +57,18 @@ pub struct Behaviour { content: content::Behaviour

, } +// impl

StoreParams for StoreWrapper

{ +// const MAX_BLOCK_SIZE: usize = 1_048_576; +// type Codecs = libipld::IpldCodec; +// type Hashes = libipld::multihash::Code; +// } + // Unfortunately by using `#[derive(NetworkBehaviour)]` we cannot easily inspects events // from the inner behaviours, e.g. we cannot poll a behaviour and if it returns something // of interest then call a method on another behaviour. We can do this in yet another wrapper // where we manually implement `NetworkBehaviour`, or the outer service where we drive the // Swarm; there we are free to call any of the behaviours as well as the Swarm. +// impl NetworkBehaviour for Behaviour

{} impl Behaviour

{ pub fn new( diff --git a/ipc/ipld-resolver/src/limiter.rs b/ipc/ipld-resolver/src/limiter.rs index 1f4237b51..69720cdb6 100644 --- a/ipc/ipld-resolver/src/limiter.rs +++ b/ipc/ipld-resolver/src/limiter.rs @@ -1,89 +1,94 @@ // Copyright 2022-2023 Protocol Labs // SPDX-License-Identifier: MIT -use std::hash::Hash; -use std::time::{Duration, Instant}; +use std::time::Duration; -use gcra::GcraState; +// use gcra::GcraState; +// use std::hash::Hash; pub use gcra::RateLimit; -use libp2p::gossipsub::TimeCache; +// FIXME: In 0.44.4 TimeCache is private, so we can't expose it directly +// use libp2p::gossipsub::TimeCache; /// Track the rate limit of resources (e.g. bytes) consumed per key. /// /// Forgets keys after long periods of inactivity. -pub struct RateLimiter { +pub struct RateLimiter /**/ { // `TimeCache` uses `Instant::now()` internally. // It's less testable than `gcra` which allows the time to be passed in, // but it's only used for cleaning up, so it should be okay. - cache: TimeCache, + // cache: TimeCache, } -impl RateLimiter +// FIXME: RateLimiter does nothing right now, it couldn't be properly +// implemented without the TimeCache +impl RateLimiter +/* where K: Eq + Hash + Clone, +*/ { pub fn new(ttl: Duration) -> Self { Self { - cache: TimeCache::new(ttl), + // cache: TimeCache::new(ttl), } } - /// Try to add a certain amount of resources consumed to a key. - /// - /// Return `true` if the key was within limits, `false` if it needs to wait. - /// - /// The [`RateLimit`] is passed in so that we can update it dynamically - /// based on how much data we anticipate we will have to serve. - pub fn add(&mut self, limit: &RateLimit, key: K, cost: u32) -> bool { - self.add_at(limit, key, cost, Instant::now()) - } + // /// Try to add a certain amount of resources consumed to a key. + // /// + // /// Return `true` if the key was within limits, `false` if it needs to wait. + // /// + // /// The [`RateLimit`] is passed in so that we can update it dynamically + // /// based on how much data we anticipate we will have to serve. + // pub fn add(&mut self, limit: &RateLimit, key: K, cost: u32) -> bool { + // self.add_at(limit, key, cost, Instant::now()) + // } - /// Same as [`RateLimiter::add`] but allows passing in the time, for testing. - pub fn add_at(&mut self, limit: &RateLimit, key: K, cost: u32, at: Instant) -> bool { - #[allow(clippy::unwrap_or_default)] - let state = self.cache.entry(key).or_insert_with(GcraState::default); + // /// Same as [`RateLimiter::add`] but allows passing in the time, for testing. + // pub fn add_at(&mut self, limit: &RateLimit, key: K, cost: u32, at: Instant) -> bool { + // #[allow(clippy::unwrap_or_default)] + // let state = self.cache.entry(key).or_insert_with(GcraState::default); - state.check_and_modify_at(limit, at, cost).is_ok() - } + // state.check_and_modify_at(limit, at, cost).is_ok() + // } } -#[cfg(test)] -mod tests { - use std::time::{Duration, Instant}; +// #[cfg(test)] +// mod tests { +// use std::time::{Duration, Instant}; - use super::{RateLimit, RateLimiter}; +// use super::{RateLimit, RateLimiter}; - #[test] - fn basics() { - // 10Mb per hour. - let one_hour = Duration::from_secs(60 * 60); - let rate_limit = RateLimit::new(10 * 1024 * 1024, one_hour); - let mut rate_limiter = RateLimiter::<&'static str>::new(one_hour); +// #[test] +// fn basics() { +// // 10Mb per hour. +// let one_hour = Duration::from_secs(60 * 60); +// let rate_limit = RateLimit::new(10 * 1024 * 1024, one_hour); +// let mut rate_limiter = RateLimiter::<&'static str>::new(one_hour); - assert!(rate_limiter.add(&rate_limit, "foo", 1024)); - assert!(rate_limiter.add(&rate_limit, "foo", 5 * 1024 * 1024)); - assert!( - !rate_limiter.add(&rate_limit, "foo", 5 * 1024 * 1024), - "can't over consume" - ); - assert!( - rate_limiter.add(&rate_limit, "bar", 5 * 1024 * 1024), - "others can consume" - ); +// assert!(rate_limiter.add(&rate_limit, "foo", 1024)); +// assert!(rate_limiter.add(&rate_limit, "foo", 5 * 1024 * 1024)); +// assert!( +// !rate_limiter.add(&rate_limit, "foo", 5 * 1024 * 1024), +// "can't over consume" +// ); +// assert!( +// rate_limiter.add(&rate_limit, "bar", 5 * 1024 * 1024), +// "others can consume" +// ); - assert!( - rate_limiter.add_at( - &rate_limit, - "foo", - 5 * 1024 * 1024, - Instant::now() + one_hour + Duration::from_secs(1) - ), - "can consume again in the future" - ); +// assert!( +// rate_limiter.add_at( +// &rate_limit, +// "foo", +// 5 * 1024 * 1024, +// Instant::now() + one_hour + Duration::from_secs(1) +// ), +// "can consume again in the future" +// ); - let rate_limit = RateLimit::new(50 * 1024 * 1024, one_hour); - assert!( - rate_limiter.add(&rate_limit, "bar", 15 * 1024 * 1024), - "can raise quota" - ); - } -} +// let rate_limit = RateLimit::new(50 * 1024 * 1024, one_hour); +// assert!( +// rate_limiter.add(&rate_limit, "bar", 15 * 1024 * 1024), +// "can raise quota" +// ); +// } +// } From 3546b49bf1586ec51f131b4300b12863171b37ca Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Sat, 9 Dec 2023 10:34:46 +0000 Subject: [PATCH 5/6] UPDATE: Workaround for the libp2p generics bug: manually defined event --- ipc/ipld-resolver/src/behaviour/mod.rs | 27 ++++++++++++++++++++++++++ ipc/ipld-resolver/src/service.rs | 7 ++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ipc/ipld-resolver/src/behaviour/mod.rs b/ipc/ipld-resolver/src/behaviour/mod.rs index 4d974637f..797a3543b 100644 --- a/ipc/ipld-resolver/src/behaviour/mod.rs +++ b/ipc/ipld-resolver/src/behaviour/mod.rs @@ -43,12 +43,39 @@ pub enum ConfigError { Membership(#[from] membership::ConfigError), } +// This would normally be created by the `NetworkBehaviour` macro, +// however it currently has a bug where it leaves out the `StoreParams` constraint. +macro_rules! behaviour_event { + ($($item:ident ( $event:ty )),+) => { + pub enum BehaviourEvent { + $($item($event)),+ + } + + $( + impl From<$event> for BehaviourEvent { + fn from(value: $event) -> Self { + Self::$item(value) + } + } + )+ + }; +} + +behaviour_event! { + Ping(ping::Event), + Identify(identify::Event), + Discovery(discovery::Event), + Membership(membership::Event), + Content(content::Event) +} + /// Libp2p behaviour bundle to manage content resolution from other subnets, using: /// /// * Kademlia for peer discovery /// * Gossipsub to advertise subnet membership /// * Bitswap to resolve CIDs #[derive(NetworkBehaviour)] +#[behaviour(to_swarm = "BehaviourEvent")] pub struct Behaviour { ping: ping::Behaviour, identify: identify::Behaviour, diff --git a/ipc/ipld-resolver/src/service.rs b/ipc/ipld-resolver/src/service.rs index 828ebf98e..f21293d9a 100644 --- a/ipc/ipld-resolver/src/service.rs +++ b/ipc/ipld-resolver/src/service.rs @@ -272,7 +272,7 @@ impl Service

{ } /// Handle events that the [`NetworkBehaviour`] for our [`Behaviour`] macro generated, one for each field. - fn handle_behaviour_event(&mut self, event: BehaviourEvent

) { + fn handle_behaviour_event(&mut self, event: BehaviourEvent) { match event { BehaviourEvent::Ping(e) => self.handle_ping_event(e), BehaviourEvent::Identify(e) => self.handle_identify_event(e), @@ -286,7 +286,7 @@ impl Service

{ fn handle_ping_event(&mut self, event: ping::Event) { let peer_id = event.peer.to_base58(); match event.result { - Ok(ping::Event::Success::Ping { rtt }) => { + Ok(rtt) => { stats::PING_SUCCESS.inc(); stats::PING_RTT.observe(rtt.as_millis() as f64); trace!( @@ -296,9 +296,6 @@ impl Service

{ rtt.as_millis() ); } - Ok(ping::Event::Success::Pong) => { - trace!("PingSuccess::Pong from {peer_id} to {}", self.peer_id); - } Err(ping::Failure::Timeout) => { stats::PING_TIMEOUT.inc(); debug!("PingFailure::Timeout from {peer_id} to {}", self.peer_id); From c2f1ff1ad57c027dd7dbae4b5b357e505f65e53d Mon Sep 17 00:00:00 2001 From: Akosh Farkash Date: Mon, 11 Dec 2023 12:56:38 +0000 Subject: [PATCH 6/6] UPDATE: Different workaround for the NetworkBehaviour derivation issue --- ipc/ipld-resolver/src/behaviour/mod.rs | 32 ++++---------------------- ipc/ipld-resolver/src/service.rs | 2 +- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/ipc/ipld-resolver/src/behaviour/mod.rs b/ipc/ipld-resolver/src/behaviour/mod.rs index 797a3543b..57e9dcd9c 100644 --- a/ipc/ipld-resolver/src/behaviour/mod.rs +++ b/ipc/ipld-resolver/src/behaviour/mod.rs @@ -43,40 +43,16 @@ pub enum ConfigError { Membership(#[from] membership::ConfigError), } -// This would normally be created by the `NetworkBehaviour` macro, -// however it currently has a bug where it leaves out the `StoreParams` constraint. -macro_rules! behaviour_event { - ($($item:ident ( $event:ty )),+) => { - pub enum BehaviourEvent { - $($item($event)),+ - } - - $( - impl From<$event> for BehaviourEvent { - fn from(value: $event) -> Self { - Self::$item(value) - } - } - )+ - }; -} - -behaviour_event! { - Ping(ping::Event), - Identify(identify::Event), - Discovery(discovery::Event), - Membership(membership::Event), - Content(content::Event) -} - /// Libp2p behaviour bundle to manage content resolution from other subnets, using: /// /// * Kademlia for peer discovery /// * Gossipsub to advertise subnet membership /// * Bitswap to resolve CIDs #[derive(NetworkBehaviour)] -#[behaviour(to_swarm = "BehaviourEvent")] -pub struct Behaviour { +pub struct Behaviour

+where + P: StoreParams, +{ ping: ping::Behaviour, identify: identify::Behaviour, discovery: discovery::Behaviour, diff --git a/ipc/ipld-resolver/src/service.rs b/ipc/ipld-resolver/src/service.rs index f21293d9a..7afdf2d8c 100644 --- a/ipc/ipld-resolver/src/service.rs +++ b/ipc/ipld-resolver/src/service.rs @@ -272,7 +272,7 @@ impl Service

{ } /// Handle events that the [`NetworkBehaviour`] for our [`Behaviour`] macro generated, one for each field. - fn handle_behaviour_event(&mut self, event: BehaviourEvent) { + fn handle_behaviour_event(&mut self, event: BehaviourEvent

) { match event { BehaviourEvent::Ping(e) => self.handle_ping_event(e), BehaviourEvent::Identify(e) => self.handle_identify_event(e),