15
votes
Accepted
Why is OP_SUBSTR disabled? (and OP_LEFT, OP_RIGHT)
I'm afraid that my answer here can't be better than "Ask Satoshi".
There was a series of bugs found in Bitcoin's early life, and the response by its creator was to disable a number of scripting ...
13
votes
Accepted
What is this unusual transaction in the Bitcoin blockchain?
The first output of transaction b53e3bc5…5377f141 has the following scriptPubKey:
OP_PUSHNUM_1 OP_PUSHBYTES_32 01010101…0101010101
The segwit softfork in 2017 defined versioning rules for all native ...
9
votes
Accepted
How is a "standard" Bitcoin transaction defined?
This is easier said than done, IMO. There are plenty of little fact sheet web pages (e.g. https://www.cryptocompare.com/coins/guides/what-are-the-bitcoin-transaction-types/) lying around that give a ...
8
votes
Accepted
What's the use of not relaying non-standard transactions if anyone can still use them using P2SH?
As you say, there are two separate concerns here:
There are some scripts that might cause harm to the network.
There are some scripts that might make future upgrades harder.
For the case of harm to ...
7
votes
How to test if a transaction is standard without spending real money?
You can use Bitcoin Core's testmempoolaccept RPC. It will tell you whether the transaction you give it would be accepted into your node's mempool at that time but won't actually add it to the mempool ...
6
votes
Accepted
Why can non-standard transactions be mined but not relayed?
doesn't this just leave miners with the ability to perform an attack whilst leaving everyone else restricted?
Not necessarily. Many of the attacks that the standardness rules protect against require ...
6
votes
Accepted
What is the maximum size transaction that will be relayed by bitcoin nodes using the default configuration?
Bitcoin Core's standardness rules limit transactions to 100000 vbytes (or 400000 WU). Larger transactions are not relayed or added to mempools. Since they are consensus-valid, they are obviously ...
5
votes
Will general non-standard transactions ever be allowed?
The isStandard() check has been relaxed as of 2014. You can now include a wide variety of scripts in transactions.
Read more here:
What is meant by "relaxed standards" for P2SH redeem ...
5
votes
What is this unusual transaction in the Bitcoin blockchain?
To add to Murch's answer:
The output was created by Matthew Zipkin to test support for sending to SegWit v1 support on purse.io. This was done in the context of the Bitcoin Optech Compatibility Matix.
...
5
votes
Accepted
Are blocks containing non-standard transactions relayed through the network or not as in the case of non-standard transactions?
The block will be relayed if it is valid. Standardness rules have no play in a valid mined block.
If it wasn't relayed then the chain would break and that block would probably be reorged out for no ...
5
votes
What is "(mempool) policy"?
Standardness refers to a stricter set of rules enforced by full nodes on a transaction in addition to the consensus rules. Policy is an even broader set of rules or processes followed by a node. ...
4
votes
Accepted
Do nodes accept non-standard output scripts in a mined block?
Yes, a valid block containing non-standard transactions would be accepted by nodes. The rules for mempool acceptance, called “mempool policy” are much stricter than the consensus rules that apply to ...
4
votes
Accepted
Failing to construct transaction that unlocks P2WSH
The problem is this line:
tx.witnesses.append(Script(['OP_5', 'OP_0', p2wsh_witness_script.to_hex()]))
Perhaps confusingly, bitcoinutils uses the same API for scripts as it does for witness stacks (...
4
votes
How to identify P2TR output type?
I don't see why that scriptPubKey would be incorrectly marked as P2TR as it absolutely does not follow the expected pattern. BIP 341 is very unambiguous as to the script construction - it must be OP_1 ...
3
votes
Accepted
Is this script a non-standard script?
This script is almost exactly the same as the standard Pay-To-Public-Key-Hash (P2PKH) script, except instead of pushing the hash onto the stack it pushes an empty vector.
As a reminder, a P2PKH script ...
3
votes
Accepted
Why is a minRelayTxFee of 1000 sat/kb not equivalent to 250 sat/kw?
I thought vbytes were equal to weight units divided by 4
It is [1], but rounded up to the next integer, so the implementation in bitcoind is :
int64_t GetVirtualTransactionSize(int64_t nWeight, ...
3
votes
Accepted
Why are there so many opcodes in Bitcoin Script, but they are not usable
Those opcodes can be used in non-standard scripts as part of a Pay-to-Script-Hash address. They can be in the redeemScript of the P2SH address and be standard.
Furthermore, standardness is not ...
3
votes
Mining a transaction with a 0 BTC output
Do you want to create p2pkh output and send zero satoshies on it? Such output is non-standard (dust) and will not be relayed and mined (but it is possible)
Or may be you want to create nulldummy (...
3
votes
Accepted
OP_PUSHDATA1 is not allowed inside redeem script of P2SH?
OP_PUSHDATA1 and even OP_PUSHDATA2 are allowed inside P2SH scripts fine. However, there is another policy in Bitcoin Core to require that all pushes are minimal in standard transactions. That means ...
3
votes
Accepted
How and when were high-s signatures made non-standard?
The requirement for transactions to only have low-s signatures is a standardness rule. Standardness is enforced at the mempool policy level and is not a protocol rule. Although the mempool behavior of ...
3
votes
Accepted
What is the minimum count of signatures and keys in OP_CHECKMULTISIG?
The minimum is 0. 0-of-0 multisigs are consensus valid, as are 0-of-n. Bare multisigs must have at least one key and signature. However it can be wrapped in a P2SH or P2WSH and will still be standard.
2
votes
Accepted
How was transaction a4bfa8ab6435ae5f25dae9d89e4eb67dfa94283ca751f393c1ddc5a837bbc31b mined?
"Relayed" and "mined" are completely separate processes and should not be conflated.
The transaction is valid, so it was perfectly fine to mine it (i.e. include it in a valid block).
"Standard" is ...
2
votes
What valid transactions are not broadcastable?
The following transactions are not broadcastable with the default bitcoin core configuration but could be found in new mined blocks:
Transactions whose fee is smaller than 1 sat/vB (and RBF bumps ...
2
votes
Accepted
OP_CHECKLOCKTIMEVERIFY generates non standard transaction
You should create a P2SH address containing the hash of that script, and when you want to spend, you can spend from that P2SH address. This'll make your transactions standard.
2
votes
Accepted
What defines the standard Bitcoin transaction size?
What is a "maximum standard weight"?
It is a property that nodes follow to prevent processing large transactions with number of rules and signatures. It is standardness not consensus. If a ...
2
votes
Accepted
Is it possible to import a P2SH address as solvable with nonstandard type script?
It would appear you're trying to import a non-standard redeemScript. Those are non-solvable by definition.
In Bitcoin Core's terminology, there are several "levels" of knowledge about an ...
2
votes
What are Bitcoin's transaction and script limits?
Transaction validity vs standardness*
A transaction that follows the consensus rules is a valid transaction. However, some extra rules were introduced that are called standardness rules.
Bitcoin nodes ...
2
votes
Are blocks containing non-standard transactions relayed through the network or not as in the case of non-standard transactions?
Mempool policy and the standardness rules only apply to unconfirmed transactions. There are no propagation guarantees for unconfirmed transactions. Unconfirmed transactions that conform to a node’s ...
2
votes
How can I add more OP_RETURN outputs to a PSBT transaction?
Transactions with more than one OP_RETURN are non-standard and would not be relayed by most of the network.
That said using the rust-bitcoin library, which i understand you are using already, you can ...
2
votes
Accepted
What is meant by "non-standard"?
The terms standard and non-standard are specific to transactions. They have no application outside of that.
The terms originate from the IsStandard() function in the original Bitcoin software. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
non-standard-transaction × 70transactions × 20
script × 16
bitcoin-core × 10
mempool × 6
p2sh × 5
dust × 5
unconfirmed-transactions × 4
op-return × 4
relay × 4
transaction-fees × 3
json-rpc × 3
signature × 3
raw-transaction × 3
testnet × 3
consensus × 3
output × 3
block-validity × 3
transaction-weight × 3
bitcoind × 2
mining-pools × 2
segregated-witness × 2
bitcoin-core-development × 2
terminology × 2
transaction-selection × 2