mev-boost-relay
mev-boost-relay copied to clipboard
Draft: log timestamps in RFC3339Nano
📝 Summary
- Changes the timestamp format to human-readable RFC3339.
- Increases the precision to nanosecond from second.
⛱ Motivation and Context
Current log precision is on the second level. On a high volume relay bids are in the hundreds per second, meaning logs, in the thousands, will share the same timestamp and lose their ordering. This would return ordering, and as a bonus make timestamps human-readable.
📚 References
✅ I have run these commands
- [ ]
make lint - [x]
make test-race - [x]
go mod tidy - [x] I have seen and agree to
CONTRIBUTING.md
Codecov Report
Attention: 5 lines in your changes are missing coverage. Please review.
Comparison is base (
c52858a) 33.26% compared to head (6523b33) 33.35%. Report is 10 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| common/logging.go | 0.00% | 5 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #537 +/- ##
==========================================
+ Coverage 33.26% 33.35% +0.09%
==========================================
Files 24 24
Lines 5090 5315 +225
==========================================
+ Hits 1693 1773 +80
- Misses 3178 3318 +140
- Partials 219 224 +5
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 33.35% <0.00%> (+0.09%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Side note: this was discussed at the end of MEV Boost call 6.
In mev-boost we're using this with millisecond precision: https://github.com/flashbots/mev-boost/blob/develop-deneb/cli/main.go#L223-L234 + https://github.com/flashbots/mev-boost/blob/develop-deneb/config/vars.go#L14
Any reason for nanoseconds over millis?
(sorry accidentally clicked on close)
@alextes do you want to rebase and update / engage in the comments?
i just didn't see any RFC3339Milli in time and thought it'd be nice to use a standard format. otherwise i'd have gone with that probably.
options are: https://pkg.go.dev/time#pkg-constants
i see now i completely read over your suggestion to use a custom RFC3339Milli format like done in mev-boost if we don't care about nano precision 🙈 .
great suggestion, updated the PR.