log `extra_data` instead of `extra_data_len` for `ExecutionPayload` (#5851)

Add more details to execution payload logs, reusing the same facilities
that we already use for `GraffitiBytes`.
This commit is contained in:
Etan Kissling 2024-02-07 10:09:25 +01:00 committed by GitHub
parent a9ca59e074
commit 94a65c2a9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -16,6 +16,7 @@
{.push raises: [].}
import
std/typetraits,
stew/byteutils,
json_serialization,
ssz_serialization/types as sszTypes,
@ -425,7 +426,7 @@ func shortLog*(v: ExecutionPayload): auto =
gas_limit: v.gas_limit,
gas_used: v.gas_used,
timestamp: v.timestamp,
extra_data_len: len(v.extra_data),
extra_data: toPrettyString(distinctBase v.extra_data),
base_fee_per_gas: $(v.base_fee_per_gas),
block_hash: shortLog(v.block_hash),
num_transactions: len(v.transactions)

View File

@ -16,6 +16,7 @@
{.push raises: [].}
import
std/typetraits,
chronicles,
stew/[bitops2, byteutils],
json_serialization,
@ -632,7 +633,7 @@ func shortLog*(v: ExecutionPayload): auto =
gas_limit: v.gas_limit,
gas_used: v.gas_used,
timestamp: v.timestamp,
extra_data_len: len(v.extra_data),
extra_data: toPrettyString(distinctBase v.extra_data),
base_fee_per_gas: $(v.base_fee_per_gas),
block_hash: shortLog(v.block_hash),
num_transactions: len(v.transactions),

View File

@ -16,6 +16,7 @@
{.push raises: [].}
import
std/typetraits,
chronicles,
std/[sequtils, strutils],
stew/[bitops2, byteutils],
@ -584,7 +585,7 @@ func shortLog*(v: ExecutionPayload): auto =
gas_limit: v.gas_limit,
gas_used: v.gas_used,
timestamp: v.timestamp,
extra_data_len: len(v.extra_data),
extra_data: toPrettyString(distinctBase v.extra_data),
base_fee_per_gas: $(v.base_fee_per_gas),
block_hash: shortLog(v.block_hash),
num_transactions: len(v.transactions),