Unknown version bit fork activated warning #16697

issue achow101 openend this issue on August 23, 2019
  1. achow101 commented at 3:40 pm on August 23, 2019: member

    Using some recent build of master, I noticed that both the GUI and and getblockchaininfo is now showing the unknown BIP 9 fork activation warning: Warning: unknown new rules activated (versionbit 1).

    git bisect tells me that this was introduced in #16060 in commit 1c93b9b31c2ab7358f9d55f52dd46340397c906d.

    The warning only shows for the highest activated bit detected. During git bisect, I noticed that it would show versionbit 0 activated after 1c93b9b31c2ab7358f9d55f52dd46340397c906d which then changed to versionbit 1 after 0328dcdcfcb56dc8918697716d7686be048ad0b3. Some modifications to the logging and warnings indicated that both version bits 0 and 1 were being detected as having activated, just that version bit 1 was checked most recently so that is the one that shows up in the warning.

    Looking at the version bits checker, it looks like the issue is caused by having empty ThresholdConditionCaches (since these are not saved to disk) which won’t have the Segwit or CSV fork conditions cached as their conditions were removed. A fix would be to always load the caches with fixed states that have Segwit and CSV activated, but I don’t know how to do that.

  2. MarcoFalke added this to the milestone 0.19.0 on Aug 23, 2019
  3. MarcoFalke added the label Validation on Aug 23, 2019
  4. MarcoFalke added the label Bug on Aug 23, 2019
  5. HashUnlimited commented at 4:32 pm on September 2, 2019: contributor
    I have also noticed that if we don’t have a start condition, we are literally checking each block 29 times - once for each version bit. Looks kind of overkill to me as everything up to present is buried.
  6. HashUnlimited referenced this in commit 78de3574aa on Sep 2, 2019
  7. MarcoFalke commented at 7:45 pm on September 27, 2019: member
    Fixed 6b2210f
  8. MarcoFalke closed this on Sep 27, 2019

  9. ghost commented at 8:56 am on October 31, 2019: none

    After updating from 0.19.0rc1 to 0.19.0rc3 I get this warning in GUI: bildschirmfoto

    in English: “Warning: Unknown new rules activated (Versionbit 0)”

  10. laanwj reopened this on Oct 31, 2019

  11. laanwj commented at 11:25 am on October 31, 2019: member

    On master:

    02019-10-31T11:24:28Z UpdateTip: new best=0000000000000000000afc2cdf3c87ae818d0018ab59d9f718d98849b8b46786 height=601774 version=0x3fffc000 log2_work=91.279951 tx=470182529 date='2019-10-31T10:54:20Z' progress=0.999985 cache=1.7MiB(12822txo) warning='58 of last 100 blocks have unexpected version'
    12019-10-31T11:24:34Z UpdateTip: new best=000000000000000000078bd9e3b48c2faf9012c2d85aed7db69b881742ca24fb height=601775 version=0x3fff0000 log2_work=91.279979 tx=470185550 date='2019-10-31T11:03:35Z' progress=0.999990 cache=3.2MiB(23855txo) warning='59 of last 100 blocks have unexpected version'
    22019-10-31T11:24:39Z UpdateTip: new best=00000000000000000008818bbe9ca05268f8a84999805c3a0ad7c0e3b05238bf height=601776 version=0x20000000 log2_work=91.280007 tx=470188076 date='2019-10-31T11:05:04Z' progress=0.999991 cache=4.3MiB(31397txo) warning='59 of last 100 blocks have unexpected version'
    32019-10-31T11:24:44Z UpdateTip: new best=00000000000000000009ebb8c576751d6af1fdc887035250784eab2a3ca4d9d7 height=601777 version=0x20800000 log2_work=91.280036 tx=470190985 date='2019-10-31T11:07:23Z' progress=0.999992 cache=5.3MiB(39459txo) warning='60 of last 100 blocks have unexpected version'
    

    This is something else than the “Warning: unknown new rules activated (versionbit %i)” warning in the GUI. I’m not seeing that (but probably we’re very close to the threshold and it will trigger for some people, sometimes).

  12. Sjors commented at 11:40 am on October 31, 2019: member

    Actually no, I’m not seeing this warning on v0.19.0rc3 or on master. @wodry can you double check that you’re running the right version in the About screen?

    I do see the 60 of last 100 blocks have unexpected version in the log, but that particular warning was removed from the UI. It’s over-sensitive because if each block signals a different bit it just adds those up.

    The warning in the screen shot was about an actual softfork activation (95% signaling for a long enough period of time). We forgot to take the newly burried SegWit deployment into account. But this was fixed.

  13. laanwj commented at 12:18 pm on October 31, 2019: member

    The warning they’re seeing is:

     0        const CBlockIndex* pindex = pindexNew;
     1        for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) {
     2            WarningBitsConditionChecker checker(bit);
     3            ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]);
     4            if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
     5                const std::string strWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)").translated, bit);
     6                if (state == ThresholdState::ACTIVE) {
     7                    DoWarning(strWarning);
     8                } else {
     9                    AppendWarning(warningMessages, strWarning);
    10                }
    11            }
    12        }
    
  14. ghost commented at 2:35 pm on October 31, 2019: none

    I double checked the version 0.19.0rc3: bildschirmfoto

    debug.log

    02019-10-31T13:37:16Z UpdateTip: new best=000000000000000000136837c0f0fc11c0ed1d46dcb2140fe7836dc525b2f68b height=601794 version=0x20002000 log2_work=91.280515 tx=470228727 date='2019-10-31T13:36:44Z' progress=1.000000 cache=78.9MiB(589007txo) warning='59 der letzten 100 Blöcke haben eine unerwartete Version'
    12019-10-31T13:40:05Z UpdateTip: new best=000000000000000000141a48ee74c31499606daabaa01136fc1780e0e966b175 height=601795 version=0x20000000 log2_work=91.280543 tx=470230091 date='2019-10-31T13:38:34Z' progress=0.999999 cache=79.1MiB(590490txo) warning='58 der letzten 100 Blöcke haben eine unerwartete Version'
    22019-10-31T13:49:57Z UpdateTip: new best=0000000000000000000f70b94f358e7be3c5f083dde531c7e001ec7b812067bc height=601796 version=0x20000000 log2_work=91.280572 tx=470232220 date='2019-10-31T13:49:08Z' progress=1.000000 cache=79.6MiB(594214txo) warning='57 der letzten 100 Blöcke haben eine unerwartete Version'
    32019-10-31T14:00:43Z UpdateTip: new best=0000000000000000000efbd3489fb12055ff48caeecd40cdb000cdf4e211a293 height=601797 version=0x3fff0000 log2_work=91.2806 tx=470234591 date='2019-10-31T14:00:36Z' progress=1.000000 cache=80.2MiB(599152txo) warning='57 der letzten 100 Blöcke haben eine unerwartete Version'
    42019-10-31T14:01:08Z UpdateTip: new best=0000000000000000000e3fd8d5559eccf8908c6ec2cf76523ff2852aa108cb87 height=601798 version=0x20000000 log2_work=91.280628 tx=470236221 date='2019-10-31T14:00:59Z' progress=1.000000 cache=80.3MiB(600073txo) warning='56 der letzten 100 Blöcke haben eine unerwartete Version'
    

    “unerwartete Version” = “unexpected version”

  15. MarcoFalke commented at 4:12 pm on October 31, 2019: member

    The “n out of 100” check is different from the versionbits check.

    How can it be that this was confirmed to be fixed in fdb3e8f8b27e3b0b2f88c32915975c6e4c299b1e and then regressed?

  16. Sjors commented at 5:25 pm on October 31, 2019: member
    Strange indeed. I’m not seeing it on macOS 10.15 (this has been running for hours):
  17. ghost commented at 6:48 pm on October 31, 2019: none
    Maybe I have uncommon peers? I am running with onlynet=onion, 10 outbound connections, 4 inbound, currently, eleven peers claim to be 0.18.{0|1|99}
  18. laanwj commented at 10:47 am on November 1, 2019: member
    It’s based on the last N blocks, not on the peers. Unless they were able to feed you a completely different chain. Although -noonion isolates your node, in a sense, that would be a scary thought.
  19. ghost commented at 8:53 am on November 2, 2019: none

    I have corrected my OP, the warning appeared after upgrading from 0.19.0rc1 (not 2) to 0.19.0rc3. (it seems that I had skipped rc2)

    I tested if I could reproduce that, so I stopped rc3 (warning was there since several days uptime), downgraded to rc1, started, let it run for 30 min, there was no warning in GUI.

    Then I stopped rc1, upgraded again to rc3, started, and after 10 hours uptime with rc3, I did not see the warning in GUI again.

  20. laanwj commented at 10:29 am on November 2, 2019: member
    rc2 and rc3 were the same apart from a version bump, so that’s ok :smile:
  21. laanwj removed this from the milestone 0.19.0 on Nov 10, 2019
  22. MarcoFalke added this to the milestone 0.19.1 on Nov 12, 2019
  23. MarcoFalke commented at 3:35 am on November 12, 2019: member
    The consensus params are read from uninitialized memory. See #17448. So this warning might randomly appear or not appear.
  24. MarcoFalke commented at 3:39 am on November 12, 2019: member
    We should probably not ship 0.19.0 with this bug
  25. MarcoFalke commented at 4:35 pm on February 10, 2020: member
    Backported to 0.19 in 6ec0dc1
  26. MarcoFalke closed this on Feb 10, 2020

  27. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me