Skip to content

Commit 2b1df06

Browse files
authored
chore: update the fvm (#1405)
* chore: update the fvm This doesn't add support for synthetic porep, but splits: #1335 Into two PRs. * finish update * I guess patches aren't enough * fix evm tests We now need to explicitly specify the sha3/ripemd features when testing (it was removed from shared). * fix clippy * switch back to helix master branch so that helix can pass CI again * use released helix crates
1 parent 8076305 commit 2b1df06

File tree

8 files changed

+253
-244
lines changed

8 files changed

+253
-244
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ libipld-core = { version = "0.13.1", features = ["serde-codec"] }
109109
integer-encoding = { version = "3.0.3", default-features = false }
110110

111111
# helix-onchain
112-
fvm_actor_utils = "7.0.0"
113-
frc42_dispatch = "3.3.0"
114-
frc46_token = "7.0.0"
112+
fvm_actor_utils = "8.0.0"
113+
frc42_dispatch = "4.0.0"
114+
frc46_token = "8.0.0"
115115

116116
# FVM
117117
fvm_sdk = "~3.3.0"
118-
fvm_shared = "~3.4.0"
118+
fvm_shared = "~3.6.0"
119119
fvm_ipld_encoding = "0.4.0"
120120
fvm_ipld_blockstore = "0.2.0"
121121
fvm_ipld_hamt = "0.7.0"

actors/miner/src/expiration_queue.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ impl<'db, BS: Blockstore> ExpirationQueue<'db, BS> {
700700
}
701701

702702
/// Traverses the entire queue with a callback function that may mutate entries.
703-
/// Iff the function returns that it changed an entry, the new entry will be re-written in the queue. Any changed
704-
/// entries that become empty are removed after iteration completes.
703+
/// Iff the function returns that it changed an entry, the new entry will be re-written in the
704+
/// queue. Any changed entries that become empty are removed after iteration completes.
705705
fn iter_while_mut(
706706
&mut self,
707707
mut f: impl FnMut(
@@ -715,8 +715,6 @@ impl<'db, BS: Blockstore> ExpirationQueue<'db, BS> {
715715
let keep_going = f(e.try_into()?, expiration_set)?;
716716

717717
if expiration_set.is_empty() {
718-
// Mark expiration set as unchanged, it will be removed after the iteration.
719-
expiration_set.mark_unchanged();
720718
epochs_emptied.push(e);
721719
}
722720

actors/miner/tests/apply_rewards.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ fn rewards_pay_back_fee_debt() {
188188
let (locked_reward, _) = locked_reward_from_reward(reward.clone());
189189
let remaining_locked = locked_reward - &st.fee_debt; // note that this would be clamped at 0 if difference above is < 0
190190
assert!(remaining_locked.is_positive());
191-
let pledge_delta = remaining_locked.clone();
191+
let pledge_delta = &remaining_locked;
192192
rt.set_caller(*REWARD_ACTOR_CODE_ID, REWARD_ACTOR_ADDR);
193193
rt.expect_validate_caller_addr(vec![REWARD_ACTOR_ADDR]);
194194
// expect pledge update
195195
rt.expect_send_simple(
196196
STORAGE_POWER_ACTOR_ADDR,
197197
PowerMethod::UpdatePledgeTotal as u64,
198-
IpldBlock::serialize_cbor(&pledge_delta).unwrap(),
198+
IpldBlock::serialize_cbor(pledge_delta).unwrap(),
199199
TokenAmount::zero(),
200200
None,
201201
ExitCode::OK,

actors/miner/tests/change_worker_address_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn setup() -> (ActorHarness, MockRuntime) {
3333
fn successfully_change_only_the_worker_address() {
3434
let (h, rt) = setup();
3535

36-
let original_control_addresses = h.control_addrs.clone();
36+
let original_control_addresses = &h.control_addrs;
3737
let new_worker = Address::new_id(999);
3838

3939
// set epoch to something close to next deadline so first cron will be before effective date
@@ -71,7 +71,7 @@ fn successfully_change_only_the_worker_address() {
7171

7272
// assert control addresses are unchanged
7373
assert!(!info.control_addresses.is_empty());
74-
assert_eq!(original_control_addresses, info.control_addresses);
74+
assert_eq!(original_control_addresses, &info.control_addresses);
7575

7676
h.check_state(&rt);
7777
}

actors/verifreg/tests/verifreg_actor_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ mod clients {
318318
let allowance_verifier = verifier_allowance(&rt);
319319
h.add_verifier(&rt, &VERIFIER, &allowance_verifier).unwrap();
320320

321-
let allowance = rt.policy.minimum_verified_allocation_size.clone();
322-
h.add_client(&rt, &VERIFIER, &CLIENT, &allowance).unwrap();
321+
let allowance = &rt.policy.minimum_verified_allocation_size;
322+
h.add_client(&rt, &VERIFIER, &CLIENT, allowance).unwrap();
323323
h.check_state(&rt);
324324
}
325325

runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ no-provider-deal-collateral = []
9191
fake-proofs = []
9292

9393

94-
test_utils = ["hex", "multihash/sha2", "libsecp256k1", "blake2b_simd", "rand", "rand/std_rng", "lazy_static", "pretty_env_logger"]
94+
test_utils = ["hex", "multihash/sha2", "multihash/sha3", "multihash/ripemd", "libsecp256k1", "blake2b_simd", "rand", "rand/std_rng", "lazy_static", "pretty_env_logger"]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "1.69.0"
2+
channel = "1.70.0"
33
components = ["clippy", "llvm-tools-preview", "rustfmt"]
44
targets = ["wasm32-unknown-unknown"]

0 commit comments

Comments
 (0)