Skip to content

Commit 0976d97

Browse files
refactor: update to fvm_ipld_{encoding|blockstore} (#189)
* refactor: update to fvm_ipld_{encoding|blockstore} Ref filecoin-project/ref-fvm#434 Co-authored-by: Steven Allen <[email protected]>
1 parent 6bdc941 commit 0976d97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+363
-242
lines changed

Cargo.lock

Lines changed: 139 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ members = [
4242
## Uncomment when working locally on ref-fvm and this repo simultaneously.
4343
## Assumes the ref-fvm checkout is in a sibling directory with the same name.
4444
## (Valid while FVM modules aren't published to crates.io)
45-
[patch."https://github.com/filecoin-project/ref-fvm"]
45+
#[patch."https://github.com/filecoin-project/ref-fvm"]
4646
#fvm_shared = { path = "../ref-fvm/shared" }
4747
#fvm_sdk = { path = "../ref-fvm/sdk" }
4848
#fvm_ipld_hamt = { path = "../ref-fvm/ipld/hamt" }
4949
#fvm_ipld_amt = { path = "../ref-fvm/ipld/amt" }
5050
#fvm_ipld_bitfield = { path = "../ref-fvm/ipld/bitfield"}
51-
#fvm_ipld_car = { path = "../ref-fvm/ipld/car"}
51+
#fvm_ipld_encoding = { path = "../ref-fvm/ipld/encoding"}
52+
#fvm_ipld_blockstore = { path = "../ref-fvm/ipld/blockstore"}
5253

5354
## Uncomment entries below when working locally on ref-fvm and this repo simultaneously.
5455
## Assumes the ref-fvm checkout is in a sibling directory with the same name.
@@ -59,7 +60,8 @@ members = [
5960
#fvm_ipld_hamt = { path = "../ref-fvm/ipld/hamt" }
6061
#fvm_ipld_amt = { path = "../ref-fvm/ipld/amt" }
6162
#fvm_ipld_bitfield = { path = "../ref-fvm/ipld/bitfield"}
62-
#fvm_ipld_car = { path = "../ref-fvm/ipld/car"}
63+
#fvm_ipld_encoding = { path = "../ref-fvm/ipld/encoding"}
64+
#fvm_ipld_blockstore = { path = "../ref-fvm/ipld/blockstore"}
6365

6466
[profile.wasm]
6567
inherits = "release"

actors/account/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ crate-type = ["cdylib", "lib"]
1414

1515
[dependencies]
1616
fil_actors_runtime = { version = "8.0.0-alpha.1", path = "../runtime", features = ["fil-actor"] }
17-
fvm_shared = { version = "0.3.1", default-features = false }
17+
fvm_shared = { version = "0.4.0", default-features = false }
1818
serde = { version = "1.0.136", features = ["derive"] }
1919
num-traits = "0.2.14"
2020
num-derive = "0.3.3"
21+
fvm_ipld_blockstore = { version = "0.1" }
22+
fvm_ipld_encoding = "0.1.0"
2123

2224
[dev-dependencies]
2325
fil_actors_runtime = { version = "8.0.0-alpha.1", path = "../runtime", features = ["test_utils", "sector-default"] }

actors/account/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright 2019-2022 ChainSafe Systems
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

4+
use fvm_ipld_blockstore::Blockstore;
5+
use fvm_ipld_encoding::RawBytes;
46
use fvm_shared::address::{Address, Protocol};
5-
use fvm_shared::blockstore::Blockstore;
6-
use fvm_shared::encoding::RawBytes;
77
use fvm_shared::{MethodNum, METHOD_CONSTRUCTOR};
88
use num_derive::FromPrimitive;
99
use num_traits::FromPrimitive;

actors/account/src/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright 2019-2022 ChainSafe Systems
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

4+
use fvm_ipld_encoding::tuple::*;
5+
use fvm_ipld_encoding::Cbor;
46
use fvm_shared::address::Address;
5-
use fvm_shared::encoding::tuple::*;
6-
use fvm_shared::encoding::Cbor;
77

88
/// State includes the address for the actor
99
#[derive(Serialize_tuple, Deserialize_tuple)]

actors/account/tests/account_actor_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
use fil_actor_account::{Actor as AccountActor, State};
55
use fil_actors_runtime::builtin::SYSTEM_ACTOR_ADDR;
66
use fil_actors_runtime::test_utils::*;
7+
use fvm_ipld_encoding::RawBytes;
78
use fvm_shared::address::Address;
8-
use fvm_shared::encoding::RawBytes;
99
use fvm_shared::error::ExitCode;
1010

1111
macro_rules! account_tests {

actors/cron/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ crate-type = ["cdylib", "lib"]
1515

1616
[dependencies]
1717
fil_actors_runtime = { version = "8.0.0-alpha.1", path = "../runtime", features = ["fil-actor"] }
18-
fvm_shared = { version = "0.3.1", default-features = false }
18+
fvm_shared = { version = "0.4.0", default-features = false }
1919
num-traits = "0.2.14"
2020
num-derive = "0.3.3"
2121
log = "0.4.14"
2222
serde = { version = "1.0.136", features = ["derive"] }
23+
fvm_ipld_blockstore = { version = "0.1" }
24+
fvm_ipld_encoding = "0.1.0"
2325

2426
[dev-dependencies]
2527
fil_actors_runtime = { version = "8.0.0-alpha.1", path = "../runtime", features = ["test_utils", "sector-default"] }

actors/cron/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
use fil_actors_runtime::runtime::{ActorCode, Runtime};
55
use fil_actors_runtime::{actor_error, cbor, ActorError, SYSTEM_ACTOR_ADDR};
6-
use fvm_shared::blockstore::Blockstore;
6+
use fvm_ipld_blockstore::Blockstore;
7+
use fvm_ipld_encoding::tuple::*;
8+
use fvm_ipld_encoding::RawBytes;
79
use fvm_shared::econ::TokenAmount;
8-
use fvm_shared::encoding::tuple::*;
9-
use fvm_shared::encoding::RawBytes;
10+
1011
use fvm_shared::{MethodNum, METHOD_CONSTRUCTOR};
1112
use num_derive::FromPrimitive;
1213
use num_traits::FromPrimitive;

actors/cron/src/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright 2019-2022 ChainSafe Systems
22
// SPDX-License-Identifier: Apache-2.0, MIT
33

4+
use fvm_ipld_encoding::tuple::*;
5+
use fvm_ipld_encoding::Cbor;
46
use fvm_shared::address::Address;
5-
use fvm_shared::encoding::tuple::*;
6-
use fvm_shared::encoding::Cbor;
77
use fvm_shared::MethodNum;
88

99
/// Cron actor state which holds entries to call during epoch tick

actors/cron/tests/cron_actor_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
use fil_actor_cron::{Actor as CronActor, ConstructorParams, Entry, State};
55
use fil_actors_runtime::test_utils::*;
66
use fil_actors_runtime::SYSTEM_ACTOR_ADDR;
7+
use fvm_ipld_encoding::RawBytes;
78
use fvm_shared::address::Address;
8-
use fvm_shared::encoding::RawBytes;
99
use fvm_shared::error::ExitCode;
1010

1111
fn construct_runtime() -> MockRuntime {

0 commit comments

Comments
 (0)