Skip to content

chore(validator): improve instrumentation#1587

Merged
bobbinth merged 5 commits intonextfrom
mirko/instrument-validator
Jan 23, 2026
Merged

chore(validator): improve instrumentation#1587
bobbinth merged 5 commits intonextfrom
mirko/instrument-validator

Conversation

@Mirko-von-Leipzig
Copy link
Collaborator

Adds more fine grained instrumentation to the validator.

The resulting code is a bit ugly but I didn't want to touch the core code flow. I'd like to try a different approach at the gRPC level but I'll leave that for another time.

@Mirko-von-Leipzig Mirko-von-Leipzig added telemetry Relates to tracing and open-telemetry validator Related to the validator component no changelog This PR does not require an entry in the `CHANGELOG.md` file labels Jan 23, 2026
@Mirko-von-Leipzig Mirko-von-Leipzig force-pushed the mirko/instrument-validator branch from f99819b to 18ae11c Compare January 23, 2026 12:29
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

for tx_header in proposed_block.transactions() {
let tx_id = tx_header.id();
if validated_transactions.get(&tx_id).await.is_none() {
// TODO: LruCache is a poor abstraction since it locks many times.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a wrapper - something like ScriptCache and provide bulk operations on this struct - to lock the underlying cache only once for such operations.

@bobbinth bobbinth merged commit d7350f6 into next Jan 23, 2026
7 checks passed
@bobbinth bobbinth deleted the mirko/instrument-validator branch January 23, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file telemetry Relates to tracing and open-telemetry validator Related to the validator component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants