@@ -376,7 +376,7 @@ func (p *Builder) handleHeaderRequest(w http.ResponseWriter, req *http.Request)
376
376
}
377
377
d , err := signing .ComputeDomain (params .BeaconConfig ().DomainApplicationBuilder ,
378
378
nil , /* fork version */
379
- nil /* genesis val root */ )
379
+ nil /* genesis val root */ )
380
380
if err != nil {
381
381
p .cfg .logger .WithError (err ).Error ("Could not compute the domain" )
382
382
http .Error (w , err .Error (), http .StatusInternalServerError )
@@ -454,7 +454,7 @@ func (p *Builder) handleHeaderRequestCapella(w http.ResponseWriter) {
454
454
}
455
455
d , err := signing .ComputeDomain (params .BeaconConfig ().DomainApplicationBuilder ,
456
456
nil , /* fork version */
457
- nil /* genesis val root */ )
457
+ nil /* genesis val root */ )
458
458
if err != nil {
459
459
p .cfg .logger .WithError (err ).Error ("Could not compute the domain" )
460
460
http .Error (w , err .Error (), http .StatusInternalServerError )
@@ -540,7 +540,7 @@ func (p *Builder) handleHeaderRequestDeneb(w http.ResponseWriter) {
540
540
}
541
541
d , err := signing .ComputeDomain (params .BeaconConfig ().DomainApplicationBuilder ,
542
542
nil , /* fork version */
543
- nil /* genesis val root */ )
543
+ nil /* genesis val root */ )
544
544
if err != nil {
545
545
p .cfg .logger .WithError (err ).Error ("Could not compute the domain" )
546
546
http .Error (w , err .Error (), http .StatusInternalServerError )
@@ -674,7 +674,7 @@ func (p *Builder) handleHeaderRequestElectra(w http.ResponseWriter) {
674
674
}
675
675
d , err := signing .ComputeDomain (params .BeaconConfig ().DomainApplicationBuilder ,
676
676
nil , /* fork version */
677
- nil /* genesis val root */ )
677
+ nil /* genesis val root */ )
678
678
if err != nil {
679
679
p .cfg .logger .WithError (err ).Error ("Could not compute the domain" )
680
680
http .Error (w , err .Error (), http .StatusInternalServerError )
@@ -955,15 +955,15 @@ func unmarshalRPCObject(b []byte) (*jsonRPCObject, error) {
955
955
}
956
956
957
957
func modifyExecutionPayload (execPayload engine.ExecutableData , fees * big.Int , prevBeaconRoot []byte , requests [][]byte ) (* engine.ExecutionPayloadEnvelope , error ) {
958
- modifiedBlock , err := executableDataToBlock (execPayload , prevBeaconRoot )
958
+ modifiedBlock , err := executableDataToBlock (execPayload , prevBeaconRoot , requests )
959
959
if err != nil {
960
960
return & engine.ExecutionPayloadEnvelope {}, err
961
961
}
962
962
return engine .BlockToExecutableData (modifiedBlock , fees , nil /*blobs*/ , requests /*requests*/ ), nil
963
963
}
964
964
965
965
// This modifies the provided payload to imprint the builder's extra data
966
- func executableDataToBlock (params engine.ExecutableData , prevBeaconRoot []byte ) (* gethTypes.Block , error ) {
966
+ func executableDataToBlock (params engine.ExecutableData , prevBeaconRoot []byte , requests [][] byte ) (* gethTypes.Block , error ) {
967
967
txs , err := decodeTransactions (params .Transactions )
968
968
if err != nil {
969
969
return nil , err
@@ -977,6 +977,12 @@ func executableDataToBlock(params engine.ExecutableData, prevBeaconRoot []byte)
977
977
withdrawalsRoot = & h
978
978
}
979
979
980
+ var requestsHash * common.Hash
981
+ if requests != nil {
982
+ h := gethTypes .CalcRequestsHash (requests )
983
+ requestsHash = & h
984
+ }
985
+
980
986
header := & gethTypes.Header {
981
987
ParentHash : params .ParentHash ,
982
988
UncleHash : gethTypes .EmptyUncleHash ,
@@ -996,7 +1002,9 @@ func executableDataToBlock(params engine.ExecutableData, prevBeaconRoot []byte)
996
1002
WithdrawalsHash : withdrawalsRoot ,
997
1003
BlobGasUsed : params .BlobGasUsed ,
998
1004
ExcessBlobGas : params .ExcessBlobGas ,
1005
+ RequestsHash : requestsHash ,
999
1006
}
1007
+
1000
1008
if prevBeaconRoot != nil {
1001
1009
pRoot := common .Hash (prevBeaconRoot )
1002
1010
header .ParentBeaconRoot = & pRoot
0 commit comments