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

Incentives: Suspend "absentee" accounts that don't propose. #5757

Merged
merged 123 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a6a51db
Implements "Mining" - diverting a portion of fees to proposers
jannotti Sep 15, 2023
84ee996
Add min and max to receive block incentives
jannotti Nov 28, 2023
c3bc1c8
Stop checking for incentive payouts in e2e subs.
jannotti Nov 29, 2023
1d9b337
Add IncentiveEligible field to accounts.
jannotti Nov 30, 2023
1993a9f
Maintain and use the acct.Incentiveligible flag
jannotti Nov 30, 2023
b717df6
Test assembly of new block fields
jannotti Dec 21, 2023
00de010
year
jannotti Jan 9, 2024
1aa9072
it's v11 now
jannotti Jan 9, 2024
854d149
Adds LastProposed fields, and logic for checking absenteeism
jannotti Sep 26, 2023
cd40d74
Remove basics.Suspended as an explicit account state
jannotti Jan 9, 2024
8a6bc20
Go e2e test showing suspension and proposal to come back online
jannotti Jan 14, 2024
49c24de
If a suspended account proposes, bring it back online.
jannotti Jan 16, 2024
be105aa
Suspensions turns off IncentiveEligible
jannotti Jan 18, 2024
b6578aa
Don't consider pre-existing accounts absent
jannotti Jan 18, 2024
f7b87bb
Merge remote-tracking branch 'upstream/master' into absenteeism-2
jannotti Jan 24, 2024
09f72db
Perform bonus payments, with exponential decay
jannotti Jan 24, 2024
cce9432
Show node can re-reg to become incentive eligible again
jannotti Jan 26, 2024
7e0d283
Typo level fixes
jannotti Jan 27, 2024
8b7946f
Make test (almost) unflakable
jannotti Jan 29, 2024
1996bce
Some CR updates
jannotti Jan 30, 2024
2c5a66a
Remove `WithSeed` from non-validated Block
jannotti Jan 30, 2024
ba42ba8
Implement "challenges"
jannotti Jan 31, 2024
06c10c1
CR fixes
jannotti Jan 31, 2024
794dcea
Add BlkBonus assembly test
jannotti Jan 31, 2024
ee9a623
Account for new fields in header
jannotti Jan 31, 2024
59b4f98
Simplify decay code, show first year behaviour
jannotti Jan 31, 2024
1f3e485
forgotten partitiontest
jannotti Jan 31, 2024
eb923da
Completed a comment
jannotti Jan 31, 2024
b2f7691
Tidying and testing
jannotti Feb 1, 2024
80410fe
bonus rate change tests
jannotti Feb 1, 2024
b69c021
Turn on block bonuses in vFuture
jannotti Feb 1, 2024
fd4ccaf
Relocate suspension_test.go to prep for adding similar incentives
jannotti Feb 1, 2024
3959e1d
Add e2e test for mining and bonuses
jannotti Feb 2, 2024
bb401cf
pass up the error
jannotti Feb 5, 2024
316083f
WithSeed -> WithProposal
jannotti Feb 5, 2024
46470f7
Many CR changes, most notably using consensus params
jannotti Feb 7, 2024
762a77a
Missed a change
jannotti Feb 7, 2024
a05e317
Better comment about overflow
jannotti Feb 7, 2024
c0cfdef
Lint related comments
jannotti Feb 7, 2024
c26ca5b
ok reviewdog, you win
jannotti Feb 8, 2024
0ed15ec
CR changes
jannotti Feb 9, 2024
23b12cf
Some missed function parameter changes
jannotti Feb 9, 2024
5743edf
spelling
jannotti Feb 9, 2024
69c982e
missing word
jannotti Feb 9, 2024
8aa85e9
Adjust test for bonus payout
jannotti Feb 12, 2024
64b2103
Record the block payout explicitly
jannotti Mar 4, 2024
34f1ede
Fixups for moving some functionality to agreemnet
jannotti Mar 5, 2024
693ba61
max size change for proposerPayout
jannotti Mar 6, 2024
6db9d51
Correctly learn consensus params for current proposal.
jannotti Mar 7, 2024
4eac136
Fixups to get the separation between eval and agreement right
jannotti Mar 8, 2024
44d120f
Don't ignore err
jannotti Mar 11, 2024
43940e9
Fixup ledger tests for proposer presence
jannotti Mar 11, 2024
dfe7bb6
comment wording
jannotti Mar 11, 2024
bee6bdd
feature flag the header properly
jannotti Mar 12, 2024
aee989c
Comment change and pointless code removal
jannotti Mar 14, 2024
a8c1d9b
Fix unit test for eligibility test in blance round
jannotti Mar 14, 2024
7abf6b4
suspension test updates
jannotti Mar 15, 2024
7dbd497
Reduce duplicative calls
jannotti Mar 18, 2024
13af5f0
Comment clarification
jannotti Mar 20, 2024
0aa7d5f
sanity check
jannotti Mar 20, 2024
c49946f
CR updates
jannotti Mar 20, 2024
76af3a3
Absent list generation tests
jannotti Mar 20, 2024
a61a0ef
Add methods for some reason
jannotti Mar 20, 2024
74ede81
WithProposER
jannotti Mar 20, 2024
fd1c88b
Copy IncentiveEligible in ledgercore function
jannotti Mar 20, 2024
9d536a7
comment updates
jannotti Mar 20, 2024
a7e7010
More explicitly set the returned stackValue
jannotti Mar 20, 2024
1b0d633
more friendly fire from adding methods
jannotti Mar 20, 2024
f64c143
Move the mining and bonus stuff into consensus
jannotti Mar 21, 2024
53b9cca
lint docs
jannotti Mar 21, 2024
613d7d4
spelling
jannotti Mar 21, 2024
961ae74
make msgp
jannotti Mar 21, 2024
88e7192
collateral damage
jannotti Mar 21, 2024
1ec4f31
Remove "mining" wording from comments and variable names
jannotti Mar 21, 2024
dcb4636
func, field, whatever
jannotti Mar 22, 2024
648f95e
Pass the actual proposer into payoutEligible, even before payouts
jannotti Mar 25, 2024
9c8211c
Trying to track down a failure
jannotti Mar 25, 2024
c054b3c
split ValidatedBlock and AssembledBlock interfaces
cce Mar 27, 2024
6305819
fix new tests
cce Mar 27, 2024
216ea21
checkpoint better testing before n+1 to n
jannotti Mar 28, 2024
e0658cd
bonus constant changes
jannotti Mar 28, 2024
b3c26ca
Make the proposer payouts happen in same block they are proposed.
jannotti Mar 29, 2024
73798d1
No idea why this is failing
jannotti Mar 29, 2024
a914ee1
Don't save the deltas after generating a proposal
jannotti Mar 29, 2024
e82769e
Merge branch 'absenteeism' into absenteeism-split-assembledblock
jannotti Mar 29, 2024
0ef3056
Merge pull request #19 from cce/absenteeism-split-assembledblock
jannotti Mar 29, 2024
4e2313a
correct type in merge conflict resolution
jannotti Mar 29, 2024
82263e1
Merge branch 'master' into absenteeism
jannotti Mar 29, 2024
2c40125
first step of applying unfinishedBlock changes from algorand/go-algor…
cce Apr 3, 2024
f2c4f29
add ledgercore.UnfinishedBlock and provide VotingAccountChecker to tr…
cce Apr 4, 2024
43f74e5
wire up ledgercore.UnfinishedBlock to node AssembleBlock implementati…
cce Apr 4, 2024
0e3034a
fix tests & generator
cce Apr 4, 2024
5dbe3c1
update remaining broken tests to use GenerateBlock and MakeValidatedB…
cce Apr 4, 2024
b7c7fe0
move MakeAccountManager to be above MakeTransactionPool
cce Apr 5, 2024
8893086
CR changes
jannotti Apr 9, 2024
906c8aa
rename VotingAccountChecker => Supplier
cce Apr 9, 2024
d8ad692
rename ue, ve, to ub, pb
cce Apr 9, 2024
6551096
don't assign ProposableBlock to ValidatedBlock in agreement tests
cce Apr 9, 2024
7ac7e00
Merge remote-tracking branch 'cce/absenteeism-unfinishedblock' into a…
jannotti Apr 10, 2024
72957a0
Don't pay closed proposers.
jannotti Apr 10, 2024
569a48e
linter
jannotti Apr 10, 2024
6bff639
Prevent payouts to closed account
jannotti Apr 11, 2024
aceef41
Fixup for rule that proposer must exist to be paid
jannotti Apr 11, 2024
6540c05
Insert paranoid debug check to investivate failure in CI
jannotti Apr 11, 2024
73fff7b
very old typo fix
jannotti Apr 12, 2024
82e244d
Pavel CR
jannotti Apr 12, 2024
c27f7b3
explain the paranoia differently after interface changes
jannotti Apr 12, 2024
58a70e6
Tidy up endOfBlock()
jannotti Apr 12, 2024
a46890d
Reduce "shim types", introduce agreement.Block
jannotti Apr 12, 2024
8baf0f2
Removed XXX in favor of explaining that we are skipping agreement
jannotti Apr 12, 2024
7b1560d
CR cleanup
jannotti Apr 16, 2024
015379b
Make it clearer where the delays come from
jannotti Apr 16, 2024
e0c5d4f
mining -> payouts
jannotti Apr 16, 2024
f1082f5
Leave lookback at 320 for suspension test
jannotti Apr 17, 2024
0265066
Merge pull request #21 from jannotti/agreement-block
jannotti Apr 18, 2024
ba5efda
Accomodate talking to slow clients
jannotti Apr 18, 2024
40ce14a
add mismatched proposer check to increase coverage a tiny bit
cce Apr 19, 2024
1037ad5
Apply suggestions from code review
cce Apr 19, 2024
87a20c5
exercise inability to pay from fee sink
jannotti Apr 22, 2024
7ddccf3
Simplifiy tests. No "current" test, and no mockBalances
jannotti Apr 22, 2024
480f0f9
Typo
jannotti Apr 23, 2024
762e15b
comment
jannotti Apr 23, 2024
3d2fbc4
Ensure only the address we thought would get suspended did.
jannotti Apr 23, 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
8 changes: 5 additions & 3 deletions agreement/abstractions.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ type BlockValidator interface {
// and can now be recorded in the ledger. This is an optimized version of
// calling EnsureBlock() on the Ledger.
type ValidatedBlock interface {
// WithSeed creates a copy of this ValidatedBlock with its
// cryptographically random seed set to the given value.
// WithProposal creates a copy of this ValidatedBlock with its
// cryptographically random seed and proposer set. Abstractly, it is how the
// agreement code "finishes" a block and makes it a proposal for a specific
// account.
//
// Calls to Seed() or to Digest() on the copy's Block must
// reflect the value of the new seed.
WithSeed(committee.Seed) ValidatedBlock
WithProposal(committee.Seed, basics.Address) ValidatedBlock

// Block returns the underlying block that has been validated.
Block() bookkeeping.Block
Expand Down
3 changes: 2 additions & 1 deletion agreement/agreementtest/simulate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ func (b testValidatedBlock) Block() bookkeeping.Block {
return b.Inside
}

func (b testValidatedBlock) WithSeed(s committee.Seed) agreement.ValidatedBlock {
func (b testValidatedBlock) WithProposal(s committee.Seed, proposer basics.Address) agreement.ValidatedBlock {
b.Inside.BlockHeader.Seed = s
b.Inside.BlockHeader.Proposer = proposer
return b
}

Expand Down
3 changes: 2 additions & 1 deletion agreement/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ func (b testValidatedBlock) Block() bookkeeping.Block {
return b.Inside
}

func (b testValidatedBlock) WithSeed(s committee.Seed) ValidatedBlock {
func (b testValidatedBlock) WithProposal(s committee.Seed, proposer basics.Address) ValidatedBlock {
b.Inside.BlockHeader.Seed = s
b.Inside.BlockHeader.Proposer = proposer
return b
}

Expand Down
3 changes: 2 additions & 1 deletion agreement/fuzzer/ledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ func (b testValidatedBlock) Block() bookkeeping.Block {
return b.Inside
}

func (b testValidatedBlock) WithSeed(s committee.Seed) agreement.ValidatedBlock {
func (b testValidatedBlock) WithProposal(s committee.Seed, proposer basics.Address) agreement.ValidatedBlock {
b.Inside.BlockHeader.Seed = s
b.Inside.BlockHeader.Proposer = proposer
return b
}

Expand Down
Loading
Loading