log execution payload (header) block_hash and parent_hash in block shortLogs (#5660)

This commit is contained in:
tersec 2023-12-10 00:25:51 +00:00 committed by GitHub
parent d8728b7b28
commit df902fd00f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 2 deletions

View File

@ -605,7 +605,9 @@ func shortLog*(v: SomeBeaconBlock): auto =
voluntary_exits_len: v.body.voluntary_exits.len(),
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: 0'u64, # Bellatrix compat
fee_recipient: "",
block_hash: "", # Bellatrix compat
parent_hash: "", # Bellatrix compat
fee_recipient: "", # Bellatrix compat
bls_to_execution_changes_len: 0, # Capella compat
blob_kzg_commitments_len: 0, # Deneb compat
)

View File

@ -401,6 +401,8 @@ func shortLog*(v: SomeBeaconBlock): auto =
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: v.body.execution_payload.block_number,
# TODO checksum hex? shortlog?
block_hash: to0xHex(v.body.execution_payload.block_hash.data),
parent_hash: to0xHex(v.body.execution_payload.parent_hash.data),
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
bls_to_execution_changes_len: 0, # Capella compat
blob_kzg_commitments_len: 0, # Deneb compat

View File

@ -608,6 +608,8 @@ func shortLog*(v: SomeBeaconBlock): auto =
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: v.body.execution_payload.block_number,
# TODO checksum hex? shortlog?
block_hash: to0xHex(v.body.execution_payload.block_hash.data),
parent_hash: to0xHex(v.body.execution_payload.parent_hash.data),
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(),
blob_kzg_commitments_len: 0, # Deneb compat

View File

@ -526,6 +526,8 @@ func shortLog*(v: SomeBeaconBlock): auto =
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: v.body.execution_payload.block_number,
# TODO checksum hex? shortlog?
block_hash: to0xHex(v.body.execution_payload.block_hash.data),
parent_hash: to0xHex(v.body.execution_payload.parent_hash.data),
fee_recipient: to0xHex(v.body.execution_payload.fee_recipient.data),
bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(),
blob_kzg_commitments_len: v.body.blob_kzg_commitments.len(),

View File

@ -297,7 +297,9 @@ func shortLog*(v: SomeBeaconBlock): auto =
voluntary_exits_len: v.body.voluntary_exits.len(),
sync_committee_participants: -1, # Altair logging compatibility
block_number: 0'u64, # Bellatrix compat
fee_recipient: "",
block_hash: "", # Bellatrix compat
parent_hash: "", # Bellatrix compat
fee_recipient: "", # Bellatrix compat
bls_to_execution_changes_len: 0, # Capella compat
blob_kzg_commitments_len: 0, # Deneb compat
)

View File

@ -28,6 +28,8 @@ func shortLog*(v: BlindedBeaconBlock): auto =
voluntary_exits_len: 0,
sync_committee_participants: 0,
block_number: 0'u64,
block_hash: "",
parent_hash: "",
fee_recipient: "",
bls_to_execution_changes_len: 0, # Capella compat
blob_kzg_commitments_len: 0, # Deneb compat

View File

@ -104,6 +104,8 @@ func shortLog*(v: BlindedBeaconBlock): auto =
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: v.body.execution_payload_header.block_number,
# TODO checksum hex? shortlog?
block_hash: to0xHex(v.body.execution_payload_header.block_hash.data),
parent_hash: to0xHex(v.body.execution_payload_header.parent_hash.data),
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(),
blob_kzg_commitments_len: 0, # Deneb compat

View File

@ -94,6 +94,8 @@ func shortLog*(v: BlindedBeaconBlock): auto =
sync_committee_participants: v.body.sync_aggregate.num_active_participants,
block_number: v.body.execution_payload_header.block_number,
# TODO checksum hex? shortlog?
block_hash: to0xHex(v.body.execution_payload_header.block_hash.data),
parent_hash: to0xHex(v.body.execution_payload_header.parent_hash.data),
fee_recipient: to0xHex(v.body.execution_payload_header.fee_recipient.data),
bls_to_execution_changes_len: v.body.bls_to_execution_changes.len(),
blob_kzg_commitments_len: 0, # Deneb compat