Questions tagged [script]

A simple, stack-based, Forth-like programming language using "opcodes" to express spending conditions.

Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

What are Known Bits in a bitcoin Transaction?

How do I know if my signatures has leak/weak signatures? Is there a website or script where I can input my signatures to check for weak/leak Nonce part?
1 vote
1 answer
35 views

Why has the Miniscript for this particular Policy changed over the past few months?

The "A 3-of-3 that turns into a 2-of-3 after 90 days" policy: thresh(3,pk(key_1),pk(key_2),pk(key_3),older(12960)) compiled to this Miniscript a few months ago: thresh(3,pk(key_1),s:pk(key_2)...
0 votes
1 answer
36 views

Why is there a OP_NUMEQUAL opcode? Does OP_NUMEQUAL offer a subset of the functionality of OP_EQUAL?

There is a OP_EQUAL opcode that returns (from the Bitcoin wiki): 1 if the inputs are exactly equal, 0 otherwise And a OP_NUMEQUAL opcode that returns: 1 if the numbers are equal, 0 otherwise In ...
2 votes
1 answer
41 views

Time delayed transactions as a solution for the inheritance problem?

Is it possible to construct a transaction which is delayed in time, more specifically blocks? The idea being that you have a device which has a signed transaction, which sends all of your Bitcoin to ...
  • 210
2 votes
2 answers
33 views

Divide unknown future input amount sent to a given address amongst known recipients in known proportions?

Is there a way to divide an unknown future input amount received by a given address amongst three recipients with proportions of, for example 0.2 , 0.3, 0.5? This would need to be done in such a way ...
  • 244
1 vote
1 answer
138 views

What OP_CODEs would push 254 bytes of data?

From BIP62 I would expect to use OP_PUSHDATA1 followed by uint8_t: Pushing 76 to 255 bytes must use OP_PUSHDATA1. But then from this answer, the link to variable-length integer makes it seem that a ...
  • 743
0 votes
2 answers
66 views

Meaning of SigScript in Satoshi Nakamoto's "Genesis" coinbase transaction

The Satoshi's coinbase transaction includes this following scriptSig: ...
  • 85
1 vote
1 answer
39 views

Optimistic Multisigs

I had an idea for an optimistic multisig scheme. In a 2/2 multisig where pubkey1 could spend any time and pubkey2 could only spend after a future block number, could you have a condition that allowed ...
  • 113
0 votes
1 answer
40 views

How does the CHECKSIGADD opcode work? How does it compare to its predecessor CHECKMULTISIG?

How does the CHECKSIGADD opcode (defined in the Tapscript BIP) BIP342 work? How does it compare to its predecessor CHECKMULTISIG? The design of CHECKSIGADD was discussed in this StackExchange question....
4 votes
2 answers
348 views

Why do invalid signatures in OP_CHECKSIGADD not push to the stack?

I've been working through the static test vectors provided by bitcoin core to implement an interpreter. Some surprising behavior I found was that in the case of OP_CHECKSIGADD, if an invalid signature ...
0 votes
0 answers
59 views

I can't find 3 words out of my 12 words recovery phrase that i saved. I hear i need to run a script I just need guidelines as a newbie on how to do it

So i can't find 3 words out of my 12 words recovery phrase that i saved. I just don't know how to go about the whole script thing. Really hoping someone could guide me step by step on it.
  • 11
2 votes
1 answer
57 views

Translating inputs (and outputs) to find addresses involved in transaction?

Is there a way for me to translate the input and output scripts in a bitcoin transaction? I am building an application that lets you query different stats from the Bitcoin-network, down the line I ...
  • 21
1 vote
1 answer
45 views

Can The Redeem Script Consist Of Only 1 Public Key In P2SH Transactions:

I have a few questions relating to Bitcoin Signatures And P2SH: Why is P2SH used as opposed to other forms? Is it still prevalent today - has SegWit made it redundant or less useful, if not, what is ...
  • 147
0 votes
1 answer
40 views

Where Is Signature Data Stored In Post-SegWit Transactions?

If i'm correct, i am pretty sure that signature data such as the scriptsigsize and scriptsig is stored outside the Tx_Data of a Bitcoin transaction. But then where is it stored? Is it in the block or ...
  • 147
2 votes
1 answer
102 views

Why does `OP_CHECKSIGADD` allow TAPROOT keyspends?

My understanding is this sig version is only for taproot keyspends, why is it allowed to be used in OP_CHECKSIGADD? https://github.com/bitcoin/bitcoin/blob/e826b22da252e0599c61d21c98ff89f366b3120f/src/...
3 votes
4 answers
1k views

Is bitcoin script necessary?

satoshi created bitcoin script which is the language that the bitcoin client uses to handle most of the operations such as sending or verifying transactions. was it necessary to have another language ...
  • 73
1 vote
1 answer
55 views

What is a sane Miniscript? How does it differ to a valid Miniscript?

What is a sane Miniscript? How does it differ to a valid Miniscript? This was asked during a Bitcoin Core PR review club on Miniscript hosted by stickies-v on May 18th 2022.
0 votes
0 answers
35 views

Is it possible to do OP_MOD with OP_GREATERTHAN and a few other opcodes?

Currently OP MOD is considered nonstandard in the Bitcoin protocol, but we can for example combine OP SHA1 and OP GREATERTHAN to gain a similar effect. https://www.cs.technion.ac.il/~idddo/...
1 vote
1 answer
39 views

Reasons not to rename scriptPubKey and scriptSig to something more intuitive?

I realize that this is how Satoshi named them and there was some reasoning behind these names, but even after years of using them, I find them weird and confusing, especially when e.g. explaining them ...
  • 271
1 vote
1 answer
61 views

Is weighed multi-sig wallet possible?

In a multi-sig wallet, each of the public keys is unique. Is it possible to create weighted multi-sig wallet, such that one private key has more power than the others? Case 1: typical Example (need 2 ...
0 votes
2 answers
82 views

How would one turn a Miniscript tree into a Taproot tree with Taproot'd Miniscript?

How would one turn a Miniscript "tree" into a Taproot tree with Taproot'd Miniscript? (To be clear unlike a Taproot tree a Miniscript tree likely would't be surfaced to the user. Breaking ...
0 votes
1 answer
45 views

Transactions with invalid or non-parseable Script

During parsing of Bitcoin data from blockchain, I found many transactions which has invalid script (example 37b828de0da38f0b3b9ec09f6f8b7883c3202a99a285b0b0087f19f9cbf526d9,...
  • 29
0 votes
0 answers
22 views

What is the script signature and PUSHDATA operation? [duplicate]

In bitcoin transactions, there is a part of the transaction known as the scriptSig. What does this mean? Also, what is the scriptSig (PUSHDATA opcode) operation.
  • 147
0 votes
1 answer
52 views

How to submit nonstandard scriptPubKey transaction to bitcoind in regtest mode?

I'm trying to replicate an algebraic puzzle I saw in the scriptPubKey of a testnet transaction: OP_2DUP OP_ADD 6e OP_EQUAL I think the intent was for this output to be spendable by a scriptSig of ...
  • 147
4 votes
1 answer
580 views

How did testnet transaction b6714e05dd014cc92de09271886e62d85e7d41dd44fad417c520eb51d57f94c0 validate?

Testnet transaction c474c67cabc13f74c65e7cf503db971d5ba176794bff7de36f46d51ca675cf3a locked 0.0005BTC with a simple math script: OP_2DUP OP_ADD 5102 OP_EQUALVERIFY OP_SUB 230d OP_EQUAL Transaction ...
  • 147
2 votes
0 answers
22 views

Simplicity vs Miniscript [duplicate]

It is clear that both simplicity and Miniscript aims to extend and improve upon the bitcoin script. However what are the differences between them and the pros and cons they both have against the other?...
0 votes
0 answers
27 views

Newbie, please help, I'm totally clueless about Bitcoin and the rest of them and I need help [duplicate]

I'm a beginner and I'm new to everything about Bitcoin, crypto and everything. Please, I need help,anyone??
1 vote
2 answers
85 views

Why does this not return TRUE?

scriptSig: <pubKey> scriptPubKey: <pubKey> OP_EQUALVERIFY The stack has <pubKey>, <pubKey> and then OP_EQUALVERIFY. So why, does it not return TRUE, even when the recent two ...
2 votes
1 answer
185 views

Are attempts to spend from a timelocked UTXO rejected?

Background I was reading a bit about Bitcoin time locked transactions within the context of the Lightning Network. One thing that was never explained is what happens when one tries to prematurely ...
0 votes
1 answer
56 views

Using EQUALVERIFY with different public keys, but generated from the same seed

I am building certain system that involves Bitcoin and therefore I need to understand well how it works under the hood. In order to receive funds, for every new transaction new public key and its hash ...
  • 57
1 vote
1 answer
155 views

How to regularly restart bitcoind after some period of time on Linux

If, like me you wish to automatically restart bitcoind after some period of time, or if it crashes at least it will restart sometime on it's own you know that it can take a long time on Linux before ...
  • 3,146
0 votes
1 answer
60 views

Q's about P2WPKH

I got some btc in testnet, here are the outputs. this is the UTXO that i get my btc { "value": 17.24756333, "n": 1, "scriptPubKey": { "asm": "...
3 votes
1 answer
370 views

How can the genesis block contain arbitrary data on it if the script is invalid?

The coinbase transaction from the genesis block contains this script: ...
0 votes
0 answers
39 views

How transactions script work?

I am trying to learn Bitcoin in some technical details, but I don't really understand the process of locking and unlocking scripts. I know that for what they are using, but can someone explain me some ...
0 votes
1 answer
72 views

Is it possible to design a recursive covenant opcode that results in a full node stuck in an infinite verification loop?

Is it possible to design a new opcode enabling recursive covenants that could result in a full node stuck in an infinite loop of verifying transactions? (Obviously this would never be considered for a ...
1 vote
1 answer
33 views

Trying to understand a nonstandard transaction in bitcoin tests

I am trying to implement a bitcoin script interpreter and today I stumbled upon a nonstandard transaction in tx_valid.json which gave me a lot of headaches. The transaction in question has the ...
0 votes
1 answer
53 views

What is a Miniscript fragment? And what should I call the underscore letter?

An example Miniscript is: and_v(or_c(pk(B),or_c(pk(C),v:older(1000))),pk(A)) (Generated using this Miniscript site). What would a fragment be here? What should I call the underscore letter (_v)? And ...
0 votes
1 answer
99 views

Why is OP_XOR disabled? Are there any forks on which it has been enabled? [duplicate]

Why is OP_XOR disabled? Are there any forks on which it has been enabled? Are there any plans to enable it? Perhaps this is the answer, still perhaps there is another reason for the bitwise logic ...
  • 244
5 votes
2 answers
410 views

Was Bitcoin 0.3.7 actually hard-forking?

Reading through the wiki (bitcoin.it consensus versions) I noticed that release 0.3.7 ("scriptSig + scriptPubKey evaluations separated") is listed as a hard-forking change. In BitMEX's ...
user avatar
2 votes
1 answer
132 views

Creating a raw transaction from scratch/

I am currently learning bitcoin technology. So I came up around the term raw transaction. There are many tools to create a raw transaction but I want to do it all by myself. My Idea is to write a raw ...
0 votes
1 answer
64 views

problem with unlocking P2WSH

i made a P2WSH address with bitcoinjs-lib from a script. the same script results in the same address with bitcoin core. I made an unlocking script and tested the combination with btcdeb and everything ...
  • 247
0 votes
1 answer
31 views

Invalid input scripts? Why are they included? Is there a correct way to identify them? [duplicate]

Transaction 88025f2bfa2435a7036a865ea0b4748491d21f9b8cfd72788e9d1c9aa8977e7d is valid, but its one and only input has an invalid script. (There are many transactions like this, but this one will ...
0 votes
2 answers
60 views

non-mandatory-script-verify-flag (unknown error) with a script that runs ok in btcdeb

after learning a lot about script (and playing with them on the testnet) i made a way longer script. $ btc decodescript 7455886f94935688789352885279935b88946e935b88945187 { "asm": "...
  • 247
1 vote
2 answers
168 views

Loops in bitcoin scripting

According to this Q&A there are no loops in bitcoin script: The Bitcoin scripting system is purposefully not Turing-complete - why? I was reading the comments in a reddit post and realized few for ...
user avatar
0 votes
3 answers
76 views

Bitcoin script with multiple recipients?

Is it possible to write a Bitcoin script that pays multiple recipients? For instance, a script funded with 2 BTC by Alice that pays 1 BTC each to Bob and Charlie. Eventually I'd like to build a system ...
  • 105
1 vote
2 answers
83 views

unlock non standard script

i transferred some coins to a testnet address 2MwP5KwNRsQV5cf3T7VcFU4Vhj2LcUeMiLM with a locking script just to play with scripts. the locking script is OP_1 OP_2 OP_ADD (always evaluates to true). ...
  • 247
0 votes
2 answers
84 views

Who do locked bitcoins belong to?

I am currently learning about bitcoin transactions and I found out about the scriptPubKey which locks every output until it is spent by using the unlocking script. My question is who owns the bitcoins ...
0 votes
1 answer
48 views

Making and trading tokens with bitcoin like with solidity and ethereum metamask

So I've learned how to make erc 20 tokens using solidity on the ethereum blockchain and move them around with metamask. Is there a similar process for making bitcoin tokens and moving those around ...
  • 1
0 votes
0 answers
58 views

Where does the "green addresses" scheme use the bitcoin scripts?

I'm reading Bitcoin and Cryptocurrency Technologies. And in this book, the author uses some application scenarios to justify the complexity of having the scripting language instead of just specifying ...
  • 35
10 votes
1 answer
2k views

What is the script assembly and execution in P2TR spend (spend from Taproot)

So I have found and fundamentally understand how P2PKH is assembled from inputs and outputs to create a bitcoin forth-like script for execution. I looked at the SegWit BIP examples section and I found ...
  • 421

1
2 3 4 5
12