Skip to content

Commit

Permalink
Update to tip of cherrypick
Browse files Browse the repository at this point in the history
  • Loading branch information
janus committed Feb 26, 2024
1 parent 9ccb0a0 commit 45c5a31
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_

enum DeploymentPos : uint16_t {
DEPLOYMENT_TESTDUMMY,
DEPLOYMENT_TAPROOT_DISCARDED,
DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342)
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp
MAX_VERSION_BITS_DEPLOYMENTS
Expand Down
4 changes: 0 additions & 4 deletions src/kernel/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ class CMainParams : public CChainParams {
// we would be keeping this information here for now, because blocks contain this version bit
// and on relaxed conditions for window/treshold (that are set for now)
// the blocks would signal that bit=2 unknown rule was activated
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT_DISCARDED].bit = 2;
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT_DISCARDED].nStartTime = 1621589357; // May 21th, 2021
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT_DISCARDED].nTimeout = 1623715200; // June 15th, 2021
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT_DISCARDED].min_activation_height = 66000; // Approximately July 1st, 2021

// Deployment of Taproot (BIPs 340-342)
consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].bit = 2;
Expand Down
1 change: 0 additions & 1 deletion src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,6 @@ UniValue DeploymentInfo(const CBlockIndex* blockindex, const ChainstateManager&
SoftForkDescPushBack(blockindex, softforks, chainman, Consensus::DEPLOYMENT_CSV);
SoftForkDescPushBack(blockindex, softforks, chainman, Consensus::DEPLOYMENT_SEGWIT);
SoftForkDescPushBack(blockindex, softforks, chainman, Consensus::DEPLOYMENT_TESTDUMMY);
SoftForkDescPushBack(blockindex, softforks, chainman, Consensus::DEPLOYMENT_TAPROOT_DISCARDED);
SoftForkDescPushBack(blockindex, softforks, chainman, Consensus::DEPLOYMENT_TAPROOT);
return softforks;
}
Expand Down

2 comments on commit 45c5a31

@wu-emma
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @janus ! Why did you remove DEPLOYMENT_TAPROOT_DISCARDED? It fixes warning message "Unknown new rules activated (versionbit 2)"

@janus
Copy link
Collaborator Author

@janus janus commented on 45c5a31 Mar 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It

Hello, @janus ! Why did you remove DEPLOYMENT_TAPROOT_DISCARDED? It fixes warning message "Unknown new rules activated (versionbit 2)"
It leads to some failures on rpc.

    DEPLOYMENT_TESTDUMMY,
    DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342)
    // NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp
    MAX_VERSION_BITS_DEPLOYMENTS
};```
Here `Max_VERSION_BITS_DEPLOYMENTS` value 2 but with `DEPLOYMENT_TAPROOT_DISCARDED`, it is 3.
2)
```const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = {
    {
        /*.name =*/ "testdummy",
        /*.gbt_force =*/ true,
    },
    {
        /*.name =*/ "taproot",
        /*.gbt_force =*/ true,
    },
};```
The above array has length 2 based on value of MAX_VERSION_BITS_DEPLOYMENTS. However with `DEPLOYMENT_TAPROOT_DISCARDED` it has  3 which leads to the last index being null. This really causes  errors when a check is made to the array.

However, based on what you just said I would figure out however best to update all the affected areas. 
I would like to simulate the failure:  is it from unit test? How could I reproduce it?

Please sign in to comment.