-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: remove SPORK_3_INSTANTSEND_BLOCK_FILTERING and SPORK_9_SUPERBLOCKS_ENABLED #7278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
afcf3d1
ee90879
3d9e80e
b2cde07
18b990b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Removed Sporks | ||
| -------------- | ||
|
|
||
| * `SPORK_3_INSTANTSEND_BLOCK_FILTERING` and `SPORK_9_SUPERBLOCKS_ENABLED` have | ||
| been removed. These sporks were already effectively always enabled on mainnet | ||
| but continued to gate behavior on test networks (testnet, regtest, and devnet). | ||
| The associated functionality (InstantSend conflicting-block rejection and | ||
| superblock payments) is now permanently enabled across all networks, and the | ||
| sporks will no longer appear in the `spork` RPC output. | ||
|
|
||
| Updated RPCs | ||
| ------------ | ||
|
|
||
| * `getblocktemplate` now always reports `superblocks_enabled` as `true`. The | ||
| field is retained for backwards compatibility. | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,10 +14,12 @@ | |||||||||||||||||||||
| #include <core_io.h> | ||||||||||||||||||||||
| #include <deploymentinfo.h> | ||||||||||||||||||||||
| #include <deploymentstatus.h> | ||||||||||||||||||||||
| #include <governance/classes.h> | ||||||||||||||||||||||
| #include <key_io.h> | ||||||||||||||||||||||
| #include <llmq/blockprocessor.h> | ||||||||||||||||||||||
| #include <llmq/context.h> | ||||||||||||||||||||||
| #include <evo/evodb.h> | ||||||||||||||||||||||
| #include <masternode/sync.h> | ||||||||||||||||||||||
| #include <net.h> | ||||||||||||||||||||||
| #include <node/context.h> | ||||||||||||||||||||||
| #include <node/miner.h> | ||||||||||||||||||||||
|
|
@@ -42,10 +44,6 @@ | |||||||||||||||||||||
| #include <validationinterface.h> | ||||||||||||||||||||||
| #include <warnings.h> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #include <governance/classes.h> | ||||||||||||||||||||||
| #include <governance/governance.h> | ||||||||||||||||||||||
| #include <masternode/sync.h> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #include <memory> | ||||||||||||||||||||||
| #include <stdint.h> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
@@ -731,12 +729,10 @@ static RPCHelpMan getblocktemplate() | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| // next bock is a superblock and we need governance info to correctly construct it | ||||||||||||||||||||||
| CHECK_NONFATAL(node.sporkman); | ||||||||||||||||||||||
| if (AreSuperblocksEnabled(*node.sporkman) | ||||||||||||||||||||||
| && !node.mn_sync->IsSynced() | ||||||||||||||||||||||
| && CSuperblock::IsValidBlockHeight(active_chain.Height() + 1)) | ||||||||||||||||||||||
| throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is syncing with network..."); | ||||||||||||||||||||||
| if (!node.mn_sync->IsSynced() && CSuperblock::IsValidBlockHeight(active_chain.Height() + 1)) { | ||||||||||||||||||||||
| // Next block is a superblock but we need governance info to correctly construct it. | ||||||||||||||||||||||
| throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, PACKAGE_NAME " is syncing with network..."); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Unconditional superblock sync check changes regtest getblocktemplate behavior SPORK_9's default value was 💡 Suggested change
Suggested change
source: ['codex'] 🤖 Fix this with AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Unconditional superblock sync check changes Previously, this check was guarded by On regtest ( The
source: ['claude', 'codex'] 🤖 Fix this with AI agentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Suggestion: Unconditional superblock sync check changes Before this PR, the sync check at superblock heights was gated by On regtest ( Notably, the IBD check at lines 722–730 is already guarded by source: ['claude'] 🤖 Fix this with AI agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably makes sense... added 18b990b |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| static unsigned int nTransactionsUpdatedLast; | ||||||||||||||||||||||
| const CTxMemPool& mempool = EnsureMemPool(node); | ||||||||||||||||||||||
|
|
@@ -962,7 +958,7 @@ static RPCHelpMan getblocktemplate() | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| result.pushKV("superblock", superblockObjArray); | ||||||||||||||||||||||
| result.pushKV("superblocks_started", pindexPrev->nHeight + 1 > consensusParams.nSuperblockStartBlock); | ||||||||||||||||||||||
| result.pushKV("superblocks_enabled", AreSuperblocksEnabled(*node.sporkman)); | ||||||||||||||||||||||
| result.pushKV("superblocks_enabled", true); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| result.pushKV("coinbase_payload", HexStr(pblock->vtx[0]->vExtraPayload)); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 Nitpick: Release notes should mention
getblocktemplatesync requirement on test chainsThe release notes document that
getblocktemplatenow always reportssuperblocks_enabledastrue, and that the removed functionality is "permanently enabled across all networks." However, the practical consequence — thatgetblocktemplatenow throwsRPC_CLIENT_IN_INITIAL_DOWNLOADat superblock heights on regtest/testnet/devnet when the node hasn't completed masternode sync — is not called out. This is a subtle but potentially breaking change for test harnesses.💡 Suggested change
source: ['claude']