Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
the size of block-template ups and downs when call `getblocktemplate` at the same block height #156
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
YihaoPeng
Jan 15, 2018
Oh, -rpcthreads=1 seems not work. I run bitcoin-abc node with -rpcthreads=1 now but I found these logs:
I0115 20:50:04.611034 19684 GbtMaker.cc:234] sumbit to Kafka, msg len: 21827912
I0115 20:50:14.980540 19684 GbtMaker.cc:198] gbt height: 513033, prev_hash: 00000000000000000012c7ef96514da48454d13fefdbe6c69d3f4434fbc23363, coinbase_value: 1259682477, bits: 18039abb, mintime: 1516014614, version: 536870912|0x20000000, gbthash: c3edd0d4d8a743248e8da3e3cf8748a45622b0c5a29536baeb069d94c2d8a3d4
I0115 20:50:15.057153 19684 GbtMaker.cc:234] sumbit to Kafka, msg len: 8205268
I0115 20:50:25.991328 19684 GbtMaker.cc:198] gbt height: 513033, prev_hash: 00000000000000000012c7ef96514da48454d13fefdbe6c69d3f4434fbc23363, coinbase_value: 1264746837, bits: 18039abb, mintime: 1516014614, version: 536870912|0x20000000, gbthash: ed03ab68ed4ee272664d2fda438688f2f20c2945444efba9ac682a91b820b9d0
I0115 20:50:26.191233 19684 GbtMaker.cc:234] sumbit to Kafka, msg len: 21827336
I0115 20:50:37.149384 19684 GbtMaker.cc:198] gbt height: 513033, prev_hash: 00000000000000000012c7ef96514da48454d13fefdbe6c69d3f4434fbc23363, coinbase_value: 1264763151, bits: 18039abb, mintime: 1516014614, version: 536870912|0x20000000, gbthash: f2cc31e4b1eb014d9b9466e7e525af3593c7b00191d8502ba88648a6e60acae7
len: 21827912 -> 8205268 -> 21827336, the block height not changed.
So we mined a near 3MB block (≈ 8205268 * 0.37) by accident.
YihaoPeng
commented
Jan 15, 2018
•
|
Oh,
len: 21827912 -> 8205268 -> 21827336, the block height not changed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
deadalnix
Jan 15, 2018
Contributor
So it is not a multithreading issue, which is somehow reinsuring. Thanks for reporting this.
|
So it is not a multithreading issue, which is somehow reinsuring. Thanks for reporting this. |
YihaoPeng
changed the title from
the size of block-template ups and downs when call `getblocktemplate` from a node with `-rpcthreads=4`
to
the size of block-template ups and downs when call `getblocktemplate` at the same block height
Jan 15, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
kingvest
Jan 15, 2018
I'm unable to reproduce this issue with Bitcoin-ABC v0.16.2
The size of getblocktemplate is increasing steadily
@YihaoPeng - Can you reproduce the issue with 0.16.2?
kingvest
commented
Jan 15, 2018
|
I'm unable to reproduce this issue with Bitcoin-ABC v0.16.2 The size of @YihaoPeng - Can you reproduce the issue with 0.16.2? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
YihaoPeng
Jan 16, 2018
I have no 0.16.2 nodes at current and the unconfirmed transactions in memory pool receded.
I will upgrade to 0.16.2 and test it at next time that the memory pool larger than 100MB.
YihaoPeng
commented
Jan 16, 2018
|
I have no 0.16.2 nodes at current and the unconfirmed transactions in memory pool receded. I will upgrade to 0.16.2 and test it at next time that the memory pool larger than 100MB. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
deadalnix
Jan 18, 2018
Contributor
I think I now what the problem is. You must have reached the sigops limit. sigops is not taken into account when prioritizing transactions building a template.
|
I think I now what the problem is. You must have reached the sigops limit. sigops is not taken into account when prioritizing transactions building a template. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
qshuai
Mar 19, 2018
Contributor
@deadalnix Yeah, you are right(sigops works), I can test 32M block in testnet. Following params will be modified:
static const uint64_t DEFAULT_MAX_BLOCK_SIZE = 32 * ONE_MEGABYTE;
static const int64_t MAX_BLOCK_SIGOPS_PER_MB = 200000;
static const uint64_t DEFAULT_MAX_GENERATED_BLOCK_SIZE = 32 * ONE_MEGABYTE;
|
@deadalnix Yeah, you are right(sigops works), I can test 32M block in testnet. Following params will be modified:
|
YihaoPeng commentedJan 15, 2018
•
Edited 6 times
-
YihaoPeng
Jan 15, 2018
-
YihaoPeng
Jan 15, 2018
-
YihaoPeng
Jan 15, 2018
-
YihaoPeng
Jan 15, 2018
-
YihaoPeng
Jan 15, 2018
-
YihaoPeng
Jan 15, 2018
Describe the issue
I run
bitcoin-abc v0.16.1with-rpcthreads=4(default setting) and-maxblocksize=7994000.You know there is a lot of unconfirmed transactions in the memory pool recently, so I expect that when I call
getblocktemplate, the size of each block-template should be close to 7.9MB.But I'm wrong. The size of block-template is fluctuant. It sometimes near 1MB, sometimes near 2MB and sometimes near 7.9MB. A size suddenly appeared, keep some seconds, then suddenly switched to another size.
(
The issue looks like disappeared if I run bitcoin-abc node with)-rpcthreads=1.There are some logs about this situation:
The block size nearly equals
rawgbt-message-len * 0.37. So the first block template of height513011is near 7.9MB (21505568 * 0.37). The next 3 block templates have the similar size. But suddenly, it downs to 879KB (2402544 * 0.37). The block height not changed.Log continues. The len suddenly ups to
21582256and21562640at16:39:06, then downs to2688528immediately.Len: 5330016 -> 21634404 -> 5453676, with the same block height.
Can you reliably reproduce the issue?
If so, please list the steps to reproduce below:
getblocktemplateevery ten seconds and record the size of the returned data.Expected behaviour
The size of block-template is increasing from a small number to near 7.9MB, then keep 7.9MB until a new block found.
Actual behaviour
The size of block-template is fluctuant. It sometimes near 1MB, sometimes near 2MB and sometimes near 7.9MB. A size suddenly appeared, keep some seconds, then suddenly switched to another size.
What version of bitcoin-abc are you using?
Bitcoin-ABC v0.16.1, https://github.com/Bitcoin-ABC/bitcoin-abc/archive/v0.16.1.tar.gz
Running it as a docker container: https://github.com/btccom/bccpool/tree/master/docker/bitcoin-abc/v0.16.1
Machine specs:
Any extra information that might be useful in the debugging process.
The issue looks like disappeared if I run bitcoin-abc with-rpcthreads=1.