Bitcoin Forum
December 13, 2018, 03:15:14 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to add blocks in parallel?  (Read 126 times)
agor
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
September 05, 2018, 10:45:59 AM
 #1

Is it possible to add two correct blocks at the same time, making them both valid to prevent orphan blocks? We might rely on both of them thereafter making them both correct. Does this approach vulnerable to some attack?
1544670914
Hero Member
*
Offline Offline

Posts: 1544670914

View Profile Personal Message (Offline)

Ignore
1544670914
Reply with quote  #2

1544670914
Report to moderator
1544670914
Hero Member
*
Offline Offline

Posts: 1544670914

View Profile Personal Message (Offline)

Ignore
1544670914
Reply with quote  #2

1544670914
Report to moderator
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1544670914
Hero Member
*
Offline Offline

Posts: 1544670914

View Profile Personal Message (Offline)

Ignore
1544670914
Reply with quote  #2

1544670914
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 1610
Merit: 1111

Somewhat inactive.


View Profile WWW
September 05, 2018, 10:51:39 AM
 #2

No. The blockchain relies on the fact that at any point in the chain, the blocks in the chain must be connected to each other. This ensures that each and every transaction can only be included once only. If there are two blocks at the same height, its likely that both of them could contain different transactions which spends the same UTXO. Hence, allowing for double spending.

bob123
Hero Member
*****
Offline Offline

Activity: 770
Merit: 748



View Profile WWW
September 05, 2018, 12:00:13 PM
 #3

No, this is not possible.
Each block has to reference the previous block to be valid. And the longest chain is the valid chain.

With 2 'parallel' blocks the next block has to be built on top of either the first or the second block with the same height.
After a block has been mined upon one of these two, the other one gets orphaned (because it is not part of the longest (and therefore valid) chain).

The whole principle of a blockchain (in theory: a linked list) is that each block references the latest block and is going to be referenced by the next one.
This (together with the extremely high hash rate) ensures that no double spends are possible.


With 2 blocks at the same height, how would one know which transaction from address X is valid if both blocks contain different transactions from address X using the same UTXO?
Short answer: That's not possible.

aliashraf
Sr. Member
****
Offline Offline

Activity: 658
Merit: 450


View Profile
September 05, 2018, 12:35:27 PM
 #4

I suppose, op is asking about a hypothetical improvement and not the current bitcoin. And my answer is yes!

I think it is totally possible to have a data structure with parallel blocks allowed the only restriction I can imagine is for the blocks not to have competing transactions (different transactions trying to spend same outpoints) or to share a same transaction.
TheArchaeologist
Member
**
Offline Offline

Activity: 84
Merit: 73

Learn from the Past!


View Profile WWW
September 05, 2018, 12:57:03 PM
 #5

I suppose, op is asking about a hypothetical improvement and not the current bitcoin. And my answer is yes!

I think it is totally possible to have a data structure with parallel blocks allowed the only restriction I can imagine is for the blocks not to have competing transactions (different transactions trying to spend same outpoints) or to share a same transaction.
In my opinion parallel means for instance two blocks get added at the same time so neither of these blocks know of the existence of the other. So how exactly would you prevent competing transactions between those two blocks if there is no knowledge about the other block? As soon as a single competing transaction is in these blocks the whole chain gets corrupted.
bob123
Hero Member
*****
Offline Offline

Activity: 770
Merit: 748



View Profile WWW
September 05, 2018, 12:57:47 PM
Merited by mocacinno (1)
 #6

I think it is totally possible to have a data structure with parallel blocks allowed the only restriction I can imagine is for the blocks not to have competing transactions (different transactions trying to spend same outpoints) or to share a same transaction.

Can you guess how low the probability of 2 independent miner searching for a block with totally different transaction is ?

Since miners have a financial incentive, they are trying to include the fees with the highest fee rate.
2 Blocks being found at the same time with no transaction from block 1 being in block 2 is almost zero.

And once a block has been found, it doesn't make sense to include other transactions and still mine with the reference to the [height - 1] block.
Mining is a probability game. It doesn't matter if you have already worked 50 minutes on block X. Solving block X has the same probability as solving block Y.

Such 'parallel' blocks do not have any advantage. They don't fit into the whole concept.


mocacinno
Legendary
*
Offline Offline

Activity: 1428
Merit: 1275


https://unblur.ninja =>lightning network testsite


View Profile WWW
September 05, 2018, 01:02:38 PM
 #7

Is it possible to add two correct blocks at the same time, making them both valid to prevent orphan blocks? We might rely on both of them thereafter making them both correct. Does this approach vulnerable to some attack?
Next to the (valid) remarks other people have given, can you give a sollution to this problem in your theory:

What if both parallel chains get a parallel chain? What if the parallel chains of the parallel chains get parallel chains? You might end up with 4 chains, then 8, 16, 32, 64 (offcourse, not all parallel chains have to get parallel chains at the same time, but i hope you see my point).

In the end, a miner would have to update his UTXO set by scanning blocks of unlimited parallel chains at height x (or maybe not all chains are at height x at the same time???)... And at this point he/she can try to solve a block using the hash of the last blockheader of any of those parallel chains, if he finds a valid header for one of these chains, he can broadcast his block and the other nodes would have to figure out which of the parallel chains the block belongs to.

aliashraf
Sr. Member
****
Offline Offline

Activity: 658
Merit: 450


View Profile
September 05, 2018, 01:11:40 PM
 #8

I think it is totally possible to have a data structure with parallel blocks allowed the only restriction I can imagine is for the blocks not to have competing transactions (different transactions trying to spend same outpoints) or to share a same transaction.

Can you guess how low the probability of 2 independent miner searching for a block with totally different transaction is ?
It doesn't need to be accidental, miners may deliberately choose to partition mempool like in a kind of sharding. Suppose people divide mempool space to odd and even transactions and miners randomly or deliberately choose to include each shard. Now the discovery of an odd block won't invalidate the even blocks under process.

In PoCW I have recently included such possibilities. There miners have a huge opportunity to switch between non-competing blocks.I've not published it yet, tho.
bob123
Hero Member
*****
Offline Offline

Activity: 770
Merit: 748



View Profile WWW
September 05, 2018, 01:12:02 PM
 #9

It doesn't need to be accidental, miners may deliberately choose to partition mempool like in a kind of sharding. Suppose people divide mempool space to odd and even transactions and miners randomly or deliberately choose to include each shard. Now the discovery of an odd block won't invalidate the even blocks under process.

What would be the benefit ?
For the rare cases where two miner find a block at 'the same time' ?

What stops me to create a 'parallel' block to the second block created then ?
I'd get 50 BTC reward, right ? Since it is height 2.

And if, in your theory, that's not possible because the height would be the (real) height (in terms of block order), then you would have a normal blockchain imagining the chain to bend 90°.
With referencing to the previous block, that's then just an illustration. But nothing would change.



What if both parallel chains get a parallel chain? What if the parallel chains of the parallel chains get parallel chains? You might end up with 4 chains, then 8, 16, 32, 64 (offcourse, not all parallel chains have to get parallel chains at the same time, but i hope you see my point).

That's (Block-)chainception.




aliashraf
Sr. Member
****
Offline Offline

Activity: 658
Merit: 450


View Profile
September 05, 2018, 01:21:06 PM
 #10

@mocacinno,
op's question/proposal is kinda thinking out of the box. One shouldn't reply from within the box. Wink

As of your arguments about parallelism leading to tree structure.

1- Tree data structures are not chaotic, they are feasible to be manipulated and traversed by proper api/protocols.

2- No need to go that far. You can imagine a mainchain and a tolerance for auxiliary (and valid) blocks up to a restricted limit with no regeneration capability (no tails).

Just think out of the box.   Wink

aliashraf
Sr. Member
****
Offline Offline

Activity: 658
Merit: 450


View Profile
September 05, 2018, 02:31:06 PM
 #11

It doesn't need to be accidental, miners may deliberately choose to partition mempool like in a kind of sharding. Suppose people divide mempool space to odd and even transactions and miners randomly or deliberately choose to include each shard. Now the discovery of an odd block won't invalidate the even blocks under process.

What would be the benefit ?
For the rare cases where two miner find a block at 'the same time' ?
No. The obvious benefit would be on-chain scaling without escalating orphan rate and jeopardizing security. In PoCW for instance, miners are aware of the work in progress (not a lottery with one winner) and it is very easy to run multiple blocks in parallel. In bitcoin and legacy PoW, it would help with orphan rate once we decide to push the network toward unstable thresholds (large block size/short block time).

I'm just thinking while writing now by the way, for PoW I can imagine the coinbase transaction of auxiliary blocks may be ignored but miners after like 2-3 blocks have been mined have to compensate their rewards (may be partially) for PocW we do it in a more simple and straightforward way that is probably out of the context of this topic.

Quote
What stops me to create a 'parallel' block to the second block created then ?
I'd get 50 BTC reward, right ? Since it is height 2.
Protocol may or may not stop you from appending more blocks to auxiliaries and protocol will decide about rewards.
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1526
Merit: 1342

Use SegWit and enjoy lower fees


View Profile WWW
September 05, 2018, 05:56:26 PM
 #12

With current Bitcoin protocol, nodes will choose chain/block with biggest PoW even though both of the blocks are valid (assuming 2 miners mine a block at similar time), so it's not possible.

But that would be different story if we're talking about Sharding or sidechain which pegged to Bitcoin's blockchain where there's some kind of locking mechanism or prevent double-spend attempt

agor
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
September 06, 2018, 08:32:43 AM
 #13

I suppose, op is asking about a hypothetical improvement and not the current bitcoin. And my answer is yes!

I think it is totally possible to have a data structure with parallel blocks allowed the only restriction I can imagine is for the blocks not to have competing transactions (different transactions trying to spend same outpoints) or to share a same transaction.

Yes, thank you. And thanks to all who answered.
bob123
Hero Member
*****
Offline Offline

Activity: 770
Merit: 748



View Profile WWW
September 06, 2018, 08:42:24 AM
 #14

No. The obvious benefit would be on-chain scaling without escalating orphan rate and jeopardizing security.  [...] , it would help with orphan rate once we decide to push the network toward unstable thresholds (large block size/short block time).

How is this in any way related to scaling ?
The amount of transactions which can be processed within a given timeframe is not increasing with your 'proposal'.

I heavily doubt 'we decide' to increase the blocksize or shorten the block time.
Both values are perfectly fine. Messing with them can lead to a catastrophic event (e.g. keep an eye on BCH once the block start getting half-way full).

Scaling should be optimally done on a second layer.
Epecially messing with the blockchain AND changing blocksize-/time- value is a horrible approach.



Quote
What stops me to create a 'parallel' block to the second block created then ?
I'd get 50 BTC reward, right ? Since it is height 2.
Protocol may or may not stop you from appending more blocks to auxiliaries and protocol will decide about rewards.

I thought this should be an improvement to the protocol. And now 'the protocol' will decide everything ?

How exactly would you handle this problem? If you don't have a solution, it is under no circumstances an acceptable change to the network.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!