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

Negative tests for Block::is_valid #215

Open
18 tasks
aszepieniec opened this issue Oct 29, 2024 · 0 comments
Open
18 tasks

Negative tests for Block::is_valid #215

aszepieniec opened this issue Oct 29, 2024 · 0 comments
Assignees

Comments

@aszepieniec
Copy link
Contributor

  • 1. Previous_block` is consistent with current block
    • a) Block height is previous plus one
    • b) Block header points to previous block
    • c) block mmr updated correctly
    • d) Block timestamp is greater than previous block timestamp
    • e) Target difficulty and cumulative proof-of-work were updated correctly
    • f) Block timestamp is less than host-time (utc) + 2 hours.
  • 2. Block is valid
    • a) block proof is valid
    • b) max block size is not exceeded
  • 3. The transaction is valid
    • a) Verify that MS removal records are valid, done against previous mutator_set_accumulator,
    • b) Verify that all removal records have unique index sets
    • c) verify that we can add mutator_set_update to previous mutator_set_accumulator,
    • c') and that it results in new block's mutator_set_accumulator
    • e) transaction timestamp <= block timestamp
    • f) transaction coinbase <= miner reward
    • g) transaction is valid (internally consistent)
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