-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Add blob topic handler #18
Conversation
813d9a3
to
e600d84
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
========================================
- Coverage 7.75% 3.15% -4.60%
========================================
Files 7 26 +19
Lines 400 3519 +3119
========================================
+ Hits 31 111 +80
- Misses 361 3397 +3036
- Partials 8 11 +3 ☔ View full report in Codecov by Sentry. |
e600d84
to
ab67cde
Compare
8cb3216
to
efa312a
Compare
eth/pubsub.go
Outdated
slog.Info( | ||
"Handling blob gossip message", | ||
"PeerID", p.host.ID(), | ||
"RemotePeerID", msg.ReceivedFrom.String(), | ||
"MsgID", hex.EncodeToString([]byte(msg.ID)), | ||
"MsgSize", len(msg.Data), | ||
"Topic", msg.GetTopic(), | ||
"Seq", msg.GetSeqno(), | ||
"Slot", slot, | ||
"ValIdx", proposerIndex, | ||
"TimeInSlot", now.Sub(slotStart).Seconds(), | ||
"StateRoot", hexutil.Encode(blob.GetSignedBlockHeader().GetHeader().GetStateRoot()), | ||
"BodyRoot", hexutil.Encode(blob.GetSignedBlockHeader().GetHeader().GetBodyRoot()), | ||
"ParentRoot", hexutil.Encode(blob.GetSignedBlockHeader().GetHeader().GetParentRoot()), | ||
) |
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.
I don't understand why the slog
logging is required, this information is duplicate with the evt
.
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.
It's not necessarily "required", but helps a little in terms of debugging and showing what's coming from those topics.
Removed it for now, and if we need them in the future, we can add back with Debug or Trace level logging.
efa312a
to
82a7227
Compare
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.
LGTM! many thanks @0x00101010 for the PR!
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.
Thanks @0x00101010 for your contribution!
Description
Add blob topic handler to decode blob p2p message and produce TraceEvent.