Skip to content
Closed
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
6 changes: 6 additions & 0 deletions consensus/system_contract/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ func SealHash(header *types.Header) (hash common.Hash) {
func ecrecover(header *types.Header) (common.Address, error) {
signature := header.BlockSignature[0:]

// For compatibility with scroll's reth node, the signature is stored in the extra data field
// If the signature is not found in the block signature field, we try to extract it from the extra data field
if len(signature) == 0 && len(header.Extra) == crypto.SignatureLength {
signature = header.Extra[0:]
}

// Recover the public key and the Ethereum address
pubkey, err := crypto.Ecrecover(SealHash(header).Bytes(), signature)
if err != nil {
Expand Down
Loading