-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: build local payload with timestamp from beacon clock #194
Conversation
/// Fetch the previous RANDAO value from the beacon chain. | ||
/// | ||
/// NOTE: for some reason, using the ApiResult from `beacon_api_client` doesn't work, so | ||
/// we are making a direct request to the beacon client endpoint. |
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.
hmm just curious to know some more detail
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.
I think it has to do with the type that the beacon_api_client
crate expects to deserialize from the result of that API call - maybe it has changed or it's not updated to what Lighthouse is responding, so it fails to deserialize.
This is probably a bug in the beacon_api_client crate - but I haven't investigated
Great catch ser! |
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.
LGTM!
This PR fixes the edge case in which the previous slot was missed by the proposer before us, and we would
use the wrong block timestamp. Now we use the timestamp according to the beacon proposal slot instead.
This also contains minor refactoring to the local payload fetcher to be a little cleaner.