Skip to content

Commit

Permalink
fix serialization for new payload
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Sep 12, 2023
1 parent bd6e81b commit c713167
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/beacon-node/src/execution/engine/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ export function serializeExecutionPayload(fork: ForkName, data: allForks.Executi
// right now the caseMap of ssz ExecutionWitness is camel cased and can
// directly be used to serialize tojson
payload.executionWitness = ssz.verge.ExecutionWitness.toJson(executionWitness);
// serialization with ssz serialize suffix diff's suffix to a string while geth expects num
(payload.executionWitness as verge.ExecutionWitness).stateDiff.forEach((sDiff) => {
sDiff.suffixDiffs.forEach((sfDiff) => {
sfDiff.suffix = Number(sfDiff.suffix);
});
});
}

return payload;
Expand Down

0 comments on commit c713167

Please sign in to comment.