From 6a5dc2d9cc012fcbc533fe802b920feae4a5ec70 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Fri, 15 Dec 2023 15:15:16 +0000 Subject: [PATCH 1/8] Use workspace dependencies in subcrates --- Cargo.lock | 124 +++++++++++++++++- Cargo.toml | 52 ++++++++ fvm/Cargo.toml | 40 +++--- ipld/amt/Cargo.toml | 20 +-- ipld/amt/fuzz/Cargo.toml | 19 +-- ipld/bitfield/Cargo.toml | 16 +-- ipld/blockstore/Cargo.toml | 2 +- ipld/car/Cargo.toml | 12 +- ipld/encoding/Cargo.toml | 16 +-- ipld/hamt/Cargo.toml | 29 ++-- ipld/hamt/fuzz/Cargo.toml | 10 +- ipld/kamt/Cargo.toml | 26 ++-- ipld/kamt/fuzz/Cargo.toml | 18 +-- sdk/Cargo.toml | 14 +- shared/Cargo.toml | 44 +++---- testing/calibration/shared/Cargo.toml | 10 +- testing/common_fuzz/fuzz/Cargo.toml | 18 +-- testing/conformance/Cargo.toml | 28 ++-- testing/integration/Cargo.toml | 40 +++--- .../actors/fil-address-actor/Cargo.toml | 6 +- .../actors/fil-create-actor/Cargo.toml | 4 +- .../actors/fil-events-actor/Cargo.toml | 10 +- .../actors/fil-exit-data-actor/Cargo.toml | 6 +- .../fil-gas-calibration-actor/Cargo.toml | 16 +-- .../actors/fil-gaslimit-actor/Cargo.toml | 12 +- .../actors/fil-hello-world-actor/Cargo.toml | 4 +- .../fil-integer-overflow-actor/Cargo.toml | 14 +- .../actors/fil-ipld-actor/Cargo.toml | 6 +- .../fil-malformed-syscall-actor/Cargo.toml | 4 +- .../actors/fil-oom-actor/Cargo.toml | 4 +- .../actors/fil-readonly-actor/Cargo.toml | 6 +- .../actors/fil-sself-actor/Cargo.toml | 6 +- .../fil-stack-overflow-actor/Cargo.toml | 4 +- .../actors/fil-syscall-actor/Cargo.toml | 8 +- .../actors/fil-upgrade-actor/Cargo.toml | 10 +- .../fil-upgrade-receive-actor/Cargo.toml | 10 +- tools/fvm-bench/Cargo.toml | 10 +- 37 files changed, 419 insertions(+), 259 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23fe3ae9e..790702175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,17 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.3" @@ -409,6 +420,19 @@ 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" @@ -2882,7 +2906,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash", + "ahash 0.8.3", ] [[package]] @@ -3057,6 +3081,30 @@ dependencies = [ "memchr", ] +[[package]] +name = "ipld_amt_fuzz" +version = "0.0.0" +dependencies = [ + "ahash 0.7.7", + "arbitrary", + "cid 0.10.1", + "fvm_ipld_amt 0.6.2", + "fvm_ipld_blockstore 0.2.0", + "itertools 0.11.0", + "libfuzzer-sys", +] + +[[package]] +name = "ipld_kamt-fuzz" +version = "0.0.0" +dependencies = [ + "ahash 0.7.7", + "arbitrary", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_kamt 0.3.0", + "libfuzzer-sys", +] + [[package]] name = "is-terminal" version = "0.4.9" @@ -3184,6 +3232,17 @@ version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +[[package]] +name = "libfuzzer-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +dependencies = [ + "arbitrary", + "cc", + "once_cell", +] + [[package]] name = "libipld" version = "0.16.0" @@ -3191,13 +3250,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1ccd6b8ffb3afee7081fcaec00e1b099fd1c7ccf35ba5729d88538fcc3b4599" dependencies = [ "fnv", + "libipld-cbor", + "libipld-cbor-derive", "libipld-core 0.16.0", + "libipld-json", "libipld-macro", + "libipld-pb", "log", "multihash 0.18.1", "thiserror", ] +[[package]] +name = "libipld-cbor" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77d98c9d1747aa5eef1cf099cd648c3fd2d235249f5fed07522aaebc348e423b" +dependencies = [ + "byteorder", + "libipld-core 0.16.0", + "thiserror", +] + +[[package]] +name = "libipld-cbor-derive" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5ba3a729b72973e456a1812b0afe2e176a376c1836cc1528e9fc98ae8cb838" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "libipld-core" version = "0.13.1" @@ -3228,6 +3315,18 @@ dependencies = [ "thiserror", ] +[[package]] +name = "libipld-json" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25856def940047b07b25c33d4e66d248597049ab0202085215dc4dca0487731c" +dependencies = [ + "libipld-core 0.16.0", + "multihash 0.18.1", + "serde", + "serde_json", +] + [[package]] name = "libipld-macro" version = "0.16.0" @@ -3237,6 +3336,18 @@ dependencies = [ "libipld-core 0.16.0", ] +[[package]] +name = "libipld-pb" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f2d0f866c4cd5dc9aa8068c429ba478d2882a3a4b70ab56f7e9a0eddf5d16f" +dependencies = [ + "bytes", + "libipld-core 0.16.0", + "quick-protobuf", + "thiserror", +] + [[package]] name = "libsecp256k1" version = "0.7.1" @@ -3443,6 +3554,8 @@ checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" dependencies = [ "arbitrary", "blake2b_simd", + "blake2s_simd 1.0.2", + "blake3", "core2", "digest 0.10.7", "multihash-derive", @@ -3904,6 +4017,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quickcheck" version = "1.0.3" diff --git a/Cargo.toml b/Cargo.toml index ebb8457bb..d7acd283f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,66 @@ members = [ "testing/integration", "testing/calibration/shared", "ipld/*", + "ipld/amt/fuzz", + "ipld/kamt/fuzz", "testing/test_actors", "testing/test_actors/actors/*", "tools/fvm-bench", ] [workspace.dependencies] +# common +serde = { version = "1.0.164", features = ["derive"] } +thiserror = "1.0.40" +anyhow = "1.0.71" +rand = "0.8.5" +rand_chacha = "0.3.0" +serde_json = "1.0.99" +serde_tuple = "0.5.0" +byteorder = "1.4.3" +hex = "0.4.3" +num-traits = "0.2.14" +num-derive = "0.4.0" +lazy_static = "1.4.0" +log = "0.4.19" +futures = "0.3.28" + +# IPLD/Encoding cid = { version = "0.10.1", default-features = false } multihash = { version = "0.18.1", default-features = false } +libipld = { version = "0.16.0", features = ["serde-codec"] } +libipld-core = { version = "0.16.0", features = ["serde-codec"] } + +# crypto +blake2b_simd = "1.0.1" +libsecp256k1 = { version = "0.7.1" } +bls-signatures = { version = "0.15", default-features = false } + +# misc +libfuzzer-sys = "0.4" +arbitrary = "1.3.0" +ahash = "0.7.6" +itertools = "0.11.0" +once_cell = "1.18.0" +unsigned-varint = "0.7.2" + +# dev/tools/tests +criterion = "0.5.1" +quickcheck = "1.0.0" +quickcheck_macros = "1.0.0" +minstant = "0.1.3" + +# workspace +fvm = { path = "fvm" } +fvm_sdk = { path = "sdk" } +fvm_ipld_amt = { path = "ipld/amt" } +fvm_ipld_hamt = { path = "ipld/hamt" } +fvm_ipld_kamt = { path = "ipld/kamt" } +fvm_ipld_car = { path = "ipld/car" } +fvm_ipld_blockstore = { path = "ipld/blockstore" } +fvm_ipld_bitfield = { path = "ipld/bitfield" } +fvm_ipld_encoding = { path = "ipld/encoding" } +fvm_shared = { path = "shared" } [profile.actor] inherits = "release" diff --git a/fvm/Cargo.toml b/fvm/Cargo.toml index b7fc3cb42..f9f49e533 100644 --- a/fvm/Cargo.toml +++ b/fvm/Cargo.toml @@ -12,40 +12,40 @@ keywords = ["filecoin", "web3", "wasm"] crate-type = ["lib"] [dependencies] -anyhow = { version = "1.0.71", features = ["backtrace"] } -thiserror = "1.0.40" -num-traits = "0.2" +anyhow = { workspace = true, features = ["backtrace"] } +thiserror = { workspace = true } +num-traits = { workspace = true } cid = { workspace = true, features = ["serde-codec"] } multihash = { workspace = true, features = ["sha2", "sha3", "ripemd"] } -fvm_shared = { version = "4.0.0", path = "../shared", features = ["crypto"] } -fvm_ipld_hamt = { version = "0.9.0", path = "../ipld/hamt" } -fvm_ipld_amt = { version = "0.6.2", path = "../ipld/amt" } -fvm_ipld_blockstore = { version = "0.2.0", path = "../ipld/blockstore" } -fvm_ipld_encoding = { version = "0.4.0", path = "../ipld/encoding" } -serde = { version = "1.0", features = ["derive"] } -serde_tuple = "0.5" -lazy_static = "1.4.0" +fvm_shared = { workspace = true, features = ["crypto"] } +fvm_ipld_hamt = { workspace = true } +fvm_ipld_amt = { workspace = true } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } +serde = { workspace = true } +serde_tuple = { workspace = true } +lazy_static = { workspace = true } +log = { workspace = true } +arbitrary = { workspace = true, optional = true, features = ["derive"] } +rand = { workspace = true } +quickcheck = { workspace = true, optional = true } +once_cell = { workspace = true } +minstant = { workspace = true } +blake2b_simd = { workspace = true } +byteorder = { workspace = true } derive_more = "0.99.17" replace_with = "0.1.7" filecoin-proofs-api = { version = "16", default-features = false } rayon = "1" num_cpus = "1.15.0" -log = "0.4.19" fvm-wasm-instrument = "0.4.0" yastl = "0.1.2" -arbitrary = { version = "1.3.0", optional = true, features = ["derive"] } -rand = "0.8.5" -quickcheck = { version = "1", optional = true } -once_cell = "1.18" -minstant = "0.1.2" -blake2b_simd = "1.0.0" -byteorder = "1.4.3" static_assertions = "1.1.0" ambassador = "0.3.5" [dev-dependencies] pretty_assertions = "1.3.0" -fvm = { path = ".", features = ["testing"], default-features = false } +fvm = { workspace = true, features = ["testing"], default-features = false } [dependencies.wasmtime] version = "12.0.2" diff --git a/ipld/amt/Cargo.toml b/ipld/amt/Cargo.toml index cf14e9721..c0a783a0c 100644 --- a/ipld/amt/Cargo.toml +++ b/ipld/amt/Cargo.toml @@ -9,18 +9,18 @@ repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] cid = { workspace = true, features = ["serde-codec"] } -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0" -once_cell = "1.18" -itertools = "0.11" -anyhow = "1.0.71" -fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" } -fvm_ipld_encoding = { version = "0.4", path = "../encoding" } +serde = { workspace = true, features = ["derive"] } +thiserror = { workspace = true } +once_cell = { workspace = true } +itertools = { workspace = true } +anyhow = { workspace = true } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } [dev-dependencies] -criterion = "0.5.1" -quickcheck = "1" -quickcheck_macros = "1" +criterion = { workspace = true } +quickcheck = { workspace = true } +quickcheck_macros = { workspace = true } [[bench]] name = "amt_benchmark" diff --git a/ipld/amt/fuzz/Cargo.toml b/ipld/amt/fuzz/Cargo.toml index d535f21b6..082d9a841 100644 --- a/ipld/amt/fuzz/Cargo.toml +++ b/ipld/amt/fuzz/Cargo.toml @@ -9,21 +9,14 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" -arbitrary = { version = "1.1", features = ["derive"] } -ahash = "0.7.6" -itertools = "0.10.3" +libfuzzer-sys = { workspace = true } +arbitrary = { workspace = true, features = ["derive"] } +ahash = { workspace = true } +itertools = { workspace = true } cid = { workspace = true, features = ["serde-codec", "arb", "std"] } -fvm_ipld_amt = { path = ".."} -fvm_ipld_blockstore = { path = "../../blockstore" } - -# Prevent this from interfering with workspaces -[workspace] -members = ["."] - -[workspace.dependencies] -cid = "0.10.1" +fvm_ipld_amt = { workspace = true } +fvm_ipld_blockstore = { workspace = true } [[bin]] name = "equivalence" diff --git a/ipld/bitfield/Cargo.toml b/ipld/bitfield/Cargo.toml index 57f318c4d..2f21581ff 100644 --- a/ipld/bitfield/Cargo.toml +++ b/ipld/bitfield/Cargo.toml @@ -8,17 +8,17 @@ edition = "2021" repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -unsigned-varint = "0.7.1" -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0.40" -arbitrary = { version = "1.3.0", optional = true} -fvm_ipld_encoding = { version = "0.4", path = "../encoding" } +unsigned-varint = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +arbitrary = { workspace = true, optional = true} +fvm_ipld_encoding = { workspace = true } [dev-dependencies] +rand = { workspace = true } +criterion = { workspace = true } +serde_json = { workspace = true } rand_xorshift = "0.3.0" -rand = "0.8.5" -criterion = "0.5" -serde_json = "1.0" gperftools = "0.2.0" [features] diff --git a/ipld/blockstore/Cargo.toml b/ipld/blockstore/Cargo.toml index f2fa68486..39fa68630 100644 --- a/ipld/blockstore/Cargo.toml +++ b/ipld/blockstore/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] cid = { workspace = true, features = ["serde-codec", "std"] } -anyhow = "1.0.71" +anyhow = { workspace = true } # multihash is also re-exported by `cid`. Having `multihash` here as a # depdendency is needed to enable the features of the re-export. multihash = { workspace = true, features = ["multihash-impl"] } diff --git a/ipld/car/Cargo.toml b/ipld/car/Cargo.toml index 1ee727365..847abab8c 100644 --- a/ipld/car/Cargo.toml +++ b/ipld/car/Cargo.toml @@ -9,12 +9,12 @@ repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] cid = { workspace = true } -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0" -futures = "0.3.28" -fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" } -fvm_ipld_encoding = { version = "0.4", path = "../encoding" } -unsigned-varint = { version = "0.7.2", features = ["futures"] } +serde = { workspace = true } +thiserror = { workspace = true } +unsigned-varint = { workspace = true, features = ["futures"] } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } +futures = { workspace = true } [dev-dependencies] async-std = { version = "1.12", features = ["attributes"] } diff --git a/ipld/encoding/Cargo.toml b/ipld/encoding/Cargo.toml index 51b34c707..e26664b53 100644 --- a/ipld/encoding/Cargo.toml +++ b/ipld/encoding/Cargo.toml @@ -8,20 +8,20 @@ edition = "2021" repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_ipld_dagcbor = "0.4.0" -serde_tuple = "0.5" -serde_repr = "0.1" +serde = { workspace = true } +serde_tuple = { workspace = true } cid = { workspace = true, features = ["serde-codec", "std"] } -thiserror = "1.0" -anyhow = "1.0.71" -fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" } +thiserror = { workspace = true } +anyhow = { workspace = true } +fvm_ipld_blockstore = { workspace = true } # multihash is also re-exported by `cid`. Having `multihash` here as a # depdendency is needed to enable the features of the re-export. multihash = { workspace = true, features = ["blake2b", "multihash-impl"] } +serde_ipld_dagcbor = "0.4.0" +serde_repr = "0.1" [features] default = [] [dev-dependencies] -serde_json = "1.0.99" +serde_json = { workspace = true } diff --git a/ipld/hamt/Cargo.toml b/ipld/hamt/Cargo.toml index 25f95066e..42f382075 100644 --- a/ipld/hamt/Cargo.toml +++ b/ipld/hamt/Cargo.toml @@ -8,29 +8,30 @@ edition = "2021" repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -serde = { version = "1.0", features = ["derive"] } -byteorder = "1.4.3" +serde = { workspace = true } +byteorder = { workspace = true } cid = { workspace = true, features = ["serde-codec"] } multihash = { workspace = true } -thiserror = "1.0" +thiserror = { workspace = true } +once_cell = { workspace = true } +anyhow = { workspace = true } +fvm_ipld_encoding = { workspace = true } +fvm_ipld_blockstore = { workspace = true } sha2 = "0.10" -once_cell = "1.18" forest_hash_utils = "0.1" -anyhow = "1.0.71" -libipld-core = { version = "0.16.0", features = ["serde-codec"] } -fvm_ipld_encoding = { version = "0.4", path = "../encoding" } -fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" } +libipld-core = { workspace = true } + [features] identity = [] [dev-dependencies] -hex = "0.4.3" -criterion = "0.5.1" -unsigned-varint = "0.7" -quickcheck = "1" -quickcheck_macros = "1" -rand = "0.8.5" +hex = { workspace = true } +criterion = { workspace = true } +unsigned-varint = { workspace = true } +quickcheck = { workspace = true } +quickcheck_macros = { workspace = true } +rand = { workspace = true } [[bench]] name = "hamt_beckmark" diff --git a/ipld/hamt/fuzz/Cargo.toml b/ipld/hamt/fuzz/Cargo.toml index 4e05936b4..4a3aaaa30 100644 --- a/ipld/hamt/fuzz/Cargo.toml +++ b/ipld/hamt/fuzz/Cargo.toml @@ -9,12 +9,12 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" -arbitrary = { version = "1.1", features = ["derive"] } -ahash = "0.7.6" +libfuzzer-sys = { workspace = true } +arbitrary = { workspace = true, features = ["derive"] } +ahash = { workspace = true } -fvm_ipld_hamt = { path = ".." } -fvm_ipld_blockstore = { path = "../../blockstore" } +fvm_ipld_hamt = { workspace = true } +fvm_ipld_blockstore = { workspace = true } # Prevent this from interfering with workspaces diff --git a/ipld/kamt/Cargo.toml b/ipld/kamt/Cargo.toml index 52a7be21d..e740fc198 100644 --- a/ipld/kamt/Cargo.toml +++ b/ipld/kamt/Cargo.toml @@ -8,28 +8,28 @@ edition = "2021" repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -serde = { version = "1.0", features = ["derive"] } -byteorder = "1.4.3" +serde = { workspace = true } +byteorder = { workspace = true } cid = { workspace = true, features = ["serde-codec"] } multihash = { workspace = true } -thiserror = "1.0" -once_cell = "1.18" +thiserror = { workspace = true } +once_cell = { workspace = true } +anyhow = { workspace = true } +fvm_ipld_encoding = { workspace = true } +fvm_ipld_blockstore = { workspace = true } forest_hash_utils = "0.1" -anyhow = "1.0.71" -fvm_ipld_encoding = { version = "0.4", path = "../encoding" } -fvm_ipld_blockstore = { version = "0.2", path = "../blockstore" } [features] # This feature should just be used for testing (ignoring links that don't exist in store) ignore-dead-links = [] [dev-dependencies] -hex = "0.4.3" -criterion = "0.5.1" -unsigned-varint = "0.7" -quickcheck = "1" -quickcheck_macros = "1" -rand = "0.8.5" +hex = { workspace = true } +criterion = { workspace = true } +unsigned-varint = { workspace = true } +quickcheck = { workspace = true } +quickcheck_macros = { workspace = true } +rand = { workspace = true } [[bench]] name = "kamt_benchmark" diff --git a/ipld/kamt/fuzz/Cargo.toml b/ipld/kamt/fuzz/Cargo.toml index 93a58f12d..502d2848f 100644 --- a/ipld/kamt/fuzz/Cargo.toml +++ b/ipld/kamt/fuzz/Cargo.toml @@ -9,20 +9,12 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" -arbitrary = { version = "1.1", features = ["derive"] } -ahash = "0.7.6" +libfuzzer-sys = { workspace = true } +arbitrary = { workspace = true, features = ["derive"] } +ahash = { workspace = true } -fvm_ipld_kamt = { path = ".." } -fvm_ipld_blockstore = { path = "../../blockstore" } - - -# Prevent this from interfering with workspaces -[workspace] -members = ["."] - -[workspace.dependencies] -cid = "0.10.1" +fvm_ipld_kamt = { workspace = true } +fvm_ipld_blockstore = { workspace = true } [[bin]] name = "simple" diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 9d8d862c5..5f85ebb20 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -12,14 +12,14 @@ crate-type = ["lib"] [dependencies] cid = { workspace = true } -fvm_shared = { version = "4.0.0", path = "../shared" } ## num-traits; disabling default features makes it play nice with no_std. -num-traits = { version = "0.2.15", default-features = false } -lazy_static = { version = "1.4.0" } -log = "0.4.19" -thiserror = "1.0.40" -fvm_ipld_encoding = { version = "0.4", path = "../ipld/encoding" } -byteorder = "1.4.3" +num-traits = { workspace = true, default-features = false } +lazy_static = { workspace = true } +log = { workspace = true } +thiserror = { workspace = true } +byteorder = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } [features] default = [] diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 10bff63fc..135948b8c 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -8,41 +8,41 @@ authors = ["ChainSafe Systems ", "Protocol Labs", "Filecoin C repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -blake2b_simd = "1.0.1" -thiserror = "1.0" -num-traits = "0.2" -num-derive = "0.4" +blake2b_simd = { workspace = true } +thiserror = { workspace = true } +num-traits = { workspace = true } +num-derive = { workspace = true } +lazy_static = { workspace = true } +cid = { workspace = true, features = ["serde-codec", "std"] } +multihash = { workspace = true } +unsigned-varint = { workspace = true } +anyhow = { workspace = true } +fvm_ipld_encoding = { workspace = true } +serde = { workspace = true, default-features = false } +serde_tuple = { workspace = true } +arbitrary = { workspace = true, optional = true, features = ["derive"] } +quickcheck = { workspace = true, optional = true } + num-bigint = "0.4" num-integer = "0.1" data-encoding = "2.4.0" data-encoding-macro = "0.1.13" -lazy_static = "1.4.0" -cid = { workspace = true, features = ["serde-codec", "std"] } -multihash = { workspace = true } -unsigned-varint = "0.7.1" -anyhow = "1.0.71" -fvm_ipld_encoding = { version = "0.4", path = "../ipld/encoding" } -serde = { version = "1", default-features = false } -serde_tuple = "0.5" -arbitrary = { version = "1.3", optional = true, features = ["derive"] } -quickcheck = { version = "1", optional = true } bitflags = { version = "2.3.3", features = ["serde"] } ## non-wasm dependencies; these dependencies and the respective code is ## only activated through non-default features, which the Kernel enables, but ## not the actors. filecoin-proofs-api = { version = "16", default-features = false, optional = true } -libsecp256k1 = { version = "0.7", optional = true } -bls-signatures = { version = "0.15", default-features = false, optional = true } +libsecp256k1 = { workspace = true, optional = true } +bls-signatures = { workspace = true, default-features = false, optional = true } [dev-dependencies] -rand = "0.8" -rand_chacha = "0.3" -serde_json = "1.0.99" +rand = { workspace = true } +serde_json = { workspace = true } multihash = { workspace = true, features = ["multihash-impl", "sha2", "sha3", "ripemd"] } -quickcheck_macros = "1" - -fvm_shared = { path = ".", features = ["arb"] } +quickcheck_macros = { workspace = true } +fvm_shared = { workspace = true, features = ["arb"] } +rand_chacha = { workspace = true } rusty-fork = { version = "0.3.0", default-features = false } [features] diff --git a/testing/calibration/shared/Cargo.toml b/testing/calibration/shared/Cargo.toml index 984a6f099..23ba81aea 100644 --- a/testing/calibration/shared/Cargo.toml +++ b/testing/calibration/shared/Cargo.toml @@ -8,8 +8,8 @@ authors = ["Protocol Labs", "Filecoin Core Devs"] repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -fvm_shared = { version = "4.0.0", path = "../../../shared", features = ["testing"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -num-traits = "0.2" -num-derive = "0.4" +fvm_shared = { workspace = true, features = ["testing"] } +serde = { workspace = true } +serde_json = { workspace = true } +num-traits = { workspace = true } +num-derive = { workspace = true } diff --git a/testing/common_fuzz/fuzz/Cargo.toml b/testing/common_fuzz/fuzz/Cargo.toml index b678cd4a3..4d807902a 100644 --- a/testing/common_fuzz/fuzz/Cargo.toml +++ b/testing/common_fuzz/fuzz/Cargo.toml @@ -9,22 +9,22 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" -arbitrary = { version = "1.1", features = ["derive"] } -rand = "0.8.5" +libfuzzer-sys = { workspace = true } +arbitrary = { workspace = true, features = ["derive"] } +rand = { workspace = true } cid = { workspace = true, features = ["serde-codec", "arb", "std"] } -fvm_ipld_bitfield = { path = "../../../ipld/bitfield", features = ["enable-arbitrary"] } -fvm_ipld_encoding = { path = "../../../ipld/encoding" } -fvm_shared = { path = "../../../shared", features = ["arb"] } -serde = { version = "1", features = ["derive"] } +fvm_ipld_bitfield = { workspace = true, features = ["enable-arbitrary"] } +fvm_ipld_encoding = { workspace = true } +fvm_shared ={ workspace = true, features = ["arb"] } +serde = { workspace = true } # Prevent this from interfering with workspaces [workspace] members = ["."] [workspace.dependencies] -cid = "0.10.1" -multihash = "0.18.1" +cid = { workspace = true } +multihash = { workspace = true } [[bin]] name = "rle_ops" diff --git a/testing/conformance/Cargo.toml b/testing/conformance/Cargo.toml index 8e2f9c4ee..065bbd241 100644 --- a/testing/conformance/Cargo.toml +++ b/testing/conformance/Cargo.toml @@ -9,32 +9,32 @@ publish = false repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -fvm_shared = { version = "4.0.0", path = "../../shared" } -fvm_ipld_car = { version = "0.7.1", path = "../../ipld/car" } -fvm_ipld_blockstore = { version = "0.2.0", path = "../../ipld/blockstore" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../ipld/encoding" } +fvm_shared = { workspace = true } +fvm_ipld_car = { workspace = true } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } -anyhow = "1.0.71" -num-traits = "0.2" +anyhow = { workspace = true } +num-traits = { workspace = true } cid = { workspace = true } multihash = { workspace = true } -serde = { version = "1.0", features = ["derive"] } -lazy_static = "1.4.0" -log = "0.4.19" -futures = "0.3.28" +serde = { workspace = true } +lazy_static = { workspace = true } +log = { workspace = true } +futures = { workspace = true } +itertools = { workspace = true } +serde_json = { workspace = true, features = ["raw_value"] } +libipld-core = { workspace = true } async-std = { version = "1.12", features = ["attributes"] } wasmtime = { version = "12.0.2", default-features = false } base64 = "0.21.2" flate2 = { version = "1.0" } colored = "2" either = "1.8.1" -itertools = "0.11.0" num_cpus = "1.15.0" -serde_json = { version = "1.0", features = ["raw_value"] } walkdir = "2.3" regex = { version = "1.8" } ittapi-rs = { version = "0.3.0", optional = true } -libipld-core = { version = "0.16.0", features = ["serde-codec"] } tar = { version = "0.4.38", default-features = false } zstd = { version = "0.12.3", default-features = false } @@ -50,7 +50,7 @@ m2-native = [] [dev-dependencies] env_logger = "0.10.0" -criterion = { version = "0.5", features = ["async_std"] } +criterion = { workspace = true, features = ["async_std"] } [[bin]] name = "perf-conformance" diff --git a/testing/integration/Cargo.toml b/testing/integration/Cargo.toml index d17089d84..5e8e47a6a 100644 --- a/testing/integration/Cargo.toml +++ b/testing/integration/Cargo.toml @@ -8,24 +8,24 @@ authors = ["Protocol Labs", "Filecoin Core Devs", "Polyphene"] repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] -fvm = { version = "4.0.0", path = "../../fvm", default-features = false, features = ["testing", "upgrade-actor"] } -fvm_shared = { version = "4.0.0", path = "../../shared", features = ["testing"] } -fvm_ipld_car = { version = "0.7.1", path = "../../ipld/car" } -fvm_ipld_blockstore = { version = "0.2.0", path = "../../ipld/blockstore" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../ipld/encoding" } +fvm = { workspace = true, default-features = false, features = ["testing", "upgrade-actor"] } +fvm_shared = { workspace = true, features = ["testing"] } +fvm_ipld_car = { workspace = true } +fvm_ipld_blockstore = { workspace = true } +fvm_ipld_encoding = { workspace = true } -anyhow = "1.0.71" +anyhow = { workspace = true } cid = { workspace = true } -futures = "0.3.28" +futures = { workspace = true } multihash = { workspace = true } -num-traits = "0.2" -lazy_static = "1.4.0" -libsecp256k1 = "0.7.1" -rand = "0.8.5" -rand_chacha = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_tuple = "0.5" -thiserror = "1.0.40" +num-traits = { workspace = true } +lazy_static = { workspace = true } +libsecp256k1 = { workspace = true } +rand = { workspace = true } +rand_chacha = { workspace = true } +serde = { workspace = true } +serde_tuple = { workspace = true } +thiserror = { workspace = true } [dependencies.wasmtime] version = "12.0.2" @@ -36,12 +36,12 @@ features = ["cranelift", "parallel-compilation"] actors-v12 = { package = "fil_builtin_actors_bundle", git = "https://github.com/filecoin-project/builtin-actors", branch = "master" } fvm_test_actors = { path = "../test_actors" } fvm_gas_calibration_shared = { path = "../calibration/shared" } -blake2b_simd = "1.0.1" -serde_json = "1.0" +blake2b_simd = { workspace = true } +serde_json = { workspace = true } +bls-signatures = { workspace = true } +hex = { workspace = true } +minstant = { workspace = true } wat = "1.0.66" -bls-signatures = { version = "0.15", default-features = false } -hex = "0.4.3" -minstant = "0.1.3" [features] default = [] diff --git a/testing/test_actors/actors/fil-address-actor/Cargo.toml b/testing/test_actors/actors/fil-address-actor/Cargo.toml index 55332d8c6..16d8e3b5e 100644 --- a/testing/test_actors/actors/fil-address-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-address-actor/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_ipld_encoding = { workspace = true } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-create-actor/Cargo.toml b/testing/test_actors/actors/fil-create-actor/Cargo.toml index f3859608b..c30d892f7 100644 --- a/testing/test_actors/actors/fil-create-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-create-actor/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } actors_v12_runtime = { package = "fil_actors_runtime", git = "https://github.com/filecoin-project/builtin-actors", branch = "master" } [lib] diff --git a/testing/test_actors/actors/fil-events-actor/Cargo.toml b/testing/test_actors/actors/fil-events-actor/Cargo.toml index 8ba3601ea..1c86c5994 100644 --- a/testing/test_actors/actors/fil-events-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-events-actor/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -serde = {version = "1.0.164", features = ["derive"] } -serde_tuple = "0.5.0" +fvm_ipld_encoding = { workspace = true } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +serde = { workspace = true } +serde_tuple = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-exit-data-actor/Cargo.toml b/testing/test_actors/actors/fil-exit-data-actor/Cargo.toml index 3c16d8cad..964db068e 100644 --- a/testing/test_actors/actors/fil-exit-data-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-exit-data-actor/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml b/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml index 33e0a9b48..8e84548c9 100644 --- a/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml @@ -5,17 +5,17 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } fvm_gas_calibration_shared = { path = "../../../calibration/shared" } cid = { workspace = true } -num-derive = "0.4" -num-traits = "0.2" -serde = { version = "1.0", features = ["derive"] } -anyhow = "1.0.71" -libipld = { version = "0.16.0", default-features = false, features = ["serde-codec"] } +num-derive = { workspace = true } +num-traits = { workspace = true } +serde = { workspace = true } +anyhow = { workspace = true } +libipld = { workspace = true } [lib] crate-type = ["cdylib"] diff --git a/testing/test_actors/actors/fil-gaslimit-actor/Cargo.toml b/testing/test_actors/actors/fil-gaslimit-actor/Cargo.toml index bc4e180d9..96d9844a0 100644 --- a/testing/test_actors/actors/fil-gaslimit-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-gaslimit-actor/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -serde = {version = "1.0.164", features = ["derive"] } -serde_tuple = "0.5.0" -log = "0.4.19" +fvm_ipld_encoding = { workspace = true } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +serde = { workspace = true } +serde_tuple = { workspace = true } +log = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-hello-world-actor/Cargo.toml b/testing/test_actors/actors/fil-hello-world-actor/Cargo.toml index 2694fd8f7..57370a94d 100644 --- a/testing/test_actors/actors/fil-hello-world-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-hello-world-actor/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-integer-overflow-actor/Cargo.toml b/testing/test_actors/actors/fil-integer-overflow-actor/Cargo.toml index c2d3e007e..92b4cddc5 100644 --- a/testing/test_actors/actors/fil-integer-overflow-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-integer-overflow-actor/Cargo.toml @@ -5,15 +5,15 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_ipld_blockstore = { version = "0.2.0", path = "../../../../ipld/blockstore" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } +fvm_ipld_blockstore = { workspace = true } -anyhow = "1.0.71" +anyhow = { workspace = true } cid = { workspace = true } -serde = { version = "1.0.164", features = ["derive"] } -serde_tuple = "0.5" +serde = { workspace = true } +serde_tuple = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-ipld-actor/Cargo.toml b/testing/test_actors/actors/fil-ipld-actor/Cargo.toml index 477e19dac..6f625274b 100644 --- a/testing/test_actors/actors/fil-ipld-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-ipld-actor/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_ipld_encoding = { workspace = true } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } [target.'cfg(coverage)'.dependencies] minicov = "0.3" diff --git a/testing/test_actors/actors/fil-malformed-syscall-actor/Cargo.toml b/testing/test_actors/actors/fil-malformed-syscall-actor/Cargo.toml index df53774b6..ff36afdbe 100644 --- a/testing/test_actors/actors/fil-malformed-syscall-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-malformed-syscall-actor/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } +fvm_shared = { workspace = true } +fvm_sdk = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-oom-actor/Cargo.toml b/testing/test_actors/actors/fil-oom-actor/Cargo.toml index d6f271ae1..294e12c4b 100644 --- a/testing/test_actors/actors/fil-oom-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-oom-actor/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-readonly-actor/Cargo.toml b/testing/test_actors/actors/fil-readonly-actor/Cargo.toml index 8836cbddd..a8fc6ce40 100644 --- a/testing/test_actors/actors/fil-readonly-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-readonly-actor/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } cid = { workspace = true } [lib] diff --git a/testing/test_actors/actors/fil-sself-actor/Cargo.toml b/testing/test_actors/actors/fil-sself-actor/Cargo.toml index 13c8649cb..b5572abd7 100644 --- a/testing/test_actors/actors/fil-sself-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-sself-actor/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } cid = { workspace = true } [lib] diff --git a/testing/test_actors/actors/fil-stack-overflow-actor/Cargo.toml b/testing/test_actors/actors/fil-stack-overflow-actor/Cargo.toml index 8c1b3e4f6..23bcd1bea 100644 --- a/testing/test_actors/actors/fil-stack-overflow-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-stack-overflow-actor/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-syscall-actor/Cargo.toml b/testing/test_actors/actors/fil-syscall-actor/Cargo.toml index 1d311982a..1b9a740c5 100644 --- a/testing/test_actors/actors/fil-syscall-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-syscall-actor/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } -fvm_sdk = { version = "4.0.0", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0", path = "../../../../shared" } +fvm_ipld_encoding = { workspace = true } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +multihash = { workspace = true, features = ["sha3", "sha2", "ripemd"] } minicov = {version = "0.3", optional = true} actors_v12_runtime = { package = "fil_actors_runtime", git = "https://github.com/filecoin-project/builtin-actors", branch = "master" } -multihash = { workspace = true, features = ["sha3", "sha2", "ripemd"] } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-upgrade-actor/Cargo.toml b/testing/test_actors/actors/fil-upgrade-actor/Cargo.toml index 328f3d26f..5c5bae03b 100644 --- a/testing/test_actors/actors/fil-upgrade-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-upgrade-actor/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0-alpha.4", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0-alpha.4", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } cid = { workspace = true } -serde = { version = "1.0.164", features = ["derive"] } -serde_tuple = "0.5.0" +serde = { workspace = true } +serde_tuple = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/testing/test_actors/actors/fil-upgrade-receive-actor/Cargo.toml b/testing/test_actors/actors/fil-upgrade-receive-actor/Cargo.toml index b8bfd01f4..3d8868871 100644 --- a/testing/test_actors/actors/fil-upgrade-receive-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-upgrade-receive-actor/Cargo.toml @@ -5,12 +5,12 @@ edition = "2021" publish = false [target.'cfg(target_arch = "wasm32")'.dependencies] -fvm_sdk = { version = "4.0.0-alpha.4", path = "../../../../sdk" } -fvm_shared = { version = "4.0.0-alpha.4", path = "../../../../shared" } -fvm_ipld_encoding = { version = "0.4.0", path = "../../../../ipld/encoding" } +fvm_sdk = { workspace = true } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } cid = { workspace = true } -serde = { version = "1.0.164", features = ["derive"] } -serde_tuple = "0.5.0" +serde = { workspace = true } +serde_tuple = { workspace = true } [lib] crate-type = ["cdylib"] ## cdylib is necessary for Wasm build diff --git a/tools/fvm-bench/Cargo.toml b/tools/fvm-bench/Cargo.toml index 1136cfcf4..e5fae7172 100644 --- a/tools/fvm-bench/Cargo.toml +++ b/tools/fvm-bench/Cargo.toml @@ -5,10 +5,10 @@ edition = "2021" [dependencies] fvm_integration_tests = { path = "../../testing/integration" } -fvm_ipld_encoding = { path = "../../ipld/encoding" } -fvm_shared = { path = "../../shared" } -anyhow = "1.0.71" +fvm = { workspace = true, default-features = false } +fvm_shared = { workspace = true } +fvm_ipld_encoding = { workspace = true } +anyhow = { workspace = true } +hex = { workspace = true } clap = { version = "4.3.9", features = ["derive", "std", "help", "usage", "error-context"], default-features = false } -hex = "0.4.3" env_logger = "0.10.0" -fvm = { path = "../../fvm", default-features = false } From 473d61ca5f675d73ebe67765b66629b171e6f6c7 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Fri, 15 Dec 2023 16:35:59 +0000 Subject: [PATCH 2/8] fix ci errors also needed to rename kamt/fuzz/simple and hamt/fuzz/simple targets as they were colliding using a single workspace --- Cargo.lock | 134 ++++++++++++++++++++------ Cargo.toml | 15 +-- ipld/hamt/fuzz/Cargo.toml | 7 +- ipld/hamt/fuzz/fuzz_targets/simple.rs | 6 +- ipld/kamt/fuzz/Cargo.toml | 2 +- testing/common_fuzz/fuzz/Cargo.toml | 18 ++-- 6 files changed, 128 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 790702175..2569470b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -741,13 +741,12 @@ checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1291,7 +1290,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -2053,14 +2052,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -2989,7 +2988,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3069,7 +3068,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3094,6 +3093,17 @@ dependencies = [ "libfuzzer-sys", ] +[[package]] +name = "ipld_hamt-fuzz" +version = "0.0.0" +dependencies = [ + "ahash 0.7.7", + "arbitrary", + "fvm_ipld_blockstore 0.2.0", + "fvm_ipld_hamt 0.9.0", + "libfuzzer-sys", +] + [[package]] name = "ipld_kamt-fuzz" version = "0.0.0" @@ -3113,7 +3123,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", "rustix 0.38.19", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -3820,7 +3830,7 @@ dependencies = [ "libc", "redox_syscall 0.4.1", "smallvec", - "windows-targets", + "windows-targets 0.48.5", ] [[package]] @@ -3929,7 +3939,7 @@ dependencies = [ "libc", "log", "pin-project-lite", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4279,7 +4289,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4292,7 +4302,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.10", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -4793,7 +4803,7 @@ dependencies = [ "fastrand 2.0.1", "redox_syscall 0.3.5", "rustix 0.38.19", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5192,7 +5202,7 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5285,7 +5295,7 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5306,7 +5316,7 @@ checksum = "b59f94b0409221873565419168e20b5aedf18c4bd64de5c38acf8f0634efeee3" dependencies = [ "cfg-if", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5333,7 +5343,7 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-versioned-export-macros", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -5439,7 +5449,16 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "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]] @@ -5448,13 +5467,28 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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]] @@ -5463,42 +5497,84 @@ 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 = "wyz" version = "0.5.1" diff --git a/Cargo.toml b/Cargo.toml index d7acd283f..82ee0a58c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,12 +4,13 @@ members = [ "fvm", "sdk", "shared", - "testing/conformance", - "testing/integration", - "testing/calibration/shared", "ipld/*", "ipld/amt/fuzz", + "ipld/hamt/fuzz", "ipld/kamt/fuzz", + "testing/calibration/shared", + "testing/conformance", + "testing/integration", "testing/test_actors", "testing/test_actors/actors/*", "tools/fvm-bench", @@ -17,7 +18,7 @@ members = [ [workspace.dependencies] # common -serde = { version = "1.0.164", features = ["derive"] } +serde = { version = "1.0.164", default-features = false, features = ["derive"] } thiserror = "1.0.40" anyhow = "1.0.71" rand = "0.8.5" @@ -26,7 +27,7 @@ serde_json = "1.0.99" serde_tuple = "0.5.0" byteorder = "1.4.3" hex = "0.4.3" -num-traits = "0.2.14" +num-traits = { version = "0.2.14", default-features = false } num-derive = "0.4.0" lazy_static = "1.4.0" log = "0.4.19" @@ -58,7 +59,8 @@ quickcheck_macros = "1.0.0" minstant = "0.1.3" # workspace -fvm = { path = "fvm" } +fvm = { path = "fvm", default-features = false } +fvm_shared = { path = "shared", default-features = false } fvm_sdk = { path = "sdk" } fvm_ipld_amt = { path = "ipld/amt" } fvm_ipld_hamt = { path = "ipld/hamt" } @@ -67,7 +69,6 @@ fvm_ipld_car = { path = "ipld/car" } fvm_ipld_blockstore = { path = "ipld/blockstore" } fvm_ipld_bitfield = { path = "ipld/bitfield" } fvm_ipld_encoding = { path = "ipld/encoding" } -fvm_shared = { path = "shared" } [profile.actor] inherits = "release" diff --git a/ipld/hamt/fuzz/Cargo.toml b/ipld/hamt/fuzz/Cargo.toml index 4a3aaaa30..a6f85c0cc 100644 --- a/ipld/hamt/fuzz/Cargo.toml +++ b/ipld/hamt/fuzz/Cargo.toml @@ -16,13 +16,8 @@ ahash = { workspace = true } fvm_ipld_hamt = { workspace = true } fvm_ipld_blockstore = { workspace = true } - -# Prevent this from interfering with workspaces -[workspace] -members = ["."] - [[bin]] -name = "simple" +name = "hamt-simple" path = "fuzz_targets/simple.rs" test = false doc = false diff --git a/ipld/hamt/fuzz/fuzz_targets/simple.rs b/ipld/hamt/fuzz/fuzz_targets/simple.rs index 2d28e3fa4..fbcf8bf7b 100644 --- a/ipld/hamt/fuzz/fuzz_targets/simple.rs +++ b/ipld/hamt/fuzz/fuzz_targets/simple.rs @@ -10,7 +10,9 @@ mod common; fuzz_target!(|data: (u8, Vec)| { let (flush_rate, operations) = data; - let mut conf = Config::default(); - conf.bit_width = 5; + let conf = Config { + bit_width: 5, + ..Default::default() + }; common::run(flush_rate, operations, conf); }); diff --git a/ipld/kamt/fuzz/Cargo.toml b/ipld/kamt/fuzz/Cargo.toml index 502d2848f..739508725 100644 --- a/ipld/kamt/fuzz/Cargo.toml +++ b/ipld/kamt/fuzz/Cargo.toml @@ -17,7 +17,7 @@ fvm_ipld_kamt = { workspace = true } fvm_ipld_blockstore = { workspace = true } [[bin]] -name = "simple" +name = "kamt-simple" path = "fuzz_targets/simple.rs" test = false doc = false diff --git a/testing/common_fuzz/fuzz/Cargo.toml b/testing/common_fuzz/fuzz/Cargo.toml index 4d807902a..b678cd4a3 100644 --- a/testing/common_fuzz/fuzz/Cargo.toml +++ b/testing/common_fuzz/fuzz/Cargo.toml @@ -9,22 +9,22 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = { workspace = true } -arbitrary = { workspace = true, features = ["derive"] } -rand = { workspace = true } +libfuzzer-sys = "0.4" +arbitrary = { version = "1.1", features = ["derive"] } +rand = "0.8.5" cid = { workspace = true, features = ["serde-codec", "arb", "std"] } -fvm_ipld_bitfield = { workspace = true, features = ["enable-arbitrary"] } -fvm_ipld_encoding = { workspace = true } -fvm_shared ={ workspace = true, features = ["arb"] } -serde = { workspace = true } +fvm_ipld_bitfield = { path = "../../../ipld/bitfield", features = ["enable-arbitrary"] } +fvm_ipld_encoding = { path = "../../../ipld/encoding" } +fvm_shared = { path = "../../../shared", features = ["arb"] } +serde = { version = "1", features = ["derive"] } # Prevent this from interfering with workspaces [workspace] members = ["."] [workspace.dependencies] -cid = { workspace = true } -multihash = { workspace = true } +cid = "0.10.1" +multihash = "0.18.1" [[bin]] name = "rle_ops" From a00f5c53261a16d72a79078458cf71e04a9be32b Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Mon, 18 Dec 2023 11:51:51 +0000 Subject: [PATCH 3/8] Add package metadata and wasmtime to workspace --- Cargo.toml | 12 ++++++++++++ fvm/Cargo.toml | 23 +++++++---------------- sdk/Cargo.toml | 8 ++++---- shared/Cargo.toml | 8 ++++---- testing/conformance/Cargo.toml | 9 ++------- testing/integration/Cargo.toml | 14 +++++--------- 6 files changed, 34 insertions(+), 40 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 82ee0a58c..0f12ed240 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,13 @@ members = [ "tools/fvm-bench", ] +[workspace.package] +version = "4.0.0" +license = "MIT OR Apache-2.0" +edition = "2021" +repository = "https://github.com/filecoin-project/ref-fvm" +authors = ["Protocol Labs", "Filecoin Core Devs"] + [workspace.dependencies] # common serde = { version = "1.0.164", default-features = false, features = ["derive"] } @@ -44,6 +51,11 @@ blake2b_simd = "1.0.1" libsecp256k1 = { version = "0.7.1" } bls-signatures = { version = "0.15", default-features = false } +# wasmtime +wasmtime = {version = "12.0.2", default-features = false, features = ["cranelift", "pooling-allocator", "parallel-compilation"] } +wasmtime-environ = "12.0.2" +wasmtime-runtime = { version = "12.0.2", default-features = false } + # misc libfuzzer-sys = "0.4" arbitrary = "1.3.0" diff --git a/fvm/Cargo.toml b/fvm/Cargo.toml index f9f49e533..55b247af2 100644 --- a/fvm/Cargo.toml +++ b/fvm/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "fvm" description = "Filecoin Virtual Machine reference implementation" -version = "4.0.0" -license = "MIT OR Apache-2.0" +version.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true authors = ["Protocol Labs", "Filecoin Core Devs"] -edition = "2021" -repository = "https://github.com/filecoin-project/ref-fvm" keywords = ["filecoin", "web3", "wasm"] [lib] @@ -22,6 +22,9 @@ fvm_ipld_hamt = { workspace = true } fvm_ipld_amt = { workspace = true } fvm_ipld_blockstore = { workspace = true } fvm_ipld_encoding = { workspace = true } +wasmtime = { workspace = true } +wasmtime-environ = { workspace = true } +wasmtime-runtime = { workspace = true } serde = { workspace = true } serde_tuple = { workspace = true } lazy_static = { workspace = true } @@ -47,18 +50,6 @@ ambassador = "0.3.5" pretty_assertions = "1.3.0" fvm = { workspace = true, features = ["testing"], default-features = false } -[dependencies.wasmtime] -version = "12.0.2" -default-features = false -features = ["cranelift", "pooling-allocator", "parallel-compilation"] - -[dependencies.wasmtime-environ] -version = "12.0.1" - -[dependencies.wasmtime-runtime] -version = "12.0.1" -default-features = false - [features] default = ["opencl"] opencl = ["filecoin-proofs-api/opencl"] diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index 5f85ebb20..2a26be6ca 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "fvm_sdk" description = "Filecoin Virtual Machine actor development SDK" -version = "4.0.0" -license = "MIT OR Apache-2.0" +version.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true authors = ["Protocol Labs", "Filecoin Core Devs"] -edition = "2021" -repository = "https://github.com/filecoin-project/ref-fvm" [lib] crate-type = ["lib"] diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 135948b8c..20eed44e8 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "fvm_shared" description = "Filecoin Virtual Machine shared types and functions" -version = "4.0.0" -edition = "2021" -license = "MIT OR Apache-2.0" +version.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true authors = ["ChainSafe Systems ", "Protocol Labs", "Filecoin Core Devs"] -repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] blake2b_simd = { workspace = true } diff --git a/testing/conformance/Cargo.toml b/testing/conformance/Cargo.toml index 065bbd241..d99c0d437 100644 --- a/testing/conformance/Cargo.toml +++ b/testing/conformance/Cargo.toml @@ -9,6 +9,7 @@ publish = false repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] +fvm = { workspace = true, default-features = false, features = ["testing"] } fvm_shared = { workspace = true } fvm_ipld_car = { workspace = true } fvm_ipld_blockstore = { workspace = true } @@ -26,7 +27,7 @@ itertools = { workspace = true } serde_json = { workspace = true, features = ["raw_value"] } libipld-core = { workspace = true } async-std = { version = "1.12", features = ["attributes"] } -wasmtime = { version = "12.0.2", default-features = false } +wasmtime = { workspace = true } base64 = "0.21.2" flate2 = { version = "1.0" } colored = "2" @@ -38,12 +39,6 @@ ittapi-rs = { version = "0.3.0", optional = true } tar = { version = "0.4.38", default-features = false } zstd = { version = "0.12.3", default-features = false } -[dependencies.fvm] -version = "4.0.0" -path = "../../fvm" -default-features = false -features = ["testing"] - [features] vtune = ["wasmtime/vtune", "ittapi-rs"] m2-native = [] diff --git a/testing/integration/Cargo.toml b/testing/integration/Cargo.toml index 5e8e47a6a..262554083 100644 --- a/testing/integration/Cargo.toml +++ b/testing/integration/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "fvm_integration_tests" description = "Filecoin Virtual Machine integration tests framework" -version = "4.0.0" -edition = "2021" -license = "MIT OR Apache-2.0" +version.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true authors = ["Protocol Labs", "Filecoin Core Devs", "Polyphene"] -repository = "https://github.com/filecoin-project/ref-fvm" [dependencies] fvm = { workspace = true, default-features = false, features = ["testing", "upgrade-actor"] } @@ -26,11 +26,7 @@ rand_chacha = { workspace = true } serde = { workspace = true } serde_tuple = { workspace = true } thiserror = { workspace = true } - -[dependencies.wasmtime] -version = "12.0.2" -default-features = false -features = ["cranelift", "parallel-compilation"] +wasmtime = { workspace = true, default-features = false, features = ["cranelift", "parallel-compilation"] } [dev-dependencies] actors-v12 = { package = "fil_builtin_actors_bundle", git = "https://github.com/filecoin-project/builtin-actors", branch = "master" } From e02efd1dd0d15a3adc8b66cd03f888b3c7aed00a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 18 Dec 2023 11:13:03 -0800 Subject: [PATCH 4/8] unify ahash version --- Cargo.lock | 20 +++++--------------- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2569470b0..e9bb1c3c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,17 +37,6 @@ dependencies = [ "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.3" @@ -55,6 +44,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", ] @@ -2905,7 +2895,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash", ] [[package]] @@ -3084,7 +3074,7 @@ dependencies = [ name = "ipld_amt_fuzz" version = "0.0.0" dependencies = [ - "ahash 0.7.7", + "ahash", "arbitrary", "cid 0.10.1", "fvm_ipld_amt 0.6.2", @@ -3097,7 +3087,7 @@ dependencies = [ name = "ipld_hamt-fuzz" version = "0.0.0" dependencies = [ - "ahash 0.7.7", + "ahash", "arbitrary", "fvm_ipld_blockstore 0.2.0", "fvm_ipld_hamt 0.9.0", @@ -3108,7 +3098,7 @@ dependencies = [ name = "ipld_kamt-fuzz" version = "0.0.0" dependencies = [ - "ahash 0.7.7", + "ahash", "arbitrary", "fvm_ipld_blockstore 0.2.0", "fvm_ipld_kamt 0.3.0", diff --git a/Cargo.toml b/Cargo.toml index 0f12ed240..9f47920d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ wasmtime-runtime = { version = "12.0.2", default-features = false } # misc libfuzzer-sys = "0.4" arbitrary = "1.3.0" -ahash = "0.7.6" +ahash = "0.8.3" itertools = "0.11.0" once_cell = "1.18.0" unsigned-varint = "0.7.2" From 03c3c6ed4e499f5297a7bee86f20f9e40b87e63e Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 18 Dec 2023 11:13:20 -0800 Subject: [PATCH 5/8] switch to workspace deps for everything but fuzzing --- Cargo.toml | 3 +++ testing/integration/Cargo.toml | 4 ++-- .../test_actors/actors/fil-gas-calibration-actor/Cargo.toml | 2 +- tools/fvm-bench/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9f47920d9..46c09fef5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,6 +81,9 @@ fvm_ipld_car = { path = "ipld/car" } fvm_ipld_blockstore = { path = "ipld/blockstore" } fvm_ipld_bitfield = { path = "ipld/bitfield" } fvm_ipld_encoding = { path = "ipld/encoding" } +fvm_gas_calibration_shared = { path = "testing/calibration/shared" } +fvm_integration_tests = { path = "testing/integration" } +fvm_test_actors = { path = "testing/test_actors" } [profile.actor] inherits = "release" diff --git a/testing/integration/Cargo.toml b/testing/integration/Cargo.toml index 262554083..37c80364c 100644 --- a/testing/integration/Cargo.toml +++ b/testing/integration/Cargo.toml @@ -30,8 +30,8 @@ wasmtime = { workspace = true, default-features = false, features = ["cranelift" [dev-dependencies] actors-v12 = { package = "fil_builtin_actors_bundle", git = "https://github.com/filecoin-project/builtin-actors", branch = "master" } -fvm_test_actors = { path = "../test_actors" } -fvm_gas_calibration_shared = { path = "../calibration/shared" } +fvm_test_actors = { workspace = true } +fvm_gas_calibration_shared = { workspace = true } blake2b_simd = { workspace = true } serde_json = { workspace = true } bls-signatures = { workspace = true } diff --git a/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml b/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml index 8e84548c9..0dbbf7a21 100644 --- a/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml +++ b/testing/test_actors/actors/fil-gas-calibration-actor/Cargo.toml @@ -8,7 +8,7 @@ publish = false fvm_sdk = { workspace = true } fvm_shared = { workspace = true } fvm_ipld_encoding = { workspace = true } -fvm_gas_calibration_shared = { path = "../../../calibration/shared" } +fvm_gas_calibration_shared = { workspace = true } cid = { workspace = true } num-derive = { workspace = true } diff --git a/tools/fvm-bench/Cargo.toml b/tools/fvm-bench/Cargo.toml index e5fae7172..7df2b00d5 100644 --- a/tools/fvm-bench/Cargo.toml +++ b/tools/fvm-bench/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -fvm_integration_tests = { path = "../../testing/integration" } +fvm_integration_tests = { workspace = true } fvm = { workspace = true, default-features = false } fvm_shared = { workspace = true } fvm_ipld_encoding = { workspace = true } From cd1d4f4f7a727d313632b4c22b7f0466ccce9669 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Tue, 19 Dec 2023 11:43:27 +0000 Subject: [PATCH 6/8] Move testing/common_fuzz into root workspace This enables us to remove the parent crate that the fuzz crates require (https://github.com/filecoin-project/ref-fvm/pull/421) --- Cargo.lock | 15 +++++++++++++++ Cargo.toml | 1 + testing/common_fuzz/Cargo.toml | 11 ----------- testing/common_fuzz/fuzz/Cargo.toml | 24 +++++++++--------------- testing/common_fuzz/src/main.rs | 5 ----- 5 files changed, 25 insertions(+), 31 deletions(-) delete mode 100644 testing/common_fuzz/Cargo.toml delete mode 100644 testing/common_fuzz/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index e9bb1c3c1..b1e249460 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -739,6 +739,21 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "common_fuzz" +version = "0.0.0" +dependencies = [ + "arbitrary", + "cid 0.10.1", + "fvm_ipld_bitfield 0.6.0", + "fvm_ipld_encoding 0.4.0", + "fvm_shared 4.0.0", + "libfuzzer-sys", + "multihash 0.18.1", + "rand", + "serde", +] + [[package]] name = "concurrent-queue" version = "2.3.0" diff --git a/Cargo.toml b/Cargo.toml index 46c09fef5..381e43d92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "ipld/kamt/fuzz", "testing/calibration/shared", "testing/conformance", + "testing/common_fuzz/fuzz", "testing/integration", "testing/test_actors", "testing/test_actors/actors/*", diff --git a/testing/common_fuzz/Cargo.toml b/testing/common_fuzz/Cargo.toml deleted file mode 100644 index 5e29dd02a..000000000 --- a/testing/common_fuzz/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "common_fuzz" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[workspace] -members = ["."] - -[dependencies] diff --git a/testing/common_fuzz/fuzz/Cargo.toml b/testing/common_fuzz/fuzz/Cargo.toml index b678cd4a3..8ad180307 100644 --- a/testing/common_fuzz/fuzz/Cargo.toml +++ b/testing/common_fuzz/fuzz/Cargo.toml @@ -9,22 +9,16 @@ edition = "2021" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.4" -arbitrary = { version = "1.1", features = ["derive"] } -rand = "0.8.5" +libfuzzer-sys = { workspace = true } +arbitrary ={ workspace = true, features = ["derive"] } +rand = { workspace = true } cid = { workspace = true, features = ["serde-codec", "arb", "std"] } -fvm_ipld_bitfield = { path = "../../../ipld/bitfield", features = ["enable-arbitrary"] } -fvm_ipld_encoding = { path = "../../../ipld/encoding" } -fvm_shared = { path = "../../../shared", features = ["arb"] } -serde = { version = "1", features = ["derive"] } - -# Prevent this from interfering with workspaces -[workspace] -members = ["."] - -[workspace.dependencies] -cid = "0.10.1" -multihash = "0.18.1" +multihash = { workspace = true } + +fvm_ipld_bitfield = { workspace = true, features = ["enable-arbitrary"] } +fvm_ipld_encoding = { workspace = true } +fvm_shared = { workspace = true, features = ["arb"] } +serde = { workspace = true } [[bin]] name = "rle_ops" diff --git a/testing/common_fuzz/src/main.rs b/testing/common_fuzz/src/main.rs deleted file mode 100644 index 84e9f2de5..000000000 --- a/testing/common_fuzz/src/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2021-2023 Protocol Labs -// SPDX-License-Identifier: Apache-2.0, MIT -fn main() { - println!("Hello, world!"); -} From b92c8b579a2119d1cb4b7e685c8c85f613fffbab Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Tue, 19 Dec 2023 11:53:20 +0000 Subject: [PATCH 7/8] fix clippy warnings --- testing/common_fuzz/fuzz/fuzz_targets/cbor_encode.rs | 2 +- testing/common_fuzz/fuzz/fuzz_targets/rle_ops.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/common_fuzz/fuzz/fuzz_targets/cbor_encode.rs b/testing/common_fuzz/fuzz/fuzz_targets/cbor_encode.rs index f82807bcb..4487da0f7 100644 --- a/testing/common_fuzz/fuzz/fuzz_targets/cbor_encode.rs +++ b/testing/common_fuzz/fuzz/fuzz_targets/cbor_encode.rs @@ -17,7 +17,7 @@ fuzz_target!(|p: Payload| { "artifacts/cbor_encode/bytes_produced_but_wont_decode.cbor", )) .unwrap(); - f.write(out.as_slice()).unwrap(); + f.write_all(out.as_slice()).unwrap(); } let p2 = encoding::from_slice::(&out).expect("everything that encodes must decode"); let out2 = encoding::to_vec(&p2).expect("decoded payload must be possible to encode2"); diff --git a/testing/common_fuzz/fuzz/fuzz_targets/rle_ops.rs b/testing/common_fuzz/fuzz/fuzz_targets/rle_ops.rs index 3139a3203..4e202b288 100644 --- a/testing/common_fuzz/fuzz/fuzz_targets/rle_ops.rs +++ b/testing/common_fuzz/fuzz/fuzz_targets/rle_ops.rs @@ -9,6 +9,8 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|bfs: [BitField; 3]| { let [bf1, bf2, bf3] = &bfs; + + #[allow(clippy::eq_op)] { assert_eq!(bf1 | bf2, bf2 | bf1); assert_eq!(bf1 | bf3, bf3 | bf1); From 534e7c5e3d5a75bd7be93fda76227cd376648d17 Mon Sep 17 00:00:00 2001 From: Fridrik Asmundsson Date: Tue, 19 Dec 2023 16:10:57 +0000 Subject: [PATCH 8/8] fix clusterfuzz lite on CI --- Cargo.lock | 4 ++++ Cargo.toml | 1 + testing/common_fuzz/Cargo.toml | 6 ++++++ testing/common_fuzz/src/main.rs | 5 +++++ 4 files changed, 16 insertions(+) create mode 100644 testing/common_fuzz/Cargo.toml create mode 100644 testing/common_fuzz/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index b1e249460..41e96f8db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -739,6 +739,10 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "common" +version = "0.1.0" + [[package]] name = "common_fuzz" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index 381e43d92..b18dfa44b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ members = [ "ipld/kamt/fuzz", "testing/calibration/shared", "testing/conformance", + "testing/common_fuzz", "testing/common_fuzz/fuzz", "testing/integration", "testing/test_actors", diff --git a/testing/common_fuzz/Cargo.toml b/testing/common_fuzz/Cargo.toml new file mode 100644 index 000000000..e020b1788 --- /dev/null +++ b/testing/common_fuzz/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "common" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/testing/common_fuzz/src/main.rs b/testing/common_fuzz/src/main.rs new file mode 100644 index 000000000..84e9f2de5 --- /dev/null +++ b/testing/common_fuzz/src/main.rs @@ -0,0 +1,5 @@ +// Copyright 2021-2023 Protocol Labs +// SPDX-License-Identifier: Apache-2.0, MIT +fn main() { + println!("Hello, world!"); +}