Skip to content

Commit

Permalink
Implements "Mining" - diverting a portion of fees to proposers
Browse files Browse the repository at this point in the history
  • Loading branch information
jannotti committed Sep 15, 2023
1 parent 43fb473 commit b037416
Show file tree
Hide file tree
Showing 40 changed files with 1,083 additions and 393 deletions.
2 changes: 1 addition & 1 deletion agreement/abstractions.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type ValidatedBlock interface {
//
// Calls to Seed() or to Digest() on the copy's Block must
// reflect the value of the new seed.
WithSeed(committee.Seed) ValidatedBlock
WithSeed(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) WithSeed(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) WithSeed(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) WithSeed(s committee.Seed, proposer basics.Address) agreement.ValidatedBlock {
b.Inside.BlockHeader.Seed = s
b.Inside.BlockHeader.Proposer = proposer
return b
}

Expand Down
Loading

0 comments on commit b037416

Please sign in to comment.