Post
Topic
Board Development & Technical Discussion
Merits 6 from 1 user
Re: just out of curiousity, why would segwit impact asicboost
by
achow101
on 06/04/2017, 18:55:11 UTC
⭐ Merited by ETFbitcoin (6)
The covert method of asicboost requires calculating multiple merkle roots which have a collision in the last 4 bytes of the merkle root. The merkle root is the root node of a tree structure. The left subtree contains the coinbase transaction, and the right subtree contains just a bunch of transactions. A fairly efficient way of calculating merkle roots which collide in the last 4 bytes is to calculate a lot of candidates for the hash of the left subtree and a lot of candidates for the right subtree and just try every single possible combination of left subtree hashed with right subtree. Any combination of left subtree hash and right subtree hash would work since they are not dependent on each other.

But, with segwit, the left subtree becomes dependent on the right subtree, which makes this optimization completely useless as then you can't make a list of left subtree hashes and right subtree hashes and just try all combinations. This is due to the witness root hash which must be included in the coinbase transaction. This witness root hash is basically the merkle root but with the txwitness field. It also depends on the order of the transactions, so changing the right subtree of the merkle root will also end up changing the witness root hash, which will change the coinbase transaction in the left subtree and change the left subtree's hash and thus the left subtree is dependent on the right subtree.