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

Add test coverage that ensures edge cases lead to invalid blocks #20

Open
daira opened this issue Oct 19, 2023 · 1 comment
Open

Add test coverage that ensures edge cases lead to invalid blocks #20

daira opened this issue Oct 19, 2023 · 1 comment

Comments

@daira
Copy link
Collaborator

daira commented Oct 19, 2023

Let's add test coverage that ensures these edge cases lead to invalid blocks:

  • Blocks:
    • 0 txns
    • non-coinbase initial txn
    • multiple coinbase txns
    • unbalanced fees (note: Doesn't Zcash NU5 mainnet allow unbalanced fees where coinbase claims less than the total allowed? Probably safe to ignore unless there were any possible security impacts for that edge case.)
    • contains "context-free-invalid" txns
    • contains txns with nonexistent (e.g. out-of-BCContext inputs)
    • contains txns with multi-spends (e.g. >1 txn with the same input).

Originally posted by @nathan-at-least in #12 (comment)

@daira
Copy link
Collaborator Author

daira commented Oct 19, 2023

Doesn't Zcash NU5 mainnet allow unbalanced fees where coinbase claims less than the total allowed? Probably safe to ignore unless there were any possible security impacts for that edge case.

Ignoring this was an intentional simplification. Zcash currently doesn't have a fee field in transactions. But it probably will have a fee field as of NU6. At that point we can strengthen the balance rule to prohibit claiming less than allowed.

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