underhood (OP)
|
|
October 10, 2016, 07:44:04 PM |
|
Hi, usually block sizes of mined blocks are near 1MB limit however from time to time strange blocks are mined with just few transactions. Any idea why? Example: In the middle of typical blocks: ~2000+ transactions ~ 990kb+ It quite stands out. Another question is could this be a possible way to attack block-chain? You do not need to have 50% of mining power but if you mine blocks without transaction on purpose you are slowing the network down.
|
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
October 10, 2016, 07:49:46 PM |
|
Empty blocks (blocks with one transaction, the coinbase transaction) usually occur due to SPV mining where the miners have not validated the previous block before building the next block on it. This means they don't know what transactions were included in that block so they do not include any transactions in the next block until they have validated the previous block.
The other blocks with few transactions may happen if the entire mempool of the miner's node was cleared by the last block and they have only received a few transactions when they began building the next block. This may be unlikely, but not impossible.
There may be another reason, but it all depends on the algorithm used to select the transactions. Blocks being at less than the maximum is not really strange, they happen all the time.
One thing to note is that if all blocks were full (as many claim is true but is actually not), then a significant amount of the "backlog" would actually be cleared.
|
|
|
|
Lutpin
Copper Member
Legendary
Offline
Activity: 1904
Merit: 1874
Goodbye, Z.
|
|
October 10, 2016, 07:51:16 PM |
|
Are these perhaps orphan blocks?
No, oprhan blocks are part of chains that are shorter than the current main chain (most of them are just single or two blocks). All of the blocks above are part of the main chain. A block doesn't have to be empty in order to be orphaned, both things don't directly influence each other. (everything else is well covered by achow101 above)
|
| | | | ███████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ███████ | | | |
▄████████████████████████████████████████████████████████████▄ ██ ▄▄▄▄▄▄ ██ ██ ██████ ▄██████████▄ ████████████████████▀ ██ ████████ ▄████▀ ▀████▄ ████▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ██ ████ ████ ████▀ ▀██▀ ████ ██ ████ ████ ▄███▀ ████ ██ ████ ████ ███▀ ████▄▄▄▄▄▄▄▄▄▄ ██ ████ ████ ███ ██████████████ ██ ████ ████ ███▄ ████▀▀▀▀▀▀▀▀▀▀ ██ ████████████████████ ▀████ ████ ██ ██████████████████████ ▀████▄ ▄██▄ ████ ██ ████ ████ ▀████▄ ▄████▀ ████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██ ████ ████ ▀██████████▀ ████████████████████▄ ██ ▀▀▀▀▀▀ ██ ▀█████████████████████████████████████████████████████████████████████▀ | | |
|
|
|
underhood (OP)
|
|
October 10, 2016, 07:53:25 PM |
|
Well what i say is maybe wrong? I do know the concept of how bitcoin works but do not follow all the tiny details.
I am sure there is some technical issue resulting in those blocks.
But it makes me think:
Imagine attacker looking to disrupt BTC with enough power (example china) but not enough to have 50%. As a government of china i want to disrupt bitcoin. There is lot of miners in China. Instead of blocking them i would just block them from receiving transactions and thus mining useless blocks (as they do not have any transactions within them). Another question would be how are miner protected from fake transaction DDOSing: Is it possible to DDOS miner pool with purposely wrong transactions? Keeping pool busy rejecting them and real transactions not reaching the pool as result?
|
|
|
|
underhood (OP)
|
|
October 10, 2016, 07:58:01 PM |
|
Empty blocks (blocks with one transaction, the coinbase transaction) usually occur due to SPV mining where the miners have not validated the previous block before building the next block on it. This means they don't know what transactions were included in that block so they do not include any transactions in the next block until they have validated the previous block.
The other blocks with few transactions may happen if the entire mempool of the miner's node was cleared by the last block and they have only received a few transactions when they began building the next block. This may be unlikely, but not impossible.
There may be another reason, but it all depends on the algorithm used to select the transactions. Blocks being at less than the maximum is not really strange, they happen all the time.
One thing to note is that if all blocks were full (as many claim is true but is actually not), then a significant amount of the "backlog" would actually be cleared.
Hi thanks to explanation. It is clear to me block doesn't have to be full. However usually they are near full due to high traffic nowadays. Even if traffic is lower block is ~>500kB. It just seemed very strange to me in the middle of high traffic there is suddenly block with no transactions (technically with one coinbase transaction)
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
October 10, 2016, 07:59:01 PM |
|
Well what i say is maybe wrong? I do know the concept of how bitcoin works but do not follow all the tiny details.
I am sure there is some technical issue resulting in those blocks.
There isn't really an issue. The issue is that miners SPV mine, and that can be really bad for the blockchain as it can lead to forks. But it makes me think:
Imagine attacker looking to disrupt BTC with enough power (example china) but not enough to have 50%. As a government of china i want to disrupt bitcoin. There is lot of miners in China. Instead of blocking them i would just block them from receiving transactions and thus mining useless blocks (as they do not have any transactions within them).
Theoretically possible, but not likely. Another question would be how are miner protected from fake transaction DDOSing: Is it possible to DDOS miner pool with purposely wrong transactions? Keeping pool busy rejecting them and real transactions not reaching the pool as result?
There are no such things as "fake transactions". If a transaction is invalid it will be rejected. If someone attempts to DoS a node with invalid txs, then they will be banned by that node.
|
|
|
|
DarkStar_
Legendary
Offline
Activity: 2772
Merit: 3284
|
|
October 10, 2016, 08:00:14 PM |
|
Imagine attacker looking to disrupt BTC with enough power (example china) but not enough to have 50%. As a government of china i want to disrupt bitcoin. There is lot of miners in China. Instead of blocking them i would just block them from receiving transactions and thus mining useless blocks (as they do not have any transactions within them).
That wouldn't work, as miners (unless it's an SPV block) get the previous block's information from another node (hence the p2p network), and if that node can give the miner the block information, it can give them the translation information as well. Blocking them off from other bitcoin nodes will cause them to be unable to mine a block and claim the reward.
|
taking a break - expect delayed responses
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
October 10, 2016, 08:04:04 PM |
|
Imagine attacker looking to disrupt BTC with enough power (example china) but not enough to have 50%. As a government of china i want to disrupt bitcoin. There is lot of miners in China. Instead of blocking them i would just block them from receiving transactions and thus mining useless blocks (as they do not have any transactions within them).
That wouldn't work, as miners (unless it's an SPV block) get the previous block's information from another node (hence the p2p network), and if that node can give the miner the block information, it can give them the translation information as well. Blocking them off from other bitcoin nodes will cause them to be unable to mine a block and claim the reward. It's called a sybil attack and they are entirely possible. A miner's node could be theoretically connected to only malicious nodes which could withhold all the new transactions and only relay blocks. It would be more effective to just cut them off the network though.
|
|
|
|
underhood (OP)
|
|
October 10, 2016, 08:05:06 PM Last edit: October 10, 2016, 08:15:08 PM by underhood |
|
There isn't really an issue. The issue is that miners SPV mine, and that can be really bad for the blockchain as it can lead to forks.
Clear and agree. "Issue" is wrong word for what i meant to say. Better word would be "technical reason" (as in not malicious) Theoretically possible, but not likely.
A lot of the blocks are mined by different mining pools, not some anonymous big miner. Furthermore, just because a lot of the miners are of the same ethnicity and nationality does not mean that they all communicate with each other and are colluding to disrupt the blockchain. Also, the miners do not control what goes in the block but rather the pool operators.
What i meant is Government instead of blocking bitcoin all-together (as it has control over internet in that country) blocking just incoming transactions for miners. However as I think more about it miners would soon notice it. There are no such things as "fake transactions". If a transaction is invalid it will be rejected. If someone attempts to DoS a node with invalid txs, then they will be banned by that node.
Again poor choice of words. I meant as you corrected me invalid transactions. And again thanks for answer. Basically what i asked is if there is invalid transaction DDOS protection. You say there is. Thanks
|
|
|
|
underhood (OP)
|
|
October 10, 2016, 08:12:36 PM |
|
It's called a sybil attack and they are entirely possible. A miner's node could be theoretically connected to only malicious nodes which could withhold all the new transactions and only relay blocks. It would be more effective to just cut them off the network though.
Well idea was for attacker with control of internet in country not to only block Bitcoin use in the country but to cause a disruption as well (for users outside country to for example decrease price of BTC). However as is clear to me now miners would soon detect this and try to circumvent, meaning you still cannot do it for long time without assistance from all mining pools in the country as well. Thinking even further it would be much easier for them (China as example but meant any big anti bitcoin country) to just push fake binaries of bitcoin to people. Especially after WoSign/StartCom debacle with issuing HTTPS certificate for any domain if you asked nicely.
|
|
|
|
achow101
Moderator
Legendary
Offline
Activity: 3542
Merit: 6886
Just writing some code
|
|
October 10, 2016, 08:28:26 PM |
|
Thinking even further it would be much easier for them (China as example but meant any big anti bitcoin country) to just push fake binaries of bitcoin to people. Especially after WoSign/StartCom debacle with issuing HTTPS certificate for any domain if you asked nicely.
Even so there are still protections against that. Bitcoin Core uses a distributed and deterministic release process (known as gitian building). Multiple people build the Bitcoin binaries and the hashes of all the binaries must match. Then the release is made and those hashes are signed with Wladimir's PGP key which only he has (in theory). The code signing keys for windows and mac are controlled only by Cory Fields (IIRC). Anything a malicious entity does would result in hashes that don't match what was released and what the gitian builders published when they did the gitian builds.
|
|
|
|
underhood (OP)
|
|
October 10, 2016, 08:39:51 PM |
|
Thinking even further it would be much easier for them (China as example but meant any big anti bitcoin country) to just push fake binaries of bitcoin to people. Especially after WoSign/StartCom debacle with issuing HTTPS certificate for any domain if you asked nicely.
Even so there are still protections against that. Bitcoin Core uses a distributed and deterministic release process (known as gitian building). Multiple people build the Bitcoin binaries and the hashes of all the binaries must match. Then the release is made and those hashes are signed with Wladimir's PGP key which only he has (in theory). The code signing keys for windows and mac are controlled only by Cory Fields (IIRC). Anything a malicious entity does would result in hashes that don't match what was released and what the gitian builders published when they did the gitian builds. That is all nice and perfect however I am not optimistic about percentage of users who really go and verify binaries against signature. If nobody really verifies it then it is not so useful (e.g. majority doesn't verify resulting in majority of user possibly running fake version).
|
|
|
|
DarkStar_
Legendary
Offline
Activity: 2772
Merit: 3284
|
|
October 10, 2016, 08:53:55 PM |
|
That is all nice and perfect however I am not optimistic about percentage of users who really go and verify binaries against signature. If nobody really verifies it then it is not so useful (e.g. majority doesn't verify resulting in majority of user possibly running fake version).
Eventually someone will do it though, realize that they don't match and post it here or on reddit. If it's legit, a lot of discussion will occur, and eventually it will be published on bitcoin news sites, and possibly get on mainstream media as people will care about it. People will then start to get the legit client from a torrent or a mirror site, and China's (or another country)'s attack will be stopped.
|
taking a break - expect delayed responses
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4420
Crypto Swap Exchange
|
|
October 11, 2016, 08:49:43 AM |
|
That is all nice and perfect however I am not optimistic about percentage of users who really go and verify binaries against signature. If nobody really verifies it then it is not so useful (e.g. majority doesn't verify resulting in majority of user possibly running fake version).
Eventually someone will do it though, realize that they don't match and post it here or on reddit. If it's legit, a lot of discussion will occur, and eventually it will be published on bitcoin news sites, and possibly get on mainstream media as people will care about it. People will then start to get the legit client from a torrent or a mirror site, and China's (or another country)'s attack will be stopped. Censorship is prevalent in China with majority of the sites being blocked in China. AFAIK, China started blocking bitcointalk.org sometime ago. It is up to the miner to verify the software themselves.
|
|
|
|
-ck
Legendary
Offline
Activity: 4284
Merit: 1645
Ruu \o/
|
|
October 11, 2016, 12:18:12 PM |
|
Here's a long discussion regarding empty blocks in mining: https://bitcointalk.org/index.php?topic=1085800.0In short it's a crappy workaround used by some pools to speed up their block changes immediately after another blocksolve to compensate for slow software which does not do full verification of the previous block, using only the header and therefore cannot build any more transactions onto the next block. If you look at this site at the last 6 months' blocks you can see the sizes and pools that offend with 1txn blocks: http://data.bitcoinity.org/bitcoin/blocksize/6m?t=lAlso if you sort by average size you'll see my pool has the largest average blocksize - in fact 3 of the top 4 average blocksize pools run my software. I strongly advocate against SPV mining and empty blocks.
|
Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel 2% Fee Solo mining at solo.ckpool.org -ck
|
|
|
RocketSingh
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 11, 2016, 03:15:50 PM |
|
usually block sizes of mined blocks are near 1MB limit however from time to time strange blocks are mined with just few transactions. Any idea why?
AntPool owner Jihan Wu said the following in response to Alex Petrov of BitFury... @sysmannet sorry, we will continue mining empty blocks. This is the freedom given by the Bitcoin protocol. Source: https://twitter.com/JihanWu/status/704476839566135298Mined by BTCC Pool. Mined by AntPool. Mined by Kano CKPool.
|
|
|
|
underhood (OP)
|
|
December 23, 2016, 09:06:19 AM |
|
usually block sizes of mined blocks are near 1MB limit however from time to time strange blocks are mined with just few transactions. Any idea why?
AntPool owner Jihan Wu said the following in response to Alex Petrov of BitFury... @sysmannet sorry, we will continue mining empty blocks. This is the freedom given by the Bitcoin protocol. Source: https://twitter.com/JihanWu/status/704476839566135298Mined by BTCC Pool. Mined by AntPool. Mined by Kano CKPool. I think it will self correct anyway as mining reward is going to decrease the main revenue source will be transaction fees. Meaning after some time mining empty blocks would be against miners interest.
|
|
|
|
mezzomix
Legendary
Offline
Activity: 2730
Merit: 1263
|
|
December 23, 2016, 09:56:47 AM |
|
Not relaying new small blocks when the mempool is full is a freedom every node operator has! Let's create a small disadvantage for SPV miners.
|
|
|
|
Yogafan00000
|
|
December 23, 2016, 04:30:50 PM |
|
Because it's too slow to include transactions in a block, during that very short time, some other miner might solve the block, they want to submit the solution as fast as possible, they will ignore the transaction fees and only go for the mining reward.
|
1YogAFA... (oh, nevermind)
|
|
|
|