Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
0f4732f
Use TAPROOT_CONTROL_MAX_NODE_COUNT_REDUCED for non-consensus Taproot …
luke-jr Oct 3, 2025
d6ae3ba
Policy: Enforce SCRIPT_VERIFY_REDUCED_DATA as a policy rule
luke-jr Oct 4, 2025
7c39d48
script: Define SCRIPT_VERIFY_REDUCED_DATA verification flag (unused) …
luke-jr Oct 6, 2025
c219005
script: Limit Taproot annex to 256 bytes for SCRIPT_VERIFY_REDUCED_DA…
luke-jr Oct 3, 2025
9ca76a7
script: Forbid Taproot annex entirely with SCRIPT_VERIFY_REDUCED_DATA…
luke-jr Oct 3, 2025
3a52dae
script: Forbid OP_IF in Tapscript with SCRIPT_VERIFY_REDUCED_DATA (st…
luke-jr Oct 3, 2025
764ac86
script: Limit Taproot control block to 257 bytes for SCRIPT_VERIFY_RE…
luke-jr Oct 3, 2025
73ac590
consensus: Enforce SCRIPT_VERIFY_REDUCED_DATA if DEPLOYMENT_REDUCED_D…
luke-jr Oct 4, 2025
b613f26
Limit datacarriersize config to MAX_OUTPUT_DATA_SIZE (=83 B)
luke-jr Oct 4, 2025
c84327f
consensus: Add no-op flags to CheckTxInputs function
luke-jr Oct 3, 2025
5c9887b
consensus: Define CheckTxInputsRules::OutputSizeLimit flag (unused) t…
luke-jr Oct 7, 2025
6dd9cf3
consensus: When CheckTxInputsRules::OutputSizeLimit is enforced (stil…
luke-jr Oct 7, 2025
a12208d
QA: rpc_getdescriptoractivity: Use RAW_OP_TRUE for test_no_address
luke-jr Oct 7, 2025
b0b4f61
QA: test_framework/wallet: Turn MiniWalletMode.RAW_P2PK into actually…
luke-jr Oct 7, 2025
595c9e3
RPC/Mempool: Provide tx memory usage in testmempoolaccept
luke-jr Oct 8, 2025
3a1ac98
QA: test_framework/mempool_util: Calibrate fill_mempool bulk tx size …
luke-jr Oct 8, 2025
3f4a6d7
Bugfix: QA: mempool_limit: Use "usage" rather than "bytes"
luke-jr Oct 8, 2025
953c148
QA: test_framework: Use multiple OP_RETURNs to pad transactions rathe…
luke-jr Oct 7, 2025
79fcad8
consensus: Enforce CheckTxInputsRules::OutputSizeLimit when DEPLOYMEN…
luke-jr Oct 4, 2025
837f06f
consensus: Enforce SCRIPT_VERIFY_DISCOURAGE_{UPGRADABLE_WITNESS_PROGR…
luke-jr Oct 4, 2025
a02cf6d
Define a service bit for BIP148
luke-jr May 31, 2017
62dd5aa
Add questionmark to end of BIP148 service bit string, and add to bitc…
luke-jr Oct 20, 2025
4145d00
Preferentially peer with nodes enforcing BIP148 to avoid partitioning…
luke-jr May 31, 2017
b02c29d
Append UA string with UASF-ReducedData:0.1/
luke-jr Oct 20, 2025
5f769d3
tests: fix feature_cltv, feature_dersig, mempool_accept, and mempool_…
moneybadger1 Nov 1, 2025
496cd2b
tests: fix BIP148 service bit
moneybadger1 Nov 1, 2025
a22746b
test: Adapt functional tests to MAX_OUTPUT_SCRIPT_SIZE=34 consensus l…
3c853b6299 Nov 1, 2025
cc893d5
test: adapt 6 tests to NODE_BIP148 service flag; add assert_equal_wit…
3c853b6299 Nov 2, 2025
fc67ebf
Fix p2p_1p1c_network test by using dynamic feerates based on mempool …
dathonohm Nov 2, 2025
5373dac
Fix p2p_addrv2_relay test to handle BIP148 service bit CompactSize en…
dathonohm Nov 3, 2025
59af784
Fix addpeeraddress RPC to include NODE_BIP148 service flag
dathonohm Nov 3, 2025
871bd66
Refactor: Include all reduced_data verify flags in REDUCED_DATA_MANDA…
luke-jr Nov 3, 2025
46d609b
validation: Extend CheckInputScripts to allow overriding script valid…
luke-jr Nov 3, 2025
67d307e
validation: Exempt inputs spending UTXOs prior to ReducedDataHeightBe…
luke-jr Nov 3, 2025
77d0efd
Add expiry support to versionbit deployments
dathonohm Nov 18, 2025
46aed56
Add max_activation_height for mandatory BIP9 activation
dathonohm Nov 18, 2025
2155164
Add DEPLOYMENT_REDUCED_DATA as temporary BIP9 UASF
dathonohm Nov 19, 2025
eb7d617
Support regtest vbparams for max_activation_height and active_duration
dathonohm Nov 19, 2025
e2034a9
Add mandatory signaling enforcement for max_activation_height
dathonohm Nov 19, 2025
e002ee4
Rename BIP148 service bit to BIP444
luke-jr Nov 3, 2025
af2ecaa
clientversion: Rename fork to UASF-BIP444
luke-jr Nov 3, 2025
a2a3d80
test: implement functional tests for UASF-ReducedData Spec
3c853b6299 Nov 5, 2025
47fe1fc
test: Add UTXO height-based REDUCED_DATA enforcement test
dathonohm Nov 7, 2025
83f36df
test: Update tests for REDUCED_DATA consensus limits
dathonohm Nov 7, 2025
6f84587
test: Replace thresh() with and_v() in descriptor test
dathonohm Nov 7, 2025
fc0d8c7
test: Add NODE_BIP444 service flag to peer connection tests
dathonohm Nov 7, 2025
13187de
Change all BIP444 references to UASF-ReducedData
dathonohm Nov 9, 2025
88904be
Add mainnet configuration for REDUCED_DATA deployment
dathonohm Nov 20, 2025
ed83b72
Remove UASF uacomment for mainline Core
dathonohm Nov 21, 2025
671c841
test: Fix fuzz for miniscript.cpp
Retropex Dec 14, 2025
56a5f97
test: change permission and remove some f-string in logs
Retropex Dec 15, 2025
bc5c160
test: use the correct flag for ignore_rejects in feature_uasf_reduced…
Retropex Dec 15, 2025
19ed3ef
test: Add retry logic to mempool_limit for i686 race condition
dathonohm Dec 22, 2025
43465ff
ci: Disable DEBUG=1 for depends in CentOS job to avoid deadlock
dathonohm Dec 23, 2025
8bfd8a6
Fix false unknown deployment warning for Taproot on mainnet
dathonohm Dec 23, 2025
ef73ad5
Add per-deployment BIP9 threshold; restore global to 90%, set reduced…
dathonohm Dec 29, 2025
1eee4b1
Support regtest vbparams for per-deployment threshold
dathonohm Dec 29, 2025
535e819
add BIP-110 DNS seeds
v72t Feb 15, 2026
c2e0db8
net: ask DNS seed for x8000009
Retropex Dec 31, 2025
bcd309d
net: allow up to 2 non-BIP110 outbound peers
dathonohm Jan 13, 2026
cc8bd4c
test: add two-node chain split and reorg tests for temporary deployment
dathonohm Jan 14, 2026
dfcd0cd
consensus: apply output size limit to generation transactions
dathonohm Jan 14, 2026
bf2db06
test: add versionbits unit tests for max_activation_height and active…
dathonohm Jan 27, 2026
9a58b4b
script: require empty witness for P2A spends
dathonohm Feb 12, 2026
eeaec45
chainparams: enable BIP-110 deployment on testnet4
dathonohm Feb 7, 2026
b362f0b
Bugfix: validation: Do not cache the result of CheckInputScripts if f…
luke-jr Feb 13, 2026
2f7f940
test: add unit and functional tests for CheckInputScripts cache-poiso…
dathonohm Feb 13, 2026
1f9d779
Add BIP-110 branding and version string for standalone UASF client
dathonohm Feb 12, 2026
06795da
test: fix feature_uacomment for BIP-110 subversion suffix
dathonohm Feb 27, 2026
768f455
test: fix feature_includeconf for BIP-110 subversion suffix
dathonohm Feb 27, 2026
a898128
test: strip trailing ? from service flag names in rpc_net
dathonohm Feb 27, 2026
7ec1c6f
test: remove Knots-only ignore_rejects from MiniWallet, use acceptnon…
dathonohm Feb 27, 2026
76bca83
test: remove ignore_rejects bypass test (Knots-only RPC feature)
dathonohm Feb 27, 2026
2e3ee14
test: fix mempool_sigoplimit standardness check for BIP-110 datacarri…
dathonohm Feb 27, 2026
cae7413
test: fix FormatSubVersion test for BIP-110 subversion suffix
dathonohm Feb 27, 2026
dc039e0
test: use P2PKH outputs in txvalidationcache to comply with BIP-110 o…
dathonohm Feb 27, 2026
9c7c7d7
test: use P2PKH outputs in wallet_tests to comply with BIP-110 output…
dathonohm Feb 27, 2026
7010c05
fix linter
v72t Mar 2, 2026
6ba0313
depends: libevent: Patch to ignore git describe
luke-jr Feb 13, 2026
2be010a
test: mark tapscript/pushmaxlimit as non-standard for BIP-110 reduced…
dathonohm Mar 5, 2026
77564fd
correct UASF version
v72t Mar 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/test/00_setup_env_native_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ export CONTAINER_NAME=ci_native_centos
export CI_IMAGE_NAME_TAG="quay.io/centos/centos:stream10"
export CI_BASE_PACKAGES="gcc-c++ glibc-devel libstdc++-devel ccache make git python3 python3-pip which patch xz procps-ng rsync coreutils bison e2fsprogs cmake dash"
export PIP_PACKAGES="pyzmq"
export DEP_OPTS="DEBUG=1" # Temporarily enable a DEBUG=1 build to check for GCC-bug-117966 regressions. This can be removed once the minimum GCC version is bumped to 12 in the previous releases task, see https://github.com/bitcoin/bitcoin/issues/31436#issuecomment-2530717875
export GOAL="install"
export BITCOIN_CONFIG="-DWITH_ZMQ=ON -DBUILD_GUI=ON -DREDUCE_EXPORTS=ON -DCMAKE_BUILD_TYPE=Debug"
2 changes: 2 additions & 0 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $(package)_download_path=https://github.com/libevent/libevent/releases/download/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb
$(package)_patches=cmake_fixups.patch
$(package)_patches += ignore_git_describe.patch
$(package)_patches += netbsd_fixup.patch
$(package)_patches += winver_fixup.patch
$(package)_build_subdir=build
Expand All @@ -26,6 +27,7 @@ endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/cmake_fixups.patch && \
patch -p1 < $($(package)_patch_dir)/ignore_git_describe.patch && \
patch -p1 < $($(package)_patch_dir)/netbsd_fixup.patch && \
patch -p1 < $($(package)_patch_dir)/winver_fixup.patch
endef
Expand Down
11 changes: 11 additions & 0 deletions depends/patches/libevent/ignore_git_describe.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/cmake/VersionViaGit.cmake
+++ b/cmake/VersionViaGit.cmake
@@ -28,7 +28,7 @@ macro(event_fuzzy_version_from_git)

find_package(Git)

- if (GIT_FOUND)
+ if (0)
execute_process(
COMMAND
${GIT_EXECUTABLE} describe --abbrev=0 --always
3 changes: 2 additions & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
std::string str;
for (size_t i = 0; i < services.size(); ++i) {
const std::string s{services[i].get_str()};
str += s == "NETWORK_LIMITED" ? 'l' : s == "P2P_V2" ? '2' : ToLower(s[0]);
str += s == "NETWORK_LIMITED" ? 'l' : s == "P2P_V2" ? '2' : s == "UASF_REDUCED_DATA?" ? '4' : ToLower(s[0]);
}
return str;
}
Expand Down Expand Up @@ -713,6 +713,7 @@ class NetinfoRequestHandler : public BaseRequestHandler
" \"c\" - COMPACT_FILTERS: peer can handle basic block filter requests (see BIPs 157 and 158)\n"
" \"l\" - NETWORK_LIMITED: peer limited to serving only the last 288 blocks (~2 days)\n"
" \"2\" - P2P_V2: peer supports version 2 P2P transport protocol, as defined in BIP 324\n"
" \"4\" - UASF_REDUCED_DATA? peer enforces the ReducedData User-Activated SoftFork\n"
" \"u\" - UNKNOWN: unrecognized bit flag\n"
" v Version of transport protocol used for the connection\n"
" mping Minimum observed ping time, in milliseconds (ms)\n"
Expand Down
25 changes: 22 additions & 3 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ void ReadRegTestArgs(const ArgsManager& args, CChainParams::RegTestOptions& opti

for (const std::string& strDeployment : args.GetArgs("-vbparams")) {
std::vector<std::string> vDeploymentParams = SplitString(strDeployment, ':');
if (vDeploymentParams.size() < 3 || 4 < vDeploymentParams.size()) {
throw std::runtime_error("Version bits parameters malformed, expecting deployment:start:end[:min_activation_height]");
if (vDeploymentParams.size() < 3 || 7 < vDeploymentParams.size()) {
throw std::runtime_error("Version bits parameters malformed, expecting deployment:start:end[:min_activation_height[:max_activation_height[:active_duration[:threshold]]]]");
}
CChainParams::VersionBitsParameters vbparams{};
if (!ParseInt64(vDeploymentParams[1], &vbparams.start_time)) {
Expand All @@ -85,12 +85,31 @@ void ReadRegTestArgs(const ArgsManager& args, CChainParams::RegTestOptions& opti
} else {
vbparams.min_activation_height = 0;
}
if (vDeploymentParams.size() >= 5) {
if (!ParseInt32(vDeploymentParams[4], &vbparams.max_activation_height)) {
throw std::runtime_error(strprintf("Invalid max_activation_height (%s)", vDeploymentParams[4]));
}
}
if (vDeploymentParams.size() >= 6) {
if (!ParseInt32(vDeploymentParams[5], &vbparams.active_duration)) {
throw std::runtime_error(strprintf("Invalid active_duration (%s)", vDeploymentParams[5]));
}
}
if (vDeploymentParams.size() >= 7) {
if (!ParseInt32(vDeploymentParams[6], &vbparams.threshold)) {
throw std::runtime_error(strprintf("Invalid threshold (%s)", vDeploymentParams[6]));
}
}
// Validate that timeout and max_activation_height are mutually exclusive
if (vbparams.timeout != Consensus::BIP9Deployment::NO_TIMEOUT && vbparams.max_activation_height < std::numeric_limits<int>::max()) {
throw std::runtime_error(strprintf("Cannot specify both timeout (%ld) and max_activation_height (%d) for deployment %s. Use timeout for BIP9 or max_activation_height for UASF, not both.", vbparams.timeout, vbparams.max_activation_height, vDeploymentParams[0]));
}
bool found = false;
for (int j=0; j < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) {
if (vDeploymentParams[0] == VersionBitsDeploymentInfo[j].name) {
options.version_bits_parameters[Consensus::DeploymentPos(j)] = vbparams;
found = true;
LogPrintf("Setting version bits activation parameters for %s to start=%ld, timeout=%ld, min_activation_height=%d\n", vDeploymentParams[0], vbparams.start_time, vbparams.timeout, vbparams.min_activation_height);
LogPrintf("Setting version bits activation parameters for %s to start=%ld, timeout=%ld, min_activation_height=%d, max_activation_height=%d, active_duration=%d, threshold=%d\n", vDeploymentParams[0], vbparams.start_time, vbparams.timeout, vbparams.min_activation_height, vbparams.max_activation_height, vbparams.active_duration, vbparams.threshold);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
{
std::string comments_str;
if (!comments.empty()) comments_str = strprintf("(%s)", Join(comments, "; "));
return strprintf("/%s:%s%s/", name, FormatVersion(nClientVersion), comments_str);
return strprintf("/%s:%s%s/%s/", name, FormatVersion(nClientVersion), comments_str, "UASF-BIP110:0.3");
}

std::string CopyrightHolders(const std::string& strPrefix)
Expand Down
3 changes: 3 additions & 0 deletions src/consensus/consensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0);
*/
static constexpr int64_t MAX_TIMEWARP = 600;

static constexpr unsigned int MAX_OUTPUT_SCRIPT_SIZE{34};
static constexpr unsigned int MAX_OUTPUT_DATA_SIZE{83};

#endif // BITCOIN_CONSENSUS_CONSENSUS_H
11 changes: 11 additions & 0 deletions src/consensus/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_
enum DeploymentPos : uint16_t {
DEPLOYMENT_TESTDUMMY,
DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342)
DEPLOYMENT_REDUCED_DATA, // Temporary deployment of UASF-ReducedData
// NOTE: Also add new deployments to VersionBitsDeploymentInfo in deploymentinfo.cpp
MAX_VERSION_BITS_DEPLOYMENTS
};
Expand All @@ -52,6 +53,16 @@ struct BIP9Deployment {
* boundary.
*/
int min_activation_height{0};
/** Maximum height for activation. If less than INT_MAX, the deployment will activate
* at this height regardless of signaling (similar to BIP8 flag day).
* std::numeric_limits<int>::max() means no maximum (activation only via signaling). */
int max_activation_height{std::numeric_limits<int>::max()};
/** For temporary softforks: number of blocks the deployment remains active after activation.
* std::numeric_limits<int>::max() means permanent (never expires). */
int active_duration{std::numeric_limits<int>::max()};
/** Per-deployment activation threshold. If 0, uses the global nRuleChangeActivationThreshold.
* Otherwise, specifies the number of blocks required for this specific deployment. */
int threshold{0};

/** Constant for nTimeout very far in the future. */
static constexpr int64_t NO_TIMEOUT = std::numeric_limits<int64_t>::max();
Expand Down
18 changes: 17 additions & 1 deletion src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,30 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
return nSigOps;
}

bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee)
bool Consensus::CheckOutputSizes(const CTransaction& tx, TxValidationState& state)
{
for (const auto& txout : tx.vout) {
if (txout.scriptPubKey.empty()) continue;
if (txout.scriptPubKey.size() > ((txout.scriptPubKey[0] == OP_RETURN) ? MAX_OUTPUT_DATA_SIZE : MAX_OUTPUT_SCRIPT_SIZE)) {
return state.Invalid(TxValidationResult::TX_PREMATURE_SPEND, "bad-txns-vout-script-toolarge");
}
}
return true;
}

bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee, const CheckTxInputsRules rules)
{
// are the actual inputs available?
if (!inputs.HaveInputs(tx)) {
return state.Invalid(TxValidationResult::TX_MISSING_INPUTS, "bad-txns-inputs-missingorspent",
strprintf("%s: inputs missing/spent", __func__));
}

// NOTE: CheckTransaction is arguably the more logical place to do this, but it's context-independent, so this is probably the next best place for now
if (rules.test(CheckTxInputsRules::OutputSizeLimit) && !CheckOutputSizes(tx, state)) {
return false;
}

CAmount nValueIn = 0;
for (unsigned int i = 0; i < tx.vin.size(); ++i) {
const COutPoint &prevout = tx.vin[i].prevout;
Expand Down
33 changes: 32 additions & 1 deletion src/consensus/tx_verify.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,45 @@ class TxValidationState;

/** Transaction validation functions */

class CheckTxInputsRules {
using underlying_type = unsigned int;
underlying_type m_flags;
constexpr explicit CheckTxInputsRules(underlying_type flags) noexcept : m_flags(flags) {}

enum class Rule {
None = 0,
OutputSizeLimit = 1 << 0,
};

public:
using enum Rule;

constexpr CheckTxInputsRules(Rule rule) noexcept : m_flags(static_cast<underlying_type>(rule)) {}

[[nodiscard]] constexpr bool test(CheckTxInputsRules rules) const noexcept {
return (m_flags & rules.m_flags) == rules.m_flags;
}

[[nodiscard]] constexpr CheckTxInputsRules operator|(const CheckTxInputsRules other) const noexcept {
return CheckTxInputsRules{m_flags | other.m_flags};
}
};

namespace Consensus {
/**
* Check whether all outputs of this transaction satisfy size limits.
* Regular outputs must be <= MAX_OUTPUT_SCRIPT_SIZE (34 bytes).
* OP_RETURN outputs must be <= MAX_OUTPUT_DATA_SIZE (83 bytes).
*/
[[nodiscard]] bool CheckOutputSizes(const CTransaction& tx, TxValidationState& state);

/**
* Check whether all inputs of this transaction are valid (no double spends and amounts)
* This does not modify the UTXO set. This does not check scripts and sigs.
* @param[out] txfee Set to the transaction fee if successful.
* Preconditions: tx.IsCoinBase() is false.
*/
[[nodiscard]] bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee);
[[nodiscard]] bool CheckTxInputs(const CTransaction& tx, TxValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, CAmount& txfee, CheckTxInputsRules rules);
} // namespace Consensus

/** Auxiliary functions for transaction validation (ideally should not be exposed) */
Expand Down
4 changes: 4 additions & 0 deletions src/deploymentinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B
/*.name =*/ "taproot",
/*.gbt_force =*/ true,
},
{
/*.name =*/ "reduced_data",
/*.gbt_force =*/ true,
},
};

std::string DeploymentName(Consensus::BuriedDeployment dep)
Expand Down
10 changes: 9 additions & 1 deletion src/deploymentstatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ inline bool DeploymentActiveAfter(const CBlockIndex* pindexPrev, const Consensus
inline bool DeploymentActiveAfter(const CBlockIndex* pindexPrev, const Consensus::Params& params, Consensus::DeploymentPos dep, VersionBitsCache& versionbitscache)
{
assert(Consensus::ValidDeployment(dep));
return ThresholdState::ACTIVE == versionbitscache.State(pindexPrev, params, dep);
if (ThresholdState::ACTIVE != versionbitscache.State(pindexPrev, params, dep)) return false;

const auto& deployment = params.vDeployments[dep];
// Permanent deployment (never expires)
if (deployment.active_duration == std::numeric_limits<int>::max()) return true;

const int activation_height = versionbitscache.StateSinceHeight(pindexPrev, params, dep);
const int height = pindexPrev == nullptr ? 0 : pindexPrev->nHeight + 1;
return height < activation_height + deployment.active_duration;
}

/** Determine if a deployment is active for this block */
Expand Down
6 changes: 3 additions & 3 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ void SetupServerArgs(ArgsManager& argsman, bool can_listen_ipc)
argsman.AddArg("-bytespersigop", strprintf("Equivalent bytes per sigop in transactions for relay and mining (default: %u)", DEFAULT_BYTES_PER_SIGOP), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
argsman.AddArg("-datacarrier", strprintf("Relay and mine data carrier transactions (default: %u)", DEFAULT_ACCEPT_DATACARRIER), ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
argsman.AddArg("-datacarriersize",
strprintf("Relay and mine transactions whose data-carrying raw scriptPubKey "
"is of this size or less (default: %u)",
strprintf("Maximum size of data in data carrier transactions we relay and mine, in bytes (maximum %s, default: %u)",
MAX_OUTPUT_DATA_SIZE,
MAX_OP_RETURN_RELAY),
ArgsManager::ALLOW_ANY, OptionsCategory::NODE_RELAY);
argsman.AddArg("-permitbaremultisig", strprintf("Relay transactions creating non-P2SH multisig outputs (default: %u)", DEFAULT_PERMIT_BAREMULTISIG), ArgsManager::ALLOW_ANY,
Expand Down Expand Up @@ -837,7 +837,7 @@ namespace { // Variables internal to initialization process only

int nMaxConnections;
int available_fds;
ServiceFlags g_local_services = ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS);
ServiceFlags g_local_services = ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS | NODE_UASF_REDUCED_DATA);
int64_t peer_connect_timeout;
std::set<BlockFilterType> g_enabled_filter_types;

Expand Down
Loading
Loading