Questions tagged [block]

This tag should be used for questions related to Bitcoin blocks

Filter by
Sorted by
Tagged with
0
votes
1answer
93 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
86 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
51 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
345 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
179 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
1k 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
51 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
3answers
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
679 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://...
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)? ...
4
votes
2answers
369 views

How segwit blocks are seen by segwit and non-segwit nodes?

Let's say a miner mines a block. In this block some transactions will be non-segwit and some will be segwit? The block contains two parts: The part with transactions The segregated part with ...
11
votes
3answers
8k views

What are the equations to convert between bits and difficulty?

If we take block hash 0000000000000006770c3806960539ca83a24facbd99ea212f37f2a0e6a5629a for example. The difficulty as a 32 bit float is 50810339.04827648. The difficulty in bits as an unsigned 32 bit ...
1
vote
3answers
643 views

Block Validation: who does it? How much it costs? And is it present in all protocols?

Different threads were posted in order to clear up this question, but there are some points that I would need to confirm: When you become a full-node (NOT miner, you just downloaded the full ...
1
vote
2answers
107 views

mining: losers get nothing?

if the winning miner takes the 12BTC+fees, unless you own the biggest mining operation out there, or are not a member of the biggest pool, why bother mining, if there is no prize for second place? ...
0
votes
2answers
699 views

Implementation of the Variable length integer in C

Anyone can give me a idea of how implement in C this concept of Variable length integer which encoded the numer of transactions in a block? based on what is described here, I think is something lime ...
2
votes
1answer
189 views

identical coinbase transactions

this sounds like an old topic but i have not found a satisfying answer yet; in history there lived two blocks with identical coinbase transactions: https://www.blockchain.com/btc/block-index/106662 ...
-4
votes
1answer
57 views

decentralized cryto currency without block time

Block time or delay is often a problem in Bitcoin. Then would it be possible to develop a decentralized cryto currency with zero delay/block time? Any reference will be appreciated.
8
votes
3answers
15k views

How many blocks are there in blockchain as of today?

I have currently downloaded 300,000 blocks and the last one is generated 1 year and 19 weeks ago. I wonder how many blocks are more to go, before I am up to date.
3
votes
1answer
606 views

Is Bitcoin network an Asynchronous network or a synchronous network?

Conventional BFT protocols work on weak timing assumptions, and if a faulty primary does not respond or forward a client's request a view change message is initiated by the backup nodes. Therefore, if ...
1
vote
1answer
35 views

What would happen if I publish a modified version of an earlier block? Would it be rejected immediately by peer nodes?

I am reading the book "Mastering Bitcoin" and have finished reading Chapter 2 and 10, but I still don't find the answer. Suppose the current main chain has 5 blocks: B0 <- B1 <- B2 <- B3 &...
5
votes
2answers
4k views

The role of timestamp

In Satoshi’s original paper, it is written that “we need timestamp to prevent double-spending”. However, I think timestamp is unnecessary, because every block has a previous block hash and merkle ...
1
vote
0answers
224 views

Estimated number of hashes

This is not a duplicate of previous, similar questions I've read on StackExchange, since none of those questions, nor the answers, go into the difficulty theory, as espoused on the Bitcoin Wiki. ...
1
vote
1answer
303 views

Fixing “Block not found on disk” rpc error

I have a full node with txindex enabled that I've been trying to use for an electrum server. However, whether I use ElectrumX or Electrs, I hit the same error on initial indexing of "Block not found ...
3
votes
2answers
362 views

Energy to confirm one block?

What is the minimum energy (or CPU operations) required for someone to confirm one block on their own, to launch a double-spend attack? How can I calculate this from the current difficulty or ...
1
vote
0answers
21 views

What needs to be done inorder to change difficulty?

I'm trying for a while to reduce difficulty of main network to do some experiments on transactions and maybe simulate some possible attacks.I came up to change nBits field in chainparams.cpp but it ...
0
votes
1answer
50 views

Why the block's order in blockxxxxx.dat is different from blockchain.info

I parsed the block00000.dat using python code: class BlockFile: def __init__(self, block_filename): self.block_filename = block_filename self.blockchain = open(block_filename, 'rb', ...
21
votes
2answers
4k views

What are the arguments for and against the increase of the block size limit?

Can someone give a quick point by point list, what arguments the proponents and opponents of increased blocksize have for their case?
2
votes
1answer
239 views

How come Merkle tree is more efficient when tree branches are not stored in blockchain?

Suppose we have 8 transactions in a block X as follows and we know every node's hash value of the whole Merkle tree (that is, including intermediary nodes such as 45). Then if someone claims ...
0
votes
1answer
25 views

Is there any python lib could be used to analysis the local block data?

Just downloaded all the block files to local and want to try some analysis on the transaction data in the block. is there any python library can be used to do the analysis?
0
votes
2answers
134 views

When are blocks validated?

Are blocks validated just before they are stored to memory, upon receipt from an RPC submit call, or at some other time? Can you point to the place in code where this validation process begins? Is ...
2
votes
2answers
653 views

How does “headers first” affect BLKxxxx.dat structure?

Assuming a full node running Bitcoincore v0.10 (with txindex=1), how exactly does the new "headers first" functionality affect the structure of the blockchain data? (Specifically, the blkxxxx.dat data,...
0
votes
2answers
70 views

Why most of pubkeys in the first batch of blocks in blk00000.dat are different

For example: the pubkey in the first 3 coinbase's output are 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f ...
0
votes
1answer
20 views

Mining when there is no transaction [duplicate]

what happens when there is noone doing transactions and miners mine the blocks? Can they mine empty blocks? And how it works when there won't be any hash in empty block or there is a hash? Thank you
0
votes
1answer
24 views

Number of transactions in block

why sometimes block has 16 transactions and sometimes over 2000? I checked it on https://blockexplorer.com/blocks. Thank you
0
votes
1answer
85 views

In Litecoin every single block is mined every 2.5 minutes, double spending?

In Bitcoin it takes roughly 10 minutes for every block to be mined. In Litecoin it takes 2,5 minutes. 2.5 minutes in Litecoin mean that transactions can be confirmed faster. In Bitcoin these 10 ...
0
votes
1answer
42 views

Who set the rules for validating a block in blockchain?

Who set the rules for validating a block in blockchain? The rules can be set the creator of the blockchain network. There might be some rules on the application that uses the blockchain network. Is ...
1
vote
1answer
59 views

While attempting to fetch a particular block my node just gets disconnected by peers?

A system at an office has its testnet node stuck at a particular block. The logs report "requesting block" over and over again for the same block and after each one reports "socket recv error" and ...
2
votes
1answer
53 views

What would be the implications of limiting Bitcoin transactions to fifty inputs?

One of the issues of increasing the blocksize is the possibility of creating attackblocks which would take significantly longer to parse than the common block. The mechanism to do so is by creating a ...
1
vote
1answer
16 views

Diffrent transactions in different block sync problem

Consider that miner A and B both try to solve its block, A's block has transactions (T1,T2), B's block has transactions (T1,T3). A solved its block then synced the block to B. Does B will discard its ...
1
vote
1answer
79 views

Detecting stale blocks with ZeroMQ

I'am writing an application which receives information about new tx and blocks via ZeroMQ. There is a chance that I will receive notifs about blocks which will later on become stale blocks. Is there a ...
0
votes
2answers
42 views

Bitcoin.org developer reference outdated?

i just can't understand if bitcoin.org developer reference is outdated or not. for example here (https://bitcoin.org/en/developer-reference#raw-transaction-format) we can see: "As of Bitcoin Core 0.9....
0
votes
1answer
65 views

Why different coins have different number of confirmations?

Does it have to do with the block difficulty? What factors impact the number of confirmations that is considered to be safe in a bloc
2
votes
2answers
74 views

Blockchain validation process is linear?

I've read at a few places that the nodes validate transactions in a linear fashion, i.e. after node A validates, then node B, etc. (which is also the reason, as claimed by many, why blockchain suffers ...
0
votes
0answers
51 views

Bitcoin transaction scripts : does ScriptSig or ScriptPubkey run first? [duplicate]

I'm confused as to the order regarding which script is run. For examples sake: say I want to spend 1 Bitcoin which was given to me by Alice in a single transaction of value 1 Bitcoin. I understand ...
0
votes
2answers
550 views

How similar is Blockchain (as a data structure) to double linked list?

I came across this definition of Blockchain from Oleg Andreev , who is the protocol architect of @chain - It felt like double linked list to me.

1 2
3
4 5
11