Repository navigation
Description
Over the years policy surrounding multisig scripts, particularly for legacy multisig scripts, has evolved in a haphazard way with various PRs affecting legacy multisig script policy without considering the ramifications.
The current status of legacy multisig script policy is as follows:
- Legacy multisig outputs in transactions can be at most m-of-3. All pubkeys in such outputs must be of the form of a compressed pubkey, or uncompressed pubkey, or a hybrid pubkey.
- Legacy multisig inputs being redeemed in transaction can be m-of-n with m and n 20 or less. Any public keys processed by OP_CHECKMULTISIG must be compressed or uncompressed pubkeys. hybrid or other data blobs are only allowed in the unprocessed part of the public key list.
While it is acceptable for legacy multisig output creation policy to be stricter than redemption policy, it makes no sense to allow hybrid keys in outputs by policy, but then to disallow them as inputs by policy.
However, there are further issues. Legacy multisig policy has evolved over time. In the beginning when legacy multisig outputs were introduced as standard by BIP 11, "pubkeys" were allowed by policy to be any value between 33 and 120 bytes. Some Bitcoin users have taken advantage of those liberal policies and created legacy multisig script UTXOs that were redeemable by policy at the time they were created, but are no longer redeemable by policy today. The UTXO 4dacd03d73cb497229dbfe2e7209adc4221540efe0e4c57f408b09b2fd36ece6:1 from 2014-01-12 is but one example. @ajtowns's analysis in #33755 suggests there are at least 147,470 such UTXOs that have become soft-confiscated over time, meaning that when they were created they were redeemable by policy, but become no longer redeemable by policy and would require direct miner assistance to be spent.
Based on my research, I believe there are 4 tasks that need to be done to make legacy Multisig policy coherent again.
1. Ban hybrid keys in legacy outputs
We should strengthen the rules surrounding creating legacy multisig (and legacy single sig) to ban the use of hybrid keys. Such keys are nearly irredeemable. However, we should only strengthen policy around the creating new legacy script outputs without further restricting policy around redeeming legacy script UTXOs.
2. Bring legacy script redemption policy in line with P2SH redeem script policy.
P2SH redeem script policy has also evolved over time. Current policy for P2SH redemption allow any scripts so long as they have a limited number of CHECKSIG related operations. I see no reason why legacy script should be subject to significantly more stringent constraints than P2SH redeem scripts are.
3. Relax SCRIPT_VERIFY_STRICTENC policy to only ban hybrid keys.
PR #5247 went unnecessarily overboard in its quest to stomp out uses of hybrid keys and made UTXOs that already existed at the time unspendable. PR #33755 partially reverts this change so that only hybrid keys are excluded from processing in CHECKMULTISIG.
4. Bring SCRIPT_VERIFY_WITNESS_PUBKEYTYPE policy in line with BIP 143 requirements.
This task is technically unrelated to legacy multisig policy, being instead about Segwit V0 multisig policy. However the policy implemented in Bitcoin Core does not match the policy stated in BIP 143, and they ought to be brought into agreement. Either by implementing the policy correctly (as #33759 does), or by amending BIP 143 to describe the current policy as implemented.
In particular, both tasks 2 and 3 need to be completed in order to make stuck UTXOs, such as 4dacd03d73cb497229dbfe2e7209adc4221540efe0e4c57f408b09b2fd36ece6:1 spendable by policy again.
I want to make it clear that UTXOs such as the above are not particularly abusive. They were simply caught up incidentally in the policy changes of PR #5247, which was only about banning the use of hybrid keys. 4dacd03d73cb497229dbfe2e7209adc4221540efe0e4c57f408b09b2fd36ece6:1 has no hybrid nor hybrid looking pubkeys in it.
OP_PUSHNUM_1
OP_PUSHBYTES_33 035bceeb417f25beaa28d133ee7b28faa1e4f5c2f76b8daf12c3fab18261718790
OP_PUSHBYTES_33 1c434e545250525459000000000000000000000001000000004190ab0000000000
OP_PUSHNUM_2
OP_CHECKMULTISIG
The script from UTXO 4dacd03d73cb497229dbfe2e7209adc4221540efe0e4c57f408b09b2fd36ece6:1
Activity
roconnor-blockstream commentedon Nov 16, 2025
How did we get here
I've compiled a list of what I believe are all the relevant PRs related to policy surrounding multisig scripts, listed in chronological order. This work is based on previous work done by @ajtowns
PR #669; merged 2011-12-20
This PR introduces m-of-n checkmultisig as a solvable script for the first time. Solvability requires m and n to be at most 16. Per BIP 11, standardness requires solvable MULTISIG tx outputs to be at most m-of-3 and m to be
less thanless than or equal to n.Any data between 33 and 120 bytes is considered a "pubkey" for solvability purposes.
This PR also introduces a new standardness rule requiring redeemed legacy scripts to be solvable. This is done because the solver needs to be run to determine if the UTXO's scriptpubkey being redeemed is an OP_EVAL (later P2SH) script.
Both legacy scripts redeemed and OP_EVAL/P2SH redeem scripts are required to be solvable at redemption time. Additionally EVAL/P2SH redeem scripts are required to be standard.
Be aware of the difference between a solvable script and a standard script. Standard scripts are limited to m-of-3 multisig, but solvability allows up to 16. Standardness is stronger than solvability.
Because the scriptpubkey for legacy UTXOs are now checked for solvability, any subsequent strengthening of standardness rules via
Solverbecomes a vector for soft-confiscation of UTXOs.PR #769; merged 2012-02-07
Unexpected stack items are banned using
ScriptSigArgsExpectedcounting when redeeming legacy script and P2SH script. This seems to be done to prevent data stuffing in scriptsigs. It is unclear if the data stuffing is a concern or the malleability is a concern. (Later code comments in PR #4365 suggests malleability isn't actually a concern, but PR comments in PR #7387 suggests it was.)The relevance here is that
Solver's output is now also being used to help count the number of expected stack items. LaterScriptSigArgsExpectedwill be removed.Unless I'm mistaken, this PR also no longer requires P2SH scripts to be standard and now merely requires them to be solvable. This enables larger P2SH multisig scripts beyond m-of-3. This change seems to be a violation of BIP 16 standardness rules, but it passes without comment.
PR #1742; merged 2012-10-20
CHECKSIGandCHECKMULTISIGoperations are modified to check pubkeys to see if they are in canonical form, which must begin with0x02,0x03or0x04, and be of suitable lengths.At this point non-canonical pubkey stack items are not yet banned from OP_CHECKMULTISIG. Instead, mempool policy diverges from consensus policy as all non-canonical pubkey stack items immediately count as a signature failure, with OP_CHECKSIG pushing a 0 in these cases and OP_CHECKMULISIG moving to the next pubkey. While non-pubkey would always fail the CHECKSIG anyways, this is a problem for valid hybrid keys where script execution for mempool policy could cause execution to diverge from consensus rule execution.
This counts as a slight tightening of policy around the redemption (but not creation) of scripts using hybrid keys and applies both to P2SH and legacy scripts.
PR #3718; merged 2014-02-14
Solvability (and hence standardness) for script is tightened so that for script standardness purposes pubkey data must be between 33 and 65 bytes rather than 33 and 120 bytes.
Due to the fact that solvability rules are checked upon UTXO redemption means that some funds, both P2SH and legacy, could have been soft-confiscated here.
::TODO:: see if any such UTXOs exist.
PR #4365; merged 2014-06-27;
P2SH rules are relaxed so non-solvable redeem scripts are allowed if sigop count is less than 15(?). Clean stack not required for redeeming such non-standard P2SH redeem scripts. I don't know why this is considered okay.
This is the beginning of the divergence of policy between redeeming legacy script and redeeming P2SH script.
PR #5247; merged 2014-11-21
The inconsistency between mempool policy execution of script and consensus execution of script is resolved by failing
SCRIPT_VERIFY_STRICTENCstandardness whenever a pubkeys processed byCHECK*SIGis non-canonical.This accidently causes in-use pre-counterparty-1.0-like legacy multiscript UTXO's to be soft-confiscated. e.g. 4dacd03d73cb497229dbfe2e7209adc4221540efe0e4c57f408b09b2fd36ece6:1 from 2014-01-12. The effect of soft-confiscating existing UTXO seems to have been inadvertent and wasn't contemplated in this PR.
This policy only applies to redemption, not creation of outputs. Standardness rules still allow creating transactions with legacy script outputs with non-canonical keys.
PR #7387; merged 2016-01-22;
ScriptSigArgsExpected is removed since now SCRIPT_VERIFY_CLEANSTACK is robustly checking for a clean stack.
Further divergence between redeeming legacy script and redeeming P2SH occurs as now as P2SH redeem scripts are themselves no longer checked for solvability. So long as the P2SH redeem scripts have a low enough
GetSigOpCountthey are allowed here. Legacy script redemptions still must be solvable scripts.In particular, P2SH multisig redeem scripts with 66-120 byte "pubkeys" occurring at the end of their list that may have been soft-confiscated in PR #3718 are now, once again, redeemable.
PR #8499; merged 2016-10-17;
For the new P2WSH script, this PR attempts to implement the policy mandated by BIP 143:
However, the implementation fails to adhere to the policy written above and only checks that, for P2WSH, the pubkeys processed by CHECKMULTISIG are compressed public key, rather than checking that all keys passed to CHECKMULTISIG are compressed public keys.
PR #12460; merged 2018-04-04;
Solvability rules for scripts are tightened to require pubkeys in them to be well-formed, but not-necessarily canonical.
Now the creation of legacy script UTXOs are, by standardness, required to be canonical or hybrid pubkeys.
It is still the case that if script evaluation encounters a hybrid pubkey it is a violation of
SCRIPT_VERIFY_STRICTENCstandardness rules to redeem.However because scriptpubkeys still are checked during redemption for solvability for legacy script (but not P2SH script), this PR likely soft-confiscates even more UTXOs.
Pre-counterparty-1.0-like legacy multiscript UTXO are now in violation of two redemption rules: They are neither solvable, and if they were executed the OP_CHECKMULTISIG would fail when trying to process non-canonical keys.
::TODO:: Find examples of UTXOs newly soft-confiscated by this PR.
EDIT: PR #13194; merged 2018-05-30
This PR refactors the Solver. The solver now fails when m > n in an m-of-n multisig. This is not a soft confiscation because such outputs are (a) unspendable anyways, and (b) were never standard to begin with.
PR #20867; merged 2021-05-03
This PR lifts the solvability of m-of-n multisig up from 16 to 20, increasing the types of legacy multisig scripts that are now redeemable. Transactions creating legacy multisig continue to be limited to 1 ≤ m ≤ n ≤ 3.
ajtowns commentedon Nov 17, 2025
The requirement is for
mnot to be greater thann, as far as I can see? (via bothIsStandard()andSolver())I believe there are four utxos that match this for bare multisig (ie, have a pubkey push of more than 65 bytes):
However, they're all 1-of-1 with 66 byte keys (that look like two 33 byte compressed keys concatenated?) so are presumably unspendable anyway.
I believe this means that while we previously allowed spending
1 [data] [pubkey] 2 CHECKMULTISIGvia a signature frompubkey, but not1 [pubkey] [data] 2 CHECKMULTISIG(because we'd seedatawas not a compressed-or-uncompressed pubkey, and abort), we now would not, becausedatais not a valid-sized-pubkey. (This would failAreInputsStandard()due toSolver()failing due toCPubKey::ValidSize()being strict)I think there are 405 utxos that fit that pattern, though they're all very small. The ones with more than 786 sats are:
Here's a CSV of what I think are all the baremultisigs that aren't just all-compressed-keys (ie every pubkey push is 33 bytes beginning with 02 or 03, m is less than n, n is 1 through 16): baremult-923997.csv.bz2 sha256 is
9951903516def05402ca4a6d8f64773f87e5f6611324e8ee86e44ce2a34982e7. It's 21M compressed, 76M uncompressed, 266k utxos. spktype is BMU if it just has some uncompressed keys, BMD if it has hybrid/invalid keys, BMSZ if it has keys outside the 33-65 byte range, and BMWEIRD if it didn't parse as expected. Doesn't include anything that didn't matchOP_m ... OP_n OP_CHECKMULTISIGwith 1<=m<=n<=16.For interest, looking at all utxos by type (with a little marker for ones that expose pubkeys to quantum attackers):
FWIW, all the BMC, BMU, BMD and BMSZ utxos have n in [1,2,3].
The BMWEIRD ones are mostly 0 or 1 sat stuff, most of which is unspendable anyway; the remaining four are:
So I believe only the BMD utxos are interesting here (BMC and BMU should already be both spendable and, depending on permitbaremultisig, creatable).
Personally, my take is that we should:
roconnor-blockstream commentedon Nov 17, 2025
Yeah, I meant to say "less than or equal to". However, AFAICT this inequality is only enforced in standardness, not solvability.
roconnor-blockstream commentedon Nov 17, 2025
Just to be clear, we cannot allow hybrid pubkeys to be processed by
CHECKMULTISIGwithout undermining the purpose of the hybrid pubkey ban. (However we can allow hybrid pubkeys that are unprocessed byCHECKMULTISIG.)My understanding of the hybrid pubkey ban is that it is in place in case we wish to, one day, introduce a soft-fork that would allow implementations of Bitcoin Core to use a normal ECDSA validation routine that only succeeds on SEC 1 formatted public keys (i.e. canonical keys). This requires failing script in
CHECKSIGandCHECKMULTISIGas soon as a hybrid pubkey is encountered for processing.I was previously thinking that we could only ban successful hybrid pubkey signatures. In other words,
CHECKSIGandCHECKMULTISIGcould process they hybrid pubkey and only fail the script in case the signature was successful. Alas, this would fail to meet the above purpose of the hybrid pubkey ban, for if this rule were to become part of consensus, then consensus implementation would still have to run the ECDSA validation engine on hybrid pubkeys in order to determine if they need to abort the script or not.That said we could simply abandon our hybrid pubkey policy entirely and give up on this soft-fork. I'm not advocating this, but it is a possibility.
It might be worth dividing your BMD category into those with some hybrid pubkeys and those without any hybrid pubkeys.
instagibbs commentedon Nov 17, 2025
circa e679ec9 creation was constrained to m-of-3
ajtowns commentedon Nov 18, 2025
Solver()callsMatchMultisig()which invokesnum_keys = GetScriptNuymber(opcode, data, required_sigs, MAX_PUBKEYS_PER_MULTISIG)which returns nullopt if the CScriptNum isn't minimal and betweenrequired_sigsandMAX_PUBKEYS_.., so I believe it's enforced in both places.Yes; I don't think a hybrid pubkey ban is worth maintaining. By switching from openssl to libsecp256k1 we've avoided the possibility of new formats being unexpectedly introduced (ref), and the validation cost (and data carrying ability if faked) of a hybrid pubkey is essentially the same as that of an uncompressed pubkey which we'll continue to support for spending. So I'm not seeing the value in treating hybrid keys differently from uncompressed keys.
Not intending to strongly advocate that view vs other alternatives at this point; just putting it out there to ensure that if we stick with the current direction, that it's for a good reason, not just because it's the status quo.
What we support by consensus matches the (earlier) ANSI X9.62-1998 standard; I don't see why we'd go to the trouble of a soft fork just to switch to a different standard/library. (ref)
I think there are 384 BMD outputs with a hybrid-ish pubkey (65 bytes beginning with 06/07), but all but one are 1-sat. Here are the 5 most recent such utxos:
I think there's five bare hybrid(looking) pubkey utxos:
Obviously there could be zero to many hybrid pubkeys in either p2pkh or p2sh outputs as well.
Python code:
roconnor-blockstream commentedon Nov 18, 2025
This checking m ≤ n behaviour in the Solver seems to have been added in #13194. However this wouldn't count as soft-confiscations because multisigs with m > n are presumably unspendable anways.
Ah, I was not aware of this.
I wouldn't object to dropping the hybrid key protections. I probably wouldn't object even if I didn't know about ANSI X9.62-1998.
ajtowns commentedon Nov 19, 2025
Yeah, see
bitcoin/script.cpp
Line 745 in 4405b78
151henry151 commentedon Nov 20, 2025
P2SH allows non-solvable redeem scripts with low sigop counts (PR #4365), while legacy scripts still require solvability. This inconsistency is hard to justify, especially since both rely on sigop limits for security.
Aligning legacy script redemption with P2SH policy would remove the asymmetry and fix the Counterparty UTXOs without special-casing, while preserving security through existing sigop limits.
If hybrid key bans are reconsidered (as ajtowns suggested), that could simplify further, but fixing the policy asymmetry seems like the right first step.
roconnor-blockstream commentedon Nov 20, 2025
I agree. I think my next step would be to PR a change to
AreInputsStandardto bring P2SH and legacy script policy into alignment.I'm not quite sure when I'll get to this, so if someone else wants to take a crack at it, I wouldn't be surprised if they can do it better / sooner than me.
3 remaining items
151henry151 commentedon Jan 11, 2026
If I'm not mistaken, my code in commit 1c67900568 does indeed limit the number of checksig operations to
MAX_P2SH_SIGOPS(same limit as P2SH) and require at least one checksig operation. The implementation checksif (sigop_count == 0 || sigop_count > MAX_P2SH_SIGOPS)for non-P2SH legacy scripts (see here and here), ensuring scripts must have at least 1 sigop and at most 15 sigops, matching P2SH policy.151henry151 commentedon Jan 18, 2026
So, have I got this right?
Keeping strict template matching reserves legacy script space for future upgrades but leaves soft-confiscated UTXOs unsolvable by policy.
Using sigop-based checks, as implemented in my PR, accepts scripts when Solver() recognizes them or when they have acceptable sigop counts. This uses more of that reserved space but allows those UTXOs to be spent.
The third option is separating the "can we parse this" and "is this stupid" parts of Solver(). This would require more refactoring but could improve separation.
ajtowns commentedon Jan 19, 2026
We do template matching for three things: (a) figuring out known address types that the wallet can/should spend, (b) verifying newly created outputs are sane, (c) verifying existing outputs are spendable. For (a), using uncompressed/hybrid keys for a new change address would be nuts, eg, and that's also true to some (much lesser) extent for (b). But (c) is a very different case, and code reuse there has led us a bit astray, IMO anyway.
I'm supportive of allowing existing utxos to be spent, particularly if they were once easily spendable using Bitcoin Core (or the satoshi client prior to the name change), and there's no ambiguity as to the validity of spending them; but outside of that, I think it makes more sense to deprecate/discourage legacy script and bare multisig (ie, scriptPubKeys for which there's no address format) rather than to support/encourage it further.
For stuff encoded in p2sh, p2wsh or tapscript, I think the only reason to make consensus-valid things unspendable is the same motive as for making inscriptions unspendable. I don't think it makes much sense to do that by default (having it be a configurable behaviour is another matter), so I guess that means I don't think BIP 143's policy-level prohibition on uncompressed/hybrid keys makes sense in the first place. The original discussion included the comment "If we don't use this opportunity now to get rid of them, we probably won't ever be until a new script revision entirely." but we do have a new script revision now without them (ie, tapscript), so maintaining the difference between policy and consensus there doesn't seem to have much value to me. Likewise it doesn't really seem worth it to propose a consensus change at this point to upgrade 143's default policy to being enforced as consensus. Maybe others mileage varies? Changing the policy rule while still diverging from consensus doesn't make much sense to me. It would probably be good if someone ran a reindex with both the current and proposed policies for non-compressed keys in p2wsh enforced as a consensus rule, to see if there are any transactions in the blockchain violating those rules...
Anyway, that's my (current) take, for whatever that's worth.
151henry151 commentedon Jan 20, 2026
Running a reindex with SCRIPT_VERIFY_WITNESS_PUBKEYTYPE enforced as a consensus rule in GetBlockScriptFlags() after segwit activation. Monitoring for consensus failures; will update once the reindex completes.
Just to confirm: since the current state is policy-only (not consensus), I'm only testing the proposed consensus enforcement. Is there a specific reason to also test the current policies as consensus, or is this sufficient?
ajtowns commentedon Jan 21, 2026
I'm not sure what you're asking; this issue (and #33759) proposes changing the meaning of
SCRIPT_VERIFY_WITNESS_PUBKEYTYPE. Knowing whether any confirmed txs violate policy as-is, or the proposed change would both be interesting, though if nothing violates with the proposed change, nothing should violate under the current policy either.151henry151 commentedon Jan 21, 2026
@ajtowns I guess my language there was not very clear, sorry about that. My confusion was simply about this line of your previous reply:
I am running a reindex to determine whether any existing transactions violate the proposed policy, but was just confused about the idea of checking to see if any transactions violate the existing policy. I understand some UTXOs are soft confiscated by the current policy, but thought it would be impossible for a transaction to be confirmed on the blockchain and yet also in violation of the current policy. I just want to be sure I'm understanding everything to the best of my ability.
ajtowns commentedon Jan 22, 2026
If some miners accepted txs out of band and didn't enforce the policy specified by BIP143, there might by confirmed txs in the blockchain that violate the existing policy.
151henry151 commentedon Jan 22, 2026
Ah, I see now. Thanks for explaining. My workstation is slow and old, so I'm only 65% through the reindex with the changed policy, but when I'm finished with that I'll check with current policy as well and share my results (and methodology) for review.
151henry151 commentedon Jan 26, 2026
@ajtowns ̶I̶'̶v̶e̶ ̶c̶o̶m̶p̶l̶e̶t̶e̶d̶ ̶a̶ ̶r̶e̶i̶n̶d̶e̶x̶ ̶c̶h̶e̶c̶k̶i̶n̶g̶ ̶w̶i̶t̶h̶ ̶t̶h̶e̶ ̶c̶h̶a̶n̶g̶e̶d̶ ̶p̶o̶l̶i̶c̶y̶;̶ ̶I̶ ̶f̶o̶u̶n̶d̶ ̶n̶o̶ ̶t̶r̶a̶n̶s̶a̶c̶t̶i̶o̶n̶s̶ ̶v̶i̶o̶l̶a̶t̶e̶ ̶i̶t̶.̶
̶M̶o̶d̶i̶f̶i̶e̶d̶ ̶
̶s̶r̶c̶/̶v̶a̶l̶i̶d̶a̶t̶i̶o̶n̶.̶c̶p̶p̶̶ ̶a̶t̶ ̶l̶i̶n̶e̶ ̶2̶3̶1̶4̶ ̶i̶n̶ ̶̶G̶e̶t̶B̶l̶o̶c̶k̶S̶c̶r̶i̶p̶t̶F̶l̶a̶g̶s̶(̶)̶̶ ̶t̶o̶ ̶e̶n̶f̶o̶r̶c̶e̶ ̶̶S̶C̶R̶I̶P̶T̶_̶V̶E̶R̶I̶F̶Y̶_̶W̶I̶T̶N̶E̶S̶S̶_̶P̶U̶B̶K̶E̶Y̶T̶Y̶P̶E̶̶ ̶a̶s̶ ̶a̶ ̶c̶o̶n̶s̶e̶n̶s̶u̶s̶ ̶r̶u̶l̶e̶ ̶a̶f̶t̶e̶r̶ ̶s̶e̶g̶w̶i̶t̶ ̶a̶c̶t̶i̶v̶a̶t̶i̶o̶n̶ ̶b̶y̶ ̶a̶d̶d̶i̶n̶g̶ ̶̶i̶f̶ ̶(̶D̶e̶p̶l̶o̶y̶m̶e̶n̶t̶A̶c̶t̶i̶v̶e̶A̶t̶(̶b̶l̶o̶c̶k̶_̶i̶n̶d̶e̶x̶,̶ ̶c̶h̶a̶i̶n̶m̶a̶n̶,̶ ̶C̶o̶n̶s̶e̶n̶s̶u̶s̶:̶:̶D̶E̶P̶L̶O̶Y̶M̶E̶N̶T̶_̶S̶E̶G̶W̶I̶T̶)̶)̶ ̶{̶ ̶f̶l̶a̶g̶s̶ ̶|̶=̶ ̶S̶C̶R̶I̶P̶T̶_̶V̶E̶R̶I̶F̶Y̶_̶W̶I̶T̶N̶E̶S̶S̶_̶P̶U̶B̶K̶E̶Y̶T̶Y̶P̶E̶;̶ ̶}̶̶.̶ ̶B̶u̶i̶l̶t̶ ̶B̶i̶t̶c̶o̶i̶n̶ ̶C̶o̶r̶e̶ ̶w̶i̶t̶h̶ ̶t̶h̶i̶s̶ ̶m̶o̶d̶i̶f̶i̶c̶a̶t̶i̶o̶n̶,̶ ̶c̶o̶n̶f̶i̶g̶u̶r̶e̶d̶ ̶p̶r̶u̶n̶i̶n̶g̶ ̶(̶̶p̶r̶u̶n̶e̶=̶5̶5̶0̶0̶0̶̶)̶,̶ ̶r̶a̶n̶ ̶a̶ ̶f̶u̶l̶l̶ ̶r̶e̶i̶n̶d̶e̶x̶,̶ ̶a̶n̶d̶ ̶m̶o̶n̶i̶t̶o̶r̶e̶d̶ ̶̶d̶e̶b̶u̶g̶.̶l̶o̶g̶̶ ̶f̶o̶r̶ ̶c̶o̶n̶s̶e̶n̶s̶u̶s̶ ̶f̶a̶i̶l̶u̶r̶e̶s̶ ̶(̶̶W̶I̶T̶N̶E̶S̶S̶_̶P̶U̶B̶K̶E̶Y̶T̶Y̶P̶E̶̶,̶ ̶̶b̶l̶o̶c̶k̶-̶s̶c̶r̶i̶p̶t̶-̶v̶e̶r̶i̶f̶y̶-̶f̶l̶a̶g̶-̶f̶a̶i̶l̶e̶d̶̶,̶ ̶̶b̶a̶d̶-̶b̶l̶k̶-̶s̶i̶g̶o̶p̶s̶̶,̶ ̶̶B̶L̶O̶C̶K̶_̶C̶O̶N̶S̶E̶N̶S̶U̶S̶̶)̶.̶ ̶T̶h̶e̶ ̶r̶e̶i̶n̶d̶e̶x̶ ̶c̶o̶m̶p̶l̶e̶t̶e̶d̶ ̶s̶u̶c̶c̶e̶s̶s̶f̶u̶l̶l̶y̶,̶ ̶v̶a̶l̶i̶d̶a̶t̶i̶n̶g̶ ̶a̶l̶l̶ ̶9̶3̶3̶,̶9̶0̶6̶ ̶b̶l̶o̶c̶k̶s̶ ̶w̶i̶t̶h̶ ̶z̶e̶r̶o̶ ̶c̶o̶n̶s̶e̶n̶s̶u̶s̶ ̶e̶r̶r̶o̶r̶s̶,̶ ̶c̶o̶n̶f̶i̶r̶m̶i̶n̶g̶ ̶n̶o̶ ̶h̶i̶s̶t̶o̶r̶i̶c̶a̶l̶ ̶b̶l̶o̶c̶k̶s̶ ̶v̶i̶o̶l̶a̶t̶e̶ ̶t̶h̶i̶s̶ ̶r̶u̶l̶e̶ ̶w̶h̶e̶n̶ ̶e̶n̶f̶o̶r̶c̶e̶d̶ ̶a̶s̶ ̶c̶o̶n̶s̶e̶n̶s̶u̶s̶.̶̶F̶o̶r̶ ̶g̶o̶o̶d̶ ̶m̶e̶a̶s̶u̶r̶e̶,̶ ̶I̶'̶m̶ ̶n̶o̶w̶ ̶r̶u̶n̶n̶i̶n̶g̶ ̶a̶ ̶r̶e̶i̶n̶d̶e̶x̶ ̶w̶i̶t̶h̶ ̶c̶u̶r̶r̶e̶n̶t̶ ̶p̶o̶l̶i̶c̶y̶ ̶c̶h̶e̶c̶k̶i̶n̶g̶ ̶f̶o̶r̶ ̶t̶h̶e̶ ̶s̶a̶m̶e̶.̶
ajtowns commentedon Jan 27, 2026
Hmm, this would need
assumevalid=0as well, no?151henry151 commentedon Jan 28, 2026
You're correct, my mistake. I'm performing the reindex again. Thanks
151henry151 commentedon Jan 29, 2026
Block 661,320 failed validation.
The reindex failed with consensus error
block-script-verify-flag-failed(Using non-compressed keys in segwit). The failing transaction is wtxid9d6d04d92cd9c7cd9e8b603085ef4d77bca83fc11fd79553522aed6205d6796b, input 0, spending from6e3f9e35215c3c814ee65c58d15b8cbc6b60d04d7a36b38cd11a54397195eec0:0. Block00000000000000000007700da139fe82d216d43384be006b8af02862ac621abc(height 661,320, 2020-12-14) violates the rule when enforced as consensus.Enforcing SCRIPT_VERIFY_WITNESS_PUBKEYTYPE as a consensus rule would invalidate historical blocks.
ajtowns commentedon Mar 5, 2026
Hmm, that example is a p2wpkh (in p2sh) encoding a 65-byte uncompressed key, rather than an uncompressed key in a p2wsh script. Would probably be nice if we could confirm whether that are p2wsh spends using non-compressed keys as well.
BIP143: specify which CHECKMULTISIG keys must be compressed