Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [block]

The components of the blockchain and a data structure that collects transactions.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Must input UTXO references be unique in a transaction, and/or unique in a block?

Must input UTXO references (txid + vout) be unique in a transaction, and/or be unique in a block? Put another way, is it a rule that UTXOs can be consumed piecemeal in transactions and blocks, so long ...
3 votes
1 answer
266 views

What's the smallest possible coinbase transaction / block size?

Let's say that, for some ununderstandable reason, a miner does not care about receiving the block reward. Rather, the miner cares only about achieving the smallest ever block. What would be the size ...
1 vote
1 answer
115 views

What does the block time represent?

I've always been under the impression that a block's timestamp represents the second at which a block was found. For this to be true, it would seem that the time header field must be modified along ...
0 votes
1 answer
175 views

How do miners manually add transaction to a block template?

Here's my idea from the quick research: Miners use getblocktemplate RPC method. In the obtained block template, they remove some transaction and instead place in other transaction that wouldn't ...
1 vote
1 answer
64 views

There's any open API to gather the blockNumber data?

Trying to create a scrip to convert wordpress posts/pages date and display it as blockNumber instead. For context, a similar question also posted on this stack. Do anyone knows if there's any open API ...
0 votes
1 answer
78 views

How to pick the block in which a transaction will get mined?

I am developping a bot for a customer with the following goals in mind: to inscribe a satoshi with the block number that it has been mined in (ordinal inscription) on every block. i think this is ...
0 votes
0 answers
32 views

what is expectedFees and expectedWeight in a block and why its changing frequently?

what is expectedFees and expectedWeight in a block and why its changing frequently ? https://mempool.space/api/v1/block/00000000000000000001c680ee86b8eaa43c94ac9012f4d2dcbfa9f45beadf06 when i last ...
0 votes
1 answer
868 views

Struggling to Decode Raw Hex Data of a Block

I am trying to Decode the Raw hex data of a Coinbase Block to check my understanding of the DS but I am facing some difficulties in decoding marked by a ? below: Q1. Can someone please check the ...
19 votes
2 answers
2k views

What happens when a miner does not claim all fees/generated coins?

Suppose that a miner for some reason has the generation transaction of their blocks not take all the possible coins. This can happen for a variety of reasons, almost all of which are bugs: An off-by-...
2 votes
1 answer
89 views

Why was there a jump in transactions per block in 2023?

I noticed that there was a jump in the number of transactions per block (from ~2000 to ~3000) in April-May 2023. The size of the serialised UTXO set also ~doubled from ~5GB to ~10GB over the following ...
1 vote
0 answers
30 views

Should I stop bitcoind when backing up chainstate/ and blocks/ directories?

This is how one might back up their Bitcoin Core data directories in order to save time on syncing in the future: #!/usr/bin/bash local_d=/root/btc_db rsync -av --delete chainstate "$local_d&...
5 votes
1 answer
182 views

RPC getblockstats call using genesis block

I am running a full node, bitcoin core 22. It is not in pruned mode. But when I try to run RPC getblockstats call I get this. $ bitcoin-cli getblockstats 0 ...
17 votes
4 answers
9k views

What is the number of transactions in a block?

What determines the number of transactions that can be validated in a block?
2 votes
1 answer
928 views

Decoding a Block beyond the Coinbase transaction

I am attempting to decode a Block and have managed to decode the Coinbase transaction but after the transaction, there is huge gaps in them that I do not understand. Taking this Block as a sample: ...
0 votes
0 answers
23 views

How can I tell who mined a certain block? [duplicate]

Just like title says, how can I tell who mined a certain block. Is it just the decoded hex value of the OP_RETURN in the first tx?
1 vote
1 answer
100 views

What are ALL the consensus rules?

I asked this question before, and it was quickly locked and pointed to a thread about mempool policy... yet my question remains unanswered. Let it be known, I don't want to know what policy is [or is ...
1 vote
1 answer
73 views

Wrong hashes for blocks when parsing from blk

Hello I'm using a python script to actually retrieve information from a blk file and to read data. import datetime # Read block ! file = open("REDACTED\blocks\\blk00000.dat", 'rb') ...
1 vote
1 answer
74 views

Is there any way for a script to depend on blockchain info?

The locktime opcodes OP_CHECKLOCKTIMEVERIFYand OP_CHECKSEQUENCEVERIFY indirectly allow for an approximate block number check, is there any way to obtain other information such as the previously mined ...
6 votes
1 answer
714 views

Where does the 2-hour limit on the timestamp come from?

Bitcoin wiki says that: A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours My question is why 2 ...
2 votes
1 answer
59 views

What determines the block's timestamp?

As a miner, what happens if I propogate a block with a future timestamp, or yesterday's timestamp? What determines the block time? Can I just give any time here or is it okay to change it with 1-2 ...
0 votes
2 answers
135 views

What is the format of a Bitcoin block body?

To my understanding, the miners solve the nonce to get a valid block header based on the difficulty target. In the header, you have the Merkle root, which is generated from the transactions included ...
0 votes
1 answer
54 views

bitcoin block time analysis with conjuction to propagation

For both scenarios that I will describe below, assume the 2 things. that network propagation for blocks always 6 seconds. that we start looking at my analysis from time = t0 and at that t0, every ...
0 votes
0 answers
40 views

High end electrum servers directly reading blk.dat files

These days, high end electrum servers directly read blk.dat files straight from Bitcoin Core's blocks folder in the process of creating their initial internal indexes. I guess they also do in the ...
2 votes
1 answer
444 views

How does solving a block work in relation to the first letter/number after the 0's?

I did a terrible job of explaining it in the title so I'll explain here. Say the target hash to solve for a block is 00004aef... etc. does that mean that you can't solve the block if you get 00005fad (...
4 votes
2 answers
203 views

Is it possible to retrieve input addresses and input values of bitcoin transactions from raw blk.dat files?

I'm developing a script that processes blk.dat files from bitcoin core. So far, I am able to retrieve the following attributes for transaction inputs: "vin", "index", "...
2 votes
1 answer
208 views

Different balances in API block explorers for BTC

BTC.com block explorer shows bigger balance than for example Insight or Blockchair. For example: https://btc.com/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72 https://insight.bitpay.com/address/...
3 votes
1 answer
69 views

When chains branch, are there multiple UTXO sets?

If there are "fork" chains coming off a block, how do we keep track of the UTXOs of different public keys? Would I just store UTXOs derived from the longest chain and recalculate if another &...
1 vote
1 answer
78 views

What happens to the blocks that do not pass the acceptance rules?

One of the acceptance rule for the blocks is that the block timestamp cannot be more than 2 hours in the future. What happens to blocks whose timestamp does not meet this rule, i.e. blocks that ...
3 votes
1 answer
294 views

On average what percentage of the total block reward comes from transaction fees?

Question Hello. At the time of this question the reward per block is 6.25 bitcoins. But if I understand correctly that does not include transaction fees. On average, in addition to the 6.25 bitcoins, ...
7 votes
2 answers
1k views

What is the Block 1,983,702 Problem?

The issue, transition to requiring block height in block coinbases, was discussed back in 2012, however I just stumbled upon it, and would like to understand more about its significance.
1 vote
0 answers
126 views

Bitcoin core synchronizing gets stuck on block [duplicate]

I have bitcoin core version 25 and the blockchain is fully synchronized. Every 2-3 days I open up core to sync with the newest blocks. When i am syncing the newest blocks from the past few days the ...
1 vote
1 answer
64 views

Is a block without transactions valid: also not including a coinbase?

We know blocks can have one transaction: the coinbase. Some call this an "empty block". But I'd argue technically there is a transaction. Question: is a block WITHOUT A COINBASE a valid ...
21 votes
5 answers
11k views

Shortest and Longest block interval time ever recorded in Bitcoin

Bitcoin block interval time is on average 10 minutes, that is the difficulty is adjusted in such a way that every 10 minutes a miner will manage to find the right hash. This is just an average time ...
2 votes
1 answer
64 views

What are the exact degrees of freedom in finding a valid block?

I am working on an educational project for bitcoin mining. I searched as much as I could but still haven't understood the following questions: What are the "exact" degrees of freedom in ...
16 votes
2 answers
4k views

Bitcoin Block Size - What are the rules?

What is the maximum size a block can be? Is there a minimum size? Can you have a block with 0 transactions included?
1 vote
3 answers
427 views

Raw data of dates in all blocks using PHP or R

Is it possible to obtain the date (time stamp) of each bitcoin block so far, using languages like PHP or R?. I am developing an analysis of the time series of bitcoin use for a scientific project, ...
9 votes
3 answers
1k views

How many sigops are in the invalid block 783426?

On April 1st 2023 F2Pool mined block 00000000000000000002ec935e245f8ae70fc68cc828f05bf4cfa002668599e4 (full block) which my node failed with bad-blk-sigops. Bitcoin Core stops counting as soon as it ...
2 votes
2 answers
155 views

Can zero-fee txs get into a block?

What happens if a transaction is set to have zero fees? Can it get into a block? Also, if you updated a coin's code to accept zero-fee transactions, would this cause a hardfork? (e.g. made tx's in ...
1 vote
1 answer
841 views

Cannot synchronize with Bitcoin in testnet mode

I downloaded Bitcoin-QT for Windows 7 into: MYUSERNAME/Downloads/bitcoin-0.8.6-win32/bitcoin-0.8.6-win32 I want to run Bitcoin in testnet mode, so I created bitcoin.conf with only the following ...
0 votes
1 answer
137 views

processing input tx in bitcoin's block response and obtain transaction value of each input

so i was parsing the block #496 of bitcoin which contains two transactions, first tx in the list is the reward tx and the second tx contains three inputs and one output. i tried to parse each ...
1 vote
1 answer
260 views

How can I trust a new block broadcated on the network?

I have a giant hole in my understanding! I recently started using https://github.com/sebicas/bitcoin-sniffer which is a Python script that lets you connect to any node on the Bitcoin Network and ...
3 votes
1 answer
298 views

Is there a correct way to refer to "orphan" blocks?

I was reading a passage on the bitcoin wiki that pointed out that it doesn't make sense to call invalid chains "orphans," since, by definition, every block in the blockchain except the ...
5 votes
3 answers
3k views

Getting orphaned Blocks from the Blockchain

I'm very interested in doing some analysis of orphaned blocks, but to do so I'd have to have a good way of accessing them. Blockchain.info seems like a good place to start but I don't want to abuse ...
6 votes
2 answers
859 views

Why are coinbase transaction outputs greater than reward?

If the sum of the coinbase transaction's outputs must be less than or equal to the current reward (25 btc currently), why in practice do blocks have a slightly higher coinbase transaction output (for ...
5 votes
1 answer
4k views

How to get raw block data?

I can use getblock json rpc method to get parsed block details, however I need the actual raw data. Is there any way to get raw block data using Bitcoin Core?
0 votes
0 answers
30 views

NodeJS code to deobfuscate chainstate data

I am currently working on a Blockchain trading platform for a company and I want to have all the unspent output saved to a local database by reading the contents of chainstate folder but I couldn't ...
0 votes
2 answers
43 views

Are the blocks produced by different nodes in the network comparable in terms of the order of transactions contained in them?

Having a transaction from person A to B and another transaction from person C to D that both took place in more or less the same time I assume that there might be a situation in which different nodes ...
2 votes
1 answer
654 views

What are the components of the raw block shown in this image?

I'm wondering what the portion between the block header and the transaction data (the un-annotated section) is. I can't seem to find any information on it.
3 votes
2 answers
201 views

Are blocks containing non-standard transactions relayed through the network or not as in the case of non-standard transactions?

When a node receives a non-standard transaction (for example, it has more than one OP_return output or has some of the non-standard outputs), it will not be relayed further through the network, ...
1 vote
2 answers
514 views

With the current hashrate, how does it still take 10min to solve a bitcoin block?

No matter how high the difficuly is (or how low the target is), I don't understand how the Bitcoin network takes an average of 10 minutes to solve each block. For any given block header, there are ...

1
2 3 4 5
14