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
1 vote
1 answer
105 views

Segwit includes the input amount in the SignatureHash. What possible attack can this prevent?

Legacy transactions only include transaction components in the SignatureHash, but segwit transactions also add the amounts of inputs in the SignatureHash. Quoting from the Mastering Bitcoin Book: ...
user avatar
1 vote
0 answers
278 views

crypto.com defiwallet sends bitcoin to random segwit address if a bitcoin taproot address is selected after confirmation of the correct address [closed]

When scanning the QR code of a taproot address with the DefiWallet of crypto.com the app will correctly show the taproot address, not give any warning of unsupported format or other error message (...
user avatar
1 vote
1 answer
34 views

How Does A Node Get Infomation From The TxID - that is, isn't the TxID the SHA^2(256) of various transaction components?

If I'm right, SegWit TxIDs are composed of the SHA^2(256) hash of the Non-SegWit data of a transaction. But, how does another Node use the TxID to obtain infomation about the transaction such as the ...
user avatar
  • 29
0 votes
1 answer
48 views

What Are The Parts Of A Bitcoin Transaction In SegWit Format?

I know that pre-segwit transactions looked like the following (This is the hash of the transaction in block 170 - the 10000 bitcoin pizza exchange): ...
user avatar
  • 29
0 votes
1 answer
32 views

How does Bitcoin Core know about a new address created in a different wallet?

Using importprvkey, I imported all the private keys of an Electrum wallet into a Bitcoin Core wallet (courtesy the electrum2core script; 🎩-tip: somedude). Then, in Electrum, I created a new bech32 ...
user avatar
  • 4,307
3 votes
1 answer
415 views

How do I know if the Bitcoin Core software on my computer is running taproot, segwit or something else?

I would like to check this. I imagine there must be some command to verify the current version of node software Bitcoin I am running ('version' is probably not the correct name here. Maybe 'soft fork' ...
user avatar
2 votes
0 answers
27 views

Bitcoin core imported wallet

I have a friend that has an issue with his core: He generated a wallet with coldcard, imported in bitcoin core.. received on both bech32 addresses and nested ones. Lost access to that pc and now when ...
user avatar
  • 113
1 vote
1 answer
53 views

How to make a P2SH-P2WPKH output using bitcoin-cli?

Can you give a simple step-by-step example on how to create a transaction with an output of P2SH-P2WPKH using bitcoin-cli on Regtest?
user avatar
2 votes
1 answer
61 views

Why does SegWit implement new address formats?

I would consider myself quite up-to-par with the concept and in-depth functionalities of SegWit (segregated witness). I just don't understand one key aspect of it; P2SH and bech32 addresses. why on ...
user avatar
0 votes
0 answers
29 views

Submitblock error: bad-signet-blksig

I try to submit the block, what I mined, but it is not accepted. Also, I could not find the solution by searching the similar questions. Setup: Centos 8 Linux, Qt programing and /bitcoincore/bitcoin-...
user avatar
1 vote
1 answer
34 views

How do pre-segwit clients evaluate segwit spends true?

Quoting Bitcoin wiki: A transaction is valid if nothing in the combined script triggers failure and the top stack item is true (non-zero). However, P2WPKH and P2WSH scriptPubkeys are two data pushes ...
user avatar
  • 13
0 votes
1 answer
53 views

Where are signatures stored in segwit, and why are addresses different?

So I'm researching SegWit, and as far as I'm aware, it re-organizes the data structure of transactions so that the ECDSA signature is not included in the preimage of the Tx Hash. I am also aware that ...
user avatar
3 votes
0 answers
151 views

Creating a P2SH-P2WPKH using Bitcoin Functional Test Framework

I'm using the Bitcoin Functional Test framework to understand how SegWit works by analyzing and building a P2SH-P2WPKH transaction. When I run my code the transaction gets created, but when I inspect ...
user avatar
1 vote
2 answers
51 views

What is the last non-segwit block mined?

I wanted to know what the last non-segwit block mined is, and if there are still some non-segwit miners?
user avatar
  • 41
0 votes
1 answer
28 views

Segwit: Does the nodes saves 2 types of blocks (or atleast in the past)

Was wondering for a long why mempool.space was showing blocks greater than 1mb! Started digging deeper and read these: https://jimmysong.medium.com/understanding-segwit-block-size-fd901b87c9d4 https:/...
user avatar
  • 155
0 votes
0 answers
16 views

questions about coinbase transacion

I am studing a coinbase transacion, and i have some questions. txid:6a67d404c25905f6774f2d136d9794ca0dc9db7d9b0acaa65933354b0e612652 for the scriptSig ...
user avatar
0 votes
3 answers
243 views

Bitcoin - How to identify if transaction is Segwit

Below is my logic to parse transaction from Bitcoin blk files Pull Version by getting uint32 Read next 2 bytes. If they are 0,1 then it is SegWit Else read again for varint to pull input count If ...
user avatar
  • 29
0 votes
0 answers
27 views

Okay so i sent btc from another wallet to my blockchain wallet since yesterday. It’s been over 16hours now and I haven’t received the btc in my wallet

I sent btc from my bitnob wallet to my newley created blockchain address. It’s been over 16 hours with 115 confirmations and yet the money isn’t in my blockchain walllet. Help anyone?
user avatar
0 votes
1 answer
49 views

What is the size and weight of a wrapped segwit single-sig input?

I'm looking for a detailed explanation of the exact weight, vsize and serialized length of a P2SH-P2WPKH (wrapped-segwit single-sig) input, in the same vein as How big is the input of a P2PKH ...
user avatar
  • 62.3k
3 votes
1 answer
38 views

Is it possible for the `size` and `vsize` to be the same for a valid segwit (bech32) transaction?

I'm aware that for non-segwit transactions, vsize is always the same as size. But is it possible for a valid transaction to include size=vsize when involving segwit inputs/outputs? This particular ...
user avatar
  • 196
1 vote
1 answer
63 views

Reference to Segwit raw transation format

Could anyone provide me a link to the specification of segwit raw transactions such as provided in https://developer.bitcoin.org/reference/transactions.html#raw-transaction-format ? (This url explains ...
user avatar
1 vote
1 answer
109 views

Issue when broadcasting Taproot transaction to older nodes

I'm trying to broadcast a Taproot transaction to random nodes across the network (Testnet3). When I try to broadcast to older nodes like 0.18.0, I get the error "Witness version reserved for soft-...
user avatar
  • 13
2 votes
1 answer
69 views

Is it okay to send witness transactions in response to `MSG_TX` get data messages?

I have a neutrino client that currently signals NODE_NONE. When it announces transactions it sends inventory messages and gets getdata MSG_TX requests back. Currently it replies with the witness ...
user avatar
4 votes
1 answer
187 views

How could a 2 byte witness program make sense?

BIP141 requires the witness program to be 2-40 bytes for segwit versions 1-16 (for v0 it must be either 20 or 32 bytes). When would a 2 byte witness program ever make sense? The 16 bits entropy is ...
user avatar
3 votes
1 answer
113 views

Why do you have to mine 432 blocks to activate segwit on regtest?

According to Rusty Russel, you need to mine 432 blocks to activate segwit on regtest. Why this specific blockheight? Sources: https://rusty-lightning.medium.com/segregated-witness-for-developers-...
user avatar
  • 1,359
1 vote
2 answers
564 views

Derive Segwit Addresses From xPub or zPub using PYTHON

Summary I'm pulling my hair out trying to understand a couple of concepts. I would like to use a Segwit wallet in my Ledger Nano S to derive unhardened(?) child public keys (and thus segwit addresses) ...
user avatar
  • 15
0 votes
1 answer
152 views

Does Ledger Nano S Have an xPub or a zPub for Bitcoin wallets?

{ "xpub": "tpub-big-long-key-that-starts-with-tpub", "index": 1, "freshAddressPath": "84'/1'/1'/0/0", "id": "libcore:1:...
user avatar
  • 15
0 votes
2 answers
58 views

Error broadcasting SegWit transaction

I have this testnet transaction that I created: Version: 01000000 Marker: 00 Flag: 01 Input Count: 01 Input #1 TXID: 42a752fe4ebd0bdc69cb1b3724de6ccc364661028ab9c043526f3f7cb0571147 Input #1 ...
user avatar
  • 55
2 votes
1 answer
71 views

how do you tell P2WSH invoice addresses apart from P2SH?

... and how do you tell P2WPKH invoice addresses apart from P2PKH?
user avatar
  • 294
0 votes
1 answer
114 views

Missing Witness field in p2wpkh decoded tx hex

I have placed together a raw tx hex but when it's unable to be broadcasted as I keep getting an error below sendrawtransaction RPC error: {"code":-25,"message":"bad-txns-...
user avatar
3 votes
2 answers
817 views

Why are segwit transactions cheaper than legacy transactions?

What's the reason to make fees for segwit addresses lower, while keeping legacy addresses with higher fees? -- I'm interested in both, why segwit transactions are cheaper than legacy addresses, and ...
user avatar
2 votes
1 answer
320 views

What is the prefix number, in bytes, of a native segwit address?

I've seen lots of tables on which bytes to use as the prefix for types of addresses. For example 0x00 for legacy addresses starting with a 1. But what's the prefix for native segwit 'bc1q'? I've tried ...
user avatar
  • 121
3 votes
0 answers
43 views

What are the malleability threat vectors when passing PSBTs to other actors?

If I am passing a PSBT (Partially Signed Bitcoin Transaction) between multiple people, and I pass on my signature for my UTXOs for given inputs, can someone take advantage of malleability and cheat me ...
user avatar
  • 1,359
0 votes
1 answer
99 views

Most transactions in a block

Block 689074 had 4,463 transactions. Is this the highest number of transactions in a block until now? What are the things that affect the number of transactions possible in a block? Few observations ...
user avatar
1 vote
1 answer
165 views

Creating Witness Signature: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

So I am trying to do my own witness signatures as described in bip143. I have code that correctly verifies the example signature, so I thought I had a hold of the basic signing and verification. I ...
user avatar
  • 412
2 votes
2 answers
105 views

The example signature in BIP143 doesn't validate?

In BIP143 the first example has a witness signature and it doesn't appear to validate/be correct?! I wrote a super simple python program to demonstrate import ecdsa import asn1 #Importing the 3 ...
user avatar
  • 412
0 votes
1 answer
58 views

bip143 witness formatting

in bip143 thet define a witness signature. In the first example there is a witness broken down witness 00 02 ...
user avatar
  • 412
0 votes
1 answer
73 views

When generating witness for bip143, how do you choose WHAT outpoint to use?

in bip 143 for creating a witness signature it describes what needs to be serialized/signed. One thing that the doc seems to be missing is how to determine WHICH outpoint to use. So in these ...
user avatar
  • 412
6 votes
1 answer
190 views

Will P2TR make P2WSH obsolete?

Assuming users have upgraded their wallets to handle P2TR outputs and trust the validation rules of P2TR, would there be any advantage of using P2WSH over P2TR?
user avatar
  • 669
5 votes
1 answer
161 views

Are the witnesses segregated with Schnorr signatures?

SegWit fixed transaction malleability by just moving the signature out of the block of data that's being hashed to form the transaction id. However, Schnorr does not suffer from signature malleability ...
user avatar
1 vote
1 answer
57 views

Are high-s ECDSA signatures forbidden in segwit witnesses?

I must have looked that up five times by now, but did segwit actually forbid high-s ECDSA signatures in witnesses, esp. in standard single-sig constructions such as P2SH-P2WPKH or P2WPKH? Or are high-...
user avatar
  • 62.3k
0 votes
1 answer
238 views

generating a zprv from a base58 rootKey with bitcoinjs-lib

var bitcoin = require('bitcoinjs-lib'); let bip32 = require('bip32'); let rootKey = 'xprv9s21ZrQH143K32CfqoCQHtbKiEb5BqFazXX6jCtNCnuty3gUjxS4CsXWi9rcNyHdjDVPiC6P1bnyEZr2ioouRq56h6HAdwejeTty1BsSEtL' ...
user avatar
0 votes
1 answer
98 views

Using Javascript, I want to generate a segwit private key (zprv) similarly to how I am generating my legacy base58 extended private key. How?

let bip32 = require('bip32'); let bip39 = require('bip39'); let { bech32, bech32m } = require('bech32') const seed = bip39.mnemonicToSeedSync('rural catch say tooth tell soul road pilot fee board ...
user avatar
5 votes
1 answer
307 views

Will cross-input signature aggregation need a new output type?

If cross-input signature aggregation were to get implemented in a subsequent soft fork after Taproot's activation, would its use require a new output type?
user avatar
  • 62.3k
4 votes
2 answers
383 views

Why are P2WSH addresses larger than P2SH addresses?

One would, perhaps naively, assume that both addresses are hashes of scripts and therefore ought to be the same size.
user avatar
1 vote
1 answer
91 views

Nbitcoin's BitcoinPubKeyAddress not recognizing native segwit addresses

I'm trying to build a transaction using Nbitcoin. When I run this line there is an error parsing the address. It runs fine with segwit addresses starting with a 1, but not native segwit. Using System; ...
user avatar
  • 121
1 vote
1 answer
200 views

How to correctly create and import a SegWit paper wallet

I use Bitcoin Core to create SegWit paper wallets for friends and family. After creating the wallet via the GUI, the steps I take are as follows: getnewaddress # Carry this public key back to the ...
user avatar
2 votes
3 answers
195 views

How hard is it for an exchange to adopt native segwit? Is it not as simple as updating the address regex checker on the front-end?

Just wondering, maybe I'm missing something. Are there changes on the backend needed to be implemented as well? Not as simple as changing the regex validation on the front end?
user avatar
  • 123
0 votes
1 answer
1k views

How can I generate SegWit addresses from a mnemonic using python?

So, I have written a script that generates BIP39 mnemonics. I now want to generate N native SegWit public keys from this mnemonic. I have found this, but it generates legacy addresses. It uses the ...
user avatar
2 votes
1 answer
203 views

What prevents miners from inserting fake transactions given SegWit?

If I'm understanding segwit correctly, miners have to verify signatures in order to include a transaction into a block that they are mining. However, miners are not required to verify signatures in ...
user avatar
  • 291

1
2 3 4 5
11