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

Cooldown changes #1175

Merged
merged 101 commits into from
Sep 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
894f055
Bump base.
eb-concordium Apr 2, 2024
cdb52ac
Work on covering new account version.
eb-concordium Apr 2, 2024
ec3a173
Delete .dat file.
eb-concordium Apr 2, 2024
4cb3a69
Fix some warnings.
eb-concordium Apr 2, 2024
35a64f0
A bit of work on the blockstate.
eb-concordium Apr 9, 2024
e1e2316
Merge remote-tracking branch 'remotes/origin/main' into cooldown-changes
td202 Apr 9, 2024
412d253
Stake cooldown migration.
td202 Apr 12, 2024
392d687
CooldownQueue definitions an integration with account structure.
td202 Apr 26, 2024
cb060d1
Restructuring cooldown implementation. Towards migration.
td202 May 2, 2024
c3c8b01
Migrate cooldowns on accounts.
td202 May 6, 2024
1271bdf
Make sure migrated active baker stake is computed correctly.
td202 May 6, 2024
cde34d5
Migration testing. Renaming some stake related functions and exposing…
td202 May 23, 2024
d8f5ce6
Changes to GetBakerPoolStatus GRPC.
td202 May 27, 2024
fdcaf70
Fix handling of GetPoolInfo.
td202 May 28, 2024
fcf2bf2
Support cooldown and available balance in account info query.
td202 Jun 4, 2024
2882853
Handle pre-pre-cooldown -> pre-cooldown -> cooldown -> available tran…
td202 Jun 10, 2024
953d070
Update base
td202 Jun 10, 2024
f335fd1
Work on configure baker and delegator in P7.
eb-concordium Jun 24, 2024
98acd46
Merge branch 'cooldown-changes' into configure-baker-delegator
eb-concordium Jun 24, 2024
732daf6
Fix compilation after merge.
eb-concordium Jun 24, 2024
96cc0cb
Release cooldowns on the account when increasing stake.
eb-concordium Jun 26, 2024
3b2da8a
Merge remote-tracking branch 'remotes/origin/main' into cooldown-changes
td202 Jun 26, 2024
c4f864e
Clean-up
td202 Jun 26, 2024
3a900f2
Tests and account storage.
td202 Jun 27, 2024
bb4dfb1
Update base, fix tests.
td202 Jun 28, 2024
7f873d5
Fix state hashes in tests.
td202 Jun 28, 2024
8e9b6f7
Fix hashes in tests.
td202 Jul 9, 2024
73d1c26
More work on configure baker and delegator
eb-concordium Jul 9, 2024
b747b48
Testing for cooldown processing in block state.
td202 Jul 9, 2024
16b5b74
Also release cooldown when adding baker or delegator.
eb-concordium Jul 16, 2024
2ae417e
Add testing for epoch transitions.
td202 Jul 17, 2024
0cad46a
Allow immediate switch from delegator to baker.
eb-concordium Jul 18, 2024
01bc102
Merge branch 'cooldown-changes' into configure-baker-delegator
td202 Jul 19, 2024
e920c09
Refactoring and simplifying reactivation of cooldown stake.
td202 Jul 19, 2024
69b465d
Start of refactoring for configure baker.
td202 Jul 19, 2024
416e94f
New configure baker.
td202 Jul 20, 2024
dc1407e
Delegation
td202 Jul 22, 2024
6ad3320
Add delegator.
td202 Jul 22, 2024
057d85a
Configure delegators.
td202 Jul 23, 2024
3883c94
Scheduler changes to configure baker/delegator in progress.
td202 Jul 24, 2024
c59d5f0
Scheduler handling for configure baker and delegator.
td202 Jul 25, 2024
442ef3c
Tests and fixes.
td202 Jul 25, 2024
861cccc
Remove bsoConfigureBaker, bsoConfigureDelegation. Update tests.
td202 Jul 26, 2024
fafa769
Simplify the basic blockstate representation of account cooldown queues.
td202 Jul 26, 2024
a07db0f
Commit missing test file.
td202 Jul 26, 2024
2cebf76
Refine account migration.
td202 Jul 29, 2024
5970cf9
Reject adding a delegator with stake 0.
eb-concordium Jul 30, 2024
6eae174
Add more delegation tests.
eb-concordium Jul 30, 2024
7fef710
Revert move of migratePersistentActiveBakers.
td202 Jul 30, 2024
a4419d1
Require non-zero stake for baker, even if minimum threshold is set at 0.
td202 Jul 30, 2024
b4adefb
Documentation.
td202 Jul 31, 2024
ddb8509
Merge remote-tracking branch 'remotes/origin/revise-get-pool-status' …
td202 Aug 1, 2024
823a0ab
Merge remote-tracking branch 'remotes/origin/revise-get-pool-status' …
td202 Aug 1, 2024
42efdd5
Enable P7 testing.
td202 Aug 1, 2024
06b029d
Add more tests.
eb-concordium Aug 2, 2024
48a0b38
Simplify instance
td202 Aug 2, 2024
cb5df8a
Merge remote-tracking branch 'remotes/origin/basic-cooldown-type' int…
td202 Aug 2, 2024
705f724
Merge remote-tracking branch 'remotes/origin/cooldowns-account-defs' …
td202 Aug 2, 2024
2a5fa4d
Add global cooldown index. Support P6->P7 migration.
td202 Aug 2, 2024
2595f88
Merge remote-tracking branch 'remotes/origin/cooldown-migration' into…
td202 Aug 2, 2024
dba06fc
Merge remote-tracking branch 'remotes/origin/cooldown-migration' into…
td202 Aug 5, 2024
aa77fad
Cooldown processing and epoch transitions.
td202 Aug 5, 2024
57bae02
Documentation
td202 Aug 5, 2024
32e4710
Merge remote-tracking branch 'remotes/origin/cooldown-processing' int…
td202 Aug 5, 2024
6d5f08c
Tests for bsoAddValidator and bsoUpdateValidator. Bugfixes.
td202 Aug 8, 2024
d72ce77
Configure delegator tests
td202 Aug 9, 2024
c82c6e7
Update delegator: fix corner case behaviours, tests and documentation.
td202 Aug 12, 2024
9cda84d
Documentation
td202 Aug 12, 2024
9822357
Revert version bump
td202 Aug 13, 2024
c809975
Merge remote-tracking branch 'remotes/origin/cooldown-processing' int…
td202 Aug 14, 2024
c559771
Update base. Documentation changes.
td202 Aug 15, 2024
4f9b853
Fix behaviour when transitioning from baker to delegator or vice-vers…
td202 Aug 23, 2024
0740444
Addressing review comments.
td202 Aug 26, 2024
63fcde8
Set protocol update hash. Bump version.
td202 Aug 26, 2024
b53dfb0
Bump base.
td202 Aug 26, 2024
a506466
Merge pull request #1227 from Concordium/release-7.0
td202 Aug 26, 2024
e9b98bb
Update submodule
td202 Aug 27, 2024
ddf852e
Fix consensus not recognizing P7 update
Sep 5, 2024
8fbfba0
Modify test to exercise account migration bug.
td202 Sep 6, 2024
e3519c2
Fix account migration.
td202 Sep 6, 2024
e5ccc6c
Merge remote-tracking branch 'remotes/origin/cooldown-changes' into a…
td202 Sep 9, 2024
5038994
Update changelog. Bump version for release.
td202 Sep 9, 2024
4ea2288
Merge pull request #1229 from Concordium/account-migration-fix
td202 Sep 9, 2024
29b43bb
Fix handling of consensus exceptions.
td202 Sep 11, 2024
747a3c6
Update changelog.
td202 Sep 11, 2024
e04ea03
Address review comments.
eb-concordium Sep 11, 2024
24f1f99
Address one more review comment.
eb-concordium Sep 11, 2024
b66f741
Address comments from code review.
eb-concordium Sep 11, 2024
72d5f73
Address more comments from code review.
eb-concordium Sep 11, 2024
0b29e1e
Fix the payday timing at the P6->P7 protocol update.
td202 Sep 11, 2024
b352765
Address review comment
td202 Sep 11, 2024
55e442b
Merge pull request #1234 from Concordium/consensus-exception
td202 Sep 11, 2024
256fc66
Merge pull request #1235 from Concordium/payday-timing
td202 Sep 11, 2024
772be2a
7.0.2 release.
td202 Sep 11, 2024
01b7ea1
Merge remote-tracking branch 'remotes/origin/main' into cooldown-changes
td202 Sep 11, 2024
0799547
Merge branch 'cooldown-changes' into 7.0/branch
td202 Sep 11, 2024
b1fd2f3
Fix issue where an error is thrown when the last finalized block is t…
td202 Sep 12, 2024
f15c014
Fix computation of regenesis block heights.
td202 Sep 12, 2024
f2fae8f
Update changelog. Bump version.
td202 Sep 12, 2024
fb000d1
Merge pull request #1238 from Concordium/7.0-fixes
td202 Sep 12, 2024
0b33407
Fix base ref
td202 Sep 13, 2024
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
Prev Previous commit
Next Next commit
Scheduler handling for configure baker and delegator.
td202 committed Jul 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c59d5f0c7fd8b3bbc5ba507bebcdcef051a5700b
23 changes: 23 additions & 0 deletions concordium-consensus/src/Concordium/GlobalState/BakerInfo.hs
Original file line number Diff line number Diff line change
@@ -222,6 +222,20 @@ data ValidatorUpdate = ValidatorUpdate
}
deriving (Eq, Show)

-- | A 'ValidatorUpdate' that removes the validator.
validatorRemove :: ValidatorUpdate
validatorRemove =
ValidatorUpdate
{ vuKeys = Nothing,
vuCapital = Just 0,
vuRestakeEarnings = Nothing,
vuOpenForDelegation = Nothing,
vuMetadataURL = Nothing,
vuTransactionFeeCommission = Nothing,
vuBakingRewardCommission = Nothing,
vuFinalizationRewardCommission = Nothing
}

-- | Failure modes when configuring a validator.
data ValidatorConfigureFailure
= -- | The stake is below the required threshold dictated by current chain parameters.
@@ -335,6 +349,15 @@ data DelegatorUpdate = DelegatorUpdate
}
deriving (Eq, Show)

-- | A 'DelegatorUpdate' that removes the delegator.
delegatorRemove :: DelegatorUpdate
delegatorRemove =
DelegatorUpdate
{ duCapital = Just 0,
duRestakeEarnings = Nothing,
duDelegationTarget = Nothing
}

-- | Data structure used to add/remove/update delegator.
data DelegationConfigure
= -- | Add a delegator, all fields are required.
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ import Concordium.Types.Accounts
import Concordium.Types.Accounts.Releases
import Concordium.Types.Execution
import Concordium.Types.HashableTo
import Concordium.Types.Option
import Concordium.Types.Parameters
import Concordium.Utils

@@ -44,7 +43,7 @@ import qualified Concordium.GlobalState.Basic.BlockState.Account as Transient
import qualified Concordium.GlobalState.Basic.BlockState.AccountReleaseSchedule as TARS
import qualified Concordium.GlobalState.Basic.BlockState.AccountReleaseScheduleV1 as TARSV1
import Concordium.GlobalState.BlockState (AccountAllowance (..))
import Concordium.GlobalState.CooldownQueue (Cooldowns (..), emptyCooldowns)
import Concordium.GlobalState.CooldownQueue (Cooldowns (..))
import Concordium.GlobalState.Persistent.Account.CooldownQueue as CooldownQueue
import Concordium.GlobalState.Persistent.Account.EncryptedAmount
import Concordium.GlobalState.Persistent.Account.MigrationStateInterface
Loading