Questions tagged [block]

This tag should be used for questions related to Bitcoin blocks

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

what file/method is block reward processed?

I have managed to build an altcoin (from litecoin source) but my coin requires that I make changes to the way rewards are made. I have been looking at the source code to try to find where block reward ...
0
votes
0answers
22 views

Where can I find a detailed network protocol spec? [duplicate]

I have been trying for a while to understand how the bitcoin network works, which I (kind of) do on a high level. However, all of the sources I read don't go into the details of the protocol that ...
5
votes
1answer
133 views

How long are orphaned or stale blocks kept in bitcoin core nodes memory?

If there was a chain reorg, for example: Blockchain: 0a---1a---2a---3a becomes... 0a---1a---2b---3b How long are blocks 2b and 3b kept in memory on the node? If I query the node for block 2b ...
2
votes
1answer
74 views

Can a miner give themselves less than the maximum block subsidy if they wish to do so?

The current maximum block subsidy is 12.5 bitcoin. A mined block recently got rejected from full nodes after a miner tried to post the block subsidy as 13.26 bitcoin. But what about in the other ...
9
votes
2answers
7k views

How is a proof-of-stake block mined at the block level, and how does it accomplish it's goals?

I've seen many broad overviews of proof-of-stake mining, and descriptions, but I have not seen any good description of what goes into actually mining and verifying a proof-of-stake block, and how it ...
2
votes
3answers
1k views

how do nodes verify that a block has been solved and can be added to the blockchain

when a miner solves a block it gets sent out to the network, when other nodes receive it, how do they verify that the block received was indeed solved and can be added to the blockchain. So you don't ...
1
vote
1answer
23 views

Doubt regarding hashing function in Merkle trees

From what I read, say in a block, there are 4 transactions. The hash value of transactions A and B are combined together to get the hash AB. Same goes for transactions C and D to get hash CD. Later AB ...
0
votes
1answer
16 views

CDiskBlockIndex: NFile and NDataPos not defined

This is the source code snippet that is used for the serialization of block indexes (found in leveldb). Block 478573 index is (as of my node's leveldb) ...
2
votes
1answer
224 views

Does assumevalid lower the security of Bitcoin?

Bitcoin's assumption was to download the blocks and verify it in order to prevent getting fooled. But by default, the assumevalid option is enabled in the software, which, as I understand it, makes ...
0
votes
3answers
636 views

Could I theoretically mine a block faster than 10 minutes?

I have been reading a lot about this 10 minute block in the Bitcoin network. I'm slightly confused because I thought mining was a somewhat random process, mostly based on how powerful your mining ...
8
votes
2answers
2k views

How to prevent a miner from stealing another miner's block?

Many articles only contain a phrasing like A miner A solves the hash problem and gives the result to the network to check. Once a majority of the network confirms, A gets the reward. But how does ...
2
votes
1answer
98 views

How to parse values in block index leveldb?

So I'm trying to read the block files with Python. From this link, What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?, it tells you how to access the files with ...
1
vote
3answers
138 views

What is a bitcoin incoming transaction with value = 0.00000546?

I wrote a script that downloads and parses blocks. I see a lot of incoming payments with value = 0.00000546. Any explanation? Thanks!
2
votes
1answer
45 views

What if an intruder modify scriptSig to get the same hashMerkleRoot of a block?

What if an intruder try to modify the coinbase transaction of a block buried in the blockchain, writing as output some other address. The arbitrary content of the scriptSig field could be modified as ...
1
vote
1answer
49 views

Bitcoin Blocks Date not coherent? [duplicate]

I was taking data from the BTC Blockchain with a custom script. I found something really weird. Block nr. 24668 was created at 2009-10-09 23:02:57 Block nr. 24669 was created at 2009-10-10 00:15:48 ...
2
votes
0answers
45 views

Is there a way to get stats about fees paid (highest, lowest, average) in a specific block?

I'd prefer to get the stats from my full node via bitcoin-cli, but if that's not possible some API would do the job too...
0
votes
1answer
51 views

Do Full Nodes validate all transactions and make new blocks after all bitcoin are mined?

Do Full Nodes validate all transactions after all bitcoin are mined? A fork of bitcoin core with all coins pre mined would be behaving in this way too I'd imagine..? Also, would these nodes still ...
1
vote
1answer
40 views

What happens in a small scale blockchain network?

My main question here is, is this understanding correct or have I misunderstood something? If this question would be better for Reddit then I apologise in advance and I'll move to there. Thanks. ...
1
vote
1answer
34 views

Tracking inventory messages

I am trying to connect to different nodes and keep track of the inventory messages that they send to me. I tried to do this with bitcoinj and libbitcoin, but I didn't make it. The goal is to connect ...
1
vote
1answer
32 views

Which is the better estimator for future mining intervals, the 10 minute protocol target or the observed, historical average?

The Bitcoin protocol is designed so that the network difficulty is periodically adjusted so that new blocks are mined on average every 10th minute. However, looking back the last 10 years, it appears ...
2
votes
2answers
371 views

In what order do new blocks get processed?

Node A receives a newest block with height h1, which it determines to be valid, and therefore stores the block on disk. A little later, it receives another block with the same height h1 but a greater ...
1
vote
1answer
93 views

Block size limit in Bitcoin v0.01

In main.h (line 17) we have a constant MAX_SIZE static const unsigned int MAX_SIZE = 0x02000000; which in decimal format equals to 33554432 (32MB) This constant is used to verify if the block ...
0
votes
1answer
35 views

How and why we need to validate a transaction?

I've starting doing some researches about the Bitcoin protocol and the blockchain. I'm trying to understand all the sections in the Bitcoin white-paper. So far, i couldn't understand what is the ...
1
vote
1answer
39 views

How chaining the blocks protect against altering data?

I am confused with the block chaining, as i know a block header contains a reference to the previous block header hash with the merkle root and other fields. This header hash is related (computed) to ...
0
votes
1answer
97 views

How can get balance for btc/bch address and block?

How can get balance for btc/bch address and block ? Similar to web3.eth.getBalance for Ethereum
0
votes
1answer
55 views

Bitcoin fork resolution - Fork losers download previous blocks 'til common block?

When resolving a naturally occurring fork in Bitcoin, do the miners who were working on the orphaned fork download previous blocks from the miner who won the block reward that resolved the fork until ...
0
votes
2answers
61 views

Bitcoin checks and balances

When a new block is created, does each block need to be validated? How does it differ from validating transactions? Why miners would waste time validating transactions and blocks when they could ...
0
votes
2answers
85 views

What Opcodes are used to store a file within Bitcoin? [closed]

At a block-to-block level, what is actually encoded at a byte[] level to encode a file stream?
0
votes
1answer
174 views

Block 566687 nonce with extranonce, how to interpret?

This could apply to any block, but I was checking this one out found by Slushpool. I've looked this up in Mastering Bitcoin and here on StackExchange, but the best I can get so far is: the coinbase ...
0
votes
2answers
114 views

What happens if “transaction size” is larger than “maximum block size”?

Assuming a transaction size is T Bytes, while maximum block size is B Bytes, such that T>B. What happens for this transaction? It will be divided into two smaller parts and will be stored in two ...
0
votes
1answer
81 views

Spending UTXO from same block

Block 546 is the first time a (actually two) transaction spends the UTXO of a transaction from the same block. Is the order important? (The transaction that generates the UTXO has to appear before in ...
2
votes
1answer
55 views

How can block time and block size be fixed when transaction volume is constantly increasing?

As I understand it the network rejects blocks over 1MB, and block hash difficulty is set after each block is created as to keep the block time close to 10min. But if people are constantly joining ...
0
votes
1answer
71 views

what happens if a miner include a transaction already exists in another block?

Suppose that I have a Transaction A. (txA) I send my txA to bitcoin network and full node validate it and put in Mempool and starts to broadcasting it. A Miner A connect to a fullnode to create a ...
0
votes
1answer
61 views

Private Blockchains: Validation

I'm a software developer, and I have some questions about private blockchains, I'd like to have technical answers since I'm trying to understand blockchain at a code level. I'm going to write a ...
0
votes
1answer
81 views

How does a node decide whether a block is valid?

I'm a software developer, and I've been trying to figure out how a node decides whether a block is valid, I do understand the hashes in bitcoin, the merkle root, and all those aspects but my question ...
-1
votes
1answer
20 views

How to prevent nodes from creating only small blocks to earn fee?

I read What are the minimum sizes for transactions and blocks in Bitcoin? that there is no min limit - just a max limit of 128MB - for a block. For example if a miner always takes a single ...
3
votes
3answers
1k views

Determining if input is a block ID, transaction ID, or address

how do sites like https://blockexplorer.com determine if the input (see inputbox in the header of https://blockexplorer.com ) is an address, transaction ID or block ID? I want to write something ...
0
votes
1answer
81 views

Getting individual block by height from Bitcoin P2P network

Is it possible to request an individual block from the bitcoin network, using the block height as parameter? Or would one have to start a node and wait until all blocks up to the desired height have ...
1
vote
2answers
48 views

What exactly makes altering of data in non-bitcoin blocks hard?

If leading zeros is only bitcoin requirement, then what makes altering of data in blocks hard? Like now its easy to modify a block and generate new hash for every subsequent blocks since generating ...
1
vote
2answers
10k views

When mining with 2 computers, do I need to use 2 separate wallets addresses?

I understand that each miner is working on a different block. Correct me if I'm wrong but this is because the first transaction in a block basically contains my wallet address so I can receive the ...
3
votes
2answers
324 views

How does the structure of a segwit block differ from a non-segwit block?

Is there any difference in the structure of a segwit block in comparison to a traditional non-segwit block? A diagram would be helpful if possible.
2
votes
2answers
164 views

Each full node has different mempool?

I don't understand if each full node has different mempool inside. With RPC command getblocktemplate I can Get the information about candidate block. I can Find all transaction verified but ...
0
votes
2answers
916 views

How to decode the block hash?

I got the block hash from zmq. 00000000000000000045c639280aee532c5b12b03c80bfdec7aae674fd8246e0 I want to decode the above block hash. Could anyone tell me how to decode the above block hash?
2
votes
1answer
44 views

Explanation of a block's fields one by one?

We can get bitcoin block data as JSON by command bitcoin-cli getblock <hash> 2, following is one for height 100000: { "hash": "...
25
votes
4answers
73k views

The bitcoin mining algorithm from a programmer's viewpoint

This page: Blocks said mining is actually to solve a mathematical problem, but reading Block hashing algorithm doesn't give much help. I also tried reading bitcoind source code, but reading code takes ...
6
votes
1answer
1k views

Why is increasing block size in the Bitcoin network considered to decrease security?

I have been doing some research on the Bitcoin Cash hard fork and the main contention of increasing the block size appears to be the possibility of less security on the network. How does an increased ...
1
vote
1answer
671 views

Where can i find proof of work in bitcoin core source code?

does anyone knows which part of the bitcoin core source code contains the proof of work for mining, creating of block and adding to blockchain? what are the files and functions involves? https://...
4
votes
2answers
119 views

Why are block header bits necessary? (Valid difficulty is already implied by chain history)

Difficulty or target is implied by chain history, so why does it need to be explicit in the header? I suppose it exposes miner-intended-difficulty, but I don't see why that would be relevant without ...
0
votes
2answers
61 views

Possible optimisation to bitcoin propagation

One of the main arguments for not raising the block size in Bitcoin is the fact that larger block size means slower propagation. The most space consuming section of the Bitcoin block is the data of ...
2
votes
1answer
104 views

Why is a “first seen” rule is used to pick a side in a honest split, instead of deterministic criteria? [duplicate]

I was just thinking, why nodes pick the first block they see when there is an honest split, instead of picking, for example, the one with the "best hash" (number further away from the difficulty cut)? ...

1
2
3 4 5
11