Skip to content

Add peerDAS kzg batch verification metric #9415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

KatyaRyazantseva
Copy link
Contributor

PR Description

Add PeerDAS beacon_kzg_verification_data_column_batch_seconds metric to align with beacon metrics specs

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

There are 2 places where we use kzg verify batch in DataColumnSidecarGossipValidator also

metricsSystem,
timeProvider,
TekuMetricCategory.BEACON,
"kzg_verification_data_column_batch_seconds",
Copy link
Contributor

Choose a reason for hiding this comment

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

If you need one metric in several places, please define it only once and reuse, see

public static final BiFunction<MetricsSystem, TimeProvider, MetricsHistogram>

@KatyaRyazantseva KatyaRyazantseva marked this pull request as ready for review May 14, 2025 00:11
Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM, just 2 cases where we should reject like kzg verification failed (it's actually failed, we don't know in which part)

return completedFuture(reject("DataColumnSidecar does not pass kzg validation"));
}
} catch (final Throwable t) {
throw new RuntimeException(t);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do the same: return completedFuture(reject("DataColumnSidecar does not pass kzg validation"));

return completedFuture(reject("DataColumnSidecar does not pass kzg validation"));
}
} catch (final Throwable t) {
throw new RuntimeException(t);
Copy link
Contributor

Choose a reason for hiding this comment

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

reject by the same reason if it didn't pass

Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

@zilm13 zilm13 merged commit aaf23c4 into Consensys:das May 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants