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

beacon/log: augment logs with block roots #5675

Merged
merged 7 commits into from
Apr 29, 2020

Conversation

q9f
Copy link
Contributor

@q9f q9f commented Apr 29, 2020

What type of PR is this?

Feature

What does this PR do? Why is it needed?

This PR augments sync logs with some additional information that helps identifying the best block and epoch without increasing verbosity but also by avoiding too much log spam.

This PR is the sister of sigp/lighthouse#1084

Which issues(s) does this PR fix?

N/A

Other notes for review

Initial Sync:
Screenshot at 2020-04-29 16-13-38

New Blocks Received:
Screenshot at 2020-04-29 16-24-04

@q9f q9f requested a review from a team as a code owner April 29, 2020 14:25
"slot": block.Slot,
"block": fmt.Sprintf("0x%s...", hex.EncodeToString(blockRoot[:])[:8]),
"epoch": helpers.SlotToEpoch(block.Slot),
"finalizedEpoch": finalized.Epoch,
Copy link
Member

Choose a reason for hiding this comment

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

My argument for this is 99% of users/non developers don't care about finalizedEpoch and finalizedRoot when syncing. So perhaps move it to debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not seeing the finality is my main pain point. Everyone should care about finality :)

Burying it in DEBUG level would be very unfortunate due to the noise.

Copy link
Member

Choose a reason for hiding this comment

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

Marinated a bit more with this. I'm on board with this rationale

beacon-chain/blockchain/log.go Outdated Show resolved Hide resolved
beacon-chain/blockchain/process_block.go Show resolved Hide resolved
beacon-chain/sync/pending_blocks_queue.go Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #5675 into master will increase coverage by 38.05%.
The diff coverage is 5.55%.

@@             Coverage Diff             @@
##           master    #5675       +/-   ##
===========================================
+ Coverage    1.47%   39.53%   +38.05%     
===========================================
  Files          69      239      +170     
  Lines        6492    20865    +14373     
===========================================
+ Hits           96     8249     +8153     
- Misses       6387    11048     +4661     
- Partials        9     1568     +1559     

prestonvanloon
prestonvanloon previously approved these changes Apr 29, 2020
Copy link
Member

@prestonvanloon prestonvanloon left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants