Skip to content

Commit

Permalink
[governance] add delegation staking pool implementation (#4187)
Browse files Browse the repository at this point in the history
* [governance] add draft delegation staking pool implementation

* distribute pool tokens at epoch boundaries

* refactor staking pool code and add delegation switching

* update rust version of sui system state

* [staking] use vector for pending delegations
  • Loading branch information
emmazzz committed Sep 20, 2022
1 parent ab2309d commit afe60ae
Show file tree
Hide file tree
Showing 16 changed files with 589 additions and 643 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,19 @@ validators:
next_epoch_delegation: 0
next_epoch_gas_price: 1
stake_amount: 1
delegation: 0
pending_stake: 0
pending_withdraw: 0
pending_delegation: 0
pending_delegation_withdraw: 0
delegator_count: 0
pending_delegator_count: 0
pending_delegator_withdraw_count: 0
gas_price: 1
delegation_staking_pool:
validator_address: 375741c9373ae27bde5e6b5f5cc79f074cd84587
starting_epoch: 1
epoch_starting_sui_balance: 0
sui_balance: 0
rewards_pool:
value: 0
delegation_token_supply:
value: 0
pending_delegations: []
pending_validators: []
pending_removals: []
next_epoch_validators:
Expand Down Expand Up @@ -428,7 +432,5 @@ parameters:
min_validator_stake: 100000000000000
max_validator_candidate_count: 100
storage_gas_price: 1
delegation_reward:
value: 0
reference_gas_price: 0

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ expression: common_costs
---
{
"MergeCoin": {
"computation_cost": 466,
"computation_cost": 482,
"storage_cost": 32,
"storage_rebate": 0
},
"Publish": {
"computation_cost": 524,
"computation_cost": 541,
"storage_cost": 83,
"storage_rebate": 0
},
Expand All @@ -29,7 +29,7 @@ expression: common_costs
"storage_rebate": 15
},
"SplitCoin": {
"computation_cost": 577,
"computation_cost": 593,
"storage_cost": 80,
"storage_rebate": 0
},
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-framework/sources/epoch_time_lock.move
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module sui::epoch_time_lock {

/// Holder of an epoch number that can only be discarded in the epoch or
/// after the epoch has passed.
struct EpochTimeLock has store {
struct EpochTimeLock has store, copy {
epoch: u64
}

Expand Down
207 changes: 0 additions & 207 deletions crates/sui-framework/sources/governance/delegation.move

This file was deleted.

59 changes: 0 additions & 59 deletions crates/sui-framework/sources/governance/epoch_reward_record.move

This file was deleted.

Loading

0 comments on commit afe60ae

Please sign in to comment.