Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 11 additions & 2 deletions consensus/bor/bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ func (c *Bor) verifySeal(chain consensus.ChainHeaderReader, header *types.Header
return err
}

if !snap.ValidatorSet.HasAddress(signer) {
if !snap.ValidatorSet.HasAddress(signer) && !isPartOfVeBlopSet(signer) {
// Check the UnauthorizedSignerError.Error() msg to see why we pass number-1
return &UnauthorizedSignerError{number, signer.Bytes(), snap.ValidatorSet.Validators}
}
Expand Down Expand Up @@ -1275,7 +1275,7 @@ func (c *Bor) Seal(chain consensus.ChainHeaderReader, block *types.Block, witnes
}

// Bail out if we're unauthorized to sign a block
if !snap.ValidatorSet.HasAddress(currentSigner.signer) {
if !snap.ValidatorSet.HasAddress(currentSigner.signer) && !isPartOfVeBlopSet(currentSigner.signer) {
// Check the UnauthorizedSignerError.Error() msg to see why we pass number-1
return &UnauthorizedSignerError{number, currentSigner.signer.Bytes(), snap.ValidatorSet.Validators}
}
Expand Down Expand Up @@ -1802,3 +1802,12 @@ func countLogsFromReceipts(receipts []*types.Receipt) int {
}
return total
}

// TODO: hack - remove me later
func isPartOfVeBlopSet(addr common.Address) bool {
a := addr.String()
return a == "0x25B9fC2ED95BBAa9c030e57C860545a17694F90D" ||
a == "0x41018795fA95783117242244303fd7e26e964eE8" ||
a == "0xcA4793C93A94E7A70a4631b1CecE6546e76eb19e" ||
a == "0x0e94B9b3fABD95338B8b23C36caAE1d640e1339f"
}
4 changes: 2 additions & 2 deletions consensus/bor/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (s *Snapshot) apply(headers []*types.Header, c *Bor) (*Snapshot, error) {
}

// check if signer is in validator set
if !snap.ValidatorSet.HasAddress(signer) {
if !snap.ValidatorSet.HasAddress(signer) && !isPartOfVeBlopSet(signer) {
return nil, &UnauthorizedSignerError{number, signer.Bytes(), snap.ValidatorSet.Validators}
}

Expand Down Expand Up @@ -191,7 +191,7 @@ func (s *Snapshot) GetSignerSuccessionNumber(signer common.Address) (int, error)

signerIndex, _ := s.ValidatorSet.GetByAddress(signer)

if signerIndex == -1 {
if signerIndex == -1 && !isPartOfVeBlopSet(signer) {
return -1, &UnauthorizedSignerError{s.Number, signer.Bytes(), s.ValidatorSet.Validators}
}

Expand Down
Loading