Skip to content
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

Gossip validation - log error metadata instead on logContext #2202

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Mar 18, 2021

Follow up of #2199

Logging so much data about the incoming attestations and aggregates is not actionable. As a consumer of logs the most useful information is the error itself, with its attached metadata. For example for FUTURE_SLOT you'll get

attestationSlot: Slot; latestPermissibleSlot: Slot;

which is more actionable that the hashTreeRoot of the aggregate. Also, computing the hashTreeRoot of attestations and aggregates is a non-trivial task that currently is done always, even when running in "production" mode, with logLevel >= info.

This PR changes from logging the entire error to only the type metadata, ommitting the unnecessary stack trace

@github-actions github-actions bot added the scope-networking All issues related to networking, gossip, and libp2p. label Mar 18, 2021
@codeclimate
Copy link

codeclimate bot commented Mar 18, 2021

Code Climate has analyzed commit 3223411 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

View more on Code Climate.

@wemeetagain wemeetagain merged commit 87b6f61 into master Mar 18, 2021
@wemeetagain wemeetagain deleted the dapplion/gossip-validation-log-context branch March 18, 2021 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-networking All issues related to networking, gossip, and libp2p.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants