Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove baseline power check #1107

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions actors/reward/src/testing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{baseline_power_from_prev, State};
use crate::State;
use fil_actors_runtime::MessageAccumulator;
use fvm_shared::{clock::ChainEpoch, econ::TokenAmount};
use num_traits::Signed;
Expand Down Expand Up @@ -52,17 +52,5 @@ pub fn check_state_invariants(
format!("cumsum realized negative ({})", state.cumsum_realized),
);

// Theoretically we should compare effective_baseline_power <= this_epoch_baseline_power but
// because of rounding issues explained and tracked in https://github.com/filecoin-project/builtin-actors/issues/459
// we settled on this workaround.
let next_epoch_baseline_power = baseline_power_from_prev(&state.this_epoch_baseline_power);
acc.require(
state.effective_baseline_power <= next_epoch_baseline_power,
format!(
"effective baseline power ({}) > next_epoch_baseline_power ({})",
state.effective_baseline_power, next_epoch_baseline_power
),
);

(StateSummary::default(), acc)
}
Loading