-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Log attestation's journey published by local validators #3534
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3534 +/- ##
==========================================
- Coverage 36.64% 36.52% -0.12%
==========================================
Files 324 324
Lines 8954 8980 +26
Branches 1406 1410 +4
==========================================
- Hits 3281 3280 -1
- Misses 5530 5556 +26
- Partials 143 144 +1 |
Code Climate has analyzed commit d6124e4 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Performance Report✔️ no performance regression detected Full benchmark results
|
I think this log statements should be part of the validator monitor. And be activated behind a flag since this could be extremely verbose?. Also, consider using a sub-logger with different module name so it's easier to filter logs with grep. logger.child({module: "VMON"})
We already do that in the validator monitor
|
bcf5b1e
to
d6124e4
Compare
@@ -530,6 +530,11 @@ export function createLodestarMetrics( | |||
help: "The delay between when the validator should send the attestation and when it was received", | |||
labelNames: ["index", "src"], | |||
}), | |||
unaggregatedAttestationMissed: register.gauge<"index" | "subnet">({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not correct since it doesn't mean it was missed. A better name would be
unaggregatedAttestationSubmittedNoSubnetPeers
but you should clarify if you are counting
- no mesh peers
- no peers in the same topic
@tuyennhv What's the status of this? Waiting for some changes upstream? |
yeah, we also need to upgrade gossipsub-js, gossipsub-js also needs to work with latest libp2p-interface |
d6124e4
to
a7769d9
Compare
0efa9b3
to
c475345
Compare
c475345
to
757863b
Compare
@@ -424,7 +423,6 @@ export function getValidatorApi({chain, config, logger, metrics, network, sync}: | |||
async publishAggregateAndProofs(signedAggregateAndProofs) { | |||
notWhileSyncing(); | |||
|
|||
const seenTimestampSec = Date.now() / 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By removing the seenTimestamp from here, now the metric is slightly different:
- before: Tracks time attestation is received at the start of handling the REST call
- now: Track the time the attestation is published to gossip. I agree this is the one that matters to us
We should track both, or track the validation time individually. But can be done in a new PR
} | ||
|
||
const balance = balances && balances[index]; | ||
if (balance !== undefined) { | ||
metrics.validatorMonitor.prevEpochOnChainBalance.set({index}, balance); | ||
} | ||
|
||
if (failedAttestation) { | ||
logger.verbose("Failed attestation in previous epoch", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this log level to debug
const fork = this.config.getForkName(aggregateAndProof.message.aggregate.data.slot); | ||
await this.publishObject<GossipType.beacon_aggregate_and_proof>( | ||
return await this.publishObject<GossipType.beacon_aggregate_and_proof>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change in all publish*
methods for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT!
Motivation
We want to debug #3527 - missing attestations in mainnet
Description
Log attestation when it's published to topic and included in AggregateAndProof
Don't log when we receive gossip block because I think it's not worth to do so considering the performance to scan through all indices of aggregate and proofs, @dapplion let me know if there's a cheap way to do it. Once an attestation is included in AggregateAndProof, it's likely it's included in upcoming blocks.
part of #3527