-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Feat:] Time consensus implementation #300
base: master
Are you sure you want to change the base?
Conversation
4772a7d
to
f602686
Compare
My master was behind |
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.
Overall looks good, some implementation comments.
14dced6
to
4cc0df3
Compare
Applied changes by @Davidson-Souza. 4cc0df3 Tries to implement Note to reviewersIm still not glad with this solution to validate time-related data and still a lot of work to do around this changes. I would like to:
|
b8b66b6
to
6bbe2c9
Compare
…s: NodeTime. add: get_mtp() method for Persisted ChainState. fix: time-related validation for Persisted ChainState.
6bbe2c9
to
c58203d
Compare
Since #198 became abandoned and wasnt updated i decided to reimplement what was done from that PR.
This PR tries to add the validation for Time related data to floresta.
To implement this i ran trough some solutions and here they are:
locktime inside the transactions
: To validate them i need theMTP
and the timestamp of the block when the utxo was created.Block Timestamp
: To validate if a block is inserting the correct timestamp i need theMTP
of the chain.This changes implements a new struct and a trait on
mod
and a new function onConsensus
.validate_locktime
method insideConsensus
to consume the other solutions (MTP, UTXO TIME-DATA) and to validate time itself.The work from now on in this PR is:
validate_locktime
and populate support for it, changing some methods signature(includingvalidate_transactions
,validate_block
and etc...).