-
Notifications
You must be signed in to change notification settings - Fork 179
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
Herostore message entity nonce #5452
Conversation
- reenable silence period registry tests
@@ -165,7 +165,8 @@ func NewGossipSubAppSpecificScoreRegistry(config *GossipSubAppSpecificScoreRegis | |||
|
|||
invalidCtrlMsgNotificationStore := queue.NewHeroStore(config.Parameters.InvalidControlMessageNotificationQueueSize, | |||
lg.With().Str("component", "invalid_control_message_notification_queue").Logger(), | |||
metrics.RpcInspectorNotificationQueueMetricFactory(config.HeroCacheMetricsFactory, config.NetworkingType)) | |||
metrics.RpcInspectorNotificationQueueMetricFactory(config.HeroCacheMetricsFactory, config.NetworkingType), | |||
queue.WithMessageEntityFactory(queue.NewMessageEntityWithNonce)) |
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.
👍
Nonce string | ||
}{ | ||
msg, | ||
time.Now().String(), |
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.
what do you think about using Nonce int64
, and then?
time.Now().String(), | |
time.Now().UnixNano(), |
it would be 8 bytes instead of 51 (2024-02-23 14:54:13.540848 -0800 PST m=+0.000076126
)
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.
We need to convert it to a string for the RLP encoding e8187bc results in a 19 byte string
Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5452 +/- ##
==========================================
+ Coverage 56.01% 57.45% +1.44%
==========================================
Files 1029 850 -179
Lines 100484 84915 -15569
==========================================
- Hits 56287 48791 -7496
+ Misses 39864 32298 -7566
+ Partials 4333 3826 -507
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…flow/flow-go into khalil/herostore-message-entity-nonce
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
Co-authored-by: Jordan Schalm <jordan@dapperlabs.com>
…flow/flow-go into khalil/herostore-message-entity-nonce
This pull request introduces a configurable message entity factory function for herostore, allowing users to incorporate a nonce into the message entity. Previously, certain tests utilizing herostore were failing due to unexpected deduplication of messages. These modifications effectively address the issue by providing users with the flexibility to add a nonce, ensuring more predictable and reliable behavior in scenarios involving message deduplication.
ref: https://github.com/dapperlabs/flow-internal/issues/1910