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

HWY-249: Add the timestamp to CandidateBlock. #879

Merged
merged 3 commits into from
Feb 7, 2021

Conversation

afck
Copy link
Contributor

@afck afck commented Feb 7, 2021

Validity of a proto block depends on the timestamp. If there are two different candidate blocks (belonging to different units) with the same proto block, we must not apply the validity result to both.

https://casperlabs.atlassian.net/browse/HWY-249

Validity of a proto block depends on the timestamp. If there are two
different candidate blocks (belonging to different units) with the same
proto block, we must not apply the validity result to both.
@@ -192,20 +192,25 @@ impl<I> Era<I> {
pub(crate) fn resolve_validity(
&mut self,
proto_block: &ProtoBlock,
timestamp: Timestamp,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a timestamp of the unit that proposed the ProtoBlock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…and it will be the timestamp of the FinalizedBlock and Block itself.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment or improve the name? In order to figure out what the timestamp is here one has to go up a couple of levels and then down into another branch where it was created.

Co-authored-by: Mateusz Górski <goral09@users.noreply.github.com>
@afck
Copy link
Contributor Author

afck commented Feb 7, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 7, 2021

Build succeeded:

@bors bors bot merged commit e150d11 into casper-network:master Feb 7, 2021
@afck afck deleted the proto_block_timestamp branch February 7, 2021 12:27
bors bot added a commit that referenced this pull request Feb 9, 2021
889: NO-TICKET: Use timestamp in candidate block hash. r=afck a=afck

I missed that when rebasing #879 on #881.

Co-authored-by: Andreas Fackler <andreas@casperlabs.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants