Skip to content

Commit 47272fe

Browse files
nisdasrkapka
authored andcommitted
Log execution requests (#14956)
1 parent 3f79f7b commit 47272fe

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

beacon-chain/blockchain/log.go

+16
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,22 @@ func logStateTransitionData(b interfaces.ReadOnlyBeaconBlock) error {
6969
log = log.WithField("kzgCommitmentCount", len(kzgs))
7070
}
7171
}
72+
if b.Version() >= version.Electra {
73+
eReqs, err := b.Body().ExecutionRequests()
74+
if err != nil {
75+
log.WithError(err).Error("Failed to get execution requests")
76+
} else {
77+
if len(eReqs.Deposits) > 0 {
78+
log = log.WithField("depositRequestCount", len(eReqs.Deposits))
79+
}
80+
if len(eReqs.Consolidations) > 0 {
81+
log = log.WithField("consolidationRequestCount", len(eReqs.Consolidations))
82+
}
83+
if len(eReqs.Withdrawals) > 0 {
84+
log = log.WithField("withdrawalRequestCount", len(eReqs.Withdrawals))
85+
}
86+
}
87+
}
7288
log.Info("Finished applying state transition")
7389
return nil
7490
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Added
2+
3+
- Log execution requests in each block.

0 commit comments

Comments
 (0)