Skip to content
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

[TECH_DEBT] - Store timestamps with proposals #3803

Open
jbearer opened this issue Oct 25, 2024 · 0 comments
Open

[TECH_DEBT] - Store timestamps with proposals #3803

jbearer opened this issue Oct 25, 2024 · 0 comments

Comments

@jbearer
Copy link
Member

jbearer commented Oct 25, 2024

What is this task and why do we need to work on it?

The confirmation layer requires a system timestamp to validate a proposal. Currently, we sample this timestamp at the beginning of validate_and_apply_header, but this leaves us open to spurious drift, because some time might have elapsed between our node receiving the proposal and calling validate_and_apply_header (e.g. time taken to store the proposal). This can lead us to rejecting a proposal that was actually constructed correctly and honestly.

HotShot can help here by sampling the system time immediately upon receiving a QuorumProposal, and keeping track of that timestamp along with the proposal until it eventually becomes an input to validate_and_apply_header. Ideally, this timestamp would be sampled as soon as we see the message in the networking task, so we don't even have to wait for the consensus task to process events in the event stream and see the quorum proposal.

What work will need to be done to complete this task?

Add the timestamp to all of the events/data structures where we pass around a proposal between receiving it and validating it. Add a timestamp as an input to validate_and_apply_header.

Are there any other details to include?

No response

What are the acceptance criteria to close this issue?

validate_and_apply_header gets a timestamp argument which is as accurate as possible to the time the proposal was received

Branch work will be merged to (if not the default branch)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant