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
24 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
203 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
31 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
43 views

Does my segwit node only have segwit blocks?

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 ...
2
votes
3answers
2k views

What is the Witness and what data does it contain?

I've learned about the Segregated Witness but couldn't find info on breaking it down. I know usually when legacy addresses are used the public keys for example will be under Scriptig. With P2SH, I ...
1
vote
2answers
600 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 ...
2
votes
1answer
30 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
120 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 ...
4
votes
1answer
399 views

What is 'ScriptCode'?

I don't understand what the 'ScriptCode' thing is. Is it a part of transaction format? The wiki https://en.bitcoin.it/wiki/Transaction describes scriptPubKey and scriptSig, mentioning nothing about '...
-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 ...
3
votes
2answers
1k views

SegWit, Bitcoin JSON-RPC and (strange?) addresses

I'm trying to analyse this transaction: https://blockchain.info/tx/a388d6f88373aacf2a5c170eeff4adf51f2c6744da26375d5890f42d653a2e6c I used to be able to just run bitcoin-cli getrawtransaction txid 1 ...
6
votes
1answer
2k views

Which block explorers recognize bech32 addresses?

At this time, blockchain.info doesn't. Neither does blockchair or blockcypher.
4
votes
2answers
166 views

What is the point of including the scriptCode of the input in the transaction digest of segwit?

BIP143 specifies "a new transaction digest algorithm". scriptCode of the input (serialized as scripts inside CTxOuts) What problems could arise if the scriptCode of the input were not ...
1
vote
1answer
56 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 ...
1
vote
2answers
108 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
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 ?...
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
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? ...
0
votes
1answer
632 views

Segwit Address Supporting Testnet Faucet

Looking for a good Segwit supporting testnet faucet and preferably one that supports P2WPKH addresses, however answers that allow only P2WSH are fine too.
-4
votes
1answer
889 views

Could miners possibly steal SegWit transactions on The Real Bitcoin? [closed]

Going to be lolz epic when all the SegWit transactions are double-spent, i.e. stolen by miners on The Real Bitcoin (the legacy Satoshi blockchain). Can anyone offer any refutation, confirmation, or ...
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 ...
2
votes
1answer
103 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 ...
1
vote
1answer
119 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 ...
3
votes
1answer
763 views

Can Bitcoin Diamond be claimed on Segwit addresses?

I currently have my Bitcoin (BTC) on a Trezor hardware wallet with Segwit (Not in a "Legacy account"). Can I claim Bitcoin Diamond (BCD) with this or not? In general: Should I move my BTC to a ...
0
votes
2answers
612 views

Segwit Addressed from xpub key

How can i get the public key of my segwit address with my extended public key. when i import the xpub into electrum it automatically creates a legacy wallet for me. i'm not with my nano and won't be ...
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
250 views

Pycoin: How to sign SegWit transaction via Pycoin?

My target is to make transaction with unspent transaction outputs(UTXOS). The information of UTXOs is as follow. [ { "pt_idx": 0, "subaccount": 37, "ga_asset_id": 1, "value": "...
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 ...
1
vote
1answer
313 views

What is a “serialized signed transaction”?

Shown in the gray area here, describing how to apply, I think, Segwit to a transaction (particularly a Bitcoin Cash tx). The last section is titled "serialized signed transaction" however it doesn't ...
15
votes
1answer
11k views

How to generate SegWit address

How do I generate a SegWit address using Bitcoin Core CLI? Also will I be able to redeem those outputs and send them to a "legacy" address? If so, will this second transaction be accepted by older, ...
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 ...
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
294 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
64 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 ...
0
votes
2answers
75 views
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
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
37 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 ...
1
vote
2answers
126 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
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 ...
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
146 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
134 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 ...