Questions tagged [block]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
44 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 ...
Marlex Blank's user avatar
0 votes
1 answer
121 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 ...
Monte Conte's user avatar
0 votes
0 answers
23 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 ...
Topman's user avatar
  • 11
0 votes
2 answers
37 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 ...
bridgemnc's user avatar
0 votes
2 answers
91 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 ...
Edile's user avatar
  • 1
3 votes
2 answers
182 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, ...
dassd's user avatar
  • 1,029
0 votes
1 answer
40 views

What prevents a faster, better-connected node stealing a miner's block solution?

Some questions already adressed similar issues (preventing fraud in a mining pool, what prevents a pool miner for stealing an entire block) but my question is different from those, if I understand ...
totalMongot's user avatar
4 votes
2 answers
554 views

Is there a well defined last block?

It's fairly well known when the last bitcoin will be mined, but is there a well defined last block? By that I mean, is there a block height H after which Bitcoin Core nodes will refuse to accept any ...
Tyler Levine's user avatar
0 votes
2 answers
58 views

Can the price of bitcoin be obtained from the block data?

I am trying to understand the bitcoin block structure and if it's possible to obtain the price of a bitcoin coin from within the bitcoin block itself. If the price of bitcoin is not obtained from the ...
Philoxopher's user avatar
-1 votes
1 answer
218 views

Read ordinal transaction data

I want to read an ordinal transaction on the Bitcoin blockchain and see its payload data. Say I use the getrawtransaction RPC Method for bitcoin receiving a JSON of the form specified here. Where ...
BAR's user avatar
  • 99
1 vote
0 answers
42 views

How can I collate blocks in blk*.dat files and rev*.dat files?

According to this answer, blocks in blk*.dat files and rev*.dat files don't necessarily appear in the same order, nor are either files necessarily in monotonic order, and blocks not part of the active ...
Vojtěch Strnad's user avatar
5 votes
1 answer
122 views

Can I replace a single corrupted block?

I'm running Bitcoin Core on Linux and it seems I have a single corrupted block file which is causing problems. It's taken me 2 weeks to download 75% of the blockchain, so I'd like to replace the ...
Bob Suruncle's user avatar
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 ...
Sjors Provoost's user avatar
0 votes
0 answers
37 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 ...
SuperAtic's user avatar
  • 121
2 votes
1 answer
48 views

python bitcoin_explorer can't read block 761249

I installed bitcoin node, synced up to date. I am using python bitcoin_explorer to read the block data. I can read all blocks, however, I can't read block 761249 I am not sure it's my syncing problem, ...
Lenny's user avatar
  • 21
0 votes
0 answers
34 views

How to display {block number} instead {date value} on Wordpress posts?

Ideally, the goal is to show the block number (ie: 782667) instead of the date value (ie: 26 March 2023 4:44PM CT) on all wordpress posts and pages that currently display it. There's maybe a script we ...
SuperAtic's user avatar
  • 121
1 vote
1 answer
50 views

Reading blk.dat files using pybtc does not yield transactions

I am trying to parse the blk.dat files using pybtc but I can't seem to get this right. f = open(block_filename, "rb") lines = f.readlines() for block in tqdm(lines): ...
bitcoinluvr6969's user avatar
1 vote
1 answer
98 views

How is it resolved when two miners find the block at the same time?

I am new in this world and I am trying to understand some simple concept of Blockchain and the propagation of transaction. Let say that a transaction x is made so from what i understand until now this ...
andrealorenzetti's user avatar
3 votes
1 answer
192 views

Relation between transaction data and transaction id

What is the relationship between transaction data and transaction id (which is used at mempool to generate Merkle root)? Note : when we query the getblock with verbosity 2, we get raw block in json ...
Ali's user avatar
  • 71
-2 votes
1 answer
83 views

Block packets contain tx_in_sig_script, is this shared with tx data from tx packets?

I'm trying to find the signature script that is in a tx message so I can better parse data. I have found that it is in there sometimes, but largely the tx packets don't contain anything in the block ...
bitcoinluvr6969's user avatar
-2 votes
1 answer
99 views

How did Satoshi Nakamoto create the first Bitcoin? The Genesis Block

How did Satoshi Nakamoto create the first Bitcoin? I have never read any statement where he recommends specific tools like CGMiner. You can't mine with the Bitcoin Core software. Actually, Bitcoin ...
user avatar
0 votes
1 answer
103 views

Transaction Wallet-Address extraction

When taking a look at the blk.dat files I am confused about how I would go about getting sender(s) and receiver(s). It is clear to me that if I have multiple inputs / outputs that there might be ...
TheEyeOfAr3s's user avatar
2 votes
1 answer
62 views

Bitcoin P2P network: unable to receive the full block data (witness stripped off)

I wrote a small script to play with the bitcoin P2P network. The script advertises itself as (NODE_NETWORK | NODE_WITNESS), and connects to a full node running on the LAN. Everything seems to work ...
Simon L's user avatar
  • 111
3 votes
1 answer
132 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", "...
Andreas's user avatar
  • 79
1 vote
1 answer
324 views

How can an attacker change the address to receive someone's reward

At the end of my lecture, my lecturer asked a question that we never had time to cover: A miner creates a block A, which contains address b, on which they want to receive their rewards. An attacker ...
Krzysztof Jaminski's user avatar
0 votes
1 answer
62 views

Exploiting the use of signature?

I've just learned signatures and why they're used in blockchain. As I understand there is a key pair that consist of one public key and one private key: Private keys are used to sign a message(...
BooRuleDie's user avatar
2 votes
1 answer
247 views

Number of transactions per blk.dat files

I am working on a parser for the blk.dat files being returned by the Bitcoin Core node. It seems to slow down considerably after a point and I am pretty sure it's because the number of transactions is ...
Rohan Maheshwari's user avatar
1 vote
1 answer
69 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') ...
LuckyAutomata's user avatar
0 votes
1 answer
61 views

How do i mine block #59502

I am not sur how to combine the information in block #59502 https://www.blockchain.com/btc/block/59502 in order to mine it how do you get the seconds on the timestamp
Mutti Kangungu's user avatar
2 votes
2 answers
112 views

Splitting of data across blkxxxxx.dat files

I am trying to parse out the bitcoin data using Big Data and wanted to know more about the blk files themselves. I was wondering how does bitcoin split the transactions across the files. I know there ...
Rohan Maheshwari's user avatar
4 votes
1 answer
342 views

What is the different between CompactSize and VarInt encoding?

Pieter Wuille's definition of CompactSize encoding seems to match Greg Walker's definition of VarInt encoding, yet the BitcoinWiki claims that CompactSize is not to be confused with VarInt. What, if ...
drogos86's user avatar
  • 117
2 votes
1 answer
54 views

Can someone with majority hashing power decide what transactions are included in my block?

I read this paragraph about if a mining pool controls the majority of the hashrate on the network: Blocking Transactions: Anyone who controls the majority of the hashing power can decide which ...
Arjun Reddy's user avatar
1 vote
2 answers
222 views

Are transactions included in a block or is only the Merkle-root hash included in a block

Before broadcasting block into bitcoin blockchain, Does a Block transactions are included in a block or only the hash of them are included in a block. While I am surfing through net, I came across two ...
Arjun Reddy's user avatar
2 votes
0 answers
41 views

Difference between pprev and pskip pointers in the CBlockIndex class?

In the Bitcoin Core there is class called CBlockIndex which as its name appears is the implementation of blocks. This class has two variable that for me they looks the same: class CBlockIndex { public:...
Amir reza Riahi's user avatar
0 votes
1 answer
167 views

Does current Bitcoin break in 2038?

I've heard about year 2038 problem and I'm worried I've read about Bitcoin measuring time with 32 bits, why aren't developers worried about Y2038P only 15 years away?
Mercedes's user avatar
  • 797
0 votes
1 answer
71 views

Where Is Signature Data Stored In Post-SegWit Transactions?

If i'm correct, i am pretty sure that signature data such as the scriptsigsize and scriptsig is stored outside the Tx_Data of a Bitcoin transaction. But then where is it stored? Is it in the block or ...
Jamo's user avatar
  • 157
2 votes
1 answer
100 views

What's the logic behind the way block proofs (in GetBlockProof) is calculated?

Bitcoin Core uses GetBlockProof() function to determine the contribution of a block to the total difficulty of the current chain, aka, nChainWork in CBlockIndex. I'm having trouble understanding the ...
The Quantum Physicist's user avatar
5 votes
1 answer
127 views

How are validity flags in block index set in concurrent blocks when one of them is chosen?

I'm trying to understand block validity flags, and what happens when a branch occurs. I found a block status flags in the bitcoin core source code: enum BlockStatus : uint32_t { ...
ardabro's user avatar
  • 195
4 votes
1 answer
902 views

Does local blockchain database (blkXXXXX.dat) contain abandoned forks forever?

When my node realizes that the given block needs to be abandoned - does it leave it in the database or replace the block with a valid one? And if "invalid" block remains: is it somehow ...
ardabro's user avatar
  • 195
1 vote
2 answers
286 views

How are TXIDs determined from the raw hex data of a block? Also, what is the coinbase transaction?

Consider the hex data of block 170. The coinbase TXID is this: b1fea52486ce0c62bb442b530a3f0132b826c74e473d1f2c220bfa78111c5082 and the second TXID is: ...
Jamo's user avatar
  • 157
2 votes
1 answer
583 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.
Jamo's user avatar
  • 157
0 votes
1 answer
56 views

Is there a way to know how many of currently unconfirmed transactions in the MemPool is currently being attempted by other miners?

Assume there there 100 unconfirmed transactions currently in the MemPool. And the size of a block is such that it's roughly made up of 10 transactions. Now when a miner completes the Proof of Work &...
user93353's user avatar
1 vote
2 answers
176 views

Where does this 2^32 come from?

Several months ago I was doing research into calculating mining revenue for several crypto currencies. When trying to calculate BTC revenue I found this value 1/2^32 which was described somewhere ...
Joe's user avatar
  • 63
1 vote
1 answer
39 views

How does the block searching by txid works?

Is that the process will go through all the blocks and find the block which contains the txid or there's an index table for all transactions?
Kalle Chen's user avatar
1 vote
1 answer
490 views

In what format does a block store the transaction data?

Does it store the raw transaction data literally like (excuse the formatting inaccuracies): 0x24134i59435ej3...9 sends 0x9wri03vw3sdfsd...i 26.00000023423 Bitcoin. Or is it stored differently?
Jamo's user avatar
  • 157
0 votes
0 answers
155 views

How do I run the invalidateblock command on bitcoind?

For a particular need I need to restart with the chain from a specific previous block. I thought about using the invalidateblock command, but it's a bitcoin-cli command and if I run it on bitcoind it ...
Minatorecoin's user avatar
0 votes
2 answers
94 views

Why aren't more empty blocks mined?

So currently only a tiny amount of empty blocks are mined A total of 71 empty blocks were mined in the first five months of 2020, accounting for 0.3% of the total blocks produced — less than half of ...
Sharif Elfouly's user avatar
0 votes
1 answer
71 views

Peer-to-peer - informations about downloading

I would like to know how the software downloads the blockchain. If the bytes write throught the socket and wait until it's written. And If the software asks 16 blocks to each peer in which you're ...
Loopite's user avatar
  • 301
0 votes
1 answer
72 views

How many transactions fit into a single block?

there is a limited number of transactions that fit into a block if the network requires more throughput (more bitcoin is being sent), that means more blocks will be solved in a shorter time interval ...
ivan866's user avatar
  • 103
0 votes
2 answers
69 views

Only My Transaction in a block

I am thinking of broadcasting a Bitcoin transaction with a very important message. The message is so important that I want it to be the only transaction (other than coinbase) in the block. For example ...
transaction0's user avatar

1
2 3 4 5
13