eth/catalyst,miner: include withdrawals in payload id calculation (#26554)

According to the spec the payloadID needs to be random or dependent on all arguments, to prevent two payloads from clashing. This change adds withdrawals into the payload derivation. 

---------

Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Marius van der Wijden
2023-02-07 13:16:53 -05:00
committed by GitHub
co-authored by lightclient@protonmail.com Martin Holst Swende Felix Lange
parent 31d401ea68
commit 2f73f4f028
3 changed files with 81 additions and 0 deletions
+2
View File
@@ -1041,6 +1041,7 @@ func TestWithdrawals(t *testing.T) {
Timestamp: blockParams.Timestamp,
FeeRecipient: blockParams.SuggestedFeeRecipient,
Random: blockParams.Random,
Withdrawals: blockParams.Withdrawals,
}).Id()
execData, err := api.GetPayloadV2(payloadID)
if err != nil {
@@ -1087,6 +1088,7 @@ func TestWithdrawals(t *testing.T) {
Timestamp: blockParams.Timestamp,
FeeRecipient: blockParams.SuggestedFeeRecipient,
Random: blockParams.Random,
Withdrawals: blockParams.Withdrawals,
}).Id()
execData, err = api.GetPayloadV2(payloadID)
if err != nil {