1

What I have learned is that state is an abstract thing and is maintained by the node locally and the state of the current blockchain can be reached by starting all the way from the genesis block and updating the state to the current state. So the state keeps adding utxos.

Does the state keep track of only the UTXOs which are unspent or the state keeps track of both the spent and the unspent utxos. What I think is ,they should be removed from the memory pool. Also what I think is that the memory pool is nothing else but the state of the blockchain.

Please clarify my confusions. Thanks

1

UTXO stands for Unspent Transaction Outputs. Thus, a node only keeps track of transaction outputs that are unspent. As soon as a transaction (even an unconfirmed one) consumes a UTXO, it is removed from the UTXO db (if the tx is dropped, it is added back).

What I think is ,they should be removed from the memory pool.

The mempool is a list of unconfirmed transactions consuming as-of-yet available UTXOs. UTXOs are not removed from the memory pool. There is a separate UTXO database

Also what I think is that the memory pool is nothing else but the state of the blockchain.

The state of the blockchain is the UTXO database. The mempool is essentially a list of proposed changes to the UTXO set, which can be mined and confirmed, which then results in an update to the state of the blockchain.

  • Hmm, I never realized that a mempool entry would remove a utxo pre-confirmation. Is that ‘standard’ across all software? I suppose that is done to mitigate against double spends? – chytrik Jul 18 '18 at 0:09
  • I'm not sure about others, but it happens in Bitcoin Core at least. You will get a txn-mempool-conflict if you try to broadcast a double spend. I'm not actually sure if it updates the UTXO set immediately, but it might have an additional check against mempool txs to achieve the same result – Raghav Sood Jul 18 '18 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.