You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Miners need RPCs and verification to be fast, to improve profits.
When Zebra has already verified a transaction in the mempool, we know it will be valid in a block. (The mempool checks are stricter than the block transaction checks.)
So we can save time by automatically approving any block transaction verify requests that match a transaction already in the mempool.
Security
We will need to test that the mempool checks are stricter than the block transaction checks. Otherwise, we could approve invalid blocks.
The text was updated successfully, but these errors were encountered:
teor2345
changed the title
Automatically verify transactions that are already in the mempool
Automatically verify transactions in blocks when the same transaction is already in the mempool
Apr 4, 2023
This only applies to non-contextual checks, right? Otherwise you have the following condition:
UTXO $u$ is not spent as of the current tip, and so a transaction $tx$ that spends $u$ can be accepted.
A block $B$ is mined that spends $u$ in a different transaction $tx'$, that the zebra node never accepted to the mempool.
Now $tx$ cannot be mined.
The same can happen for nullifiers, and for any other contextual check (e.g. mempool transactions can expire, etc.) It's fine as long as mining $B$ kicks $tx$ out of the mempool and there is no possible race condition.
Motivation
Miners need RPCs and verification to be fast, to improve profits.
When Zebra has already verified a transaction in the mempool, we know it will be valid in a block. (The mempool checks are stricter than the block transaction checks.)
So we can save time by automatically approving any block transaction verify requests that match a transaction already in the mempool.
Security
We will need to test that the mempool checks are stricter than the block transaction checks. Otherwise, we could approve invalid blocks.
The text was updated successfully, but these errors were encountered: