BTCfork / bitcoinfork-collaborative-spec

Proposed requirements and design for Minimum Viable Hard Fork implementations
Other
1 stars 4 forks source link

Clarify and fix the SegWit trigger condition #2

Closed ftrader closed 8 years ago

ftrader commented 8 years ago

USER-REQ-2 seems wrong in its 75% percentage. This figure was based on my misunderstanding that Core's SegWit implementation might emit SW-specific data (in particular, allow mining of SW-affected blocks) before the 95% transition to ACTIVE.

I opened a Reddit thread to request input [1], and feedback, which strongly suggests that the 95% threshold is definitive. However, the Core SegWit code (release candidate) needs to be examined to ensure this is correct, and that the STARTED state does not lead to any SW transactions being included in blocks, which would then require carrying forward the SW consensus rule code in a fork client, or forking at some point in the past where SW data hadn't been included in blocks.

This requirements issue affects all current branches of this repo (core, xt, classic and unlimited).

[1] https://www.reddit.com/r/btc/comments/5229ya/correctly_understanding_segwit_activation_in/

ftrader commented 8 years ago

PRs 7,8,9,10 (core, xt, classic, unlimited): Adjusted the percentage to 95%, and added a note that this depends on final SW release code BIP9 conformity, and that USER-REQ-2 may need to be adjusted if Core implementation deviates from BIP9 conformity (esp. if it were to allow SW transaction emission/relay and subsequent mining of SW tx's prior to BIP9's 95% activation threshold).

Keeping this issue open until certainty is reached.

ftrader commented 8 years ago

Core dev suggesting start time of 1479168000 here: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-October/013226.html Some other Core devs agree, but the matter seems unfinalized yet. Matt Corallo proposing that BIP9 parameter changes could be discussed:

SegWit soonest activation time proposed, community feedback if we want to switch from BIP 9 defaults

https://twitter.com/TheBlueMatt/status/787713423371079680

It seems that by the time the start time is agreed on, it might need to be changed again if they want to keep it 1 month ahead as suggested in BIP9.

ftrader commented 8 years ago

Core has merged https://github.com/bitcoin/bitcoin/pull/8937 which finalizes the start time and timeout for SegWit:

For Bitcoin mainnet, the BIP9 starttime will be midnight 15 november 2016 UTC (Epoch timestamp 1479168000) and BIP9 timeout will be midnight 15 november 2017 UTC (Epoch timestamp 1510704000).

This has been reflected in and resolved by merge of https://github.com/BTCfork/bitcoinfork-collaborative-spec/pull/37