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

feat(iota-framework): storage fund's ability earn staking rewards #959

Closed
Show file tree
Hide file tree
Changes from 10 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
5 changes: 1 addition & 4 deletions crates/iota-framework/docs/iota-system/iota_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ gas coins.
4. Update all validators.


<pre><code><b>fun</b> <a href="iota_system.md#0x3_iota_system_advance_epoch">advance_epoch</a>(storage_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, computation_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, wrapper: &<b>mut</b> <a href="iota_system.md#0x3_iota_system_IotaSystemState">iota_system::IotaSystemState</a>, new_epoch: u64, next_protocol_version: u64, storage_rebate: u64, non_refundable_storage_fee: u64, storage_fund_reinvest_rate: u64, reward_slashing_rate: u64, epoch_start_timestamp_ms: u64, ctx: &<b>mut</b> <a href="../iota-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
<pre><code><b>fun</b> <a href="iota_system.md#0x3_iota_system_advance_epoch">advance_epoch</a>(storage_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, computation_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, wrapper: &<b>mut</b> <a href="iota_system.md#0x3_iota_system_IotaSystemState">iota_system::IotaSystemState</a>, new_epoch: u64, next_protocol_version: u64, storage_rebate: u64, non_refundable_storage_fee: u64, reward_slashing_rate: u64, epoch_start_timestamp_ms: u64, ctx: &<b>mut</b> <a href="../iota-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
</code></pre>


Expand All @@ -1379,8 +1379,6 @@ gas coins.
next_protocol_version: u64,
storage_rebate: u64,
non_refundable_storage_fee: u64,
storage_fund_reinvest_rate: u64, // share of storage fund's rewards that's reinvested
// into storage fund, in basis point.
reward_slashing_rate: u64, // how much rewards are slashed <b>to</b> punish a <a href="validator.md#0x3_validator">validator</a>, in bps.
epoch_start_timestamp_ms: u64, // Timestamp of the epoch start
ctx: &<b>mut</b> TxContext,
Expand All @@ -1395,7 +1393,6 @@ gas coins.
computation_reward,
storage_rebate,
non_refundable_storage_fee,
storage_fund_reinvest_rate,
reward_slashing_rate,
epoch_start_timestamp_ms,
ctx,
Expand Down
25 changes: 3 additions & 22 deletions crates/iota-framework/docs/iota-system/iota_system_state_inner.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,12 +560,6 @@ the epoch advancement transaction.
</dt>
<dd>

</dd>
<dt>
<code>storage_fund_reinvestment: u64</code>
</dt>
<dd>

</dd>
<dt>
<code>storage_charge: u64</code>
Expand Down Expand Up @@ -2076,7 +2070,7 @@ gas coins.
4. Update all validators.


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_advance_epoch">advance_epoch</a>(self: &<b>mut</b> <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_IotaSystemStateInnerV2">iota_system_state_inner::IotaSystemStateInnerV2</a>, new_epoch: u64, next_protocol_version: u64, storage_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, computation_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, storage_rebate_amount: u64, non_refundable_storage_fee_amount: u64, storage_fund_reinvest_rate: u64, reward_slashing_rate: u64, epoch_start_timestamp_ms: u64, ctx: &<b>mut</b> <a href="../iota-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_advance_epoch">advance_epoch</a>(self: &<b>mut</b> <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_IotaSystemStateInnerV2">iota_system_state_inner::IotaSystemStateInnerV2</a>, new_epoch: u64, next_protocol_version: u64, storage_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, computation_reward: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, storage_rebate_amount: u64, non_refundable_storage_fee_amount: u64, reward_slashing_rate: u64, epoch_start_timestamp_ms: u64, ctx: &<b>mut</b> <a href="../iota-framework/tx_context.md#0x2_tx_context_TxContext">tx_context::TxContext</a>): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
</code></pre>


Expand All @@ -2093,8 +2087,6 @@ gas coins.
<b>mut</b> computation_reward: Balance&lt;IOTA&gt;,
<b>mut</b> storage_rebate_amount: u64,
<b>mut</b> non_refundable_storage_fee_amount: u64,
storage_fund_reinvest_rate: u64, // share of storage fund's rewards that's reinvested
// into storage fund, in basis point.
reward_slashing_rate: u64, // how much rewards are slashed <b>to</b> punish a <a href="validator.md#0x3_validator">validator</a>, in bps.
epoch_start_timestamp_ms: u64, // Timestamp of the epoch start
ctx: &<b>mut</b> TxContext,
Expand All @@ -2104,11 +2096,7 @@ gas coins.

<b>let</b> bps_denominator_u64 = <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_BASIS_POINT_DENOMINATOR">BASIS_POINT_DENOMINATOR</a> <b>as</b> u64;
// Rates can't be higher than 100%.
<b>assert</b>!(
storage_fund_reinvest_rate &lt;= bps_denominator_u64
&& reward_slashing_rate &lt;= bps_denominator_u64,
<a href="iota_system_state_inner.md#0x3_iota_system_state_inner_EBpsTooLarge">EBpsTooLarge</a>,
);
<b>assert</b>!(reward_slashing_rate &lt;= bps_denominator_u64, <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_EBpsTooLarge">EBpsTooLarge</a>);

// TODO: remove this in later upgrade.
<b>if</b> (self.parameters.stake_subsidy_start_epoch &gt; 0) {
Expand Down Expand Up @@ -2152,11 +2140,6 @@ gas coins.

<b>let</b> storage_fund_reward_amount = storage_fund_balance <b>as</b> u128 * computation_charge_u128 / total_stake_u128;
<b>let</b> <b>mut</b> storage_fund_reward = computation_reward.split(storage_fund_reward_amount <b>as</b> u64);
<b>let</b> storage_fund_reinvestment_amount =
storage_fund_reward_amount * (storage_fund_reinvest_rate <b>as</b> u128) / <a href="iota_system_state_inner.md#0x3_iota_system_state_inner_BASIS_POINT_DENOMINATOR">BASIS_POINT_DENOMINATOR</a>;
<b>let</b> storage_fund_reinvestment = storage_fund_reward.split(
storage_fund_reinvestment_amount <b>as</b> u64,
);

self.epoch = self.epoch + 1;
// Sanity check <b>to</b> make sure we are advancing <b>to</b> the right epoch.
Expand Down Expand Up @@ -2194,11 +2177,10 @@ gas coins.
leftover_staking_rewards.join(computation_reward);
<b>let</b> leftover_storage_fund_inflow = leftover_staking_rewards.value();

self.iota_treasury_cap.burn_balance(leftover_staking_rewards, ctx);
<b>let</b> refunded_storage_rebate =
self.<a href="storage_fund.md#0x3_storage_fund">storage_fund</a>.<a href="iota_system_state_inner.md#0x3_iota_system_state_inner_advance_epoch">advance_epoch</a>(
storage_reward,
storage_fund_reinvestment,
leftover_staking_rewards,
storage_rebate_amount,
non_refundable_storage_fee_amount,
);
Expand All @@ -2210,7 +2192,6 @@ gas coins.
reference_gas_price: self.reference_gas_price,
total_stake: new_total_stake,
storage_charge,
storage_fund_reinvestment: storage_fund_reinvestment_amount <b>as</b> u64,
storage_rebate: storage_rebate_amount,
storage_fund_balance: self.<a href="storage_fund.md#0x3_storage_fund">storage_fund</a>.total_balance(),
stake_subsidy_amount,
Expand Down
8 changes: 1 addition & 7 deletions crates/iota-framework/docs/iota-system/storage_fund.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Called by <code><a href="iota_system.md#0x3_iota_system">iota_system</a></code>
Called by <code><a href="iota_system.md#0x3_iota_system">iota_system</a></code> at epoch change times to process the inflows and outflows of storage fund.


<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="storage_fund.md#0x3_storage_fund_advance_epoch">advance_epoch</a>(self: &<b>mut</b> <a href="storage_fund.md#0x3_storage_fund_StorageFund">storage_fund::StorageFund</a>, storage_charges: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, storage_fund_reinvestment: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, leftover_staking_rewards: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, storage_rebate_amount: u64, non_refundable_storage_fee_amount: u64): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
<pre><code><b>public</b>(<b>friend</b>) <b>fun</b> <a href="storage_fund.md#0x3_storage_fund_advance_epoch">advance_epoch</a>(self: &<b>mut</b> <a href="storage_fund.md#0x3_storage_fund_StorageFund">storage_fund::StorageFund</a>, storage_charges: <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;, storage_rebate_amount: u64, non_refundable_storage_fee_amount: u64): <a href="../iota-framework/balance.md#0x2_balance_Balance">balance::Balance</a>&lt;<a href="../iota-framework/iota.md#0x2_iota_IOTA">iota::IOTA</a>&gt;
</code></pre>


Expand All @@ -106,15 +106,9 @@ Called by <code><a href="iota_system.md#0x3_iota_system">iota_system</a></code>
<pre><code><b>public</b>(package) <b>fun</b> <a href="storage_fund.md#0x3_storage_fund_advance_epoch">advance_epoch</a>(
self: &<b>mut</b> <a href="storage_fund.md#0x3_storage_fund_StorageFund">StorageFund</a>,
storage_charges: Balance&lt;IOTA&gt;,
storage_fund_reinvestment: Balance&lt;IOTA&gt;,
leftover_staking_rewards: Balance&lt;IOTA&gt;,
storage_rebate_amount: u64,
non_refundable_storage_fee_amount: u64,
) : Balance&lt;IOTA&gt; {
// Both the reinvestment and leftover rewards are not <b>to</b> be refunded so they go <b>to</b> the non-refundable <a href="../iota-framework/balance.md#0x2_balance">balance</a>.
self.non_refundable_balance.join(storage_fund_reinvestment);
self.non_refundable_balance.join(leftover_staking_rewards);

// The storage charges for the epoch come from the storage rebate of the new objects created
// and the new storage rebates of the objects modified during the epoch so we put the charges
// into `total_object_storage_rebates`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ module iota_system::iota_system {
next_protocol_version: u64,
storage_rebate: u64,
non_refundable_storage_fee: u64,
storage_fund_reinvest_rate: u64, // share of storage fund's rewards that's reinvested
// into storage fund, in basis point.
reward_slashing_rate: u64, // how much rewards are slashed to punish a validator, in bps.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This param must also be removed in the call to advance_epoch in iota_adapter_latest::execution_engine::checked::construct_advance_epoch_pt (as well as v0, v1, v2).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll create a separate issue for that
Because of removing of storage_fund_reinvest_rate looks dangerous in some places.
We'll do it separately

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think it is better to do this in a separate issue, please, add a subtask and implement it based on this branch.
I think we should not merge this branch without removing storage_fund_reinvest_rate from the Rust side because our main branch will be broken in this case.

Copy link
Contributor Author

@Dkwcs Dkwcs Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue - #970

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not merge this branch without removing storage_fund_reinvest_rate from the Rust side because our main branch will be broken in this case.

Exactly why I suggested these changes. Without this change and the SystemEpochInfoEvent update, the iota-test-validator does not work. The required changes are not huge, so we should do it in this branch, imo, otherwise we cannot merge this PR without breaking our issue 153 branch.

Issue 970 deals with multiple things now. I think we simply should do the appropriate changes to the Rust types in this PR, and left 970 deal only with the naming changes. There are lots of variables and fields that contain the storage_fund name and those should be updated to storage_deposit(s). So 970 should only be a renaming task, imho, not a logic change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll fix storage_fund_reinvest_rate in Rust code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check it out please

epoch_start_timestamp_ms: u64, // Timestamp of the epoch start
ctx: &mut TxContext,
Expand All @@ -561,7 +559,6 @@ module iota_system::iota_system {
computation_reward,
storage_rebate,
non_refundable_storage_fee,
storage_fund_reinvest_rate,
reward_slashing_rate,
epoch_start_timestamp_ms,
ctx,
Expand Down Expand Up @@ -750,7 +747,6 @@ module iota_system::iota_system {
computation_charge: u64,
storage_rebate: u64,
non_refundable_storage_fee: u64,
storage_fund_reinvest_rate: u64,
reward_slashing_rate: u64,
epoch_start_timestamp_ms: u64,
ctx: &mut TxContext,
Expand All @@ -765,7 +761,6 @@ module iota_system::iota_system {
next_protocol_version,
storage_rebate,
non_refundable_storage_fee,
storage_fund_reinvest_rate,
reward_slashing_rate,
epoch_start_timestamp_ms,
ctx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ module iota_system::iota_system_state_inner {
protocol_version: u64,
reference_gas_price: u64,
total_stake: u64,
storage_fund_reinvestment: u64,
storage_charge: u64,
storage_rebate: u64,
storage_fund_balance: u64,
Expand Down Expand Up @@ -831,8 +830,6 @@ module iota_system::iota_system_state_inner {
mut computation_reward: Balance<IOTA>,
mut storage_rebate_amount: u64,
mut non_refundable_storage_fee_amount: u64,
storage_fund_reinvest_rate: u64, // share of storage fund's rewards that's reinvested
// into storage fund, in basis point.
reward_slashing_rate: u64, // how much rewards are slashed to punish a validator, in bps.
epoch_start_timestamp_ms: u64, // Timestamp of the epoch start
ctx: &mut TxContext,
Expand All @@ -842,11 +839,7 @@ module iota_system::iota_system_state_inner {

let bps_denominator_u64 = BASIS_POINT_DENOMINATOR as u64;
// Rates can't be higher than 100%.
assert!(
storage_fund_reinvest_rate <= bps_denominator_u64
&& reward_slashing_rate <= bps_denominator_u64,
EBpsTooLarge,
);
assert!(reward_slashing_rate <= bps_denominator_u64, EBpsTooLarge);

// TODO: remove this in later upgrade.
if (self.parameters.stake_subsidy_start_epoch > 0) {
Expand Down Expand Up @@ -890,11 +883,6 @@ module iota_system::iota_system_state_inner {

let storage_fund_reward_amount = storage_fund_balance as u128 * computation_charge_u128 / total_stake_u128;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dkwcs This is the line where the storage fund is earning rewards, this and the following shall be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we have to completely remove the storage_fund_rewards from validators.advance_epoch or replace it with something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In SUI the storage fund earns rewards itself from the stake susibidies, i.e. it is treated as stake. It goes back to the validators as additional reward.

In IOTA the storage deposit does not earn staking rewards, it is not considered staked. It doesn't generate rewards. So answering your question:

So we have to completely remove the storage_fund_rewards from validators.advance_epoch or replace it with something?

Yes, remove it completely.

let mut storage_fund_reward = computation_reward.split(storage_fund_reward_amount as u64);
let storage_fund_reinvestment_amount =
storage_fund_reward_amount * (storage_fund_reinvest_rate as u128) / BASIS_POINT_DENOMINATOR;
let storage_fund_reinvestment = storage_fund_reward.split(
storage_fund_reinvestment_amount as u64,
);

self.epoch = self.epoch + 1;
// Sanity check to make sure we are advancing to the right epoch.
Expand Down Expand Up @@ -931,12 +919,11 @@ module iota_system::iota_system_state_inner {
let mut leftover_staking_rewards = storage_fund_reward;
leftover_staking_rewards.join(computation_reward);
let leftover_storage_fund_inflow = leftover_staking_rewards.value();


self.iota_treasury_cap.burn_balance(leftover_staking_rewards, ctx);
let refunded_storage_rebate =
self.storage_fund.advance_epoch(
storage_reward,
storage_fund_reinvestment,
leftover_staking_rewards,
storage_rebate_amount,
non_refundable_storage_fee_amount,
);
Expand All @@ -948,7 +935,6 @@ module iota_system::iota_system_state_inner {
reference_gas_price: self.reference_gas_price,
total_stake: new_total_stake,
storage_charge,
storage_fund_reinvestment: storage_fund_reinvestment_amount as u64,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to also be removed in iota_types::event::SystemEpochInfoEvent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll create a separate issue for that
Because of removing of storage_fund_reinvest_rate looks dangerous in some places.
We'll do it separately

storage_rebate: storage_rebate_amount,
storage_fund_balance: self.storage_fund.total_balance(),
stake_subsidy_amount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@ module iota_system::storage_fund {
public(package) fun advance_epoch(
self: &mut StorageFund,
storage_charges: Balance<IOTA>,
storage_fund_reinvestment: Balance<IOTA>,
leftover_staking_rewards: Balance<IOTA>,
storage_rebate_amount: u64,
non_refundable_storage_fee_amount: u64,
) : Balance<IOTA> {
// Both the reinvestment and leftover rewards are not to be refunded so they go to the non-refundable balance.
self.non_refundable_balance.join(storage_fund_reinvestment);
self.non_refundable_balance.join(leftover_staking_rewards);

// The storage charges for the epoch come from the storage rebate of the new objects created
// and the new storage rebates of the objects modified during the epoch so we put the charges
// into `total_object_storage_rebates`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ module iota_system::governance_test_utils {
let ctx = scenario.ctx();

let storage_rebate = system_state.advance_epoch_for_testing(
new_epoch, 1, storage_charge, computation_charge, stoarge_rebate, non_refundable_storage_rebate, 0, 0, 0, ctx,
new_epoch, 1, storage_charge, computation_charge, stoarge_rebate, non_refundable_storage_rebate, 0, 0, ctx,
);
test_scenario::return_shared(system_state);
scenario.next_epoch(@0x0);
Expand All @@ -162,7 +162,7 @@ module iota_system::governance_test_utils {
let ctx = scenario.ctx();

let storage_rebate = system_state.advance_epoch_for_testing(
new_epoch, 1, storage_charge * MICROS_PER_IOTA, computation_charge * MICROS_PER_IOTA, 0, 0, 0, reward_slashing_rate, 0, ctx
new_epoch, 1, storage_charge * MICROS_PER_IOTA, computation_charge * MICROS_PER_IOTA, 0, 0, reward_slashing_rate, 0, ctx
);
test_utils::destroy(storage_rebate);
test_scenario::return_shared(system_state);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ module iota_system::iota_system_tests {
let prev_counter = system_state.get_stake_subsidy_distribution_counter();

let rebate = system_state.advance_epoch_for_testing(
new_epoch, 1, 0, 0, 0, 0, 0, 0, prev_epoch_time + epoch_length, scenario.ctx()
new_epoch, 1, 0, 0, 0, 0, 0, prev_epoch_time + epoch_length, scenario.ctx()
);
destroy(rebate);
assert_eq(system_state.get_stake_subsidy_distribution_counter(), prev_counter + (if (should_increment_counter) 1 else 0));
Expand Down
Loading
Loading