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

1
vote
1answer
16 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
23 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
40 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
235 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
24 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
21 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
31 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
53 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
51 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
48 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
89 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
43 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
13 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/...
0
votes
0answers
16 views

How can i push my raw bch transaction to a BCH miner [duplicate]

I mistakenly sent bch to a btc segwit and from all the research I did I was able to create a raw transaction using only the public key, how can I broadcast this to a miner to help? btc.com aren't ...
1
vote
1answer
96 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
38 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
59 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
84 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
22 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
22 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
42 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
65 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
68 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: "...
1
vote
0answers
31 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
136 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
113 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 ...
1
vote
2answers
41 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
33 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
158 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
48 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
407 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: ...
0
votes
1answer
278 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
79 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
76 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
69 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
110 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 ...
1
vote
0answers
24 views

How to store bitcoins to easily claim hard forks later?

I had my bitcoins kept in a milti-signature, segwit address. After the fork of Bitcoin Cash, Gold, etc., I got to know that I can't claim my fork coins (or very difficult to claim, if possible). I ...
2
votes
1answer
125 views

Why do we need public key as part of Witness in P2WPKH transactions?

As we want to minimize the data payload in a blockchain, which also led to concepts like SegWit, and is matter of discussion in Signature aggregation etc, I wonder why do we actually need to supply ...
1
vote
1answer
201 views

How to check ownership of wallet with segwit address

So .. this seems like a simple question. If i have a wallet and someone wants to send me BTC. I want to make sure they own the wallet they claim to be sending funds from. Usually people do something ...
0
votes
2answers
100 views

Why non-SegWit nodes do not reject SegWit block since there is no witness?

SegWit is meant to be backward-compatible. When a SigWit block is relayed to a non-SegWit node, the witness part is stripped. If this is the case, wouldn't it be invalid since the non-SegWit node sees ...
2
votes
2answers
293 views

Bitcoin - Technical difference between P2PKH and P2SH address generation?

I was convinced that the only difference between the generation of addresses starting with '1' and '3' was simply changing the prefix added to the digest from 0x00 to 0x05 after the ripemd160 part. ...
3
votes
0answers
30 views

Is SegWit similar to/ derived from Hyperledger Fabric?

Segregating the witness (signature) data from the transactional data is similar to the structure used in Hyperledger Fabric. Curious about the derivation of SegWit?
5
votes
2answers
425 views

What the difference between old segwit (3) and new segwit address (bc)?

i'm not that kind of person who understands cryptography and math, can you tell me simply the main purpose of new segwit address? are transactions fee the same for new segwit (bc1)? instead of "Old ...
1
vote
1answer
41 views

On SPV clients and Segwit

An article released by Blockstream claims that after Segwit, SPV clients can verify that transactions have been accepted by the network without having to download the signatures/witness-data. I'm ...
1
vote
1answer
28 views

Is it more profitable to mine non-SegWit blocks

The fees for a SegWit address are lower than non-Segwit ones. Is there less fees per block with Segwit blocks? Is it less profitable to mine Segwit blocks?
0
votes
0answers
55 views

Should a new wallet still support non-segwit addresses?

So I've been required to design a new HD bitcoin wallet. I've checked BIP49 and BIP84, which in short propose new purpose fields for derivations that will result in P2WPKH-nested-in-P2SH and native ...
2
votes
1answer
75 views

How does a non-segwit full node ensure validation of the blockchain?

Let's say a block been created with most tx are segwit , now the block is more then 1MB and will be near to 4MB, I understand that a non-SegWit node ( let's say bitcoin-core 0.15 ) cannot get a block ...
2
votes
1answer
200 views

OP_RETURN in a coinbase transaction?

Hey looking at this transaction I'm confused why there are two outputs and why one of them is labelled with OP_RETURN
2
votes
1answer
84 views

Extract lightning network funding transactions with python bitcoin blockchain parser lib

My ultimate goal is to parse funding transactions (as well as channel closes in a later step) from the blockchain. In order to do so I wanted to start with a funding transaction and disect it. ...
5
votes
1answer
253 views

What are the standard formats of transaction outputs?

A transaction output can have the type Pay to public key hash, P2PKH, where the ScriptPubKey field has the format: 76 a9 14 <20-byte hash of pubkey> 88 ac Pay to script hash, P2SH, used for e.g. ...