Skip to content

Commit

Permalink
prune vm_api depdendencies
Browse files Browse the repository at this point in the history
  • Loading branch information
alexytsu committed Jul 27, 2023
1 parent ec7a37e commit 85a1418
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 73 deletions.
31 changes: 0 additions & 31 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion vm_api/src/expects.rs → test_vm/src/expects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use fil_actors_runtime::{
VERIFIED_REGISTRY_ACTOR_ADDR,
};

use crate::trace::ExpectInvocation;
use vm_api::trace::ExpectInvocation;

/// Static helper functions for creating invocation expectations.
pub struct Expect {}
Expand Down
1 change: 1 addition & 0 deletions test_vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ use vm_api::{actor, ActorState, MessageResult, VMError, VM};
use vm_api::util::{get_state, serialize_ok};

pub mod deals;
pub mod expects;
pub mod fakes;
pub mod util;

Expand Down
2 changes: 1 addition & 1 deletion test_vm/src/util/workflows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ use fvm_shared::sector::RegisteredSealProof;
use fvm_shared::sector::SectorNumber;
use fvm_shared::sector::StoragePower;
use num_traits::Zero;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::apply_ok;
use vm_api::util::get_state;
Expand All @@ -73,6 +72,7 @@ use vm_api::VM;

use crate::*;

use super::expects::Expect;
use super::make_bitfield;
use super::miner_dline_info;
use super::sector_deadline;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/commit_post_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use fil_actors_runtime::runtime::Policy;
use fil_actors_runtime::{
CRON_ACTOR_ADDR, STORAGE_MARKET_ACTOR_ADDR, STORAGE_POWER_ACTOR_ADDR, SYSTEM_ACTOR_ADDR,
};
use test_vm::expects::Expect;
use test_vm::util::{
advance_by_deadline_to_epoch, advance_to_proving_deadline, assert_invariants, create_accounts,
create_miner, expect_invariants, get_network_stats, invariant_failure_patterns, miner_balance,
precommit_sectors, submit_windowed_post,
};
use test_vm::{TestVM, TEST_VM_RAND_ARRAY};
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_code, apply_ok, get_state, DynBlockstore};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/extend_sectors_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use fil_actors_runtime::test_utils::{make_piece_cid, make_sealed_cid};
use fil_actors_runtime::{
DealWeight, EPOCHS_IN_DAY, STORAGE_MARKET_ACTOR_ADDR, VERIFIED_REGISTRY_ACTOR_ADDR,
};
use test_vm::expects::Expect;
use test_vm::util::{
advance_by_deadline_to_epoch, advance_by_deadline_to_epoch_while_proving,
advance_by_deadline_to_index, advance_to_proving_deadline, bf_all, create_accounts,
Expand All @@ -28,7 +29,6 @@ use test_vm::util::{
submit_windowed_post, verifreg_add_client, verifreg_add_verifier,
};
use test_vm::TestVM;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_ok, get_state, DynBlockstore};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/multisig_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use fvm_shared::METHOD_SEND;
use integer_encoding::VarInt;
use std::collections::HashSet;
use std::iter::FromIterator;
use test_vm::expects::Expect;
use test_vm::util::{assert_invariants, create_accounts};
use test_vm::TestVM;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_code, apply_ok, get_state, DynBlockstore};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/power_scenario_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ use fvm_shared::econ::TokenAmount;
use fvm_shared::sector::{RegisteredPoStProof, RegisteredSealProof};
use fvm_shared::METHOD_SEND;
use num_traits::Zero;
use test_vm::expects::Expect;
use test_vm::util::{
assert_invariants, create_accounts, create_miner, expect_invariants,
invariant_failure_patterns, miner_dline_info,
};
use test_vm::{TestVM, FIRST_TEST_USER_ADDR, TEST_FAUCET_ADDR};
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_ok, serialize_ok};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/publish_deals_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ use fil_actors_runtime::network::EPOCHS_IN_DAY;
use fil_actors_runtime::runtime::Policy;
use fil_actors_runtime::{test_utils::*, STORAGE_MARKET_ACTOR_ADDR, VERIFIED_REGISTRY_ACTOR_ADDR};
use test_vm::deals::{DealBatcher, DealOptions};
use test_vm::expects::Expect;
use test_vm::util::assert_invariants;
use test_vm::util::{
bf_all, create_accounts, create_accounts_seeded, create_miner, verifreg_add_verifier,
};
use test_vm::TestVM;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_ok, serialize_ok};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/replica_update_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use fvm_shared::sector::SectorSize;
use fvm_shared::sector::StoragePower;
use fvm_shared::sector::{RegisteredSealProof, SectorNumber};
use test_case::test_case;
use test_vm::expects::Expect;
use test_vm::util::{
advance_by_deadline_to_epoch, advance_by_deadline_to_index, advance_to_proving_deadline,
assert_invariants, bf_all, check_sector_active, check_sector_faulty, create_accounts,
Expand All @@ -39,7 +40,6 @@ use test_vm::util::{
submit_windowed_post, verifreg_add_client, verifreg_add_verifier,
};
use test_vm::TestVM;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_code, apply_ok, get_state, DynBlockstore};

Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/terminate_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ use fvm_shared::piece::PaddedPieceSize;
use fvm_shared::sector::{RegisteredSealProof, StoragePower};
use num_traits::cast::FromPrimitive;
use std::ops::Neg;
use test_vm::expects::Expect;
use test_vm::util::{
advance_by_deadline_to_epoch, advance_by_deadline_to_epoch_while_proving,
advance_to_proving_deadline, create_accounts, create_miner, expect_invariants,
invariant_failure_patterns, make_bitfield, market_publish_deal, miner_balance,
submit_windowed_post, verifreg_add_verifier,
};
use test_vm::TestVM;
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_ok, get_state, DynBlockstore};
use vm_api::VM;
Expand Down
2 changes: 1 addition & 1 deletion test_vm/tests/verifreg_remove_datacap_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use fil_actors_runtime::{
};
use fvm_ipld_encoding::ipld_block::IpldBlock;
use fvm_shared::address::Address;
use test_vm::expects::Expect;
use test_vm::util::{assert_invariants, create_accounts, verifreg_add_verifier};
use test_vm::{TestVM, TEST_VERIFREG_ROOT_ADDR};
use vm_api::expects::Expect;
use vm_api::trace::ExpectInvocation;
use vm_api::util::{apply_code, apply_ok, get_state, DynBlockstore};
use vm_api::VM;
Expand Down
31 changes: 0 additions & 31 deletions vm_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,15 @@ publish = false
[lib]

[dependencies]
fil_builtin_actors_state = { workspace = true }
fil_actors_runtime = { workspace = true, features = [ "test_utils" ] }
fil_actor_init = { workspace = true }
fil_actor_cron = { workspace = true }
fil_actor_system = { workspace = true }
fil_actor_account = { workspace = true }
fil_actor_multisig = { workspace = true }
fil_actor_paych = { workspace = true }
fil_actor_reward = { workspace = true }
fil_actor_power = { workspace = true }
fil_actor_market = { workspace = true }
fil_actor_verifreg = { workspace = true }
fil_actor_miner = { workspace = true }
fil_actor_datacap = { workspace = true }
fil_actor_evm = { workspace = true }
fil_actor_eam = { workspace = true }
fil_actor_ethaccount = { workspace = true }

anyhow = { workspace = true }
bimap = { workspace = true }
blake2b_simd = { workspace = true }
cid = { workspace = true }
frc42_dispatch = { workspace = true }
frc46_token = { workspace = true }
fvm_actor_utils = { workspace = true }
fvm_ipld_bitfield = { workspace = true }
fvm_ipld_blockstore = { workspace = true }
fvm_ipld_encoding = { workspace = true }
fvm_ipld_hamt = { workspace = true }
fvm_shared = { workspace = true }
indexmap = { workspace = true }
integer-encoding = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
num-derive = { workspace = true }
num-traits = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
regex = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
libsecp256k1 = { workspace = true }

1 change: 0 additions & 1 deletion vm_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use fvm_shared::{

pub mod trace;
use trace::*;
pub mod expects;
pub mod util;

mod error;
Expand Down

0 comments on commit 85a1418

Please sign in to comment.