Coder Social home page Coder Social logo

builtin-actors's People

Contributors

aarshkshah1992 avatar alexytsu avatar anorth avatar arajasek avatar connormullett avatar dignifiedquire avatar elmattic avatar fridrik01 avatar galargh avatar geoff-vball avatar hunjixin avatar jdjaustin avatar jennijuju avatar kubuxu avatar lemmih avatar lesnyrumcajs avatar lyswifter avatar maciejwitowski avatar macro-ss avatar mriise avatar raulk avatar rvagg avatar shamb0 avatar stebalien avatar sudo-shashank avatar tyshko5 avatar vmx avatar vyzo avatar zenground0 avatar zhiqiangxu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

builtin-actors's Issues

Cron Actor Test Coverage

Initial Coverage:

|| actors/cron/src/lib.rs: 23/28

Unit tests to migrate/check

cron $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstructor
    • TestConstructor/construct_with_empty_entries
    • TestConstructor/construct_with_non-empty_entries
  • TestEpochTick
    • TestEpochTick/epoch_tick_with_empty_entries
    • TestEpochTick/epoch_tick_with_non-empty_entries
    • TestEpochTick/built-in_entries

Make room in runtime policy for market, reward policies

#68 extracted miner policy constants to a runtime Policy object, but ignored other built-in actors with similar policy settings.

Restructure to make room for configurable policy settings for all built-in actors, maybe something like Policy.Miner.xyz .

CheckState functions

specs-actors implements the CheckState function for all actors. This function traverses actor state looking for inconsistencies. This check is used both in testing (unit and integration) and in live checks of main net state.

This issue tracks work to duplicate the existing CheckState methods and the top-level traversal of filecoin network state

Reward Actor Test Coverage

Initial coverage

|| actors/reward/src/expneg.rs: 6/6
|| actors/reward/src/lib.rs: 67/115
|| actors/reward/src/logic.rs: 30/30
|| actors/reward/src/state.rs: 39/50

Unit tests to migrate/check

go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestComputeRTeta
  • TestBaselineReward
  • TestSimpleReward
  • TestBaselineRewardGrowth
  • TestConstructor
    • TestConstructor/construct_with_0_power
    • TestConstructor/construct_with_less_power_than_baseline
    • TestConstructor/construct_with_more_power_than_baseline
  • TestAwardBlockReward
    • TestAwardBlockReward/rejects_gas_reward_exceeding_balance
    • TestAwardBlockReward/rejects_negative_penalty_or_reward
    • TestAwardBlockReward/rejects_zero_wincount
    • TestAwardBlockReward/pays_reward_and_tracks_penalty
    • TestAwardBlockReward/pays_out_current_balance_when_reward_exceeds_total_balance
    • TestAwardBlockReward/TotalStoragePowerReward_tracks_correctly
    • TestAwardBlockReward/funds_are_sent_to_the_burnt_funds_actor_if_sending_locked_funds_to_miner_fails
  • TestThisEpochReward
    • TestThisEpochReward/successfully_fetch_reward_for_this_epoch
  • TestSuccessiveKPIUpdates

Perform operations in sorted order (in builtin actors)

Proposal

I'm switching out our "hash" maps/sets with "btree" maps/sets (in actors, at least) due to filecoin-project/ref-fvm#232. Given this, I'd like to switch some of our parameter processing from "first encountered deadline/partition" to "sorted order" because btrees are ordered anyways.

If we do this right, clients that pass pre-sorted parameters should get a bit of a gas discount as well.

Background

In order to be deterministic pre-FVM, built-in actors that need to "group" inputs either needed to execute these groups based on the order in which they were encountered in the params, or sort them before executing.

By example:

Group, then execute based on first encountered:

let mut grouped = HashMap::<_, Vec<_>>::new();
// Keep track of the order in which we first encounter "keys" (groups).
let mut keys = Vec::new();

for inp in inputs {
    let key = key(&inp);
    grouped.entry(key).or_insert_with(||{ keys.push(key); key }).push(inp);
}

// Execute based on that order.
for key in keys {
    let value = grouped[key];
}

Group then sort:

let mut grouped = HashMap::<_, Vec<_>>::new();
for inp in inputs {
    grouped.entry(key(&inp)).or_default().push(inp);
}

// Once we've grouped, extract the keys.
let mut keys = grouped.keys();
// Sort them.
keys.sort();

// Execute based on these keys.
for key in keys {
    let value = grouped[key];
}

However, two things have changed:

  1. Actors now have no access to system randomness so the original reason no longer stands.
  2. We can't securely use hash-maps in many cases at all due to filecoin-project/ref-fvm#232. As a part of this, I've been switching HashMaps and HashSets to BTreeMap/Sets.

Power Actor Test Coverage

Initial coverage

|| actors/power/src/lib.rs: 0/368
|| actors/power/src/state.rs: 16/166

Unit tests to migrate/check

power ⟩ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstruction
    • TestConstruction/simple_construction
    • TestConstruction/create_miner
  • TestCreateMinerFailures
    • TestCreateMinerFailures/fails_when_caller_is_not_of_signable_type
    • TestCreateMinerFailures/fails_if_send_to_Init_Actor_fails
  • TestUpdateClaimedPowerFailures
    • TestUpdateClaimedPowerFailures/fails_if_caller_is_not_a_StorageMinerActor
    • TestUpdateClaimedPowerFailures/fails_if_claim_does_not_exist_for_caller
  • TestEnrollCronEpoch
    • TestEnrollCronEpoch/enroll_multiple_events
    • TestEnrollCronEpoch/enroll_for_an_epoch_before_the_current_epoch
    • TestEnrollCronEpoch/fails_if_epoch_is_negative
  • TestPowerAndPledgeAccounting
    • TestPowerAndPledgeAccounting/power_&_pledge_accounted_below_threshold
    • TestPowerAndPledgeAccounting/new_miner_updates_MinerAboveMinPowerCount
    • TestPowerAndPledgeAccounting/power_accounting_crossing_threshold
    • TestPowerAndPledgeAccounting/all_of_one_miner's_power_disappears_when_that_miner_dips_below_min_power_threshold
    • TestPowerAndPledgeAccounting/power_gets_added_when_miner_crosses_minPower_but_not_before
    • TestPowerAndPledgeAccounting/threshold_only_depends_on_raw_power,_not_qa_power
    • TestPowerAndPledgeAccounting/qa_power_is_above_threshold_before_and_after_update
    • TestPowerAndPledgeAccounting/claimed_power_is_externally_available
  • TestUpdatePledgeTotal
    • TestUpdatePledgeTotal/update_pledge_total_aborts_if_miner_has_no_claim
  • TestCron
    • TestCron/calls_reward_actor
    • TestCron/test_amount_sent_to_reward_actor_and_state_change
    • TestCron/event_scheduled_in_null_round_called_next_round
    • TestCron/event_scheduled_in_past_called_next_round
    • TestCron/fails_to_enroll_if_epoch_is_negative
    • TestCron/skips_invocation_if_miner_has_no_claim
    • TestCron/handles_failed_call
  • TestSubmitPoRepForBulkVerify
    • TestSubmitPoRepForBulkVerify/registers_porep_and_charges_gas
    • TestSubmitPoRepForBulkVerify/aborts_when_too_many_poreps
    • TestSubmitPoRepForBulkVerify/aborts_when_miner_has_no_claim
  • TestCronBatchProofVerifies
    • TestCronBatchProofVerifies/success_with_one_miner_and_one_confirmed_sector
    • TestCronBatchProofVerifies/success_with_one_miner_and_multiple_confirmed_sectors
    • TestCronBatchProofVerifies/duplicate_sector_numbers_are_ignored_for_a_miner
    • TestCronBatchProofVerifies/skips_verify_if_miner_has_no_claim
    • TestCronBatchProofVerifies/success_with_multiple_miners_and_multiple_confirmed_sectors_and_assert_expected_power
    • TestCronBatchProofVerifies/success_when_no_confirmed_sector
    • TestCronBatchProofVerifies/verification_for_one_sector_fails_but_others_succeeds_for_a_miner
    • TestCronBatchProofVerifies/cron_tick_does_not_fail_if_batch_verify_seals_fails

ExpectAbort and ExpectAbortContainsMessage

We've discussed bringing these testing helpers to rust actors and this issue tracks the discussion.

I think it makes sense to bring both things over. Less controversially we should at least try to bring ExpectAbort over. There's probably some reason this wasn't added in the first place related to things being different in rust. We should try adding this functionality to the mock runtime and see what happens.

Init Actor Test Coverage

Initial Coverage

|| actors/init/src/lib.rs: 41/55
|| actors/init/src/state.rs: 17/19

Unit tests to migrate/check

init $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstructor
  • TestExec
    • TestExec/abort_actors_that_cannot_call_exec
    • TestExec/happy_path_exec_create_2_payment_channels
    • TestExec/happy_path_exec_create_storage_miner
    • TestExec/happy_path_create_multisig_actor
    • TestExec/sending_to_constructor_failure

Account Actor Test Coverage

Initial Coverage

|| actors/account/src/lib.rs: 17/22

Unit tests to migrate/check

account $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestAccountactor
    • TestAccountactor/happy_path_construct_SECP256K1_address
    • TestAccountactor/happy_path_construct_BLS_address
    • TestAccountactor/fail_to_construct_account_actor_using_ID_address
    • TestAccountactor/fail_to_construct_account_actor_using_Actor_address

Validate proof types on decode

Currently, we validate proof types manually inside our actors to match go's behavior. It would be safer to simply reject invalid proof types when we attempt to decode state/messages.

Doing this for NV16 (M1) is pretty easy: we'd just remove the Invalid cases from our enums. E.g.:

https://github.com/filecoin-project/ref-fvm/blob/0692d5bbb4d7ca588278a3544a48504a7f5ed0ee/shared/src/sector/registered_proof.rs#L30

Doing this after Nv16 is possible, but slightly tricker as these types tend to be "shared" between versions. Although it shouldn't be too bad as we won't re-compile nv16 actors in nv17.

replica update integration test

refer to https://github.com/filecoin-project/specs-actors/blob/master/actors/test/replica_update_test.go

Add/Refactor error handling to Actors V7

As agreed with @raulk and @Stebalien - we will add error handling, next to the V7 actor's version.
We will then put everything together in the actors V8, which will be used for internal and external audits, which we plan to conduct from Mid March.

could not compile as a result of the car file output localtion

warning: bundle=/home/dtynn/proj/github.com/filecoin-project/builtin-actors/target/release/build/filecoin_canonical_actors_bundle-29a911457ca77f1f/out/bundle/bundle.car
error: couldn't read /home/dtynn/proj/github.com/filecoin-project/builtin-actors/target/release/build/filecoin_canonical_actors_bundle-29a911457ca77f1f/out/bundle.car: No such file or directory (os error 2)
  --> bundle/src/lib.rs:23:31
   |
23 | pub const BUNDLE_CAR: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/bundle.car"));
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)

The following warnings were emitted during compilation:

error occurs for cargo build --release

difference between

https://github.com/filecoin-project/builtin-actors/blob/master/bundle/build.rs#L41

and

https://github.com/filecoin-project/builtin-actors/blob/master/bundle/src/lib.rs#L23

Rename this repo to builtin-actors

In the past, without a real VM, a name like spec-actors or canonical-actors made sense because there were no other actors and this code defined the precise behaviour. But the FVM will introduce a flourishing of new, user-programmed actors that will do all kinds of wonderful things. Some of those will become "canonical" in the loose sense of the work, e.g. by setting standard APIs for tokens, loans, deals, derivatives etc. Using the name canonical for this repo somehow downgrades the importance of the user actors we're seeking to enable.

The axis that will distinguish the actors in this repo from all the others will be that these are built-in to the network, forming part of the consensus rules, and change only with network upgrades. The built-in/user-programmed axis is clear, but I don't think canonical/non-canonical makes as much sense.

Eager bitfield validation in parameters

The rust actors lazily validate bitfields because that's what go does. We do want to lazily validate bitfields in state (too expensive to validate them every time we load state), but we should be eagerly validating bitfields in parameters and return values.

Once we start making consensus breaking changes, we should replace all UnvalidatedBitFields in parameters with BitField.

Remove old CC upgrade/replace params

Now SnapDeal is live in the network, we should remove all code that's only for the old cc upgrade path, including ReplaceCapacity params.ReplaceSectorNumber and so on.

Use custom error types and remove error downcasting

Currently, we have a lot of "anyhow" errors and rely on error downcasting to figure out the right exit code. Unfortunately, this makes it very difficult to figure out what the exit code should be.

Instead, we'd ideally:

  1. Abort immediately once we know the right exit code (#282).
  2. Return situation-specific errors from state types like partitions & deadlines, so we can figure out the correct exit code.

Market Actor Test Coverage

Initial coverage

|| actors/market/src/deal.rs: 0/15
|| actors/market/src/lib.rs: 9/816
|| actors/market/src/policy.rs: 0/18
|| actors/market/src/state.rs: 21/311

Unit tests to migrate/check

market $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestRemoveAllError
  • TestMarketActor
    • TestMarketActor/simple_construction
    • TestMarketActor/AddBalance
      • TestMarketActor/AddBalance/adds_to_provider_escrow_funds
      • TestMarketActor/AddBalance/fails_unless_called_by_an_account_actor
      • TestMarketActor/AddBalance/adds_to_non-provider_escrow_funds
      • TestMarketActor/AddBalance/fail_when_balance_is_zero
    • TestMarketActor/WithdrawBalance
      • TestMarketActor/WithdrawBalance/fails_with_a_negative_withdraw_amount
      • TestMarketActor/WithdrawBalance/fails_if_withdraw_from_non_provider_funds_is_not_initiated_by_the_recipient
      • TestMarketActor/WithdrawBalance/fails_if_withdraw_from_provider_funds_is_not_initiated_by_the_owner_or_worker
      • TestMarketActor/WithdrawBalance/withdraws_from_provider_escrow_funds_and_sends_to_owner
      • TestMarketActor/WithdrawBalance/withdraws_from_non-provider_escrow_funds
      • TestMarketActor/WithdrawBalance/client_withdrawing_more_than_escrow_balance_limits_to_available_funds
      • TestMarketActor/WithdrawBalance/worker_withdrawing_more_than_escrow_balance_limits_to_available_funds
      • TestMarketActor/WithdrawBalance/balance_after_withdrawal_must_ALWAYS_be_greater_than_or_equal_to_locked_amount
      • TestMarketActor/WithdrawBalance/worker_balance_after_withdrawal_must_account_for_slashed_funds
  • TestDealOpsByEpochOffset
    • TestDealOpsByEpochOffset/deal_starts_on_day_boundary
    • TestDealOpsByEpochOffset/deal_starts_partway_through_day
  • TestPublishStorageDeals
    • TestPublishStorageDeals/simple_deal
    • TestPublishStorageDeals/provider_and_client_addresses_are_resolved_before_persisting_state_and_sent_to_VerigReg_actor_for_a_verified_deal
    • TestPublishStorageDeals/publish_a_deal_after_activating_a_previous_deal_which_has_a_start_epoch_far_in_the_future
    • TestPublishStorageDeals/publish_a_deal_with_enough_collateral_when_circulating_supply_>_0
    • TestPublishStorageDeals/publish_multiple_deals_for_different_clients_and_ensure_balances_are_correct
  • TestPublishStorageDealsFailures
    • TestPublishStorageDealsFailures/provider_collateral_less_than_bound
    • TestPublishStorageDealsFailures/provider_does_not_have_enough_balance_for_collateral
    • TestPublishStorageDealsFailures/deal_end_after_deal_start
    • TestPublishStorageDealsFailures/negative_client_collateral
    • TestPublishStorageDealsFailures/no_entry_for_client_in_locked__balance_table
    • TestPublishStorageDealsFailures/zero_piece_size
    • TestPublishStorageDealsFailures/piece_size_less_than_128_bytes
    • TestPublishStorageDealsFailures/current_epoch_greater_than_start_epoch
    • TestPublishStorageDealsFailures/negative_provider_collateral
    • TestPublishStorageDealsFailures/provider_collateral_greater_than_max_collateral
    • TestPublishStorageDealsFailures/client_does_not_have_enough_balance_for_collateral
    • TestPublishStorageDealsFailures/unable_to_resolve_client_address
    • TestPublishStorageDealsFailures/signature_is_invalid
    • TestPublishStorageDealsFailures/bad_piece_CID
    • TestPublishStorageDealsFailures/deal_duration_greater_than_max_deal_duration
    • TestPublishStorageDealsFailures/price_per_epoch_greater_than_total_filecoin
    • TestPublishStorageDealsFailures/client_collateral_greater_than_max_collateral
    • TestPublishStorageDealsFailures/no_entry_for_provider_in_locked__balance_table
    • TestPublishStorageDealsFailures/piece_size_is_not_a_power_of_2
    • TestPublishStorageDealsFailures/negative_price_per_epoch
    • TestPublishStorageDealsFailures/fail_when_client_has_some_funds_but_not_enough_for_a_deal
    • TestPublishStorageDealsFailures/fail_when_provider_has_some_funds_but_not_enough_for_a_deal
    • TestPublishStorageDealsFailures/fail_when_deals_have_different_providers
    • TestPublishStorageDealsFailures/fail_when_caller_is_not_of_signable_type
    • TestPublishStorageDealsFailures/fail_when_no_deals_in_params
    • TestPublishStorageDealsFailures/fail_to_resolve_provider_address
    • TestPublishStorageDealsFailures/caller_is_not_the_same_as_the_worker_address_for_miner
    • TestPublishStorageDealsFailures/fails_if_provider_is_not_a_storage_miner_actor
  • TestActivateDeals
    • TestActivateDeals/active_deals_multiple_times_with_different_providers
  • TestActivateDealFailures
    • TestActivateDealFailures/fail_when_caller_is_not_the_provider_of_the_deal
    • TestActivateDealFailures/fail_when_caller_is_not_a_StorageMinerActor
    • TestActivateDealFailures/fail_when_deal_has_not_been_published_before
    • TestActivateDealFailures/fail_when_deal_has_already_been_activated
    • TestActivateDealFailures/fail_when_current_epoch_greater_than_start_epoch_of_deal
    • TestActivateDealFailures/fail_when_end_epoch_of_deal_greater_than_sector_expiry
    • TestActivateDealFailures/fail_to_activate_all_deals_if_one_deal_fails
  • TestOnMinerSectorsTerminate
    • TestOnMinerSectorsTerminate/terminate_multiple_deals_from_multiple_providers
    • TestOnMinerSectorsTerminate/ignore_deal_proposal_that_does_not_exist
    • TestOnMinerSectorsTerminate/terminate_valid_deals_along_with_just-expired_deal
    • TestOnMinerSectorsTerminate/terminate_valid_deals_along_with_expired_and_cleaned-up_deal
    • TestOnMinerSectorsTerminate/terminating_a_deal_the_second_time_does_not_change_it's_slash_epoch
    • TestOnMinerSectorsTerminate/terminating_new_deals_and_an_already_terminated_deal_only_terminates_the_new_deals
    • TestOnMinerSectorsTerminate/do_not_terminate_deal_if_end_epoch_is_equal_to_or_less_than_current_epoch
    • TestOnMinerSectorsTerminate/fail_when_caller_is_not_a_StorageMinerActor
    • TestOnMinerSectorsTerminate/fail_when_caller_is_not_the_provider_of_the_deal
    • TestOnMinerSectorsTerminate/fail_when_deal_has_been_published_but_not_activated
    • TestOnMinerSectorsTerminate/termination_of_all_deals_should_fail_when_one_deal_fails
  • TestCronTick
    • TestCronTick/fail_when_deal_is_activated_but_proposal_is_not_found
    • TestCronTick/fail_when_deal_update_epoch_is_in_the_future
    • TestCronTick/crontick_for_a_deal_at_it's_start_epoch_results_in_zero_payment_and_no_slashing
    • TestCronTick/slash_a_deal_and_make_payment_for_another_deal_in_the_same_epoch
    • TestCronTick/cannot_publish_the_same_deal_twice_BEFORE_a_cron_tick
  • TestRandomCronEpochDuringPublish
    • TestRandomCronEpochDuringPublish/cron_processing_happens_at_processing_epoch,_not_start_epoch
    • TestRandomCronEpochDuringPublish/deals_are_scheduled_for_expiry_later_than_the_end_epoch
    • TestRandomCronEpochDuringPublish/deal_is_processed_after_it's_end_epoch_->_should_expire_correctly
    • TestRandomCronEpochDuringPublish/activation_after_deal_start_epoch_but_before_it_is_processed_fails
    • TestRandomCronEpochDuringPublish/cron_processing_of_deal_after_missed_activation_should_fail_and_slash
  • TestCronTickTimedoutDeals
    • TestCronTickTimedoutDeals/timed_out_deal_is_slashed_and_deleted
    • TestCronTickTimedoutDeals/publishing_timed_out_deal_again_should_work_after_cron_tick_as_it_should_no_longer_be_pending
    • TestCronTickTimedoutDeals/timed_out_and_verified_deals_are_slashed,_deleted_AND_sent_to_the_Registry_actor
  • TestCronTickDealExpiry
    • TestCronTickDealExpiry/all_payments_are_made_for_a_deal_->deal_expires->_client_withdraws_collateral_and_client_account_is_removed
    • TestCronTickDealExpiry/deal_expiry_->_regular_payments_till_deal_expires_and_then_locked_funds_are_unlocked
    • TestCronTickDealExpiry/deal_expiry_->_deal_is_correctly_processed_twice_in_the_same_crontick
    • TestCronTickDealExpiry/deal_expiry_->_payment_for_a_deal_if_deal_is_already_expired_before_a_cron_tick
    • TestCronTickDealExpiry/expired_deal_should_unlock_the_remaining_client_and_provider_locked_balance_after_payment_and_deal_should_be_deleted
  • TestCronTickDealSlashing
    • TestCronTickDealSlashing/deal_is_terminated_at_the_activation_epoch_and_then_the_first_crontick_happens
    • TestCronTickDealSlashing/deal_is_slashed_and_then_deal_expiry_happens_on_crontick,_but_slashing_still_occurs
    • TestCronTickDealSlashing/deal_is_slashed_just_BEFORE_the_end_epoch
    • TestCronTickDealSlashing/deal_is_slashed_after_the_startepoch_and_then_the_first_crontick_happens
    • TestCronTickDealSlashing/deal_is_slashed_at_the_startepoch_and_then_the_first_crontick_happens
    • TestCronTickDealSlashing/deal_is_slashed_before_the_startepoch_and_then_the_first_crontick_happens
    • TestCronTickDealSlashing/slash_multiple_deals_in_the_same_epoch
    • TestCronTickDealSlashing/deal_is_correctly_processed_twice_in_the_same_crontick_and_slashed
    • TestCronTickDealSlashing/regular_payments_till_deal_is_slashed_and_then_slashing_is_processed
    • TestCronTickDealSlashing/regular_payments_till_deal_expires_and_then_we_attempt_to_slash_it_but_it_will_NOT_be_slashed
    • TestCronTickDealSlashing/deal_is_slashed_AT_the_end_epoch_->_should_NOT_be_slashed_and_should_be_considered_expired
  • TestMarketActorDeals
  • TestMaxDealLabelSize
  • TestComputeDataCommitment
    • TestComputeDataCommitment/successfully_compute_cid
    • TestComputeDataCommitment/success_on_empty_piece_info
    • TestComputeDataCommitment/success_with_multiple_sector_commitments
    • TestComputeDataCommitment/fail_when_deal_proposal_is_absent
    • TestComputeDataCommitment/fail_when_syscall_returns_an_error
    • TestComputeDataCommitment/fail_whole_call_when_one_deal_proposal_of_one_sector_is_absent
    • TestComputeDataCommitment/fail_whole_call_when_one_commitment_fails_syscall
  • TestVerifyDealsForActivation
    • TestVerifyDealsForActivation/verify_deal_and_get_deal_weight_for_unverified_deal_proposal
    • TestVerifyDealsForActivation/verify_deal_and_get_deal_weight_for_verified_deal_proposal
    • TestVerifyDealsForActivation/verification_and_weights_for_verified_and_unverified_deals
    • TestVerifyDealsForActivation/fail_when_caller_is_not_a_StorageMinerActor
    • TestVerifyDealsForActivation/fail_when_deal_proposal_is_not_found
    • TestVerifyDealsForActivation/fail_when_caller_is_not_the_provider
    • TestVerifyDealsForActivation/fail_when_current_epoch_is_greater_than_proposal_start_epoch
    • TestVerifyDealsForActivation/fail_when_deal_end_epoch_is_greater_than_sector_expiration
    • TestVerifyDealsForActivation/fail_when_the_same_deal_ID_is_passed_multiple_times
  • TestLockedFundTrackingStates

Paych Actor Test Coverage

Initial coverage

|| actors/paych/src/lib.rs: 113/171
|| actors/paych/src/state.rs: 2/2
|| actors/paych/src/types.rs: 14/14

Unit tests to migrate/check

paych $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestPaymentChannelActor_Constructor
    • TestPaymentChannelActor_Constructor/can_create_a_payment_channel_actor
    • TestPaymentChannelActor_Constructor/creates_a_payment_channel_actor_after_resolving_non-ID_addresses_to_ID_addresses
    • TestPaymentChannelActor_Constructor/fails_if_target_(to)_is_not_account_actor
    • TestPaymentChannelActor_Constructor/fails_if_sender_(from)_is_not_account_actor
    • TestPaymentChannelActor_Constructor/fails_if_sender_addr_is_not_resolvable_to_ID_address
    • TestPaymentChannelActor_Constructor/fails_if_target_addr_is_not_resolvable_to_ID_address
    • TestPaymentChannelActor_Constructor/fails_if_actor_does_not_exist_with:_no_code_for_address
  • TestPaymentChannelActor_CreateLane
    • TestPaymentChannelActor_CreateLane/succeeds
    • TestPaymentChannelActor_CreateLane/fails_if_channel_address_does_not_match_address_on_the_signed_voucher
    • TestPaymentChannelActor_CreateLane/fails_if_address_on_the_signed_voucher_cannot_be_resolved_to_ID_address
    • TestPaymentChannelActor_CreateLane/succeeds_if_address_on_the_signed_voucher_can_be_resolved_to_channel_ID_address
    • TestPaymentChannelActor_CreateLane/fails_if_balance_too_low
    • TestPaymentChannelActor_CreateLane/fails_if_new_send_balance_is_negative
    • TestPaymentChannelActor_CreateLane/fails_if_signature_not_valid
    • TestPaymentChannelActor_CreateLane/fails_if_too_early_for_voucher
    • TestPaymentChannelActor_CreateLane/fails_if_beyond_TimeLockMax
    • TestPaymentChannelActor_CreateLane/fails_if_signature_not_verified
    • TestPaymentChannelActor_CreateLane/fails_if_SigningBytes_fails
  • TestActor_UpdateChannelStateRedeem
    • TestActor_UpdateChannelStateRedeem/redeeming_voucher_updates_correctly_with_one_lane
    • TestActor_UpdateChannelStateRedeem/redeems_voucher_for_correct_lane
    • TestActor_UpdateChannelStateRedeem/redeeming_voucher_fails_on_nonce_reuse
  • TestActor_UpdateChannelStateMergeSuccess
  • TestActor_UpdateChannelStateMergeFailure
    • TestActor_UpdateChannelStateMergeFailure/fails:_merged_lane_in_voucher_has_outdated_nonce,_cannot_redeem
    • TestActor_UpdateChannelStateMergeFailure/fails:_voucher_has_an_outdated_nonce,_cannot_redeem
    • TestActor_UpdateChannelStateMergeFailure/fails:_not_enough_funds_in_channel_to_cover_voucher
    • TestActor_UpdateChannelStateMergeFailure/fails:_voucher_cannot_merge_lanes_into_its_own_lane
    • TestActor_UpdateChannelStateMergeFailure/When_lane_doesn't_exist,_fails_with:_voucher_specifies_invalid_merge_lane_999
    • TestActor_UpdateChannelStateMergeFailure/Lane_ID_over_max_fails
  • TestActor_UpdateChannelStateExtra
    • TestActor_UpdateChannelStateExtra/Succeeds_if_extra_call_succeeds
    • TestActor_UpdateChannelStateExtra/If_Extra_call_fails,_fails_with:_spend_voucher_verification_failed
  • TestActor_UpdateChannelStateSettling
    • TestActor_UpdateChannelStateSettling/No_change
    • TestActor_UpdateChannelStateSettling/Updates_MinSettleHeight_only
    • TestActor_UpdateChannelStateSettling/SettlingAt_unchanged_even_after_MinSettleHeight_is_changed_because_it_is_greater_than_MinSettleHeight
    • TestActor_UpdateChannelStateSettling/SettlingAt_changes_after_MinSettleHeight_is_changed_because_it_is_less_than_MinSettleHeight
  • TestActor_UpdateChannelStateSecretHash
    • TestActor_UpdateChannelStateSecretHash/Succeeds_with_correct_secret
    • TestActor_UpdateChannelStateSecretHash/If_bad_secret_preimage,_fails_with:_incorrect_secret!
  • TestActor_Settle
    • TestActor_Settle/Settle_adjusts_SettlingAt
    • TestActor_Settle/settle_fails_if_called_twice:_channel_already_settling
    • TestActor_Settle/Settle_changes_SettleHeight_again_if_MinSettleHeight_is_less
    • TestActor_Settle/Voucher_invalid_after_settling
  • TestActor_Collect
    • TestActor_Collect/Happy_path
    • TestActor_Collect/fails_if_not_settling_with:_payment_channel_not_settling_or_settled
    • TestActor_Collect/fails_if_Failed_to_send_funds_to_To

determine final versioning strategy

Continuing the discussion started in #12.

There are two version numbers that come into play when reasoning about built-in actor evolution and versioning schemes:

  • builtin-actors crate version number (vX.Y.Z, semver semantics)
  • network actor version number (I suspect this doesn't technically exist in the protocol, but it's a de-facto reality that all clients model actor version as a single vN ordinal).

IMO, there are roughly two approaches we can take:

  1. Try to make crate versions numbers align with network actor versions numbers.

    • Actor version numbers are modelled as single int ordinal, so we would abandon minor version usage in crate versioning, and allow patch version bumping to denote bugfix releases before they hit mainnet (e.g. we made a definitive v10.0.0 release, but during the last mile of testing we discovered a bug and we released v10.0.1, which is ultimately what hit mainnet).
    • All releases prior to the definitive release would be pre-final releases (e.g. beta, RC, etc.). These releases would be deployed in testnets.
  2. Only match on the major version, but give total freedom for bumping minor and patch versions in crate versioning.

    • This means that for ActorVersion=10, the crate version hitting the network could be v10.2.3.
    • We'd need an authoritative table somewhere tracking which crate version went live with each network version.
    • This approach gives the community more flexibility when releasing, but we'd need to have a second discussion on what events lead to major, minor, and patch bumping. Perhaps it creates more organizational complexity.

Use a fixed byte array to represent randomness

Currently, we use a vector to match go's behavior of decoding any byte array as "randomness", then later asserting that it's the right length. In M1, we should be able to change this type to just a fixed-length byte array.

[EPIC]Test Coverage

Our task is to improve coverage across the board, by porting the spec-actors test suite and ensuring 1-to-1 correspondence (to the point it makes sense).
This issue is here to track progress towards that goal

Actor Coverage

  • account -- #23
  • cron -- #24
  • init -- #25
  • market -- #26 🔥
  • miner -- #27 🔥
  • multisig -- #28 🔥
  • paych -- #29
  • power -- #30 🔥
  • reward -- #31
  • system -- #32
  • verifreg -- #33 🔥

Initial Test Coverage Details

This is the current coverage as reported by tarpaulin:

Mar 02 18:29:54.671  INFO cargo_tarpaulin::report: Coverage Results:
|| Tested/Total Lines:
|| actors/account/src/lib.rs: 17/22
|| actors/account/tests/account_actor_test.rs: 30/32
|| actors/cron/src/lib.rs: 23/28
|| actors/cron/tests/cron_actor_test.rs: 71/71
|| actors/init/src/lib.rs: 41/55
|| actors/init/src/state.rs: 17/19
|| actors/init/tests/init_actor_test.rs: 130/132
|| actors/market/src/deal.rs: 0/15
|| actors/market/src/lib.rs: 9/816
|| actors/market/src/policy.rs: 0/18
|| actors/market/src/state.rs: 21/311
|| actors/market/tests/market_actor_test.rs: 23/69
|| actors/miner/src/bitfield_queue.rs: 0/55
|| actors/miner/src/deadline_assignment.rs: 0/51
|| actors/miner/src/deadline_info.rs: 0/40
|| actors/miner/src/deadline_state.rs: 0/594
|| actors/miner/src/deadlines.rs: 0/34
|| actors/miner/src/expiration_queue.rs: 0/438
|| actors/miner/src/lib.rs: 0/2353
|| actors/miner/src/monies.rs: 0/65
|| actors/miner/src/partition_state.rs: 0/382
|| actors/miner/src/policy.rs: 0/52
|| actors/miner/src/sector_map.rs: 0/64
|| actors/miner/src/sectors.rs: 0/67
|| actors/miner/src/state.rs: 0/475
|| actors/miner/src/termination.rs: 0/15
|| actors/miner/src/vesting_state.rs: 0/55
|| actors/multisig/src/lib.rs: 0/345
|| actors/multisig/src/state.rs: 0/41
|| actors/multisig/src/types.rs: 0/2
|| actors/paych/src/lib.rs: 113/171
|| actors/paych/src/state.rs: 2/2
|| actors/paych/src/types.rs: 14/14
|| actors/paych/tests/paych_actor_test.rs: 478/500
|| actors/power/src/lib.rs: 0/368
|| actors/power/src/state.rs: 16/166
|| actors/reward/src/expneg.rs: 6/6
|| actors/reward/src/lib.rs: 67/115
|| actors/reward/src/logic.rs: 30/30
|| actors/reward/src/state.rs: 39/50
|| actors/reward/tests/reward_actor_test.rs: 131/137
|| actors/runtime/src/actor_error.rs: 6/16
|| actors/runtime/src/builtin/network.rs: 0/3
|| actors/runtime/src/builtin/sector.rs: 0/4
|| actors/runtime/src/builtin/shared.rs: 3/16
|| actors/runtime/src/builtin/singletons.rs: 4/10
|| actors/runtime/src/lib.rs: 13/13
|| actors/runtime/src/runtime/actor_blockstore.rs: 0/3
|| actors/runtime/src/runtime/fvm.rs: 0/160
|| actors/runtime/src/runtime/mod.rs: 2/12
|| actors/runtime/src/test_utils.rs: 232/369
|| actors/runtime/src/util/balance_table.rs: 33/41
|| actors/runtime/src/util/chaos/mod.rs: 0/84
|| actors/runtime/src/util/downcast.rs: 16/56
|| actors/runtime/src/util/multimap.rs: 27/34
|| actors/runtime/src/util/set.rs: 23/27
|| actors/runtime/src/util/set_multimap.rs: 31/42
|| actors/runtime/src/util/unmarshallable.rs: 9/13
|| actors/runtime/tests/alpha_beta_filter_test.rs: 82/82
|| actors/runtime/tests/balance_table_test.rs: 31/31
|| actors/runtime/tests/multimap_test.rs: 39/39
|| actors/runtime/tests/set_multimap_test.rs: 27/27
|| actors/runtime/tests/set_test.rs: 26/26
|| actors/system/src/lib.rs: 0/8
|| actors/verifreg/src/lib.rs: 0/294
|| actors/verifreg/src/state.rs: 0/7
|| actors/verifreg/src/types.rs: 0/1
|| bundle/bundler/src/bin/bundler.rs: 0/13
|| bundle/bundler/src/lib.rs: 71/75
|| 
19.97% coverage, 1953/9781 lines covered

As we can see, we have quite low coverage with some actors not covered at all.

Audit actors params after ref-fvm gas changes

@jennijuju points out that after we have the revised gas values from the FVM, we should audit those params in actors that could be affected. It's possible that the PreCommitBatch max size, for instance, might need to be lowered if the old max can't theoretically fit in a message anymore.

I do not expect any of these to need to change.

generate and integrate CAR bundle

This issue tracks work being carried out in the raulk/initial branch of this repo:

  • Remove reliance on wasm-builder from all actors
  • Remove reliance on runtime-wasm feature from all actors.
  • Compile actors to Wasm under the bundle module.
  • Create a bundling utility to pack Wasm bytecode into a CAR with an index data structure enumerating actor types => CodeCID.
  • Integrate bundling utility into build.
  • Remove all knowledge of static CodeCIDs from actors, and migrate to an actor::is_builtin_actor syscall that returns whether a given CodeCID corresponds to a builtin actor, and to which from an enumerated set.
  • Load bundle CAR in ref-fvm conformance tests.
  • Pass index structure to the FVM via contructor so it can handle the above syscalls.
  • Run conformance tests.
  • Do the same in Lotus.
  • Publish cargo releases of fvm, fvm_shared, and other modules so we can specify versions in the Cargo.toml file instead of local paths.
  • Make a release of builtin-actors/bundle, so it can be integrated upstream.

Verifreg Actor Test Coverage

Initial coverage

|| actors/verifreg/src/lib.rs: 0/294
|| actors/verifreg/src/state.rs: 0/7
|| actors/verifreg/src/types.rs: 0/1

Unit tests to migrate/check

verifreg $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstruction
    • TestConstruction/successful_construction_with_root_ID_address
    • TestConstruction/non-ID_address_root_is_resolved_to_an_ID_address_for_construction
    • TestConstruction/fails_if_root_cannot_be_resolved_to_an_ID_address
  • TestAddVerifier
    • TestAddVerifier/fails_when_caller_is_not_the_root_key
    • TestAddVerifier/fails_when_allowance_less_than_MinVerifiedDealSize
    • TestAddVerifier/fails_when_root_is_added_as_a_verifier
    • TestAddVerifier/fails_when_verified_client_is_added_as_a_verifier
    • TestAddVerifier/fails_to_add_verifier_with_non-ID_address_if_not_resolvable_to_ID_address
    • TestAddVerifier/successfully_add_a_verifier
    • TestAddVerifier/successfully_add_a_verifier_after_resolving_to_ID_address
  • TestRemoveVerifier
    • TestRemoveVerifier/fails_when_caller_is_not_the_root_key
    • TestRemoveVerifier/fails_when_verifier_does_not_exist
    • TestRemoveVerifier/successfully_remove_a_verifier
    • TestRemoveVerifier/add_verifier_with_non_ID_address_and_then_remove_with_its_ID_address
  • TestAddVerifiedClient
    • TestAddVerifiedClient/successfully_add_multiple_verified_clients_from_different_verifiers
    • TestAddVerifiedClient/verifier_successfully_adds_a_verified_client_and_then_fails_on_adding_another_verified_client_because_of_low_allowance
    • TestAddVerifiedClient/successfully_add_a_verified_client_after_resolving_it's_given_non_ID_address_to_it's_ID_address
    • TestAddVerifiedClient/success_when_allowance_is_equal_to_MinVerifiedDealSize
    • TestAddVerifiedClient/fails_to_add_verified_client_if_address_is_not_resolvable_to_ID_address
    • TestAddVerifiedClient/fails_when_allowance_is_less_than_MinVerifiedDealSize
    • TestAddVerifiedClient/fails_when_caller_is_not_a_verifier
    • TestAddVerifiedClient/fails_when_verifier_cap_is_less_than_client_allowance
    • TestAddVerifiedClient/fails_when_root_is_added_as_a_verified_client
    • TestAddVerifiedClient/fails_when_verifier_is_added_as_a_verified_client
  • TestUseBytes
    • TestUseBytes/successfully_consume_deal_bytes_for_deals_from_different_verified_clients
    • TestUseBytes/successfully_consume_deal_bytes_for_verified_client_and_then_fail_on_next_attempt_because_it_does_NOT_have_enough_allowance
    • TestUseBytes/successfully_consume_deal_bytes_after_resolving_verified_client_address
    • TestUseBytes/successfully_consume_deal_for_verified_client_and_then_fail_on_next_attempt_because_it_has_been_removed
    • TestUseBytes/fail_if_caller_is_not_storage_market_actor
    • TestUseBytes/fail_if_deal_size_is_less_than_min_verified_deal_size
    • TestUseBytes/fail_if_verified_client_does_not_exist
    • TestUseBytes/fail_if_deal_size_is_greater_than_verified_client_cap
  • TestRestoreBytes
    • TestRestoreBytes/successfully_restore_deal_bytes_for_different_verified_clients
    • TestRestoreBytes/successfully_restore_bytes_after_using_bytes_reduces_a_client's_cap
    • TestRestoreBytes/successfully_restore_deal_bytes_after_resolving_client_address
    • TestRestoreBytes/successfully_restore_bytes_after_using_bytes_removes_a_client
    • TestRestoreBytes/fail_if_caller_is_not_storage_market_actor
    • TestRestoreBytes/fail_if_deal_size_is_less_than_min_verified_deal_size
    • TestRestoreBytes/fails_if_attempt_to_restore_bytes_for_root
    • TestRestoreBytes/fails_if_attempt_to_restore_bytes_for_verifier

Migrate issues from the specs-actors project

The specs-actors project has a rich backlog of potential improvements to the built-in actors and supporting code. We should migrate a relevant set of those issues over to this project.

I suggest we do that after these Rust actors have taken over as the ones executing on the network, since we won't make any of the changes until after that point anyway.

Built-in actors abort versus errors

  • In go actors, we panic (abort) with an exit code on error.
  • In rust actors, we bubble an error all the way to the caller.

We should abort in rust actors as well:

  • It's easier to say we exit with code X on error E, because nothing can intercept/downcast/etc. the error.
  • It's faster (we exit immediately) and helps the compiler optimize for the non-error path.

System Actor Test Coverage

Initial coverage

|| actors/system/src/lib.rs: 0/8

Unit tests to migrate/check

system $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstruction

Multisig actor test coverage

Initial coverage

|| actors/multisig/src/lib.rs: 0/345
|| actors/multisig/src/state.rs: 0/41
|| actors/multisig/src/types.rs: 0/2

Unit tests to migrate/check

multisig $ go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestConstruction
    • TestConstruction/simple_construction
    • TestConstruction/construction_by_resolving_signers_to_ID_addresses
    • TestConstruction/construction_with_vesting
    • TestConstruction/fail_to_construct_multisig_actor_with_0_signers
    • TestConstruction/fail_to_construct_multisig_actor_with_more_than_max_signers
    • TestConstruction/fail_to_construct_multisig_with_more_approvals_than_signers
    • TestConstruction/fail_to_construct_multisig_if_a_signer_is_not_resolvable_to_an_ID_address
    • TestConstruction/fail_to_construct_multisig_with_duplicate_signers(all_ID_addresses)
    • TestConstruction/fail_to_construct_multisig_with_duplicate_signers(ID_&_non-ID_addresses)
  • TestVesting
    • TestVesting/happy_path_full_vesting
    • TestVesting/partial_vesting_propose_to_send_half_the_actor_balance_when_the_epoch_is_half_the_unlock_duration
    • TestVesting/propose_and_autoapprove_transaction_above_locked_amount_fails
    • TestVesting/fail_to_vest_more_than_locked_amount
    • TestVesting/avoid_truncating_division
    • TestVesting/sending_zero_ok_when_nothing_vested
    • TestVesting/sending_zero_ok_when_lockup_exceeds_balance
  • TestPropose
    • TestPropose/simple_propose
    • TestPropose/propose_with_threshold_met
    • TestPropose/propose_with_threshold_and_non-empty_return_value
    • TestPropose/fail_propose_with_threshold_met_and_insufficient_balance
    • TestPropose/fail_propose_from_non-signer
  • TestApprove
    • TestApprove/simple_propose_and_approval
    • TestApprove/approve_with_non-empty_return_value
    • TestApprove/approval_works_if_enough_funds_have_been_unlocked_for_the_transaction
    • TestApprove/fail_approval_if_current_balance_is_less_than_the_transaction_value
    • TestApprove/fail_approval_if_enough_unlocked_balance_not_available
    • TestApprove/fail_approval_with_bad_proposal_hash
    • TestApprove/accept_approval_with_no_proposal_hash
    • TestApprove/fail_approve_transaction_more_than_once
    • TestApprove/fail_approve_transaction_that_does_not_exist
    • TestApprove/fail_to_approve_transaction_by_non-signer
    • TestApprove/proposed_transaction_is_approved_by_proposer_if_number_of_approvers_has_already_crossed_threshold
    • TestApprove/approve_transaction_if_number_of_approvers_has_already_crossed_threshold_even_if_we_attempt_a_duplicate_approval
    • TestApprove/approve_transaction_if_number_of_approvers_has_already_crossed_threshold_and_ensure_non-signatory_cannot_approve_a_transaction
  • TestCancel
    • TestCancel/simple_propose_and_cancel
    • TestCancel/fail_cancel_with_bad_proposal_hash
    • TestCancel/signer_fails_to_cancel_transaction_from_another_signer
    • TestCancel/fail_to_cancel_transaction_when_not_signer
    • TestCancel/fail_to_cancel_a_transaction_that_does_not_exist
    • TestCancel/subsequent_approver_replaces_removed_proposer_as_owner
  • TestAddSigner
    • TestAddSigner/happy_path_add_signer
    • TestAddSigner/add_signer_and_increase_threshold
    • TestAddSigner/fail_to_add_signer_than_already_exists
    • TestAddSigner/fail_to_add_signer_with_ID_address_that_already_exists(even_though_we_ONLY_have_the_non_ID_address_as_an_approver)
    • TestAddSigner/fail_to_add_signer_with_non-ID_address_that_already_exists(even_though_we_ONLY_have_the_ID_address_as_an_approver)
  • TestRemoveSigner
    • TestRemoveSigner/happy_path_remove_signer
    • TestRemoveSigner/remove_signer_and_decrease_threshold
    • TestRemoveSigner/remove_signer_when_multi-sig_is_created_with_an_ID_address_and_then_removed_using_it's_non-ID_address
    • TestRemoveSigner/remove_signer_when_multi-sig_is_created_with_a_non-ID_address_and_then_removed_using_it's_ID_address
    • TestRemoveSigner/remove_signer_when_multi-sig_is_created_with_a_non-ID_address_and_then_removed_using_it's_non-ID_address
    • TestRemoveSigner/remove_signer_when_multi-sig_is_created_with_a_ID_address_and_then_removed_using_it's_ID_address
    • TestRemoveSigner/fail_remove_signer_if_decrease_set_to_false_and_number_of_signers_below_threshold
    • TestRemoveSigner/remove_signer_from_single_singer_list
    • TestRemoveSigner/fail_to_remove_non-signer
    • TestRemoveSigner/fail_to_remove_a_signer_and_decrease_approvals_below_1
    • TestRemoveSigner/remove_signer_removes_approvals
    • TestRemoveSigner/remove_signer_deletes_solo_proposals
  • TestSwapSigners
    • TestSwapSigners/happy_path_signer_swap
    • TestSwapSigners/swap_signer_when_multi-sig_is_created_with_it's_ID_address_but_we_ask_for_a_swap_with_it's_non-ID_address
    • TestSwapSigners/swap_signer_when_multi-sig_is_created_with_it's_non-ID_address_but_we_ask_for_a_swap_with_it's_ID_address
    • TestSwapSigners/swap_signer_when_multi-sig_is_created_with_it's_non-ID_address_and_we_ask_for_a_swap_with_it's_non-ID_address
    • TestSwapSigners/swap_signer_when_multi-sig_is_created_with_it's_ID_address_and_we_ask_for_a_swap_with_it's_ID_address
    • TestSwapSigners/fail_to_swap_when_from_signer_not_found
    • TestSwapSigners/fail_to_swap_when_to_signer_already_present
    • TestSwapSigners/fail_to_swap_when_to_signer_ID_address_already_present(even_though_we_have_the_non-ID_address)
    • TestSwapSigners/fail_to_swap_when_to_signer_non-ID_address_already_present(even_though_we_have_the_ID_address)
    • TestSwapSigners/swap_signer_removes_approvals
    • TestSwapSigners/swap_signer_deletes_solo_proposals
  • TestChangeThreshold
    • TestChangeThreshold/happy_path_decrease_threshold
    • TestChangeThreshold/happy_path_simple_increase_threshold
    • TestChangeThreshold/fail_to_set_threshold_to_zero
    • TestChangeThreshold/fail_to_set_threshold_above_number_of_signers
    • TestChangeThreshold/transaction_can_be_re-approved_and_executed_after_threshold_lowered
  • TestLockBalance
    • TestLockBalance/retroactive_vesting
    • TestLockBalance/prospective_vesting
    • TestLockBalance/can't_alter_vesting
    • TestLockBalance/can't_alter_vesting_from_construction
    • TestLockBalance/checks_preconditions

Miner Actor Test Coverage

Initial coverage

|| actors/miner/src/bitfield_queue.rs: 0/55
|| actors/miner/src/deadline_assignment.rs: 0/51
|| actors/miner/src/deadline_info.rs: 0/40
|| actors/miner/src/deadline_state.rs: 0/594
|| actors/miner/src/deadlines.rs: 0/34
|| actors/miner/src/expiration_queue.rs: 0/438
|| actors/miner/src/lib.rs: 0/2353
|| actors/miner/src/monies.rs: 0/65
|| actors/miner/src/partition_state.rs: 0/382
|| actors/miner/src/policy.rs: 0/52
|| actors/miner/src/sector_map.rs: 0/64
|| actors/miner/src/sectors.rs: 0/67
|| actors/miner/src/state.rs: 0/475
|| actors/miner/src/termination.rs: 0/15
|| actors/miner/src/vesting_state.rs: 0/55

Unit tests to migrate/check

go test -v ./... | grep PASS | sed 's/--- PASS:/- [ ]/g' | sed 's/ (.*)//g' | grep -v PASS
  • TestDeadlineAssignment
  • TestMaxPartitionsPerDeadline
    • TestMaxPartitionsPerDeadline/fails_if_all_deadlines_hit_their_max_partitions_limit_before_assigning_all_sectors_to_deadlines
    • TestMaxPartitionsPerDeadline/succeeds_if_all_all_deadlines_hit_their_max_partitions_limit_but_assignment_is_complete
    • TestMaxPartitionsPerDeadline/fails_if_some_deadlines_have_sectors_beforehand_and_all_deadlines_hit_their_max_partition_limit
  • TestCompactionWindow
  • TestChallengeWindow
  • TestExpirations
  • TestExpirationsEmpty
  • TestAssignProvingPeriodBoundary
  • TestCurrentProvingPeriodStart
  • TestFaultFeeInvariants
    • TestFaultFeeInvariants/br_looks_right_in_plausible_(sectorPower,_networkPower,_reward)_range
    • TestFaultFeeInvariants/Declared_and_Undeclared_fault_penalties_are_linear_over_sectorQAPower_term
  • TestBitfieldQueue
    • TestBitfieldQueue/adds_values_to_empty_queue
    • TestBitfieldQueue/adds_bitfield_to_empty_queue
    • TestBitfieldQueue/quantizes_added_epochs_according_to_quantization_spec
    • TestBitfieldQueue/quantizes_added_epochs_according_to_quantization_spec#01
    • TestBitfieldQueue/merges_values_withing_same_epoch
    • TestBitfieldQueue/adds_values_to_different_epochs
    • TestBitfieldQueue/PouUntil_from_empty_queue_returns_empty_bitfield
    • TestBitfieldQueue/PopUntil_does_nothing_if_'until'_parameter_before_first_value
    • TestBitfieldQueue/PopUntil_removes_and_returns_entries_before_and_including_target_epoch
    • TestBitfieldQueue/cuts_elements
    • TestBitfieldQueue/adds_empty_bitfield_to_queue
  • TestDeadlines
    • TestDeadlines/adds_sectors
    • TestDeadlines/adds_sectors_and_proves
    • TestDeadlines/terminates_sectors
    • TestDeadlines/terminates_unproven_sectors
    • TestDeadlines/pops_early_terminations
    • TestDeadlines/removes_partitions
    • TestDeadlines/marks_faulty
    • TestDeadlines/marks_unproven_sectors_faulty
    • TestDeadlines/cannot_remove_partitions_with_early_terminations
    • TestDeadlines/can_pop_early_terminations_in_multiple_steps
    • TestDeadlines/cannot_remove_missing_partition
    • TestDeadlines/removing_no_partitions_does_nothing
    • TestDeadlines/fails_to_remove_partitions_with_faulty_sectors
    • TestDeadlines/terminate_proven_&_faulty
    • TestDeadlines/terminate_unproven_&_faulty
    • TestDeadlines/fails_to_terminate_missing_sector
    • TestDeadlines/fails_to_terminate_missing_partition
    • TestDeadlines/fails_to_terminate_already_terminated_sector
    • TestDeadlines/faulty_sectors_expire
    • TestDeadlines/cannot_pop_expired_sectors_before_proving
    • TestDeadlines/post_all_the_things
    • TestDeadlines/post_with_unproven,_faults,_recoveries,_and_retracted_recoveries
    • TestDeadlines/post_with_skipped_unproven
    • TestDeadlines/post_missing_partition
    • TestDeadlines/post_partition_twice
    • TestDeadlines/retract_recoveries
    • TestDeadlines/cannot_declare_faults_in_missing_partitions
    • TestDeadlines/cannot_declare_faults_recovered_in_missing_partitions
  • TestProvingPeriodDeadlines
    • TestProvingPeriodDeadlines/quantization_spec_rounds_to_the_next_deadline
  • TestDeadlineInfoFromOffsetAndEpoch
    • TestDeadlineInfoFromOffsetAndEpoch/Offset_and_epoch_invariant_checking
    • TestDeadlineInfoFromOffsetAndEpoch/sanity_checks
  • TestExpirationSet
    • TestExpirationSet/adds_sectors_and_power_to_empty_set
    • TestExpirationSet/adds_sectors_and_power_to_non-empty_set
    • TestExpirationSet/removes_sectors_and_power_set
    • TestExpirationSet/remove_fails_when_pledge_underflows
    • TestExpirationSet/remove_fails_to_remove_sectors_it_does_not_contain
    • TestExpirationSet/remove_fails_when_active_or_fault_qa_power_underflows
    • TestExpirationSet/set_is_empty_when_all_sectors_removed
  • TestExpirationQueue
    • TestExpirationQueue/added_sectors_can_be_popped_off_queue
    • TestExpirationQueue/quantizes_added_sectors_by_expiration
    • TestExpirationQueue/reschedules_sectors_as_faults
    • TestExpirationQueue/reschedules_all_sectors_as_faults
    • TestExpirationQueue/reschedule_recover_restores_all_sector_stats
    • TestExpirationQueue/replaces_sectors_with_new_sectors
    • TestExpirationQueue/removes_sectors
    • TestExpirationQueue/adding_no_sectors_leaves_the_queue_empty
    • TestExpirationQueue/rescheduling_no_expirations_as_faults_leaves_the_queue_empty
    • TestExpirationQueue/rescheduling_all_expirations_as_faults_leaves_the_queue_empty_if_it_was_empty
    • TestExpirationQueue/rescheduling_no_sectors_as_recovered_leaves_the_queue_empty
  • TestCommitments
    • TestCommitments/no_deals
    • TestCommitments/max_sector_number
    • TestCommitments/unverified_deal
    • TestCommitments/verified_deal
    • TestCommitments/two_deals
    • TestCommitments/insufficient_funds_for_pre-commit
    • TestCommitments/deal_space_exceeds_sector_space
    • TestCommitments/precommit_pays_back_fee_debt
    • TestCommitments/invalid_pre-commit_rejected
    • TestCommitments/fails_with_too_many_deals
    • TestCommitments/precommit_checks_seal_proof_version
    • TestCommitments/precommit_does_not_vest_funds
  • TestPreCommitBatch
    • TestPreCommitBatch/one_sector
    • TestPreCommitBatch/max_sectors
    • TestPreCommitBatch/one_deal
    • TestPreCommitBatch/many_deals
    • TestPreCommitBatch/empty_batch
    • TestPreCommitBatch/too_many_sectors
    • TestPreCommitBatch/insufficient_balance
    • TestPreCommitBatch/one_bad_apple_ruins_batch
    • TestPreCommitBatch/duplicate_sector_rejects_batch
  • TestProveCommit
    • TestProveCommit/prove_single_sector
    • TestProveCommit/prove_sectors_from_batch_pre-commit
    • TestProveCommit/invalid_proof_rejected
    • TestProveCommit/prove_commit_aborts_if_pledge_requirement_not_met
    • TestProveCommit/drop_invalid_prove_commit_while_processing_valid_one
    • TestProveCommit/prove_commit_just_after_period_start_permits_PoSt
    • TestProveCommit/sector_with_non-positive_lifetime_is_skipped_in_confirmation
    • TestProveCommit/verify_proof_does_not_vest_funds
  • TestAggregateProveCommit
    • TestAggregateProveCommit/valid_precommits_then_aggregate_provecommit
  • TestBatchMethodNetworkFees
    • TestBatchMethodNetworkFees/insufficient_funds_for_aggregated_prove_commit_network_fee
    • TestBatchMethodNetworkFees/insufficient_funds_for_batch_precommit_network_fee
    • TestBatchMethodNetworkFees/insufficient_funds_for_batch_precommit_in_combination_of_fee_debt_and_network_fee
    • TestBatchMethodNetworkFees/enough_funds_for_fee_debt_and_network_fee_but_not_for_PCD
    • TestBatchMethodNetworkFees/enough_funds_for_everything
  • TestPrecommittedSectorsStore
    • TestPrecommittedSectorsStore/Put,_get_and_delete
    • TestPrecommittedSectorsStore/Delete_nonexistent_value_returns_an_error
    • TestPrecommittedSectorsStore/Get_nonexistent_value_returns_false
    • TestPrecommittedSectorsStore/Duplicate_put_rejected
  • TestSectorsStore
    • TestSectorsStore/Put_get_and_delete
    • TestSectorsStore/Delete_nonexistent_value_returns_an_error
    • TestSectorsStore/Get_nonexistent_value_returns_false
    • TestSectorsStore/Iterate_and_Delete_multiple_sector
  • TestVesting_AddLockedFunds_Table
    • TestVesting_AddLockedFunds_Table/vest_funds_in_a_single_epoch
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=2_quantization=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=3
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=3_quantization=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=2_step=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=5_step=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_delay=1_period=5_step=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=5_step=2_quantization=2
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=5_step=3_quantization=1
    • TestVesting_AddLockedFunds_Table/vest_funds_with_period=5_step=3_quantization=2
    • TestVesting_AddLockedFunds_Table/(step_greater_than_period)_vest_funds_with_period=5_step=6_quantization=1
    • TestVesting_AddLockedFunds_Table/vest_funds_with_delay=5_period=5_step=1_quantization=1
    • TestVesting_AddLockedFunds_Table/vest_funds_with_offset_0
    • TestVesting_AddLockedFunds_Table/vest_funds_with_offset_1
    • TestVesting_AddLockedFunds_Table/vest_funds_with_proving_period_start_>_quantization_unit
    • TestVesting_AddLockedFunds_Table/vest_funds_with_step_much_smaller_than_quantization
  • TestVestingFunds_AddLockedFunds
    • TestVestingFunds_AddLockedFunds/LockedFunds_increases_with_sequential_calls
    • TestVestingFunds_AddLockedFunds/Vests_when_quantize,_step_duration,_and_vesting_period_are_coprime
  • TestVestingFunds_UnvestedFunds
    • TestVestingFunds_UnvestedFunds/Unlock_unvested_funds_leaving_bucket_with_non-zero_tokens
    • TestVestingFunds_UnvestedFunds/Unlock_unvested_funds_leaving_bucket_with_zero_tokens
    • TestVestingFunds_UnvestedFunds/Unlock_all_unvested_funds
    • TestVestingFunds_UnvestedFunds/Unlock_unvested_funds_value_greater_than_LockedFunds
    • TestVestingFunds_UnvestedFunds/Unlock_unvested_funds_when_there_are_vested_funds_in_the_table
  • TestAddPreCommitExpiry
    • TestAddPreCommitExpiry/simple_pre-commit_expiry_and_cleanup
    • TestAddPreCommitExpiry/batch_pre-commit_expiry
  • TestSectorAssignment
    • TestSectorAssignment/assign_sectors_to_deadlines
  • TestSectorNumberAllocation
    • TestSectorNumberAllocation/batch_allocation
    • TestSectorNumberAllocation/repeat_allocation_rejected
    • TestSectorNumberAllocation/overlapping_batch_rejected
    • TestSectorNumberAllocation/batch_masking
    • TestSectorNumberAllocation/range_limits
    • TestSectorNumberAllocation/mask_range_limits
    • TestSectorNumberAllocation/compaction_with_mask
  • TestRepayDebtInPriorityOrder
  • TestConstruction
    • TestConstruction/simple_construction
    • TestConstruction/control_addresses_are_resolved_during_construction
    • TestConstruction/fails_if_control_address_is_not_an_account_actor
    • TestConstruction/test_construct_with_invalid_peer_ID
    • TestConstruction/fails_if_control_addresses_exceeds_maximum_length
    • TestConstruction/test_construct_with_large_multiaddr
    • TestConstruction/test_construct_with_empty_multiaddr
  • TestPeerInfo
    • TestPeerInfo/can_set_peer_id
    • TestPeerInfo/can_clear_peer_id
    • TestPeerInfo/can't_set_large_peer_id
    • TestPeerInfo/can_set_multiaddrs
    • TestPeerInfo/can_set_multiple_multiaddrs
    • TestPeerInfo/can_set_clear_the_multiaddr
    • TestPeerInfo/can't_set_empty_multiaddrs
    • TestPeerInfo/can't_set_large_multiaddrs
  • TestControlAddresses
    • TestControlAddresses/get_addresses
  • TestWindowPost
    • TestWindowPost/basic_PoSt_and_dispute
    • TestWindowPost/invalid_submissions
    • TestWindowPost/test_duplicate_proof_rejected
    • TestWindowPost/test_duplicate_proof_rejected_with_many_partitions
    • TestWindowPost/successful_recoveries_recover_power
    • TestWindowPost/skipped_faults_adjust_power
    • TestWindowPost/skipping_all_sectors_in_a_partition_rejected
    • TestWindowPost/skipped_recoveries_are_penalized_and_do_not_recover_power
    • TestWindowPost/skipping_a_fault_from_the_wrong_partition_is_an_error
    • TestWindowPost/cannot_dispute_posts_when_the_challenge_window_is_open
    • TestWindowPost/can_dispute_up_till_window_end,_but_not_after
    • TestWindowPost/can't_dispute_up_with_an_invalid_deadline
    • TestWindowPost/can_dispute_test_after_proving_period_changes
  • TestDeadlineCron
    • TestDeadlineCron/cron_on_inactive_state
    • TestDeadlineCron/sector_expires
    • TestDeadlineCron/sector_expires_and_repays_fee_debt
    • TestDeadlineCron/detects_and_penalizes_faults
    • TestDeadlineCron/test_cron_run_trigger_faults
  • TestDeadlineCronDefersStopsRestarts
    • TestDeadlineCronDefersStopsRestarts/cron_enrolls_on_precommit,_prove_commits_and_continues_enrolling
    • TestDeadlineCronDefersStopsRestarts/cron_enrolls_on_precommit,_expires_on_pcd_expiration,_re-enrolls_on_new_precommit_immediately
    • TestDeadlineCronDefersStopsRestarts/cron_enrolls_on_precommit,_expires_on_pcd_expiration,_re-enrolls_on_new_precommit_after_falling_out_of_date
    • TestDeadlineCronDefersStopsRestarts/enroll,_pcd_expire,_re-enroll_x_3
  • TestDeclareFaults
    • TestDeclareFaults/declare_fault_pays_fee_at_window_post
  • TestDeclareRecoveries
    • TestDeclareRecoveries/recovery_happy_path
    • TestDeclareRecoveries/recovery_must_pay_back_fee_debt
    • TestDeclareRecoveries/recovery_fails_during_active_consensus_fault
  • TestExtendSectorExpiration
    • TestExtendSectorExpiration/rejects_negative_extension
    • TestExtendSectorExpiration/rejects_extension_too_far_in_future
    • TestExtendSectorExpiration/rejects_extension_past_max_for_seal_proof
    • TestExtendSectorExpiration/updates_expiration_with_valid_params
    • TestExtendSectorExpiration/updates_many_sectors
    • TestExtendSectorExpiration/supports_extensions_off_deadline_boundary
  • TestTerminateSectors
    • TestTerminateSectors/removes_sector_with_correct_accounting
    • TestTerminateSectors/cannot_terminate_a_sector_when_the_challenge_window_is_open
  • TestWithdrawBalance
    • TestWithdrawBalance/happy_path_withdraws_funds
    • TestWithdrawBalance/fails_if_miner_can't_repay_fee_debt
    • TestWithdrawBalance/withdraw_only_what_we_can_after_fee_debt
  • TestRepayDebts
    • TestRepayDebts/repay_with_no_avaialable_funds_does_nothing
    • TestRepayDebts/pay_debt_entirely_from_balance
    • TestRepayDebts/partially_repay_debt
    • TestRepayDebts/pay_debt_partially_from_vested_funds
  • TestChangePeerID
    • TestChangePeerID/successfully_change_peer_id
  • TestCompactPartitions
    • TestCompactPartitions/compacting_a_partition_with_both_live_and_dead_sectors_removes_the_dead_sectors_but_retains_the_live_sectors
    • TestCompactPartitions/fail_to_compact_partitions_with_faults
    • TestCompactPartitions/fails_to_compact_partitions_with_unproven_sectors
    • TestCompactPartitions/fails_if_deadline_is_equal_to_WPoStPeriodDeadlines
    • TestCompactPartitions/fails_if_deadline_is_open_for_challenging
    • TestCompactPartitions/fails_if_deadline_is_next_up_to_be_challenged
    • TestCompactPartitions/the_deadline_after_the_next_deadline_should_still_be_open_for_compaction
    • TestCompactPartitions/deadlines_challenged_last_proving_period_should_still_be_in_the_dispute_window
    • TestCompactPartitions/compaction_should_be_forbidden_during_the_dispute_window
    • TestCompactPartitions/compaction_should_be_allowed_following_the_dispute_window
    • TestCompactPartitions/fails_if_partition_count_is_above_limit
  • TestCheckSectorProven
    • TestCheckSectorProven/successfully_check_sector_is_proven
    • TestCheckSectorProven/fails_is_sector_is_not_found
  • TestChangeMultiAddrs
    • TestChangeMultiAddrs/successfully_change_multiaddrs
    • TestChangeMultiAddrs/clear_multiaddrs_by_passing_in_empty_slice
  • TestChangeWorkerAddress
    • TestChangeWorkerAddress/successfully_change_ONLY_the_worker_address
    • TestChangeWorkerAddress/change_cannot_be_overridden
    • TestChangeWorkerAddress/successfully_resolve_AND_change_ONLY_control_addresses
    • TestChangeWorkerAddress/successfully_change_both_worker_AND_control_addresses
    • TestChangeWorkerAddress/successfully_clear_all_control_addresses
    • TestChangeWorkerAddress/fails_if_control_addresses_length_exceeds_maximum_limit
    • TestChangeWorkerAddress/fails_if_unable_to_resolve_control_address
    • TestChangeWorkerAddress/fails_if_unable_to_resolve_worker_address
    • TestChangeWorkerAddress/fails_if_worker_public_key_is_not_BLS
    • TestChangeWorkerAddress/fails_if_new_worker_address_does_not_have_a_code
    • TestChangeWorkerAddress/fails_if_new_worker_is_not_an_account_actor
    • TestChangeWorkerAddress/fails_when_caller_is_not_the_owner
  • TestConfirmUpdateWorkerKey
    • TestConfirmUpdateWorkerKey/successfully_changes_the_worker_address
    • TestConfirmUpdateWorkerKey/does_nothing_before_the_effective_date
    • TestConfirmUpdateWorkerKey/does_nothing_when_no_update_is_set
  • TestChangeOwnerAddress
    • TestChangeOwnerAddress/successful_change
    • TestChangeOwnerAddress/proposed_must_be_valid
    • TestChangeOwnerAddress/withdraw_proposal
    • TestChangeOwnerAddress/only_owner_can_propose
    • TestChangeOwnerAddress/only_owner_can_change_proposal
    • TestChangeOwnerAddress/only_nominee_can_confirm
    • TestChangeOwnerAddress/nominee_must_confirm_self_explicitly
  • TestReportConsensusFault
    • TestReportConsensusFault/invalid_report_rejected
    • TestReportConsensusFault/mis-targeted_report_rejected
    • TestReportConsensusFault/Report_consensus_fault_pays_reward_and_charges_fee
    • TestReportConsensusFault/Report_consensus_fault_updates_consensus_fault_reported_field
    • TestReportConsensusFault/Double_report_of_consensus_fault_fails
  • TestApplyRewards
    • TestApplyRewards/funds_are_locked
    • TestApplyRewards/funds_vest
    • TestApplyRewards/penalty_is_burnt
    • TestApplyRewards/penalty_is_partially_burnt_and_stored_as_fee_debt
    • TestApplyRewards/rewards_pay_back_fee_debt_
  • TestCompactSectorNumbers
    • TestCompactSectorNumbers/compact_sector_numbers_then_pre-commit
    • TestCompactSectorNumbers/owner_can_also_compact_sectors
    • TestCompactSectorNumbers/one_of_the_control_addresses_can_also_compact_sectors
    • TestCompactSectorNumbers/fail_if_caller_is_not_among_caller_worker_or_control_addresses
    • TestCompactSectorNumbers/sector_number_range_limits
    • TestCompactSectorNumbers/compacting_no_sector_numbers_aborts
  • TestPledgePenaltyForTermination
    • TestPledgePenaltyForTermination/when_undeclared_fault_fee_exceeds_expected_reward,_returns_undeclaraed_fault_fee
    • TestPledgePenaltyForTermination/when_expected_reward_exceeds_undeclared_fault_fee,_returns_expected_reward
    • TestPledgePenaltyForTermination/sector_age_is_capped
    • TestPledgePenaltyForTermination/fee_for_replacement_=_fee_for_original_sector_when_power,_BR_are_unchanged
    • TestPledgePenaltyForTermination/fee_for_replacement_=_fee_for_same_sector_without_replacement_after_lifetime_cap
    • TestPledgePenaltyForTermination/charges_for_replaced_sector_at_replaced_sector_day_rate
  • TestNegativeBRClamp
  • TestContinuedFault
    • TestContinuedFault/zero_power_means_zero_fault_penalty
  • TestExpectedRewardForPowerClamptedAtAttoFIL
    • TestExpectedRewardForPowerClamptedAtAttoFIL/expected_zero_valued_BR_clamped_at_1_attofil
    • TestExpectedRewardForPowerClamptedAtAttoFIL/expected_negative_valued_BR_clamped_at_1_atto_FIL
  • TestPrecommitDepositAndInitialPledgePostiive
    • TestPrecommitDepositAndInitialPledgePostiive/IP_is_clamped_at_1_attofil
    • TestPrecommitDepositAndInitialPledgePostiive/PCD_is_clamped_at_1_attoFIL
  • TestAggregateNetworkFee
    • TestAggregateNetworkFee/Constant_fee_per_sector_when_base_fee_is_below_5_nFIL
    • TestAggregateNetworkFee/Fee_increases_iff_basefee_crosses_threshold
    • TestAggregateNetworkFee/Regression_tests
    • TestAggregateNetworkFee/25/75_split
  • TestPartitions
    • TestPartitions/adds_sectors_then_activates_unproven
    • TestPartitions/adds_sectors_and_reports_sector_stats
    • TestPartitions/doesn't_add_sectors_twice
    • TestPartitions/adds_faults_(proven:true)
    • TestPartitions/adds_faults_(proven:false)
    • TestPartitions/re-adding_faults_is_a_no-op
    • TestPartitions/fails_to_add_faults_for_missing_sectors
    • TestPartitions/adds_recoveries
    • TestPartitions/remove_recoveries
    • TestPartitions/recovers_faults
    • TestPartitions/faulty_power_recovered_exactly_once
    • TestPartitions/missing_sectors_are_not_recovered
    • TestPartitions/replace_sectors
    • TestPartitions/replace_sectors_errors_when_attempting_to_replace_inactive_sector
    • TestPartitions/replace_sectors_errors_when_attempting_to_unproven_sector
    • TestPartitions/terminate_sectors
    • TestPartitions/terminate_non-existent_sectors
    • TestPartitions/terminate_already_terminated_sector
    • TestPartitions/mark_terminated_sectors_as_faulty
    • TestPartitions/pop_expiring_sectors
    • TestPartitions/pop_expiring_sectors_errors_if_a_recovery_exists
    • TestPartitions/pop_expiring_sectors_errors_if_a_unproven_sectors_exist
    • TestPartitions/records_missing_PoSt
    • TestPartitions/pops_early_terminations
    • TestPartitions/test_max_sectors
  • TestRecordSkippedFaults
    • TestRecordSkippedFaults/fail_if_ALL_declared_sectors_are_NOT_in_the_partition
    • TestRecordSkippedFaults/already_faulty_and_terminated_sectors_are_ignored
    • TestRecordSkippedFaults/recoveries_are_retracted_without_being_marked_as_new_faulty_power
    • TestRecordSkippedFaults/successful_when_skipped_fault_set_is_empty
  • TestQuality
    • TestQuality/quality_is_independent_of_size_and_duration
    • TestQuality/quality_scales_with_verified_weight_proportion
  • TestPower
    • TestPower/empty_sector_has_power_equal_to_size
    • TestPower/verified_sector_has_power_a_multiple_of_size
    • TestPower/verified_weight_adds_proportional_power
    • TestPower/demonstrate_standard_sectors
  • TestDeadlineSectorMap
  • TestDeadlineSectorMapError
  • TestDeadlineSectorMapValues
  • TestPartitionSectorMapValues
  • TestDeadlineSectorMapOverflow
  • TestPartitionSectorMapOverflow
  • TestDeadlineSectorMapEmpty
  • TestPartitionSectorMapEmpty
  • TestDeadlineSectorMapSorted
  • TestPartitionSectorMapSorted
  • TestSectors
    • TestSectors/loads_sectors
    • TestSectors/stores_sectors
    • TestSectors/loads_and_stores_no_sectors
    • TestSectors/gets_sectors
    • TestSectors/must_get
    • TestSectors/loads_for_proof_with_replacement
    • TestSectors/loads_for_proof_without_replacement
    • TestSectors/empty_proof
    • TestSectors/no_non-faulty_sectors
  • TestTerminationResult

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.