agreement: Add validatedAt to proposal type and BlockAcceptedEventDetails message#3703
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3703 +/- ##
=======================================
Coverage 49.91% 49.91%
=======================================
Files 382 382
Lines 64412 64421 +9
=======================================
+ Hits 32150 32155 +5
- Misses 28832 28836 +4
Partials 3430 3430
Continue to review full report at Codecov.
|
tsachiherman
left a comment
There was a problem hiding this comment.
Overall, I think that the PR makes sense. It uses relative timing and log the relative offset correctly.
I have few small requests:
- The
DurationUntilis abit problematic, since it would break the concept ofdetachable clock, since it would pass-in a timestamp. - In order to solve the above, please port from the feature/txnsync branch the following method; it should perform the same work and would not get duplicated once the txnsync get merged in :
// Since returns the time that has passed between the time the clock was last zeroed out and now
func (m *Monotonic) Since() time.Duration {
return time.Since(m.zero)
}- Since you've changed a serialized data structure, please rebuild the msgp. It will make a comment only change, but it's important to avoid accumulating undesired changes.
| Address: a.Certificate.Proposal.OriginalProposer.String(), | ||
| Hash: a.Certificate.Proposal.BlockDigest.String(), | ||
| Round: uint64(a.Certificate.Round), | ||
| ValidatedAt: a.Payload.validatedAt, |
There was a problem hiding this comment.
Could you add to the telemetryspec.BlockAcceptedEventDetails another field to indicate whether it's a prevalidated block or not ?
( i.e. so that this branching would be visible on the telemetry ? )
There was a problem hiding this comment.
oh, that would be interesting to know, sure
## Summary There was one Clock implementation not updated in #3703 in the agreement fuzzer testing package's NetworkFacade type. This updates it to fully implement the Clock interface.
Summary
This pulls a bit of code from the the pipelining branch to add a "validatedAt" duration field to the agreement.proposal type. This is used to provide an extra field in the BlockAcceptedEventDetails message describing how soon into the round each block was validated.
Test Plan
Existing tests should pass, and a new test might be helpful to show that the value is getting filled in correctly.