Questions tagged [block]
The components of the blockchain and a data structure that collects transactions.
623
questions
1
vote
1
answer
32
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):
...
1
vote
1
answer
49
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 ...
1
vote
1
answer
113
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 ...
-2
votes
1
answer
76
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 ...
-2
votes
1
answer
58
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 ...
0
votes
1
answer
37
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 ...
2
votes
1
answer
50
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 ...
3
votes
1
answer
75
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",
"...
0
votes
0
answers
29
views
it takes too long to receive block data from the full node [duplicate]
I created a full node container on docker.
However, it takes too long to receive block data from the full node.
It's been a week already and we still only have 400,000.
I'm curious as to why.
0
votes
0
answers
22
views
How to delete old scanned block while maintaining the use of A '-txindex' option?
We are crypto-wallet developers.
And we've been maintaining a Bitcoin full node for a long time.
But nowadays, our disk usage is almost full.
And we are trying '-prune' mode, but prune mode is ...
1
vote
1
answer
301
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 ...
0
votes
1
answer
45
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(...
2
votes
1
answer
162
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 ...
1
vote
1
answer
48
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')
...
0
votes
1
answer
54
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
2
votes
2
answers
82
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 ...
3
votes
1
answer
208
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 ...
2
votes
1
answer
48
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
...
1
vote
2
answers
147
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 ...
0
votes
0
answers
31
views
What is the mechanism that makes Bitcoin block timestamps *not* monotonic? [duplicate]
Quoting from Glassnode:
BTC, BCH, and LTC all do not enforce monotonic timestamp sequences (e.g. block #10 can have a timestamp that is earlier than the timestamp of block #9). This happens only very ...
2
votes
0
answers
34
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:...
0
votes
1
answer
89
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?
0
votes
1
answer
53
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 ...
2
votes
1
answer
62
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 ...
5
votes
1
answer
118
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 {
...
4
votes
1
answer
892
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 ...
1
vote
2
answers
137
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: ...
2
votes
1
answer
417
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.
0
votes
1
answer
42
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 &...
1
vote
2
answers
109
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 ...
1
vote
1
answer
34
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?
1
vote
1
answer
260
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?
0
votes
0
answers
105
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 ...
0
votes
2
answers
80
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 ...
0
votes
1
answer
53
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 ...
0
votes
1
answer
54
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
...
0
votes
2
answers
63
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 ...
1
vote
1
answer
100
views
How often does target hash change and how to find it?
So basically I was researching target hash and trying to figure out how I can find it. I know there are posts out there that have said that Bitcoins target hash is a 256 bit number with 32 bits of ...
0
votes
1
answer
54
views
Which time does timestamp given in the block explorer represents?
The time block header was constructed
The time when block was validated?
if 2, this means not only nonce is incremented +1 every time we have hashed block header but also timestamp increments and ...
5
votes
1
answer
138
views
Is timestamping needed for anything except difficulty adjustment
This question asks about the role of timestamping and this answer supports the assertion that the main role is block difficulty adjustment.
On the other hand, the whitepaper claims that ordering ...
1
vote
1
answer
231
views
When do miners add a new block to blockchain?
I'm a bit new to blockchain and I am trying to understand.
As I understand when a new transaction happens it's added to a mining pool and miners prioritize these transactions (for example by amount of ...
0
votes
1
answer
48
views
Trying to validade a bitcoin block
So I'm trying to validade a bitcoin block just for curiosity, let's take for example bitcoin block #1 (https://bitpay.com/insight/#/BTC/mainnet/block/...
-1
votes
1
answer
83
views
Theoretically how large can a blockchain block be?
How large can a blockchain block be? This is not specific to the current bitcoin blockchain or any blockchain. Just assuming you are creating a blockchain, how large can the blocks be?
Also what are ...
0
votes
1
answer
41
views
Segwit: Does the nodes saves 2 types of blocks (or atleast in the past)
Was wondering for a long why mempool.space was showing blocks greater than 1mb!
Started digging deeper and read these:
https://jimmysong.medium.com/understanding-segwit-block-size-fd901b87c9d4
https:/...
3
votes
1
answer
232
views
Why do early blocks contain OP_PUSHBYTES instructions in the coinbase input?
Early blocks contain OP_PUSHBYTES sequences in the coinbase input ScriptSig:
Block 1: OP_PUSHBYTES_4 ffff001d OP_PUSHBYTES_1 04
Block 2: OP_PUSHBYTES_4 ffff001d OP_PUSHBYTES_1 0b
Block 3: ...
0
votes
1
answer
56
views
what is the confirmation section in the block info?
in the details of a bitcoin block there's a section called block confirmation (which is different than transaction confirmation), first i thought it was the number of the blocks that are created after ...
0
votes
1
answer
48
views
what is block confirmation [duplicate]
in the details of a bitcoin block there's a section called block confirmation (which is different than transaction confirmation), first i thought it was the number of the blocks that are created after ...
0
votes
0
answers
32
views
use java to scan all the block
I am trying to scan all the bitcoin data on my workstation with java to get some high level statistic data.
I parsed all the transactions with bitcoinJ, but I encountered a problem, the Transaction ...
0
votes
1
answer
40
views
Getting wrong version number of block from block index of Bitcoin Core
I am reading block index using plyvel python package.
Following is the location of block indexes:
export BLOCK_INDEX_DB=$BITCOIN_HOME/blocks/index
Following is the method to decode b128 varint:
def ...
0
votes
2
answers
64
views
Are filters available for Blockchain.com APIs?
I'm trying to get the block details of Bitcoin using block height. The API provided on the "blockchain.com" website also dumps the huge transaction list along with the response. Is there a ...