From e0458056fd31286ef6bfa9aa666886ca6552992c Mon Sep 17 00:00:00 2001 From: Capri Date: Mon, 27 Jul 2026 20:25:29 +0000 Subject: [PATCH] Add public seed nodes and ignore version-rolling bits --- src/chainparams.cpp | 4 +++- src/validation.cpp | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index a4df9b8..48bec6e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -128,7 +128,9 @@ public: assert(consensus.hashGenesisBlock == uint256S("0x0000027626959d894ae1c8a6f9050cdcbdf58eb0037ab06345cb5502955370f1")); assert(genesis.hashMerkleRoot == uint256S("0x3c1f602428f06c9baf0961930a5f711a2b5fd6157a9922365e7f1eca1970ff16")); - // DNS seeds will be added after the first public Vexta seed nodes are deployed. + // Public Vexta mainnet seed nodes. + vSeeds.emplace_back("87.106.99.23"); // UK seed + vSeeds.emplace_back("74.208.53.160"); // US seed base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,70); base58Prefixes[SCRIPT_ADDRESS_OLD] = std::vector(1,85); diff --git a/src/validation.cpp b/src/validation.cpp index 2fce8ea..fbca7aa 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2257,15 +2257,21 @@ void CChainState::UpdateTip(const CBlockIndex* pindexNew) } } - // Check the version of the last 100 blocks to see if we need to upgrade: + // Check the version of the last 100 blocks to see if we need to upgrade. + // Ignore bits reserved for BIP310 version rolling / overt ASICBoost. + static constexpr uint32_t VERSION_ROLLING_MASK = 0x1fffe000; + for (int i = 0; i < 100 && pindex != nullptr; i++) { - int32_t nExpectedVersion = g_versionbitscache.ComputeBlockVersion(pindex->pprev, m_params.GetConsensus()); - if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0) + const int32_t nExpectedVersion = g_versionbitscache.ComputeBlockVersion(pindex->pprev, m_params.GetConsensus()); + const uint32_t unexpectedBits = + (static_cast(pindex->nVersion) & + ~static_cast(nExpectedVersion)) & + ~VERSION_ROLLING_MASK; + + if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && unexpectedBits != 0) { ++nUpgraded; - // SHA256D blocks with weird versions could simply be the result - // of overt AsicBoost. } pindex = pindex->pprev; }