1
Except for checking for double spends, if there's a transaction in a block that's already in the node's mempool, it can theoretically skip its validation. Does it actually happen, or the nodes validate each transaction twice?
1
Except for checking for double spends, if there's a transaction in a block that's already in the node's mempool, it can theoretically skip its validation. Does it actually happen, or the nodes validate each transaction twice?
2
The most expensive part of checking a transaction, ECDSA validation, is cached.
0
Zero confirmed transaction are unsafe. Simillarly, it is not safe to validate using them as benchmark. See this example:
Also note that bitcoind has to validate blocks which on different forks/chains. Mempool only has unconfirmed transaction on the longest chain
1Nonsense, you can cache the validation, just not the UTXO check. – Anonymous – 2018-03-23T13:25:16.770
Didn't cache also the transaction itself? – Osias Jota – 2018-03-23T12:38:28.957
1Transaction validity can change (OP_CLTV). – Anonymous – 2018-03-23T12:54:13.447
Now I'm thinking about it, it can change even before that because there could've been a double spend attempt. – Osias Jota – 2018-03-23T15:16:15.657