Don't return from long polling if the block template is an invalid block proposal #6037
Labels
A-consensus
Area: Consensus rule updates
A-rpc
Area: Remote Procedure Call interfaces
C-enhancement
Category: This is an improvement
I-lose-funds
Zebra loses user funds
Motivation
zcashd
returns an error when the block template is not a valid block (ignoring proof of work):https://github.com/zcash/zcash/blob/9e1efad2d13dca5ee094a38e6aa25b0f2464da94/src/miner.cpp#L674-L676
Mining pools would like to start working on new blocks as soon as possible, but they are ok with some delays before seeing updated transactions.
Design
Specifications
This checks all the block consensus rules:
https://zips.z.cash/protocol/protocol.pdf#blockheader
https://zips.z.cash/protocol/protocol.pdf#txnencoding
Complex Code or Requirements
We already have a function to create a block proposal and submit it to the state in our tests, so this should be simple to implement.
We should check performance long polling on large blocks before and after this change.
Testing
This change would add a runtime test for some block proposals in production code. We already do these tests in CI.
The text was updated successfully, but these errors were encountered: