Skip to content

Commit

Permalink
Ignore signature error when validating header
Browse files Browse the repository at this point in the history
Consensys#1118 fixed an issue due to
which some blocks could be produced with an invalid seal in the list
of signers. This change ignores the error during block import/sync.
  • Loading branch information
Vinod Damle committed Oct 5, 2022
1 parent 6c76d81 commit 5fc7103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion consensus/istanbul/ibft/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/consensus/istanbul/validator"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
Expand Down Expand Up @@ -412,7 +413,8 @@ func (e *Engine) Signers(header *types.Header) ([]common.Address, error) {
// 2. Get the original address by seal and parent block hash
addr, err := istanbulcommon.GetSignatureAddress(proposalSeal, seal)
if err != nil {
return nil, istanbulcommon.ErrInvalidSignature
// return nil, istanbulcommon.ErrInvalidSignature
log.Warn("IBFT: found invalid signature", "err", err)

This comment has been minimized.

Copy link
@lastperson

lastperson Oct 13, 2022

Why does this work? addrs will get a zero address appended, which will result in an error in the ValidateSeals.

}
addrs = append(addrs, addr)
}
Expand Down

0 comments on commit 5fc7103

Please sign in to comment.