diff --git a/beacon-chain/blockchain/log.go b/beacon-chain/blockchain/log.go index b8f4e0d94168..d67a0b3f2696 100644 --- a/beacon-chain/blockchain/log.go +++ b/beacon-chain/blockchain/log.go @@ -69,6 +69,22 @@ func logStateTransitionData(b interfaces.ReadOnlyBeaconBlock) error { log = log.WithField("kzgCommitmentCount", len(kzgs)) } } + if b.Version() >= version.Electra { + eReqs, err := b.Body().ExecutionRequests() + if err != nil { + log.WithError(err).Error("Failed to get execution requests") + } else { + if len(eReqs.Deposits) > 0 { + log = log.WithField("depositRequestCount", len(eReqs.Deposits)) + } + if len(eReqs.Consolidations) > 0 { + log = log.WithField("consolidationRequestCount", len(eReqs.Consolidations)) + } + if len(eReqs.Withdrawals) > 0 { + log = log.WithField("withdrawalRequestCount", len(eReqs.Withdrawals)) + } + } + } log.Info("Finished applying state transition") return nil } diff --git a/changelog/nisdas_log_execution_requests.md b/changelog/nisdas_log_execution_requests.md new file mode 100644 index 000000000000..55198b988d7a --- /dev/null +++ b/changelog/nisdas_log_execution_requests.md @@ -0,0 +1,3 @@ +### Added + +- Log execution requests in each block. \ No newline at end of file