File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ var caps = []string{
9191 "engine_forkchoiceUpdatedWithWitnessV1" ,
9292 "engine_forkchoiceUpdatedWithWitnessV2" ,
9393 "engine_forkchoiceUpdatedWithWitnessV3" ,
94+ "engine_forkchoiceUpdatedWithWitnessV4" ,
9495 "engine_exchangeTransitionConfigurationV1" ,
9596 "engine_getPayloadV1" ,
9697 "engine_getPayloadV2" ,
Original file line number Diff line number Diff line change @@ -84,6 +84,22 @@ func (api *ConsensusAPI) ForkchoiceUpdatedWithWitnessV3(update engine.Forkchoice
8484 return api .forkchoiceUpdated (update , params , engine .PayloadV3 , true )
8585}
8686
87+ // ForkchoiceUpdatedWithWitnessV4 is analogous to ForkchoiceUpdatedV4, only it
88+ // generates an execution witness too if block building was requested.
89+ func (api * ConsensusAPI ) ForkchoiceUpdatedWithWitnessV4 (update engine.ForkchoiceStateV1 , params * engine.PayloadAttributes ) (engine.ForkChoiceResponse , error ) {
90+ if params != nil {
91+ switch {
92+ case params .Withdrawals == nil :
93+ return engine .STATUS_INVALID , attributesErr ("missing withdrawals" )
94+ case params .BeaconRoot == nil :
95+ return engine .STATUS_INVALID , attributesErr ("missing beacon root" )
96+ case ! api .checkFork (params .Timestamp , forks .Eip7805 ):
97+ return engine .STATUS_INVALID , unsupportedForkErr ("fcuV4 must only be called for eip7805 payloads" )
98+ }
99+ }
100+ return api .forkchoiceUpdated (update , params , engine .PayloadV4 , true )
101+ }
102+
87103// NewPayloadWithWitnessV1 is analogous to NewPayloadV1, only it also generates
88104// and returns a stateless witness after running the payload.
89105func (api * ConsensusAPI ) NewPayloadWithWitnessV1 (params engine.ExecutableData ) (engine.PayloadStatusV1 , error ) {
You can’t perform that action at this time.
0 commit comments