0
I am missing something so far in reading this (excellent resource). I read the part about transactions for the most part, but I don't understand the actual code evaluation part, and how long it takes. So if you have a low-priority transaction (because of a low-fee), it could take "a long time" to run, or potentially never. If you have a high-priority transaction (high fee), then it will get run "quicker" or "with higher probability". My question is what actually is happening between the moment of a transaction being "created" and it being "added to a block". I wonder if your code is actually run before the transaction is actually added to the block and validated, or it's never run until fully validated. I wonder because this seems like a huge performance slow-down in resource-intensive applications, and I wonder what people do there.
Here it says:
A new block, containing transactions that occurred since the last block, is "mined" every 10 minutes on average, thereby adding those transactions to the blockchain.
So my question then basically is, if your code doesn't evaluate until that 10 minutes passes, or when the code actually evaluates. Basically what happens between a transaction being created and when it is incorporated into a block.
Wondering where I can find more information on this, I'm not seeing it here in the transaction section.
– Lance Pollard – 2019-02-17T09:20:38.053What other information are you looking for? @MCCCS added a good answer as well. But the crux of it is that when a new block is found, nodes will update their blockchain record (and thus UTXO set) to include the changes made by transactions that were included in that block. – chytrik – 2019-02-17T09:32:02.193
I guess I'm looking for "transaction validation process". – Lance Pollard – 2019-02-17T09:33:08.540
1
I'm not sure what other info to point you towards exactly... but the answer on this Q has some info about what constitutes a valid tx: https://bitcoin.stackexchange.com/questions/77912/how-miners-validate-each-transaction?r=SearchResults . There is a little more info about how transactions are serialized here: https://bitcoin.org/en/developer-reference#raw-transaction-format . The ultimate reference for expected behaviour of the network is the source code itself: https://github.com/bitcoin/bitcoin/tree/master/src
– chytrik – 2019-02-17T09:56:19.663