diff --git a/consensus/istanbul/ibft/engine/engine.go b/consensus/istanbul/ibft/engine/engine.go index 08e7454c3e..a98cb653c2 100644 --- a/consensus/istanbul/ibft/engine/engine.go +++ b/consensus/istanbul/ibft/engine/engine.go @@ -2,6 +2,7 @@ package ibftengine import ( "bytes" + "fmt" "math/big" "time" @@ -14,6 +15,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" @@ -330,6 +332,8 @@ func (e *Engine) Seal(chain consensus.ChainHeaderReader, block *types.Block, val number := header.Number.Uint64() if _, v := validators.GetByAddress(e.signer); v == nil { + log.Debug("Engine signer (sealing) is not part of validator set", "signer", e.signer, "validators", fmt.Sprintf("%v", validators.List())) + return block, istanbulcommon.ErrUnauthorized } diff --git a/consensus/istanbul/utils.go b/consensus/istanbul/utils.go index e622c4290e..add588707b 100644 --- a/consensus/istanbul/utils.go +++ b/consensus/istanbul/utils.go @@ -17,6 +17,8 @@ package istanbul import ( + "fmt" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" @@ -65,5 +67,8 @@ func CheckValidatorSignature(valSet ValidatorSet, data []byte, sig []byte) (comm return val.Address(), nil } + // 3. Log signer that is missing in validator set + log.Debug("Signer is missing from validator set", "signer", signer, "valSet", fmt.Sprintf("%v", valSet.List())) + return common.Address{}, ErrUnauthorizedAddress }