2022 Developer Survey is open! Take survey.

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
0 answers
30 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/...
user avatar
1 vote
1 answer
25 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 ...
user avatar
  • 281
1 vote
1 answer
45 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 ...
user avatar
0 votes
2 answers
43 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 ...
user avatar
0 votes
1 answer
35 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,...
user avatar
  • 29
0 votes
1 answer
20 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 ...
user avatar
  • 147
4 votes
1 answer
574 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 ...
user avatar
  • 147
2 votes
0 answers
21 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?...
user avatar
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??
user avatar
1 vote
2 answers
78 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 ...
user avatar
2 votes
1 answer
161 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 ...
user avatar
0 votes
1 answer
48 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 ...
user avatar
  • 15
1 vote
1 answer
72 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 ...
user avatar
  • 3,136
0 votes
1 answer
37 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": "...
user avatar
3 votes
1 answer
353 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: ...
user avatar
0 votes
0 answers
32 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 ...
user avatar
0 votes
1 answer
59 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 ...
user avatar
1 vote
1 answer
30 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 ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
0 votes
1 answer
81 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 ...
user avatar
  • 139
5 votes
2 answers
360 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
88 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
  • 229
0 votes
1 answer
27 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 ...
user avatar
0 votes
2 answers
40 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": "...
user avatar
  • 229
1 vote
2 answers
125 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
66 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 ...
user avatar
  • 105
1 vote
2 answers
68 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). ...
user avatar
  • 229
0 votes
2 answers
80 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 ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
  • 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 ...
user avatar
  • 21
9 votes
1 answer
1k 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 ...
user avatar
  • 411
2 votes
1 answer
139 views

How to check OP_CHECKLOCKTIMEVERIFY?

I try to simply get into the OP_CHECKLOCKTIMEVERIFY opcode and test it. However I get the error error: Locktime requirement not satisfied no matter what unix- or blocktime I enter in my btcdeb. I ...
user avatar
  • 191
0 votes
0 answers
27 views

Non-mandatory-script-verify-flag (unknown error)

I am trying to learn how scripts are working. In a testnet i got some scripts working and learned a lot about what not to do. But now I am struggeling getting this to work. Originaly I worked with a ...
user avatar
  • 1
5 votes
1 answer
233 views

Can Schnorr aggregate signatures be nested inside other Schnorr aggregate signatures?

The way I've understood Schnorr signatures is that multiple parties can combine their signatures into a one shared signature, thus obfuscating the number of participants involved in the signature ...
user avatar
  • 123
1 vote
1 answer
83 views

Recognizing Taproot outputs in raw transactions

What can be the contents of an P2TR output script? Is it always OP_1 0x20 <32-bit public key>? Can multisig script be there, and if yes - in what format, and more importantly - how do I convert ...
user avatar
0 votes
0 answers
70 views

What is the easyest python3 script to generate pubkey + addresses from 24 words + passphrase?

Coldcard can generate 24 words from dice, but then I still need to verify that applying my passphrase on top of the 24 words, give me the addresses that coldcard is showing me. What is the easyest ...
user avatar
0 votes
1 answer
44 views

ANYONECANSPEND transaction vs. private key for giving bitcoin as a prize

I would like to create a game (kind of like a treasure hunt) where the winner finds a piece of hidden information that allows them to claim some bitcoin. One way to do it is to create a transaction ...
user avatar
  • 213
0 votes
1 answer
64 views

Why does the locking script for MultSig contain PubKeys instead of PubKeyHash?

I am reading "Mastering Bitcoin" by Andreas Antonopoulos. In the transactions section, the locking script for normal account(single address) is OP_DUP OP_HASH160 <Cafe Public Key Hash> ...
user avatar
1 vote
2 answers
98 views

What if I change PubKeyHash in scriptPubKey of a transaction to my PubKeyHash?

Suppose a person A makes a transaction to person B and sends it to bitcoin network. Suppose I changed PubKeyHash in scriptPubKey of a transaction to my PubKeyHash and send it to bitcoin network. The ...
user avatar
0 votes
1 answer
62 views

How to spend an anyone-can-spend input

I'm trying to teach myself bitcoin script, and so far I'm failing with a seemingly trivial example. I'm using the Bitcoin Test Framework, and this is what I'm doing (simplified): # p2sh address for ...
user avatar
  • 1
1 vote
1 answer
98 views

Liquid tapscript opcodes

Related question: What opcodes are supported on Liquid but not yet on Bitcoin? I had seen few opcodes in the slides shared by notgrubles on Twitter Opcodes: OP_INSPECTCURRENTINPUT OP_INSPECTINPUT ...
user avatar
1 vote
1 answer
82 views

What opcodes are supported on Liquid but not yet on Bitcoin?

What opcodes are supported in Liquid as of today (September 2021) but not (yet) on Bitcoin? What is the rationale for including these particular opcodes but not others?
user avatar
7 votes
1 answer
1k views

How does OP_RETURN burn coins?

What exactly causes the output containing OP_RETURN to be unspendable? And why do I have to use the byes after OP_RETURN for keeping data in the blockchain and I can't use bytes before OP_RETURN?
user avatar
0 votes
1 answer
87 views

How to edit bitcoin.conf for bitcoin.cli scripting

I want to install Kristaps Kaupe’s scripts on my bitcoin.conf but I am afraid I don't have the technical expertise necessary to make it run. I am simply cutting and pasting it on my bitcoin.conf file, ...
user avatar
0 votes
2 answers
45 views

What script unlocks this locking script?

The locking script I have is OP_PUSH1(0x03) OP_ADD OP_PUSH1(0x05) OP_NUMEQUALVERIFY I don't understand how the OP_PUSH works - where does it push from and does it push it onto the top of the stack? I ...
user avatar
  • 3
2 votes
0 answers
28 views

Script type test vectors

I'm looking for test vectors, assuming xpub or public key to derive various script type addresses out of it. Something along the line of https://bip32jp.github.io/english/ but not only for P2PKH, but ...
user avatar
  • 1,564
0 votes
0 answers
25 views

What is the Purpose of Writing the Previous ScriptPubKey as a Temporary ScriptSig of an Input Before Signing?

I have seen some guides saying to write the script pub key of the output we are trying to redeem. (Ie. step 6. How to redeem a basic Tx?) I'm curious what the reasoning behind this is and what will ...
user avatar
0 votes
1 answer
70 views

Can you program a transaction to automatically run once fees are low?

Can i program a bitcoin transaction to run when the network is not as busy or when fees are low? If you are not in a rush to complete trx.
user avatar
  • 3
1 vote
1 answer
90 views

How does a Wallet Create a Transaction when a Public Address Is Provided?

Given a public Bitcoin wallet address 1BdYVvwoxTWMGqJS2Pg6NkVD7RnENVjSac; is pasted into a wallet to send Bitcoins to. How does the wallet create an output to send coins to the public key associated ...
user avatar

1
2 3 4 5
11