Hot answers tagged

9

You cannot obtain a list of transactions from the merkle tree. The merkle tree root is part of the block header, which as you said, allows quick verification of the proof-of-work. After the block header, each block contains a list of serialized transactions in the order they appear in the merkle tree. A complete block is a block header + list of ...


6

There's a generic answer to this question that anyone can use, and an answer specific to users of Bitcoin Core (versions 0.10.0 or higher). Generic version Rather than directly answer your question with an answer that would become outdated within a few minutes as the next block was discovered, here's a general way you can look up the current number of ...


4

Full nodes are always in a perpetual state of "catching up to the network". This is true if they are just booting up for the first time, have been down for a month, or have been running since the network began. Nothing is fundamentally different about their operation. The amount of time a node will take to catch up is determined mostly by a) how many ...


4

There would be a lot of empty blocks and the number of unconfirmed transactions would increase dramatically. But at the same time, miners who are including transactions in their blocks will start being paid more and more. Those miners including transactions in their blocks will be able to collect all of the transaction fees that are being paid. Because the ...


4

Is the blocks and chainstate folder store the same blocks data ? No, the blocks directory contains the actual blocks. The chainstate directory contains the state as of the latest block (in simplified terms, it stores every spendable coin, who owns it, and how much it's worth). How can we read those data using code and display that on the web frontend ...


3

In order to validate a block nodes must have the actual transactions themselves, even a list is insufficient. But the question "Does a block contain X" is a bit like asking "What is the sound of one hand clapping?". It would be valid to say that a "block" is nothing more than its block header or even that that hash of a block is "the block". You couldn't ...


3

Bitcoin Core does not support pruning witnesses. It supports pruning blocks entirely, but that is independent from segwit. No full node in the network will accept a segwit block without the witnesses. It's simply impossible to validate a block without it, so not having a witness is treated as equivalent to not receiving a block at all. SegWit does enable ...


3

How can i tell if the block is official / not orphaned and that it will not be replaced by a 'better' block? As Nate notes, there's no guarantee that any block will be part of the best chain in the future. Here's what you should ask: Is this block part of the highest-work valid blockchain? Here's how you determine that: you get the blocks, and connect them ...


3

As of October 31, 2015, 6:48 PM UTC, there are 381435 blocks.


3

Miners have spent money on mining hardware. The value they are able to get out of that mining hardware is tied directly to the price of Bitcoins and the mining difficulty. If the price goes up, that will incentivize some additional miners and if the price goes down, more people will mine. But this doesn't happen immediately nor does it cancel out perfectly. ...


3

Do Full Nodes validate all transactions after all bitcoin are mined? Yes. Also, would these nodes still create blocks of transactions Yes if so, why dont full nodes do this now? Do what? Validation? If so, full nodes certainly do validate now. In fact, full nodes validating is what keeps miners in check. Is mining only a safety mechanism for a ...


3

The difficulty is actually represented by the target threshold encoded in the nBits value in the block header. Where difficulty represents the human readable representation ("how often do we need to try to find a solution"), the target threshold defines the prefix a block must undershoot in order to be valid. This means that the 256-bit block hash ...


3

The data in blk.dat files is stored in binary, and each new block gets appended to the end of the file. Blocks are not downloaded in order always. So you can write python code to read files, convert to hex, check if it has one of the blocks mined between 446032- 473593 and save the required information. https://learnmeabitcoin.com/technical/blkdat I would ...


3

Bitcoin Core is the only software that saves the blocks in the blk*.dat format. This format is not standardized and internal (i.e. not exposed to users). The contents of, for example, blk2342.dat can differ between multiple instances of Bitcoin Core. The only option is to run Bitcoin Core yourself, or to find somebody who runs Bitcoin Core and can provide ...


2

There is no incentive to serve historical blocks beyond altruism, generally that applies to all facets of participating in the p2p network. Nodes without incoming connections will generally not be requested to send any old blocks, and this is a standard operating mode for people who have disabled listening or are behind restrictive NAT with no ability to ...


2

According to this GitHub discussion it turns out that the problem is caused by OpenSSL moving to 0.9.4.0 binaries should resolve your issue. Gregory Maxwell The incompatibility is due to the OpenSSL update changing the behavior of ECDSA validation to reject any signature which is not encoded in a very rigid manner. This was a result of OpenSSL's ...


2

Pieter Wuille suggests extinct blocks: The first is perhaps best called extinct blocks. These are blocks that were produced by building on an block that is no longer the active tip of the chain. Some nodes may have considered it to be the best block at some point, but they switched to another chain which does not contain the relevant block anymore. They ...


2

You need to issue a getdata on the last entry in the returned invs. This is used as trigger that you have processed the response, and the remainer will be sent automatically. Note that since version 0.10, Bitcoin Core does no longer use the getdata/inv/getdata/block cycle to synchronize, but getheaders/headers (for synchronizing headers). Actual blocks are ...


2

There is nothing particularly special about six. Five blocks would take less time but provide a slightly lower level of assurance. Seven blocks would take longer but would provide a slightly higher level of assurance. Lots of services use fewer than six blocks.


2

Other nodes check if the transaction is valid, and if it is, they relay the transaction to other nodes. Mining pools have also (at least one) nodes, they verify it too, and if it's valid and the fee is enough, they put it in the block they're working on. Do miners check it before including it in a block? Yep. If they include an invalid transaction, the ...


2

those block files are your copy of the blockchain. you could stop your new bitcoind daemon and move them into the $HOME/.bitcoin/blocks folder and restart bitcoind, and save yourself and the network the necessity to re-download them.


2

That error means that the block got corrupted somewhere so it became invalid. The only way to fix this is to re-download the block. To do so, first stop Bitcoin Core. Then go to the Bitcoin Core data directory and then the blocks folder within that. Delete the highest numbered blk*.dat and rev*.dat files. Then start Bitcoin Core again. When it asks whether ...


2

Transactions are stored in the form of merkel trees inside a block. (I know how a merkel tree is made). A merkel root is calculated and stored in the block header.  All correct. An SPV can ask a full node about the balance of an address No, it can only ask for a proof that a particular transaction was included in the blockchain. The Merkle tree has ...


2

If you were using a fork of Bitcoin Core, your small scale network would not work. Assuming you did the basic chain parameter modification or just firewall yourself from the rest of the Bitcoin network, there are two major things that are missing: peer discover, and mining. Bitcoin Core by default uses a process called DNS Seeding in order to discover seed ...


2

You could send your Bitcoin to an address that has a redeem/witness script containing OP_CHECKSEQUENCEVERIFY (for a relative timelock) or OP_CHECKLOCKTIMEVERIFY (for absolute timelock). Once the transaction has confirmed, the output cannot be spent without the timelocks being met first. By revealing the script, you can show that those outputs have a ...


2

Bitcoin Core doesn't have such a feature. The prune depth controls how many blocks are kept, and you can change that (-prune=N option on the command line or prune=N in bitcoin.conf), but once a block is pruned, it is gone. If you want to add blocks back, for now you'll need to resync from scratch. There is no technical reason for this; it's perfectly ...


2

Is this the highest number of transactions in a block until now? The highest number of transactions in a block is 12239 in block 00000000000000001080e6de32add416cd6cda29f35ec9bce694fea4b964c7be at height 367853. What are the things that affect the number of transactions possible in a block? Besides the block size/weight limit, the primary thing that ...


1

Refers to Bitcoin Core 0.17: WalletNotify Will be executed at the time when a transaction gets added to the wallet. If your wallet is 100 blocks behind and in those 100 blocks you have 2 transaction in each block, the wallet notify script will be called twice per block (== 200 executions during the 100 block catch up). Only valid blocks (valid transaction)...


1

Suppose Alice has one bitcoin. She can form a transaction to send that bitcoin to Bob. And she can also form a transaction to send that bitcoin to Charlie. Somehow, we all have to eventually agree that one of those transactions is valid and the other is not. Why? Suppose Alice can't possibly convince Bob that she paid him that bitcoin because Bob always ...


1

You questions are legit, however they might need a bit of reorg. where is the link to a new block then? Every block header has the hash of previous block's header. So there's the link Do they create blocks while searching for a new block with btc inside? a miner "creates" a block by selecting tx from the pool and "solving the math problem" as you ...


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