-
Notifications
You must be signed in to change notification settings - Fork 90
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
cluster: align hash timestamp to unix #2430
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2430 +/- ##
==========================================
+ Coverage 53.71% 53.88% +0.17%
==========================================
Files 199 198 -1
Lines 26467 26458 -9
==========================================
+ Hits 14216 14257 +41
+ Misses 10483 10438 -45
+ Partials 1768 1763 -5
☔ View full report in Codecov by Sentry. |
cluster/ssz.go
Outdated
@@ -695,7 +697,7 @@ func hashRegistration(r Registration, hh ssz.HashWalker) error { | |||
hh.PutUint64(uint64(r.GasLimit)) | |||
|
|||
// Field (2) 'Timestamp' Bytes48 | |||
hh.PutBytes([]byte(r.Timestamp.String())) | |||
hh.PutBytes([]byte(r.Timestamp.Format(time.RFC3339))) |
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.
please use eth2 standard of ssz marshalling, also please ensure this hash equals canonical ssz hashing of validator registration
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.
Done 🫡
Aligns timestamp format of validator registration in hash calculation to unix format. This is done to avoid any confusion between timestamp in
cluster-lock.json
and the format used to calculate lock hash. Also it aligns the timestamp format with that ofgo-eth2-client
types.category: bug
ticket: #2436