mev-boost-relay icon indicating copy to clipboard operation
mev-boost-relay copied to clipboard

expose eligible_at and signed_at in data api

Open rajivpo opened this issue 2 years ago • 8 comments

📝 Summary

Exposes eligible_at and signed_at via data api

⛱ Motivation and Context

The two relevant timestamps were captured and added in #301. For research purposes, it would be convenient to expose these as part of builder_blocks_received and proposer_payload_delivered. I have opted for providing the millisecond timestamps as milliseconds should be the roughly the relevant timeframe for sim and is aligned with the existing timestamp_ms field in BidTraceV2WithTimestampJSON. Additionally, tests for /relay/v1/data/bidtraces/builder_blocks_received have been added.

This is definitely not the cleanest implementation, so any and all feedback is appreciated!

📚 References

#301 #260 (edited to include)


✅ I have run these commands

  • [x] make lint
  • [x] make test-race
  • [x] go mod tidy
  • [x] I have seen and agree to CONTRIBUTING.md

rajivpo avatar Apr 20 '23 04:04 rajivpo

Interesting, thanks! Reminds me a bit of #260

Will review in depth soon

metachris avatar Apr 20 '23 06:04 metachris

Codecov Report

Merging #359 (5654d09) into main (cfb5923) will increase coverage by 11.77%. The diff coverage is 36.76%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##             main     #359       +/-   ##
===========================================
+ Coverage   19.18%   30.96%   +11.77%     
===========================================
  Files          20       24        +4     
  Lines        3722     4819     +1097     
===========================================
+ Hits          714     1492      +778     
- Misses       2915     3125      +210     
- Partials       93      202      +109     
Flag Coverage Δ
unittests 30.96% <36.76%> (+11.77%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
beaconclient/mock_multi_beacon_client.go 0.00% <0.00%> (ø)
common/common.go 0.00% <0.00%> (ø)
common/types.go 2.04% <0.00%> (-0.08%) :arrow_down:
common/types_spec.go 0.00% <0.00%> (ø)
common/utils.go 21.85% <0.00%> (-19.40%) :arrow_down:
database/mockdb.go 0.00% <0.00%> (ø)
database/types.go 27.27% <ø> (+27.27%) :arrow_up:
datastore/memcached.go 0.00% <ø> (ø)
...ons/validator-registration-signature-check/main.go 0.00% <0.00%> (ø)
services/api/blocksim_ratelimiter.go 12.00% <0.00%> (-1.05%) :arrow_down:
... and 13 more

codecov-commenter avatar Apr 20 '23 06:04 codecov-commenter

yeah #260 was definitely a partial inspiration for some of the structure/implementation

rajivpo avatar Apr 20 '23 15:04 rajivpo

@metachris wanted to see if you've had a chance to take a look at this

rajivpo avatar May 01 '23 16:05 rajivpo

Asking for a bit of patience, as we're working on other important PRs to get merged first (in particular #380)

metachris avatar May 02 '23 10:05 metachris

@rajivpo could you please rebase?

metachris avatar Jun 12 '23 07:06 metachris

yes will get this done shortly

rajivpo avatar Jun 13 '23 00:06 rajivpo

something went wrong with this rebase, it now has 45 commits and a ton of changes 🤔

metachris avatar Jun 17 '23 07:06 metachris