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
4
votes
2answers
799 views

Can someone explain how this person hacked bitcoin?

I'm trying to fill a few gaps in my understanding how this transaction happened! It all started with this article In short, some vigilante/miner was able to scoop up all of the BCH sitting in ...
2
votes
2answers
84 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 ...
1
vote
1answer
34 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 ...
0
votes
2answers
197 views

Using BitcoinJS - How do you verify a message using a segwit bech32 (bc1…) / P2SH (3…) addresses?

I created a signature from a message using my private key. But how do I verify this signed message using my segwit addresses of 3... or bc1...? How do I verify this using the BitcoinJS library?
2
votes
1answer
262 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 ...
3
votes
1answer
109 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?...
0
votes
1answer
139 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 ...
5
votes
1answer
418 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. ...
9
votes
2answers
2k views

How to get addresses from scriptPubKey in segwit transactions?

I'm running through raw transaction data, and I'd like to be able to gather addresses (where possible). So far, I've made this diagram to help me understand when it's possible to figure out addresses ...
0
votes
1answer
47 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
250 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 ...
4
votes
1answer
91 views

What differences exist between the Lightning Network implementation versus the white paper?

I'm reading the Lightning Network WP and came across SIGHASH_NOINPUT, then came across this: Lightning network: how was malleability actually fixed? Are there any other design considerations in the ...
1
vote
1answer
335 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 ...
4
votes
1answer
488 views

Can a Non-Segwit Miner mine segwit transactions?

I understand that non-segwit nodes interpret segwit txes as Anyone-Can-Spend txes, and they cannot validate txes that spend segwit outputs. But when an old style miner receives a segwit tx to mine he ...
1
vote
1answer
435 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 ...
2
votes
2answers
62 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 ...
5
votes
1answer
332 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
34 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
2answers
720 views

Create Pay to Witness Script Hash in Pay to Script Hash Address

I'm trying to generate a multisignature, segwit compatible address as a P2WSH nested in BIP16 P2SH as described in BIP141. Basically, I want to construct a P2WSH-nested-in-P2SH address from n public ...
2
votes
2answers
97 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 ...
1
vote
0answers
47 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....
1
vote
1answer
286 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
1answer
206 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 ...
2
votes
0answers
97 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
586 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
1k 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 ...
0
votes
1answer
54 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
123 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/...
3
votes
2answers
776 views

Is there a paper wallet generator for the new bech32 bc1xxx segwit address?

Is there a paper wallet generator like bitaddress.org for the new bech32 bc1xxx segwit addresses?
1
vote
1answer
572 views

What is the difference between Segwit and non-segwit?

What's the difference? What is the definition of these two terms?
3
votes
1answer
294 views

Does Bitcoin Unlimited keep ASICBOOST intact vs going with segwit?

In light of the new findings about ASICBOOST from bitmain. Having that segwit disables ASICBOOST, does this mean that Bitcoin Unlimited leaves this ASICBOOST feature intact? Having that segwit ...
0
votes
2answers
99 views

What will happen to bitcoins stored at segwit outputs pre-BCH-fork?

If I understand correctly, P2SH-P2WPKH outputs are simply anyone can spend outputs in BCH. What would have happened to BTC stored in such SegWit outputs BEFORE the fork, assuming that those ...
0
votes
1answer
82 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
0answers
99 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 ...
5
votes
2answers
1k views

What is a fraud proof?

In Pieter Wuille's presentation on Segregated Witness, he often mentioned "fraud proofs". What exactly are they? Do physical users actually have to go out of their way to manually produce these proofs ...
3
votes
2answers
944 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
851 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?...
2
votes
1answer
162 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 ...
0
votes
2answers
140 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 ...
0
votes
1answer
208 views

BIP 84, BIP 173 Implementation in BitcoinJ

Can BitcoinJ (Java) supports complete implementations of BIP 173, BIP 84? How can segwit address can be created using BitcoinJ for SPV wallet?
6
votes
1answer
2k views

What does a segregated witness transaction look like?

I'd like to learn how segregated witness works, and I thought the raw transaction data would be a good place to start If this is the structure of current transactions: version | [inputcount] {[txid] ...
1
vote
1answer
520 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 ...
2
votes
2answers
561 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. ...
2
votes
2answers
193 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 ...
7
votes
2answers
2k 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
66 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
35 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
1answer
543 views

How do you output segwit bech32 (bc1…) / P2SH (3…) addresses from a bitcoin private key?

I have a bitcoin private key and know that it can output a segwit addresses of bech32 bc1... and p2sh 3... formats. How can this be done easily?