Bitcoin Forum
September 12, 2025, 08:41:33 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: "warning: unknown rules activated (versionbit 1)"  (Read 65 times)
takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 760
Merit: 645


View Profile
September 07, 2025, 04:57:53 PM
Merited by stwenhao (1)
 #1

I installed the new bitcoin-29.1.knots20250903 release. Checksum and gpg verified. I freaked out when it said "warning: unknown rules activated (versionbit 1)". I launched it on testnet3 mode. I closed it, reopened it and now it doesn't say that. What happened there?
stwenhao
Hero Member
*****
Offline Offline

Activity: 487
Merit: 938


View Profile
September 07, 2025, 06:30:32 PM
 #2

It is normal. Welcome to testnet, where strange things can happen at any time.

Here, people test things, which they wouldn't try in mainnet. Which means for example pretending, that some kind of new soft-fork is activated. Because miners can produce any blocks they want, then they can signal support for some soft-forks, without even announcing them. So, if someone will set some special bits in the block header version, then you will get a message like that.

Also, you can see more strange things, for example blockstorms: https://blog.lopp.net/griefing-bitcoin-testnet/

It is all expected. There are many different test networks. In testnet3 and testnet4, everyone can become a miner, and if you are lucky, then you can even mine a block on a CPU, it is all about being the fastest one to broadcast it to the rest of the network. If you want more stable environment, then try signet. In testnets, prepare for a rollercoaster, especially in testnet3, where blockstorms can happen every 2016 blocks, which is why you can see block numbers like 4658296 (which is also why testnet4 was created, to fix that bug; while also making new ones).

Proof of Work puzzle in mainnet and testnet4.
takuma sato (OP)
Hero Member
*****
Offline Offline

Activity: 760
Merit: 645


View Profile
September 07, 2025, 07:06:25 PM
Merited by stwenhao (1)
 #3

It is normal. Welcome to testnet, where strange things can happen at any time.

Here, people test things, which they wouldn't try in mainnet. Which means for example pretending, that some kind of new soft-fork is activated. Because miners can produce any blocks they want, then they can signal support for some soft-forks, without even announcing them. So, if someone will set some special bits in the block header version, then you will get a message like that.

Also, you can see more strange things, for example blockstorms: https://blog.lopp.net/griefing-bitcoin-testnet/

It is all expected. There are many different test networks. In testnet3 and testnet4, everyone can become a miner, and if you are lucky, then you can even mine a block on a CPU, it is all about being the fastest one to broadcast it to the rest of the network. If you want more stable environment, then try signet. In testnets, prepare for a rollercoaster, especially in testnet3, where blockstorms can happen every 2016 blocks, which is why you can see block numbers like 4658296 (which is also why testnet4 was created, to fix that bug; while also making new ones).

Oh so it's something specific to testnet. Well the thing is, the exact warning is:

"WARNING: Unknown new rules activated (versionbit 1): this software is not secure"

It was the "this software is not secure" that would freak people out. It makes it sound as it's something wrong with the actual Bitcoin software node, but if it's just the testnet thing then I guess I will not worry. I wonder if they could make these errors more specific.
stwenhao
Hero Member
*****
Offline Offline

Activity: 487
Merit: 938


View Profile
September 08, 2025, 03:33:51 AM
Merited by vapourminer (10)
 #4

Quote
It was the "this software is not secure" that would freak people out.
Imagine that you have pre-Segwit node, and that Segwit is suddenly activated. Or that you have pre-Taproot node, and Taproot is activated. If you have some old node, executing only old rules, then there may be some coins, which will move, and your node will have no idea, how to check them.

When new soft-forks are activated, miners are setting specific bits in block header versions, so that everyone knows, that the new BIP is going to activate, and that miners are ready to execute new rules. And then, old users can get a message, like "please upgrade". But in testnets, miners can mine any blocks. Sometimes, some people simply think: "Block version? Let's put whatever, nobody cares about it". And because it doesn't make the block "invalid", then they check all values, without masking it. And then, sometimes your node can check these headers, and interpret it as "oh, so new soft-fork is in progress, I should display the warning". And that's how you get it.

Quote
I wonder if they could make these errors more specific.
Not really, because these things are needed for mainnet. And because miners can trigger any warning, then in testnets, you can see all kinds of warnings, that are possible. If one day, someone will implement a warning, that "SHA-256 is broken, please upgrade", or "ECDSA is broken, please send coins to quantum-safe addresses", then don't be surprised, if you see such things in testnet, even if everything will be still safe.

Also, in the very old versions, there was an alert system. And then, by knowing a specific private key, it was possible to display literally any message in all clients, if you were a developer. It is now disabled, with the famous "alert key compromised" message. But in this frame, any scary text can be displayed, especially in testnet. For example: https://en.bitcoin.it/wiki/File:Prefinal_alert.png

So, if you want to know exactly, why a given text is displayed, then you should simply save a given text (for example by making a screenshot), and locate it in the source code of your client. Then, I guess you will find it nearby block header version, transaction version, or in a similar place, where it can be triggered.

Edit: https://github.com/bitcoinknots/bitcoin/blob/29.x-knots/src/validation.cpp#L3303
Code:
    std::vector<bilingual_str> warning_messages;
    if (!m_chainman.IsInitialBlockDownload()) {
        const CBlockIndex* pindex = pindexNew;
        for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) {
            WarningBitsConditionChecker checker(m_chainman, bit);
            ThresholdState state = checker.GetStateFor(pindex, m_chainman.GetConsensus(), m_chainman.m_warningcache.at(bit));
            if (state == ThresholdState::ACTIVE || state == ThresholdState::LOCKED_IN) {
                const bilingual_str warning = strprintf(_("WARNING: Unknown new rules activated (versionbit %i) - this software is not secure"), bit);
                m_chainman.GetNotifications().warningSet(kernel::Warning::UNKNOWN_NEW_RULES_ACTIVATED, warning);
                warning_messages.push_back(warning);
            }
        }
See? It is just about the bits in the block header version. Bitcoin Core has a little bit different warnings than Knots, so this exact text is specific to this client. If it is too scary, then you should complain to them, or simply change it in your version.

Proof of Work puzzle in mainnet and testnet4.
pooya87
Legendary
*
Offline Offline

Activity: 3934
Merit: 11910



View Profile
September 08, 2025, 05:14:00 AM
Merited by stwenhao (1)
 #5

I don't think it is a testnet specific warning, the same warning should technically be printed if you use mainnet as well since as it can be seen from mainnet blocks that are being mined[1], the miners are using the version field in their "mining loop" as an extra nonce.

This works and is perfectly valid according to consensus rules because in bitcoin we only verify that the block has at least a certain version (eg. version >=2) and anything above that is valid. IIRC the min block version is 4 currently.
But it is a bad practice because according to BIP-9 the version field is used to signal for soft forks which is why the warning is shown to the user whenever the client faces a version that is higher than it expects it to be (it assumes there is a new version out with new rules that you haven't upgraded to).

[1] https://blockchair.com/bitcoin/blocks#f=id,version,version_hex,version_bits
[2] https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki

stwenhao
Hero Member
*****
Offline Offline

Activity: 487
Merit: 938


View Profile
September 08, 2025, 06:01:43 AM
 #6

Quote
the same warning should technically be printed if you use mainnet as well
Sure. But it is easier to trigger it on testnet, where blocks can be mined even on CPUs, than convince major mainnet pools to do that.

Quote
But it is a bad practice
Testnet is for testing edge cases, that people wouldn't try on mainnet (for example testing DoS scenarios, flooding the network, and doing other dangerous things). It is normal to see soft-fork signalling, because some people may want to test just that, and others may simply use all version bits, without thinking too much about the consequences.

Proof of Work puzzle in mainnet and testnet4.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!