@@ -302,9 +302,22 @@ func (c *Clique) verifyHeader(chain consensus.ChainHeaderReader, header *types.H
302
302
if chain .Config ().IsShanghai (header .Number , header .Time ) {
303
303
return errors .New ("clique does not support shanghai fork" )
304
304
}
305
+ // Verify the non-existence of withdrawalsHash.
306
+ if header .WithdrawalsHash != nil {
307
+ return fmt .Errorf ("invalid withdrawalsHash: have %x, expected nil" , header .WithdrawalsHash )
308
+ }
305
309
if chain .Config ().IsCancun (header .Number , header .Time ) {
306
310
return errors .New ("clique does not support cancun fork" )
307
311
}
312
+ // Verify the non-existence of cancun-specific header fields
313
+ switch {
314
+ case header .ExcessBlobGas != nil :
315
+ return fmt .Errorf ("invalid excessBlobGas: have %d, expected nil" , header .ExcessBlobGas )
316
+ case header .BlobGasUsed != nil :
317
+ return fmt .Errorf ("invalid blobGasUsed: have %d, expected nil" , header .BlobGasUsed )
318
+ case header .ParentBeaconRoot != nil :
319
+ return fmt .Errorf ("invalid parentBeaconRoot, have %#x, expected nil" , header .ParentBeaconRoot )
320
+ }
308
321
// All basic checks passed, verify cascading fields
309
322
return c .verifyCascadingFields (chain , header , parents )
310
323
}
@@ -753,6 +766,15 @@ func encodeSigHeader(w io.Writer, header *types.Header) {
753
766
if header .WithdrawalsHash != nil {
754
767
panic ("unexpected withdrawal hash value in clique" )
755
768
}
769
+ if header .ExcessBlobGas != nil {
770
+ panic ("unexpected excess blob gas value in clique" )
771
+ }
772
+ if header .BlobGasUsed != nil {
773
+ panic ("unexpected blob gas used value in clique" )
774
+ }
775
+ if header .ParentBeaconRoot != nil {
776
+ panic ("unexpected parent beacon root value in clique" )
777
+ }
756
778
if err := rlp .Encode (w , enc ); err != nil {
757
779
panic ("can't encode: " + err .Error ())
758
780
}
0 commit comments