Questions tagged [segregated-witness]

This tag should be used for questions regarding Segregated Witness (segwit), an activated softfork that defined a new transaction format which doesn't include signatures in the transaction identifier (txid).

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Transaction w/ a P2WPKH input with nonWitnessUtxo

I am reading the testing code of bitcoinJS-lib and see the line below that is about "create (and broadcast via 3PBP) a Transaction, w/ a P2WPKH input with nonWitnessUtxo' ". https://github....
6
votes
1answer
158 views

What are the different upgradeability features in the BIP-Taproot (BIP 341) proposal?

What are the different upgradability features in the BIP-Taproot (BIP 341) proposal? Why are there so many upgradability paths? Is there something an annex can do that a leaf version can't? This ...
0
votes
1answer
29 views

Are P2PKH or P2SH transactions malleable?

BIP66 fixed one source of transaction malleability and segwit, to my understanding, fixed the rest of the sources. Yet, there are still many common types of non-segwit transactions in use, like P2PKH ...
2
votes
1answer
39 views

Retrieve address when create a channel lightning network

I have two nodes in regtest. the first one is: $ l1-cli getinfo { "id": "02c3f99e70c8da59e428dd119d36c0a1317e5cd85218a760355b5f9b4f822f6109", "alias": "ALICE&...
2
votes
1answer
50 views

Get public or private key from address with C-lightning

I'm studying Lightning network and I use c-lightning. I can Get a new address with newaddr method, but I can't find private key. My address is bcrt1qmckts70jsq2u5886lgcq2yn7xjmp97t09zlrg, how can I ...
1
vote
1answer
25 views

How were miners supposed to signal support for BIP148?

Under BIP141 (SegWit), you could signal support by setting nVersion bit 1 equal to 1. BIP9 counted: 20000002 100000000000000000000000000010 20000012 100000000000000000000000010010 30000007 ...
0
votes
0answers
19 views

Speed of decoding Bech32 addresses

I am trying to understand if Bech32 can be a bottleneck in some specific cases (only Bech32, not Bitcoin itself). What is the hypothetical speed decoding the address back to the streamable format in ...
1
vote
1answer
41 views

Hardware Wallet Vulnerability Fix - Verifying Input Value

I'm confused by the proposed solution posted in the blog regarding the recent vulnerability https://blog.trezor.io/details-of-firmware-updates-for-trezor-one-version-1-9-1-and-trezor-model-t-version-2-...
6
votes
1answer
133 views

Segwit & Offline Signing

Yesterday Trezor released details of a segwit-related hardware wallet vulnerability. The writeup claims that providing full previous transactions to the hardware wallet prevents the exploit. My ...
1
vote
2answers
62 views

segwit compatilibity bc1 and 3 bitcoin wallet?

I would like to know what's the better aproach for upgrading from a legacy address to a segwit one, but there are two type of segwit as P2SH starting with 3 and Native SegWit (bech32) starting with ...
0
votes
2answers
42 views

number of inputs or outputs affect bitcoin transaction fee?

I would like to know how inputs and outputs affects my bitcoin transaction fee using legacy address, and how using a segwit address will decrease the same transaction? and how they will be ...
4
votes
1answer
71 views

Why is a minRelayTxFee of 1000 sat/kb not equivalent to 250 sat/kw?

Naively, we would expect a minRelayTxFee of 1000 sat/kb to correspond to 250 sat/kw. However, apparently this is not so according to this issue (ACINQ), which also references this issue (c-lightning). ...
1
vote
1answer
45 views

Decodescript for a Testnet pubkey hash address

This is the address information: bitcoin-cli validateaddress n35oDVMPNkHRzBKy7q9RDB7r5e8qbVa9SW { "isvalid": true, "address": "n35oDVMPNkHRzBKy7q9RDB7r5e8qbVa9SW", "scriptPubKey": "...
2
votes
1answer
54 views

What is the link between address and use of the UTXO?

I state that I'm still a beginner. I need some clarification. I am using the Testnet. This is the information regarding the address I used to receive funds from a Faucet bitcoin-cli validateaddress ...
0
votes
1answer
26 views

Limitations in P2WSH custom script

I did a stupid custom validation script in P2SH where after check signature, check if OP_3 is equal of OP_3. Now I want to move the same logic in P2WSH multisignatue 1-3. it's my script $ bitcoin-...
3
votes
1answer
69 views

Sign manually P2SH-P2WPKH with openssl

I have a very similar problem of my last post before post again, I tried a lot of time but whitout success. I studied this link but I don't find solution. I have 50 bitcoins (total Amount) and I want ...
3
votes
1answer
89 views

Sign manually P2WSH native with Openssl

I'm studying the segwit part, and I want to sign P2WSH (native) manually (openssl). I just read the BIP0143 and I see the new transaction digest. Double SHA256 of the serialization of: 1. ...
1
vote
1answer
47 views

Naming in segwit script

I have some doubts about naming in witness script/transaction. P2SH-P2WSH (multisig) WITNESS_SCRIPT = OP_3 <public key1> <public key2> <public key3> <OP_2> (is it witness ...
0
votes
0answers
47 views

Bad witness error in P2SH-P2WSH

I've managed to build a P2SH 2-of-3 multisig contract that works, ie I can create addresses, send coins to them, and spend the outputs. Now I'd like to transition that solution to a P2SH-P2WSH, but I'...
0
votes
1answer
58 views

P2SH-P2WPKH stack

I'm studying P2SH-P2WPKH and when I create the signed transaction I can see this stack (using btcdeb) script | ...
1
vote
1answer
149 views

Redeem script. script hash, witness script and witness program

I have a little confusion about naming in Bitcoin. Redeem script is the conditions that will be satisfy. For example P2PKH inside P2SH OP_DUP OP_HASH160 <PubKHash> OP_EQUALVERIFY OP_CHECKSIG ...
0
votes
0answers
37 views

Generate p2sh-segwit and address bech32

When I use bitcoin-cli getnewaddress "" "p2sh-segwit" which kind of script is inside And can I convert if in bech32?
3
votes
1answer
47 views

Checksum P2WSH failed

My goal is replicate the same P2WSH of https://en.bitcoin.it/wiki/BIP_0173 tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7 I'm able to generate the "first" part before checksum. ...
1
vote
1answer
66 views

ScriptSig in P2SH-P2WPKH BIP16

I have some doubts about P2SH-P2WPKH BIP16. I can read the witness program and I understand that a node is triggered when find 0 and 20 o 32 bytes in scriptSig or ScriptpubKey, more precisely: If is ...
0
votes
2answers
128 views

Generate P2SH-P2WSH

I want to generate P2SH-P2WSH with script P2PKH. My public key is 027712968e8f2f9dfa79abe10940a3d915a0c95a0b97750881e6201acf2b66da97 SHA256 and RIPEMD160 of Public key ---------- Witness Script ...
3
votes
1answer
133 views

Confusion about Addresses

I have a little bit confusion about addresses segwit and not segwit. I can see P2WPKH and P2WSH from this link https://en.bitcoin.it/wiki/BIP_0173, and they are segwit and start with bc (mainnet) or ...
1
vote
1answer
94 views

Generate P2WSH native

I want to create P2WSH native like https://en.bitcoin.it/wiki/BIP_0173. I have already a script to generate P2WPKH and it works, thank the python part and re-arrange group byte works. I read that ...
0
votes
0answers
13 views

Fail to sign the Segwit Transaction's input in bitcoinj

I want to spend from a segwit address and it has a P2WPH script, I created this transaction just like creating a normal P2PKH transaction, but just changed the address of the input to the segwit ...
0
votes
1answer
56 views

getting public key from any raw transaction - what to take care of?

i need to retrieve public key of transaction sender. now i know there are 03 compressed pubkeys and 04 uncompressed ones. but how is this working with segwit and multisig addresses? can you please ...
0
votes
2answers
36 views

Can I build a raw segwit transaction with no segwit inputs?

I am trying to build a segwit transaction between a regular p2pkh address and a p2sh 2-of-2 multi-signature address. I have successfully transacted back and forth between these two addresses before (...
0
votes
1answer
67 views

Why does Bisq claim that my “native segwit” receive addresses are “invalid”?

Every time I'm transferring over the funds from Bisq to Bitcoin Core, I get the error: Invalid address. (Or something along those lines.) Only after generating another receive address in Bitcoin ...
0
votes
0answers
36 views

Generate P2WPKH

I'm able to generate P2PKH from bash but I don't find the steps to generate P2WPKH (not wrap) I saw this link and I understand that I have to do base58 of Public key hash and prepend 00, but I don't ...
0
votes
1answer
33 views

Signing a Segwit Multisig Transaction

I am creating some test code which can create transactions and sign then, I already could do it with NON-Segwit multisig address, they were signed using my code and broadcasted. But when I tried with ...
0
votes
0answers
31 views

How to strip witness data from block in json/hex format?

I have a JSON format block (Height:500000) here. As you can see here, it is a segwit block and its actual size is 1048581 and stripped size (without witness data) is 981404. I want to strip full node'...
0
votes
1answer
142 views

Segwit with Multisig

I was analyzing a Bitcoin transaction that works both with Segwit and non-Segwit for multisig Scripts. Here is the transaction: https://www.blockchain.com/en/btc/tx/...
0
votes
0answers
44 views

Sign Raw Segwit (P2WPKH) Transaction Digest

I have a simple transaction that I want to sign the digest of, but I'm not sure if I've got the raw transaction correct, therefore my digest is incorrect. The transaction has one input and one output,...
3
votes
1answer
83 views

Can a coinbase transaction have a segwit output?

And more generally speaking, are there any restrictions on the output of a coinbase transaction?
2
votes
4answers
719 views

Are all three Bitcoin address types interoperable (legacy, segwit, native segwit)?

is it possible to send transactions back and forth between all 3 address types (legacy, segwit, native segwit-bech32)? Or is one of them not able to send to another?
0
votes
1answer
67 views

Signmessagewithprivkey result is different than txinwitness

I'm studying segwit and I'm doing some experiment in regtest. I create a raw transaction with P2SH address. My Transaction data without signature is: ...
0
votes
1answer
221 views

How to generate legacy receiving address in Bitcoin core 0.19.x.x

I must have missed the memo. I see Bitcoin Core 19.1.0.1 defaults to generating Bech32 receive addresses (prefixed with "bc1"), and offers a checkmark to generate P2SH addresses instead (prefixed ...
0
votes
1answer
49 views

What is the signature digest for Segwit outputs

(Assume there's no OP_CODESEPERATOR) For standard P2PKH, the signature digest is generated this way: NewTransaction settle the TxOuts well set all TxIn scripts to empty insert the Previous Locking ...
3
votes
1answer
80 views

Why does a same transaction signed separately have different witness values?

I signed a bitcoin testnet transaction using nbitcoin library and got an output: ...
3
votes
1answer
82 views

Why is a 20 byte hash acceptable in p2wpkh but p2wsh needs 32 bytes?

Why is it acceptable to use a 20 byte hash to represent single-sig witness programs whereas a 32 byte hash is used for pay to witness script hash?
0
votes
0answers
33 views

How do I ask for witness data from a Bitcoin full node?

So, I'm trying to build a Bitcoin block explorer using my own Python library. I'm doing it just as an exercise to better understand how Bitcoin works under the hood. Right now, when I send a block ...
0
votes
3answers
1k views

Convert bech32 Bitcoin address to legacy

I know that similar tools exist for BCH (e.g. https://cashaddr.bitcoincash.org/). Is there a way to convert a native segwit bech32 Bitcoin address to a legacy format?
0
votes
0answers
125 views

Issue generating private Key and segwit address with python

I used the following script to generate my private key and the corresponding segwit address. Then to test it, i sent funds to the address and imported the private key on blockchain wallet; RESULT: ...
1
vote
1answer
71 views

What is the scriptCode in a P2WSH transaction?

Let's say I am spending from a 2-of-2 multisig with this script: ...
2
votes
2answers
345 views

Is Segwit really safe and reduced?

In the Segwit rules, transactions propagated to legacy node doesn't have any signature. so it will be valid as well as in terms of fresh node(supporting Segwit). First question: In this point, if ...
1
vote
1answer
67 views

How a SegWit transaction is accepted without witness?

I would like ask 2 questions. First, as perspective of legacy node(doesn't upgrade software): When SegWit transactions are transferred, witness data is stripped. It means that there are no signatures ...
2
votes
1answer
50 views

Parsing stripped-witness blocks

I've read all the relevant BIPs, and am still confused. Are segwit enabled blocks stripped of witness data and marker and flag bytes when they are propagated to non-segwit peers? Or are they just ...

1
2 3 4 5
9