Taproot test use the argument -vbparams , but other test like SegwWit use -testactivationheight, what is the use of each one and the difference for using one or the other?

class WalletTaprootTest(BitcoinTestFramework):
    """Test generation and spending of P2TR address outputs."""

    def set_test_params(self):
        self.num_nodes = 3
        self.setup_clean_chain = True
        self.extra_args = [['-keypool=100'], ['-keypool=100'], ["-vbparams=taproot:1:1"]]
        self.supports_cli = False
class SegWitTest(BitcoinTestFramework):
    def set_test_params(self):
        self.setup_clean_chain = True
        self.num_nodes = 3
        # This test tests SegWit both pre and post-activation, so use the normal BIP9 activation.
        self.extra_args = [

1 Answer 1


-testactivationheight is defined here.

argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (segwit, bip34, dersig, cltv, csv). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);

-vbparams is defined here.

argsman.AddArg("-vbparams=deployment:start:end[:min_activation_height]", "Use given start/end times and min_activation_height for specified version bits deployment (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);

-testactivationheight is setting the name (segwit, bip34, dersig, cltv, csv) of the soft fork and the activation height (on regtest) for each soft fork. It is not testing the deployment of a particular soft fork (miner signaling etc, how a soft fork can get activated), just the block heights at which soft forks activate.

-vbparams is setting the start, end and min_activation_height of a deployment (on regtest). It is testing the deployment of a particular soft fork rather than just setting the activation height for various soft forks.

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.