Is the following scenario valid?

  1. Some unhonest segwit mining pool takes top-1000 segwit utxo and mines a block at height N with a transaction which transfers all funds to his p2pkh address
  2. This block does not have segwit data portion, but it can be broadcasted to all non-segwit nodes on the network
  3. All other pools have a dilema - wait the segwit data associated with this block or start mining block N+1 on the top of N
  4. What if miners will use SPV-mining on the top of this block? They will create blocks at heights N+1, N+2... etc without checking the segwit-validity of block N

Also asked here: https://bitcointalk.org/index.php?topic=1434842.0

1 Answer 1

  1. Yes, they can do that.

  2. Correct, though the switchover requires a 95% threshold to make the chance that old nodes see confirmations on such blocks very small.

  3. Segwit nodes never accept blocks that have a witness commitment but no witness section. Either the block must not have a commitment (in which case it will be invalid, as script validation fails), or it is outright not accepted (because there is missing data; similar to a block with missing transactions isn't accepted).

  4. Miners that don't validate a block before mining on top of it violate the security assumptions of the network. We can't prevent them from doing so (with or without segwit), but that is one of the reasons why block propagation and block validation needs to be low-latency: so that the potential advantage miners get from SPV mining is not too significant.

  • Why are there any requirements in step (2)? There is a valid PoW block at height N with valid transactions came from 0.9.x node which known nothing about segwit. And a valid block at height (N+1) with segwit-data. What block height will you start to mine? N or (N+1) or (N+2)?
    – amaclin
    Apr 13, 2016 at 14:52
  • 1
    Segwit transactions are non-standard to old versions very far back. A 0.9 node will never mine them unless they're modified to do so. Apr 13, 2016 at 22:03
  • We are talking about transactions in block. v0.9.x will accept such block without segwit data, check it and relay to all peers. segwit transactions are quite correct in bitcoin block for such clients
    – amaclin
    Apr 13, 2016 at 22:18
  • 0.9.x won't create blocks with segwit transactions, but yes, it will accept, so your point (2) is correct. However, mining such an invalid block will only happen intentionally, and is costly. Furthermore, because the rule only activates after 95% support, a chain not building on top will grow 20x faster, so confirmations on top are very unlikely. Apr 14, 2016 at 11:35
  • 1
    [quote]However, mining such an invalid block will only happen intentionally, and is costly [/quote] 12.5+ btc - is not a big cost. I will pay these funds to a mining pool for creating a valid block with my content, broadcasting "standard" part to a network and withholding segwit part of it. just for fun :)
    – amaclin
    Apr 14, 2016 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.