mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fix: system config consensus (#1180)
* fix: system config to check sign in any case * chore: auto version bump [bot]
This commit is contained in:
parent
a4109fd8a9
commit
7b56ff1d66
2 changed files with 11 additions and 14 deletions
|
|
@ -130,7 +130,7 @@ func (s *SystemContract) verifyHeader(chain consensus.ChainHeaderReader, header
|
||||||
return errInvalidNonce
|
return errInvalidNonce
|
||||||
}
|
}
|
||||||
// Check that the BlockSignature contains signature if block is not requested
|
// Check that the BlockSignature contains signature if block is not requested
|
||||||
if !header.Requested && header.Number.Cmp(big.NewInt(0)) != 0 && len(header.BlockSignature) != extraSeal {
|
if header.Number.Cmp(big.NewInt(0)) != 0 && len(header.BlockSignature) != extraSeal {
|
||||||
return errMissingSignature
|
return errMissingSignature
|
||||||
}
|
}
|
||||||
// Ensure that the mix digest is zero
|
// Ensure that the mix digest is zero
|
||||||
|
|
@ -197,8 +197,6 @@ func (s *SystemContract) verifyCascadingFields(chain consensus.ChainHeaderReader
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// only if block header has NOT been requested, then verify the signature against the current signer
|
|
||||||
if !header.Requested {
|
|
||||||
signer, err := ecrecover(header)
|
signer, err := ecrecover(header)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
@ -211,7 +209,6 @@ func (s *SystemContract) verifyCascadingFields(chain consensus.ChainHeaderReader
|
||||||
log.Error("Unauthorized signer", "Got", signer, "Expected:", s.signerAddressL1)
|
log.Error("Unauthorized signer", "Got", signer, "Expected:", s.signerAddressL1)
|
||||||
return ErrUnauthorizedSigner
|
return ErrUnauthorizedSigner
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
VersionMajor = 5 // Major version component of the current release
|
VersionMajor = 5 // Major version component of the current release
|
||||||
VersionMinor = 8 // Minor version component of the current release
|
VersionMinor = 8 // Minor version component of the current release
|
||||||
VersionPatch = 41 // Patch version component of the current release
|
VersionPatch = 42 // Patch version component of the current release
|
||||||
VersionMeta = "mainnet" // Version metadata to append to the version string
|
VersionMeta = "mainnet" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue