From 27d20784194f1bfe95026e2c8f0c77b222843269 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:16:19 +0100 Subject: [PATCH] feat(telemetry): add consensus validation span enrichment (Task 4.8) Add validation ledger hash and full-validation flag to consensus.validation.send spans, plus quorum and proposer count to consensus.accept spans for trace-level agreement analysis. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/xrpld/app/consensus/RCLConsensus.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xrpld/app/consensus/RCLConsensus.cpp b/src/xrpld/app/consensus/RCLConsensus.cpp index 01cfb7e08f..cc0077b364 100644 --- a/src/xrpld/app/consensus/RCLConsensus.cpp +++ b/src/xrpld/app/consensus/RCLConsensus.cpp @@ -536,6 +536,10 @@ RCLConsensus::Adaptor::doAccept( XRPL_TRACE_SET_ATTR("xrpl.consensus.proposing", proposing); XRPL_TRACE_SET_ATTR( "xrpl.consensus.round_time_ms", static_cast(result.roundTime.read().count())); + XRPL_TRACE_SET_ATTR( + "xrpl.consensus.validation_quorum", static_cast(app_.getValidators().quorum())); + XRPL_TRACE_SET_ATTR( + "xrpl.consensus.proposers_validated", static_cast(result.proposers)); // Parent ledger's close time — enables computing close-time deltas across // consecutive rounds without correlating separate spans. XRPL_TRACE_SET_ATTR( @@ -885,6 +889,8 @@ RCLConsensus::Adaptor::validate(RCLCxLedger const& ledger, RCLTxSet const& txns, #endif XRPL_TRACE_SET_ATTR("xrpl.consensus.ledger.seq", static_cast(ledger.seq())); XRPL_TRACE_SET_ATTR("xrpl.consensus.proposing", proposing); + XRPL_TRACE_SET_ATTR("xrpl.validation.ledger_hash", to_string(ledger.id()).c_str()); + XRPL_TRACE_SET_ATTR("xrpl.validation.full", proposing); using namespace std::chrono_literals;