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

feat: Consensus Rules #162

Open
2 of 3 tasks
jaoleal opened this issue May 21, 2024 · 2 comments
Open
2 of 3 tasks

feat: Consensus Rules #162

jaoleal opened this issue May 21, 2024 · 2 comments

Comments

@jaoleal
Copy link
Contributor

jaoleal commented May 21, 2024

After a talk with @Davidson-Souza was noticed that floresta lack "minimum" consensus rules that core has.

TODO:

  • Map implemented and not-implemented rules on floresta in comparison to core
  • Implement that ones that need to
  • implement all core test case about consensus
@jaoleal
Copy link
Contributor Author

jaoleal commented May 21, 2024

Core validation.cpp will serve as a guide

@Davidson-Souza
Copy link
Collaborator

Looks great! Just to clarify, we don't implement script validation, this is handled by libbitcoinconsensus. We have to implement:

  • Other transaction checks
    • Amounts (implemented but not tested)
    • Script pubkey consensus restriction (I think a spk cannot be bigger than 10k bytes) (not implemented)
    • absolute and relative locktimes (not implemented)
    • Use libbitcoinconsensus to check the inputs (implemented but not tested)
  • Blocks
    • PoW (implemented but not very tested)
    • Whether they have a valid ancestor (implemented and somehow tested)
    • Timestamp: it cannot be smaller than the MTP and greater than 7200 seconds from now (not implemented)
    • The merkle tree (implemented and tested as this is from rust-bitcoin)
    • The witness commitment (implemented and tested as this is from rust-bitcoin)
    • whether all transactions are valid (including coinbase) (implemented but not tested)

This list isn't exhaustive, we need to find out what else is there and implement it

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

No branches or pull requests

2 participants