Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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).

0
votes
0answers
13 views

SegWit-incapable miners won't include SegWit tx's but accept them as valid?

Why SegWit-incapable miners won't include SegWit tx's in their blocks but will accept as valid someone else's block with SegWit tx's in it?
0
votes
1answer
18 views

Can you send a transaction from non-native segwit to native(bech32) segwit address?

Let's say I have a wallet with a non-native segwit address (prefixed with 3- like multisig). Can I send my utxos from this address to a native segwit (bech32) address?
2
votes
2answers
35 views

How does the structure of a segwit block differ from a non-segwit block?

Is there any difference in the structure of a segwit block in comparison to a traditional non-segwit block? A diagram would be helpful if possible.
1
vote
1answer
21 views

Why is the wtxid considered malleable?

Why is the wtxid considered malleable since the transaction is unconfirmed? How can a third-party modify it?
1
vote
1answer
38 views

Electrum's “script hash” form with NBitcoin?

I've come across how scripts are hashed in the electrum (stratum) protocol implementation by looking at the docs. I'm using NBitcoin, and I've tried to generate this hash from a segwit address, first ...
0
votes
2answers
32 views

SHA256 vs RIPEMD160 in SegWit

In Pay-To-Witness-Public-Key-Hash (P2WPKH), the RIPEMD160 hash function is used to hash the public key of the recipient in the locking script. On the contrary, Pay-To-Witness-Script-Hash (P2WSH) uses ...
1
vote
3answers
174 views

Why does the decode function of the segwit bech32 encoder/decoder take a hrp (human readable part) as input?

Looking at the code referenced in bip-0173, specifically for example here: https://github.com/sipa/bech32/blob/master/ref/javascript/segwit_addr.js function decode (hrp, addr) { var dec = ...
2
votes
1answer
219 views

Are “1” , “3” and “Bech” Addresses (BTC) forward and backward compatible?

Wondering if lets say someone has funds in Bech32 and they send to a "1" or "3" address due to less characters to remember ect.
1
vote
2answers
32 views

BIP 144 transaction format and soft-forks and old nodes

I was trying to manually parse a raw Bitcoin transaction in order to better understand how it works. This is how it starts: "0200000000010141035625cd030eca667c95d1729a" I think I've parsed the Tx ...
4
votes
2answers
116 views

What were the main technological reasons that Bitcoin Cash did not want to adopt SegWit?

What are the key risks/drawbacks to SegWit and why did the Bitcoin Cash community conduct a risky hard fork to avoid it?
2
votes
1answer
56 views

In simple terms, what are the major differences between P2WPKH and P2WSH bech32 addresses?

I've read over the bip173, bip141, and bip143 specifications and they're a bit too technical to get at the simple answers I'm looking for.
0
votes
2answers
70 views

How can Segwit increase transaction throughput if the same amount of data is stored in the blockchain?

I'm posting this after reading the answers to this: Where is the Signature stored in a SegWit transaction? I've found out from reading that, that in Segwit, the "witnesses" (or signatures) that ...
3
votes
2answers
43 views

SegWit Version - is there a proposal for new versions?

I can see transactions with version 0 Are there any other versions of SegWit proposed or in existence?
-2
votes
1answer
61 views

How to make segwit transaction and bech32 mandatory

Is it possible to make segwit transactions (and possibly segwit address: Bech32) mandatory in the Bitcoin Core code? In other words, when a transaction is created using the wallet, the transaction ...
0
votes
2answers
31 views

Transaction order in the blockchain

What is the difference between segregated witness (segwit) and canonical transaction ordering (CTOR) ?
1
vote
1answer
33 views

What percentage of nodes currently support segwit?

What percentage of nodes currently support segwit? It seems Bitnodes could figure this out, but I can't find such a stat on its website.
0
votes
1answer
39 views

Struggling to successfully broadcast a p2pkh transaction

I've been experimenting with sending bitcoin transactions with python for the past week. I successfully was able to send p2wpkh->ALL address types, p2sh-p2wpkh->ALL address types. What I am ...
0
votes
1answer
61 views

Segwit txin. Witness data association

I am trying to learn more about the bitcoin protocol and I am writing some python software to make a light wallet. I have advanced quite far and I have come across something that I dont really ...
5
votes
2answers
260 views

Why didn't Bitcoin implement segwit in the first place?

Why didn't Bitcoin implement segwit in the first place? Why and how does non-segwit Bitcoin enable a miner to change a transaction's txid? From Mastering Bitcoin ch. 7 § "Transaction identifiers": ...
1
vote
2answers
36 views

Calculating the witness size of a transaction

I want to calculate how many % of a block, and thus, transactions that are witness data. I need to calculate the size of the witness data in bytes in every transaction. And as I understand it, I ...
0
votes
1answer
28 views

Does my segwit node only have segwit bocks?

My segwit node makes a gettxout RPC query and checks the scriptPubKey.type is "witness_v0_keyhash" and does things accordingly. To my understanding old nodes have different blocks and if I happened ...
1
vote
1answer
44 views

Transaction Malleability, if i want to change signature, what part should I change, so that it would remain valid?

I know what transaction malleability is, but I don't understand how someone can change my signature so that it would remain valid. For example, If I want to change signature what part should I change, ...
1
vote
1answer
76 views

Transaction Malleability, How can I change signature?

I'm kind of desperate as I can't follow some ideas that I don't understand. I hope you can help me. Thank you in advance It's all about Segwit Question 1) It says that when bob makes a transaction ...
2
votes
1answer
86 views

How do I calculate the witness commitment hash for a given block?

From my understanding, every SegWit enabled block has an added output script which is used as a place to store the "Witness commitment" specified in BIP 141. One issue I've stumbled upon was ...
2
votes
1answer
58 views

Where is the pubkey for segwit inputs?

Normally when you spend an input, you reveal your public key and signature so that ECVERIFY can be done. I look at segwit raw transactions and cannot find the public key inside them, where do they go?...
2
votes
2answers
149 views

How can a third party spend BCH accidentally sent to a BTC address?

I transferred BCH to an Electrum wallet address and haven't ever received it because Electrum uses only BTC. As I have been trying to recover it, I looked up the transaction on explorer.bitcoin.com ...
0
votes
1answer
44 views

Is there any format change in block #498557

I wrote some python code to parse the block data, all the result are fine, until block01095.dat, block #498557. The code to deal with Transaction is: class Tx: def __init__(self, blockchain): ...
1
vote
0answers
14 views

I sent BCH to a segwit btc address, how can i get it back? [duplicate]

I accidentally sent bitcoin cash to a segwit bitcoin address, please can anyone help me on how i can get it back. i tried using this recovery service, https://bch.btc.com/docs/help/...
1
vote
1answer
187 views

sent BCH to a BTC Segwit address [duplicate]

Is there a way to recover the BCH ? Use his Ledger purse I've sent BCH To address BTC Segwit This link is treated https://explorer.bitcoin.com/bch/address/36CU6nDniJca1UVhvNhjsDdZpUsyYw5vSx I want ...
0
votes
1answer
67 views

Access funds on legacy address related to segwit address from which I have private key

The situation Hello. Our company running BTC pool. We've been mining BTC for a while and used segwit address 32Z3eXSPgxcHj2fnQy8d6dg66eVtZfxrBM as pool adress. But when we finally found a first ...
1
vote
1answer
128 views

Can you retrieve funds send to a legacy address created with a Segwit extended private key imported in Mycelium from a Ledger Nano S?

I imported a segwit xpub6-key in Mycelium as a watch only address. It only shows address starting with 1 instead of 3, which makes sense. I retrieved a small amount on the legacy address and it shows ...
3
votes
1answer
116 views

What exactly is hashed and signed in a segwit transaction

I have an unsigned raw segwit transaction on my regtest network: ...
0
votes
1answer
26 views

Are higher versions of segregated witness script non-standard?

My understanding is that only version 0 is defined but other versions are considered valid to allow extensions using soft forks, but are they non-standard at the moment?
1
vote
0answers
30 views

Segwit versioning limitations

Currently my understanding is that if new version of Segwit script is introduced, you are free to create whatever crazy rules you want there as long as they do not go against any valid consensus rules....
2
votes
2answers
55 views

Do legacy nodes receive the witness fields of a Segwit transactions?

My question comes from not understanding how BIP 144 works? Regarding the BIP what I ask is, whether legacy nodes support the new parser, so that they treat Segwit tranasctions as valid? There it is ...
2
votes
1answer
95 views

Derive the bech32 address from the transaction 'txinwitness' witness data in Bitcoin Core 0.16

I'm trying to extract the bech32 address associated to an input or output using the txinwitness field included in every pure SegWit transaction. An example with transaction ...
1
vote
1answer
89 views

Segwit transaction in golang

I tried to create transaction which spends p2sh(p2wpkh) output: from wif I derived compressed pub key: "035476e55521c97cf0489e6c57893a99d67e84d306a69e6b6904f324c11b3cef8d". created witness program: "...
2
votes
0answers
48 views

What are segwit extended key prefix bytes for regtest?

I need the HD version bytes for equivalent of ypub, zpub, Ypub, Zpub but on the regtest network. I also need Ypub on testnet. All the rest I can find in slip132, but it is incomplete. thanks.
0
votes
1answer
216 views

How to verify if it's Segwit Transaction or not?

Segwit Usage chart example : https://p2sh.info/dashboard/db/segwit-usage?orgId=1 I Would like to verify by checking tx if it's Segwit Transaction or not. Is there any simple method to do this? ...
0
votes
3answers
273 views

What is Witness and what data does it contain?

I've learned about the Segregated Witness but couldn't find info on braking it apart. I know usually when legacy addresses are used the public keys for example will be under Scriptig. With P2SH, I ...
2
votes
2answers
51 views

Do lightweight wallets validate signatures? If not, why?

I've learned that "some SPV clients simply don’t check signatures themselves at all": https://bitcoincore.org/en/2016/01/26/segwit-benefits/#efficiency-gains-when-not-verifying-signatures I wonder if ...
0
votes
1answer
37 views

P2PUBKEY in witness program (P2WPUBKEY)

Old standard transactions format included 3 types: P2PUBKEY, P2PKH, P2SH. After Segwit soft fork, we have got 2 additional types: P2WPKH and P2WSH. If we compare the cost of spending inputs (in bytes ...
1
vote
1answer
210 views

Converted Segwit address (YPUB) to Legacy (XPUB), but balances differ

I'm trying to convert a Segwit YPUB address I got from a Ledger Wallet to a Legacy XPUB address in order to query the transactions from the wallet. I've yet to find a reliable API that supports YPUB ...
0
votes
1answer
59 views

What are segwit txs?

Which one is a segwit tx? A Tx that send outputs to a segwit address or A Tx that create inputs along with witness part? Which one? should segwit tx necessarily produce outputs of type ...
2
votes
2answers
551 views

16: bad-txns-vin-empty. Code:-26

I am trying to push a raw transaction via BTC insight API, but I always get an error message: 16: bad-txns-vin-empty. Code:-26 Here is the raw transaction hex: ...
1
vote
1answer
459 views

How to generate a native Segwit address and P2SH Segwit address from a standard WIF?

Can I have the steps to generate a native Segwit address from a standard WIF? And the steps to generate a P2SH Segwit address from the same WIF? How do these two formats differ and why are there two?...
1
vote
1answer
96 views

how to verify the first segwit litecoin transaction?

I know than the first litecoin segwit transaction was put to blockchain in 2017/05/10, and it seem that no signature in witness data, how this transaction signed and verified? https://chain.so/tx/LTC/...
2
votes
0answers
84 views

Post SegWit Inclusion, how long until Lightning Network is included in the core?

Introduction - Reason for asking this question With most of the money in the cryptocurrency domain still being utilized in transactions on crypto-exchanges and the numerous hacks that have previously ...
0
votes
2answers
85 views

How does a non-segwit full-node validate a SegWit input

From segwit part of reading bitcoinbook, there is an example for upgrading P2PKH to P2WPKH: Alice created a transaction to pay Bob for a cup of coffee. That transaction created a P2PKH output ...
1
vote
1answer
132 views

ELI5: How does Segregated Witness (segwit) work?

Can someone ELI5 Segregated Witness (AKA BIP 141)? I've been doing research and understand that there are segwit addresses, there are segwit transactions, and there are segwit nodes. I understand ...