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
25 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: ...
0
votes
1answer
26 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
206 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
32 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
32 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 ...
3
votes
1answer
122 views

Would a Schnorr PubKey be a different length than a Taproot PubKey like P2WPKH and P2WSH?

A P2WPKH PubKey is shorter than a P2WSH PubKey. Would this also be the case that a Taproot PubKey is larger than a Schnorr PubKey? If so, wouldn't people be incentivised to use the Schnorr PubKey and ...
-2
votes
1answer
32 views

Bitcoin And BitcoinCash Input Value [closed]

According to bip 143 (https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki), bitcoin transaction has the information about the input value as part of the witness. i heard bitcoincash has ...
1
vote
1answer
58 views

Error Signing P2SH-P2WSH MultiSig - “Unable to sign input, invalid stack size (possibly missing key)”

I am trying to create and spend a P2SH-P2WSH transaction using bitcoin-cli but am getting "Unable to sign input, invalid stack size (possibly missing key)" when I try to sign the Multi-Sig transaction ...
7
votes
2answers
494 views

Most efficient way to store Segwit Address in a database

This is not a duplicate of What is the most efficient way to store bitcoin addresses in a database? but it's the same question except I need a segwit answer. Let's say I wanted to store every ...
0
votes
1answer
44 views

How to spend from a segwit address generated by a legacy wallet?

I used atomic pay payment gateway and a segwit address was generated by XPUB key i'm unable to spend the coins i sent to the generated address and coins are not visible in my legacy wallet what to do ?...
0
votes
1answer
22 views

Witness data storage localisation in the blockchain

Since segregated witness is in place inside Bitcoin blockchain, my understanding is that witness data are no longer stored inside the blocks, so if blocks are linked to each other where theirs ...
1
vote
2answers
54 views

How does storing the witness outside of the block prevent malleability?

I have some question on how segregated witness work. I'm reading this post and in the answer exist this phrase Since signature data (witness data) is stored outside the transaction (and outside ...
0
votes
1answer
36 views

How Segwit makes transactions smaller? What about the witness?

I have seen similar questions without a clear answer. So, how does Segregated Witness make transactions smaller? I understand it removes data from the transaction hash and solves malleability ... But ...
2
votes
1answer
109 views

How to calculate p2wsh signature?

I read the bip143, but didn't understand how to calculate the scriptCode of p2wsh. bip143 told us: A new transaction digest algorithm is defined, but only applicable to sigops in version 0 witness ...
0
votes
1answer
73 views

Javascript library or code that can convert an “uncompressed” bitcoin private key to a compressed one

I forked a pretty old brain wallet generator: https://dvdbng.github.io/memwallet/ -- Currently it generates uncompressed bitcoin private keys. Is there a javascript library that can convert an ...
6
votes
2answers
299 views

Is there a difference between bytes and virtual bytes (vbytes)?

In an Optech newsletter, size is referred to using vbytes. Is there a difference between vbytes and bytes? If so, what is the difference?
0
votes
0answers
49 views

Mycelium not reading segwit bech32 (bc1) addresses from a private key

I'm trying to import my bitcoin private key into the Mycelium android wallet, but it keeps showing up as the legacy address that starts with 1xxx. I sent some coins to the bc1 address and I verified ...
1
vote
1answer
66 views

How to calculate txid for segwit transactions?

I'm having difficulty calculating txid for recent transactions. I followed bip-141 at https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki For the first transaction in the first block found ...
4
votes
1answer
76 views

How has the Bitcoin average block size recently risen above 3 MB?

I was aware that the block size could rise above the 1 MB cap due to SegWit. However, my understanding was that the block size would still be limited under SegWit. My understanding of SegWit is that ...
0
votes
2answers
75 views

Raw SegWit TX look solid and verifies, but is rejected. Need help figuring out why

Consider the following transaction expressed as hex: ...
1
vote
1answer
29 views

For the 3 bitcoin address types, which can send to each other? Can a valid tx be created that spends to an unspendable address?

I'm just getting started with using bech32 addresses instead of legacy addresses, and I'm not familiar with how the legacy vs segwit compatible vs bech32 addresses play with each other. Can I get an ...
0
votes
1answer
53 views

In practice, are redeemScripts commonly reused?

In regards to P2SH-P2WSH transactions, are Txout-script values identical between transactions? Is it reasonable to expect a business or vendor that accepts bitcoin to be using the same redeemScript ...
0
votes
2answers
58 views

Are non-SegWit transactions still malleable?

SegWit was (amongst other improvements) introduced to fix malleability issues. Does that mean that non-SegWit transactions are still malleable? If so, what types of malleability could still happen in ...
0
votes
1answer
38 views

P2WPKH - which private key is used to generate signature?

I am looking at the BIP143 P2WPKH example. I am kind of following until the generation of the sigHash: c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670 but then that is used to ...
0
votes
1answer
23 views

Alternative to Python pip bitcoin

This Python pip package https://pypi.org/project/bitcoin/ was originally developed by Vitalik Buterin (that Ethereum guy) but is no longer maintained. Is there any alternative equivalent pip package ...
2
votes
1answer
37 views

Why is a library's signature of a segwit tx different from Bitcoin Core signature?

I have been writing a (yet another) Bitcoin python library primarily for educational purposes; for me and my students. Signing a non-segwit transaction results in a signed tx that is identical to ...
0
votes
0answers
38 views

Will non-segwit addresses still be able to send bitcoin in 5+ years?

My public address starts with 1,and I can currently spend the Bitcoin from it. However, as more and more transactions become only segwit based, will miners eventually just abandon verifying ...
1
vote
2answers
109 views

Bitcoin API with bech32 support

Since a while, I have been using the insight-api to view bitcoin transactions. However, recently I have found out that bech32 addresses are not supported. Now I try to fix this issue and I am open ...
0
votes
1answer
77 views

Find sender's public key in SegWit Transaction

How can I retrieve the sender's public key in a Segwit transaction? For example: https://www.blockchain.com/btc/tx/3179d18d6f36fa77b88909496535485d8188d96b79d295843789a9e0ff6c3e6a I can happily ...
2
votes
1answer
148 views

What does it mean if TXID and WTXID are the same?

I'm having a tough time understanding what exactly WTXID is and what it means when WTXID and TXID are the same (and vica versa). What I understand is that WTXID includes the witness data. Since non-...
3
votes
1answer
61 views

What is the rationale for inclusion of previous amount in SegWit signing process?

When spending a P2PKH output, the "data" we hash only includes the output script from previous transaction but when spending a P2WPKH (the new serialization) we also include the amount field from ...
0
votes
0answers
137 views

Send to bech32 segwit address from Bitcoin Core 17.1

I have a non-HD wallet in Bitcoin Core v17.1. I have never used SegWit before. I need to send some coins to a bech32 address from bitcoin-qt GUI. The problem is after selecting the specific coin ...
1
vote
1answer
92 views

Concept of Block weight and segwit are still unclear

It seems like duplicated question, but i read many articles and posts to undestand about segwit. Below links are something i read What is block weight and how is it different from block size? After ...
4
votes
2answers
144 views

On chain cost of Segwit version 1 versus version 0

How do total blockchain cost for Segwit version 0 compare to version 1 which is being proposed? I'm specifically interested in a single user transactions – both paying to public key (or pk hash) and ...
1
vote
1answer
45 views

What is the O(n^2) signature hashing problem and how does SegWit solves it?

One of the many benefits of SegWit is that it solves the O(n^2) signature hashing problem. What exactly is the O(n^2) hashing problem and how segregating signatures to separate witness field solve it?
4
votes
1answer
87 views

Does v1 Segwit includes v0?

My question is whether the version 1 of Segwit script will allow you to use version 0 scripts types inside of it. In other words, is version 1 superset of version 0? Please include reasoning behind ...
1
vote
1answer
172 views

Multisig scripts hashing (p2sh): difference between legacy and segwit

Some time ago I noticed that, given the same inputs, addmultisigaddress and createmultisig Bitcoin core's methods were generating different p2sh (addresses). I asked around and a user from the ...
1
vote
1answer
79 views

Why do most exchanges still have not implemented segwit bc1 addresses to save block space?

Segwit bech32 bc1 addresses has been out for a good 2 years. Why do most exchanges still refuse to implement such a feature for its users? Exchanges create a bulk of the bitcoin transactions and also ...
0
votes
1answer
55 views

Following SegWit implementation, is BIP-146 signalling and implementation still on the docket?

Is BIP 146, which defines using the low S value, still on the docket to be signalled and implemented given that SegWit fixed the txid malleability issue by moving the witness outside the transaction? ...
1
vote
1answer
362 views

How to calculate segwit transaction fee in bytes?

I'm trying to calculate SegWit transaction fees in bytes, I have two Segwit inputs and 2 segwit outputs. can anyone calculate this transaction fees if I'm paying 100 Sat per byte?
1
vote
0answers
54 views

Stripped segwit data

I have two client Bitcoin, 0.17.0 and 0.12.0 and I want to see the difference between the same transaction. 0.17 has segwit, 0.12 doesn't have. If I do that RPC call in 0.17.0 /bin/bitcoin-cli -...
1
vote
1answer
293 views

Are there still miners or mining pool which refuse to implement SegWit?

It was well known that initially while SegWit got more than 50% of hashrate after activation that a part of the mining pools refused to implement it. But are there still blocks being mined by miners ...
1
vote
1answer
46 views

Failed CHECK(MULTI)SIG operation - BIP143 hash pre-image

Using Blockstream's api to broadcast a raw transaction to the Bitcoin testnet, I encountered the following error: sendrawtransaction RPC error: {"code":-26,"message":"non-mandatory-script-verify-flag ...
0
votes
0answers
24 views

Bitcoin was sent out and still hasn't been received

I sent bitcoin out to a segwit address (P2SH) and it split the transactions in 2 but I still haven't seen them delivered in into the wallet
1
vote
1answer
122 views

How to sweep a bc1… bitcoin segwit address using a mobile app?

I have a bitcoin private key with some money on the segwit bc1 address, but when I try to sweep this private key using mycellium android wallet, it shows up as a 3... address. What other mobile app ...
2
votes
1answer
41 views

Why does witness use count instead of length?

In legacy transaction (without SegWit) the scriptSig is easily parsed by knowing the length of it (a CompactInt value) and without needing to read the script in place. However in SegWit transaction ...
0
votes
1answer
113 views

How to generate the digest from a raw bitcoin transaction for verifying signature of specific input?

I'm writing a stand alone process that needs to verify that a known UTXO is part of a new transaction with a valid signature. Inputs [ UTXO, raw transaction, input_number ] How do to I verify the ...
4
votes
1answer
186 views

Activation of SegWit v1

The segregated witness soft fork of August 2017 included a versioning field which would allow for future incrementation. Anthony Towns has recently posted an early draft of the proposal for the SegWit ...
0
votes
0answers
21 views

Swift implementation of bitcoin transaction creation

Is there a well known and widely used Swift implementation for creating raw Bitcoin transactions and getting their hash (SegWit and Non-SegWit) of signing? If not, is there a reference document that ...
1
vote
2answers
109 views

If I was developing a Bitcoin wallet, should I support both legacy and compatibility addresses?

To receive funds, I was thinking of giving a user the option of displaying two QR codes: Legacy - p2phk e.g. 1AKDDsfTh8uY4X3ppy1m7jw1fVMBSMkzjP Compatibility - p2sh(p2wpkh) e.g. ...