7

This is implementation dependent, but in Bitcoin Core there is not just a single UTXO set: The UTXO set on disk in the chainstate/ directory in a database. It corresponds to the state as of the last flushed block (and does not include the effects of any mempool transaction, or of any block since the last flush). The in-memory coins cache is a cache on top ...


6

At the protocol level, Bitcoin has no concept of "balances" or "addresses", and their common interpretation isn't relevant during verification. Every transaction spends "coins" and reforges them into new "coins" (called UTXOs). Every UTXO has a value (in number of satoshis) and an locking script. UTXOs are always spent ...


4

This cannot happen. Every block contains at least a "coinbase" transaction that distributes the subsidy and fees to the block's miners. Blocks without coinbase are invalid, even if the subsidy were 0.


3

I was wondering why the txn_count field in a block exists. The count of transactions could be determined by parsing the txns field in tx format, right? Yes, it could, but it isn't. Ultimately serialization formats are a convention, and Satoshi picked one when he created the initial software which has persisted in the protocol. It could be changed, but why ...


3

Serialization is certainly not my area of expertise, but I'd guess: one challenge with serialized data is to know how much data to read. Explicitly providing the count of objects (and their length) you're about to parse is likely simpler and safer than having multiple levels of terminators in a hierarchical data structure and may actually require less data ...


2

What can do to retrieve my funds ? Bitcoin transactions cannot be reversed once they have been included in a block that is part of the valid chain. The only way is to have the funds returned is to contact the person you sent them to, and ask for them back.


2

Your wallet will receive the Bitcoin. Your wallet is still watching for transactions to that address and will be able to receive Bitcoin at that address at any point in time. The expiration is only used as a hint to the sender if you give them the payment request or the Bitcoin URI. It is not part of the blockchain nor part of the address. So if you just ...


1

I highly recommend bcoin: https://bcoin.io/ https://github.com/bcoin-org/bcoin It is a nodejs library that can also run a fully validating node, SPV node, and BIP44 wallet. It's used in production by many long-standing bitcoin companies such as Purse.io You can even use the bcoin client to make RPC calls to bitcoin core, and of course you do not need to run ...


1

No, it is not. The individual values of the inputs and outputs don't matter, only the sum matters. So the sum of the inputs is compared against the sum of the outputs. And since the sum of the outputs is greater than the sum of the inputs, the transaction is invalid. Bitcoin does not take Bitcoin from particular inputs and map it to a particular output. ...


1

Yes you need to provide the UTXO details when building a transaction in bitcoinjs. One should not have to trust a library to provide blockchain data, the library works like a calculator and processes the data that it is given. It's not unreasonable at all, these details are easy to get from your node or an explorer.


1

A very useful RPC is the testmempoolaccept RPC. This will tell you whether the transaction would be accepted by the node. You can use this to determine whether the transaction is correctly signed. It will also tell you what the transaction fee is so you can determine whether the fee is what you expect it to be. If the transaction would not be accepted, it ...


1

These are bare multisig scripts, there is no address format for such type of output. So explorers basically came up with confusing (and constantly differents, as there is no right one) placeholders.


Only top voted, non community-wiki answers of a minimum length are eligible