Skip to main content

Questions tagged [getblocktemplate]

A protocol to allow pools to specify a set of valid transactions but give the control over which transactions to include to miners.

Filter by
Sorted by
Tagged with
2 votes
1 answer
137 views

What criteria does Bitcoin Core use to create block templates?

I wonder how Bitcoin Core chooses which transactions are added to the template of a block when you call getblocktemplate. Is the mempool sorted by fee rate in sat/vB and selects transactions in an ...
polespinasa's user avatar
1 vote
0 answers
67 views

What determines the order of transactions in a block?

I've been looking at the live mempool on mempool.space, and while most transactions are sorted in order of highest sat/vB to lowest, I've noticed some that standout with extremely high sat/vB but are ...
Blank Dev's user avatar
3 votes
1 answer
188 views

Is the sum of sigops in the transaction details returned by getBlockTemplate not allowed to exceed 2000?

I invoke the getBlockTemplate interface using SegWit. The sum of weights in the returned transactions data is 3991625, and the sum of SigOps is 20037. Each time, I package all the transactions ...
youcai zhao's user avatar
5 votes
1 answer
179 views

What are the steps to create a block template?

My current understanding is that pool operators create block templates and pool miners solve the math to add it to the blockchain. My question is what are the steps for a pool operator to create a ...
Jake Stanton's user avatar
1 vote
1 answer
299 views

Constructing a block template to avoid mining "empty" blocks

In my understanding, Stratum V2 can help avoid "empty" blocks (ref A, ref B), as most of the information can be distributed ahead of time, i.e. before the next block is mined. To avoid ...
C-Otto's user avatar
  • 452
0 votes
2 answers
149 views

Miners setting timestamps up to 2h into the Future

When a miner adds the Timestamp to a block template, it must satisfy two conditions: Timestamp must be greater than the Median Timestamp of the previous 11 blocks Timestamp must be less than its ...
sha2fiddy's user avatar
0 votes
1 answer
103 views

Keep getting high-hash error from bitcoind

I'm sending this json to bitcoind server running in regtest mode: {"jsonrpc": 2.0, "id": "cumainer", "method": "submitblock", "params": [&...
Viaceslavus's user avatar
2 votes
1 answer
47 views

Mined blocks with reserved space for old utxos

I've heard that long time ago. Getblocktemplate or it's equivalent at that time reserved a small space on blocks for old utxos instead of following the rule of ordering transactions by its sat/Byte ...
dev7ba's user avatar
  • 383
1 vote
1 answer
773 views

Why is the block header version value different from the getblocktemplate version value in the bitcoin blockchain?

When looking at block header for block 746632 I see that the version is 1073676292 or 3fff0004 or when reversed 0400ff3f, but the version I received from a getblocktemplate request is 536870912 or ...
andrewz's user avatar
  • 257
0 votes
2 answers
260 views

MerkleRoot requires transaction hash to build a merkle tree.... Is that the "hash" key/value within the getblocktemplate response or the "data"?

I've created a function for parsing Json Objects and values and just when I think nothing can stop me, just when I feel like I'm the king of the blockchain and I can finally join in on the mining race ...
AncientTides's user avatar
0 votes
1 answer
264 views

What exactly is the data required when creating a coinbase transaction? How do I insert the blocks height into the coinbase transaction?

Still trying to write a function to properly create a coinbase transaction and the only thing I can't seem to get a hold on is..... How to get the block height provided by getblocktemplate into the ...
AncientTides's user avatar
1 vote
1 answer
164 views

Can Bitcoin Core 0.9.5 still fully sync?

Solo Linux GPU bitcoin miner here (doing it for fun not profit so please, no 'what's the point' answers). Working mining software for this purpose is far and few in between, but I have been able to ...
seamux's user avatar
  • 13
1 vote
1 answer
219 views

How to call `getblocktemplate` without running a full node?

I was trying to get into bitcoin mining but I could not find any useful information on calling getblocktemplate without downloading the entire blockchain. Is there a way to get blocks for mining ...
adventure2334's user avatar
0 votes
1 answer
293 views

How to get unconfirmed transactions

I am trying to learn how mining is done in bitcoin , wrote a simple mining code in python that works fine on sample data set of raw json coming from https://btc.cryptoid.info/btc/block.dws?693649.htm, ...
Shakti's user avatar
  • 123
5 votes
2 answers
1k views

Why does the mined block differ so much from the block template?

I am looking at the specific block at height 680175. At the time when the block was not mined yet, I received the block template via bitcoin-cli getblocktemplate '{"rules": ["segwit&...
Andy's user avatar
  • 233
2 votes
0 answers
231 views

Is there any way to test that a mining system is set up correctly (solo mining)?

I am running a full node and have written some mining software to learn more about how bitcoin works. I know that the chances of mining a block are basically zero given my hash rate, but I am curious ...
CryptoJoe's user avatar
1 vote
0 answers
231 views

Endianess of txids when calculating Merkle Root from getblocktemplate

I am trying to solve a merkle root from a previously mined block. Specifically this block... https://www.blockchain.com/en/btc/block/000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506 ...
Jay's user avatar
  • 13
0 votes
1 answer
380 views

Block version 0x20000000

When i run getblocktemplate, Bitcoind gives me in the version field a decimal number, when i convert it to Hex it's 20000000 I know it must be in little endian, but to build the blockheader must i put ...
Hamita's user avatar
  • 174
1 vote
1 answer
581 views

reconstruct block template from stratum mining.notify

I have a mining notification from a stratum pool. I wish to write a general script to extract the value of the block reward that the pool is taking. That is, reconstruct the block template, or at ...
SDiv's user avatar
  • 123
1 vote
1 answer
114 views

getblocktemplate request that omits transactions?

Is there a way to make a getblocktemplate request that returns only the bits/target, or at least omits all of the pending transactions? I am interested in tracking the coin difficulty in real time. ...
SDiv's user avatar
  • 123
0 votes
0 answers
741 views

CPU Miner return Internal Server Error for getblocktemplate request

I was developing an altcoin using bitcoin v 0.17. I am using CPU miner for mining purposes. I started the miner using this command: ./minerd -a sha256d -o http://localhost:19230 -O adreno:adreno@123 -...
Ajit Soman's user avatar
2 votes
1 answer
561 views

getblocktemplate fails in regtest mode even when it is connected to the other node

I have created two nodes and connected the 1st node with the 2nd node in regtest mode . Now when I make the getblocktemplate command using bitcoin-cli . It fails with bitcoin is downloading the block. ...
nirajkumar's user avatar
2 votes
0 answers
316 views

Is my understanding of Blockhain Endianness correct?

I know questions on this topic have been asked to death in a number of different ways. I also know that what endian order refers to specifically is dependent on context. What I want are some ...
zeboidlund's user avatar
2 votes
2 answers
121 views

Where does this pattern in the feerate distribution per block originate from?

While building a tool/visualization that displays the feerate of a transaction according to it's position in a given block I came across a patter in some blocks. I expect a typical block to start ...
0xb10c's user avatar
  • 1,440
2 votes
1 answer
252 views

Building the merkle root from transactions in a template block

I want to compute the merkle root for transactions in a given template block - bitcoind:getblocktemplate(). I understand the merkle root is a hash of all the transactions in a block from the last ...
Corbin's user avatar
  • 285
0 votes
1 answer
619 views

bitcoin fork getblocktemplate keeps reporting downloading blocks

I got my own hard fork of bitcoin from forkgen.tech. The fork has happened after block 506016. I have 2 nodes running and after syncing up to block 506016, I want to run a pool server. But the ...
Eric Dela Cruz's user avatar
0 votes
0 answers
183 views

Why did GBT fail?

GBT was a way to stop miner centralization, but no one used it, everyone continued to use Stratum. Why did it fail?
MCCCS's user avatar
  • 10.2k
2 votes
1 answer
817 views

How does bitcoin reward who find the block?

After getting the getblocktemplate, hashing it, finding a solution and generating the proper message to submit to the blockchain, if i ever solve a block how does the network knows it was me and ...
Rafael Milewski's user avatar
1 vote
2 answers
1k views

How i can delete last block from blockchain? altcoin

How can I delete the last block from blockchain to be ready for hardfork. What I mean is, in blockchain last block is with error's. I want to delete those blocks, for the new blockchain is disabled ...
tseries's user avatar
  • 205
1 vote
0 answers
460 views

Does Stratum cause mining to be more centralized than getBlockTemplate would?

I read the question "I don't understand the "51% attack" problem. Why does a mining pool have power with a 51% share?" and its anwers. That made me wonder that since the GBT protocol is ...
Gary Chen's user avatar
3 votes
1 answer
506 views

Why does getblocktemplate use priority for transaction selection?

I don't know how getblocktemplate works exactly, but it seems to include transactions based on priority. Selecting transactions based on priority isn't the most profitable method for building a block ...
inersha's user avatar
  • 3,185
5 votes
1 answer
819 views

How does getblocktemplate select transactions?

I wrote a script that compares the transactions listed in the memory pool with the transactions included in getblocktemplate: http://learnmeabitcoin.com/explorer/node/memorypool (I've ordered the ...
inersha's user avatar
  • 3,185
0 votes
2 answers
1k views

How to compute merkle root without coinbasetxn?

How do you build a merkle root without a coinbase transaction? I compute the merkle root without the coinbase portion and I get a different root then the submitter.
n8CodeGuru's user avatar
2 votes
1 answer
515 views

Question about getblocktemplate

I'm having trouble understanding getblocktemplate. From https://en.bitcoin.it/wiki/Getblocktemplate, I see how to build the block header and then begin hashing by incrementing the nonce, the same as ...
dacox's user avatar
  • 33
0 votes
1 answer
146 views

How does the getblocktemplate request rate correlate with a miner's hashrate?

What is the relationship between a miner's hashrate and the getblocktemplate (GBT) request rate? (The question here, "How does the rate of getwork requests correlate with the hashrate of a miner?," ...
Geremia's user avatar
  • 4,704
13 votes
2 answers
2k views

Work distribution in a mining pool

How is work distributed among members of a pool? Regarding the block hashing algorithm and valid hashes of a new node, how is the set of solutions for nonces "distributed" among miners?Is a nonce, ...
Aliakbar Ahmadi's user avatar
2 votes
1 answer
1k views

Bitcoin testnet: "Bitcoin is downloading blocks..." and other problem

I'm trying to setup a local testnet with multiple nodes. Currently I have three nodes, and their mining powers are almost the same. Things have been quite ok so far, except some problems that I need ...
Loi.Luu's user avatar
  • 137
7 votes
2 answers
2k views

How often should I call getblocktemplate?

I'm building a basic Bitcoin client in c# to better understand the mining protocol. I need help understanding Getblocktemplate. I have read the Getblocktemplate wiki, but I'm still having an issue ...
Sarah's user avatar
  • 71
1 vote
1 answer
1k views

Difference between coinbaseaux.flags vs. coinbasetxn.data?

After reading through most of the protocol, and trying to piece everything together, I'm still at a loss as to how some things work. For example, the difference between coinbaseaux.flags and ...
xil3's user avatar
  • 275
3 votes
1 answer
845 views

Do pool servers communicate with bitcoind, and in what capacity?

I'm trying to understand how the whole process flows. Here's how I currently understand it working. Mining client -> Pool server -> Bitcoind getwork: Mining client calls getwork from ...
xil3's user avatar
  • 275
1 vote
2 answers
4k views

How to hash data from 'getblocktemplate' request

I've been reading lots of articles, trying to understand how to hash the data returned from getwork; but I totally overlooked getblocktemplate. I'm just trying to understand how all the data below is ...
xil3's user avatar
  • 275
5 votes
2 answers
7k views

Protocols for use between mining clients and mining pool servers

Which protocols are there for mining clients to communicate with mining pool servers? How do they compare?
Dr.Haribo's user avatar
  • 8,469
-2 votes
1 answer
2k views

Difference between getwork and getblocktemplate? [duplicate]

What are the differences between getwork and getblocktemplate? Who identified the need for the new protocol? Who were the primary contributors to its creation?
Kinnard Hockenhull's user avatar
2 votes
1 answer
1k views

Should I use getwork or getblocktemplate

I am working on an fpga mining device just for fun. I realized that there is a getblocktemplate function which replaces the getwork Json-rpc call. So do I need to switch over to it and change all the ...
Enthusiast's user avatar
6 votes
1 answer
3k views

What is the standard protocol for pools/miners?

The Bitcoin client protocol is well documented in the Bitcoin Wiki, but I can't find much on the protocol used by pools and miners. Is it described anywhere?
ThePiachu's user avatar
  • 43.1k