Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert updates to cid/multihash #1211

Merged
merged 2 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 24 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions fvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ thiserror = "1.0.30"
num-traits = "0.2"
derive_builder = "0.11.2"
num-derive = "0.3.3"
cid = { version = "0.9.0", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.17.0", default-features = false }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.16.3", default-features = false }
fvm_shared = { version = "3.0.0-alpha.13", path = "../shared", features = ["crypto"] }
fvm_ipld_hamt = { version = "0.6.1", path = "../ipld/hamt" }
fvm_ipld_amt = { version = "0.5.0", path = "../ipld/amt" }
Expand Down Expand Up @@ -65,5 +65,5 @@ default = ["opencl"]
opencl = ["filecoin-proofs-api/opencl"]
cuda = ["filecoin-proofs-api/cuda"]
testing = []
arb = ["arbitrary", "quickcheck", "fvm_shared/arb", "cid/arb"]
arb = ["arbitrary", "quickcheck"]
m2-native = []
12 changes: 8 additions & 4 deletions fvm/src/state_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,16 @@ impl ActorState {
#[cfg(feature = "arb")]
impl Arbitrary for ActorState {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
let cid = Cid::new_v1(
u64::arbitrary(g),
cid::multihash::Multihash::wrap(u64::arbitrary(g), &[u8::arbitrary(g)]).unwrap(),
);
Self {
code: Cid::arbitrary(g),
state: Cid::arbitrary(g),
code: cid,
state: cid,
sequence: u64::arbitrary(g),
balance: TokenAmount::arbitrary(g),
address: Option::arbitrary(g),
balance: TokenAmount::from_atto(u64::arbitrary(g)),
address: None,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ipld/amt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = { version = "0.9.0", default-features = false, features = ["serde-codec"] }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec"] }
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
once_cell = "1.5"
Expand Down
2 changes: 1 addition & 1 deletion ipld/amt/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ arbitrary = { version = "1.1", features = ["derive"] }
ahash = "0.7.6"
itertools = "0.10.3"

cid = { version = "0.9.0", default-features = false, features = ["serde-codec", "arb", "std"] }
cid = { version = "0.8.2", default-features = false, features = ["serde-codec", "arb", "std"] }
fvm_ipld_amt = { path = ".."}
fvm_ipld_blockstore = { path = "../../blockstore" }

Expand Down
4 changes: 2 additions & 2 deletions ipld/blockstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ edition = "2021"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = { version = "0.9.0", default-features = false, features = ["serde-codec", "std"] }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec", "std"] }
anyhow = "1.0.51"
# multihash is also re-exported by `cid`. Having `multihash` here as a
# depdendency is needed to enable the features of the re-export.
multihash = { version = "0.17.0", default-features = false, features = ["multihash-impl"] }
multihash = { version = "0.16.1", default-features = false, features = ["multihash-impl"] }

[features]
default = []
2 changes: 1 addition & 1 deletion ipld/car/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/filecoin-project/ref-fvm"

[dependencies]
cid = "0.9.0"
cid = "0.8.5"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"
futures = "0.3.5"
Expand Down
4 changes: 2 additions & 2 deletions ipld/encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ serde = { version = "1.0", features = ["derive"] }
serde_ipld_dagcbor = "0.2.2"
serde_tuple = "0.5"
serde_repr = "0.1"
cid = { version = "0.9.0", default-features = false, features = ["serde-codec", "std"] }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec", "std"] }
thiserror = "1.0"
anyhow = "1.0.56"
fvm_ipld_blockstore = { version = "0.1", path = "../blockstore" }
# multihash is also re-exported by `cid`. Having `multihash` here as a
# depdendency is needed to enable the features of the re-export.
multihash = { version = "0.17.0", default-features = false, features = ["blake2b", "multihash-impl"] }
multihash = { version = "0.16.1", default-features = false, features = ["blake2b", "multihash-impl"] }

[features]
default = []
Expand Down
6 changes: 3 additions & 3 deletions ipld/hamt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ repository = "https://github.com/filecoin-project/ref-fvm"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
byteorder = "1.3.2"
cid = { version = "0.9.0", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.17.0", default-features = false }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.16.1", default-features = false }
thiserror = "1.0"
sha2 = "0.10"
once_cell = "1.5"
forest_hash_utils = "0.1"
anyhow = "1.0.51"
libipld-core = { version = "0.15.0", features = ["serde-codec"] }
libipld-core = { version = "0.14.0", features = ["serde-codec"] }
fvm_ipld_encoding = { version = "0.3", path = "../encoding" }
fvm_ipld_blockstore = { version = "0.1", path = "../blockstore" }

Expand Down
4 changes: 2 additions & 2 deletions ipld/kamt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ repository = "https://github.com/filecoin-project/ref-fvm"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
byteorder = "1.3.2"
cid = { version = "0.9.0", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.17.0", default-features = false }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec"] }
multihash = { version = "0.16.0", default-features = false }
thiserror = "1.0"
sha2 = "0.10"
once_cell = "1.5"
Expand Down
2 changes: 1 addition & 1 deletion sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/filecoin-project/ref-fvm"
crate-type = ["lib"]

[dependencies]
cid = { version = "0.9.0", default-features = false }
cid = { version = "0.8.5", default-features = false }
fvm_shared = { version = "3.0.0-alpha.13", path = "../shared" }
## num-traits; disabling default features makes it play nice with no_std.
num-traits = { version = "0.2.14", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ data-encoding = "2.3.2"
data-encoding-macro = "0.1.12"
lazy_static = "1.4.0"
log = "0.4.8"
cid = { version = "0.9.0", default-features = false, features = ["serde-codec", "std"] }
multihash = { version = "0.17.0", default-features = false, features = ["multihash-impl", "sha2", "sha3", "ripemd"] }
cid = { version = "0.8.5", default-features = false, features = ["serde-codec", "std"] }
multihash = { version = "0.16.3", default-features = false, features = ["multihash-impl", "sha2", "sha3", "ripemd"] }
unsigned-varint = "0.7.1"
anyhow = "1.0.51"
fvm_ipld_blockstore = { version = "0.1", path = "../ipld/blockstore" }
Expand All @@ -44,7 +44,7 @@ sha3 = { version = "0.10.0", default-features = false, optional = true }
rand = "0.8"
rand_chacha = "0.3"
serde_json = "1.0.56"
multihash = { version = "0.17.0", default-features = false, features = ["multihash-impl", "sha2", "sha3", "ripemd"] }
multihash = { version = "0.16.3", default-features = false, features = ["multihash-impl", "sha2", "sha3", "ripemd"] }

[features]
default = []
Expand Down
4 changes: 2 additions & 2 deletions testing/common_fuzz/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ ahash = "0.7.6"
itertools = "0.10.3"
rand = "0.8.5"

cid = { version = "0.9.0", default-features = false, features = ["serde-codec", "arb", "std"] }
multihash = { version = "0.17.0", features = ["sha2"]}
cid = { version = "0.8.4", default-features = false, features = ["serde-codec", "arb", "std"] }
multihash = { version = "0.16.2", features = ["sha2"]}

fvm_ipld_bitfield = { path = "../../../ipld/bitfield", features = ["enable-arbitrary"] }
fvm_ipld_encoding = { path = "../../../ipld/encoding" }
Expand Down
Loading