Author

Topic: SegWit question (Read 917 times)

sr. member
Activity: 475
Merit: 255
January 20, 2016, 05:24:32 AM
#6
[1] not sure which prefix though, 1, 2, 3, 5 are used, so maybe 4? or S for SegWit?

It depends on SegWit program. I think it will be p... for P2WPKH address and 7... for a P2WSH address.
But it looks that BIPs change on the go.
Quote
BIP142:
For P2WPKH address, the address version is 6 (0x06) for a main-network address or 3 (0x03) for a testnet address.
For P2WSH address, the address version is 10 (0x0A) for a main-network address or 40 (0x28) for a testnet address.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
January 20, 2016, 12:39:03 AM
#5
Im really confused here and I dont know if this is me or you, so I will just put this out there.

My understanding is that in order to create a SigWit transaction you pay to a SegWit address first. Thus its always the receiving party that deceides whether or not they want to use SegWit or not. If I create a "anyone can spend" address that is not SegWit, its my own fault that literally anyone can spend my funds as soon as someone else paid me. SegWit would introduce a new address type[1] to clearify on the highest level whats going on. So if I just dont upgrade, I keep using the same old version 1 addresses and nothing is going wrong, except that I might have to pay more in fees when I spend the coins.



[1] not sure which prefix though, 1, 2, 3, 5 are used, so maybe 4? or S for SegWit?
staff
Activity: 3458
Merit: 6793
Just writing some code
January 19, 2016, 05:03:17 PM
#4
Hallo.
I have read BIPs 141-144 about Segregate witness and I have a question about validity of SegWit "witnessed" tx for old (non-upgraded) nodes.
Quote
Non-upgraded nodes, however, will not see nor validate the witness data and will consider all witness programs as anyone-can-spend scripts.

So they consider such transactions as valid. But what if someone constructs SegWit-like tx (but without valid SegWit script/witness program). Non-upgraded node (eg. merchant selling goods) would see and accept such transaction as valid (and send goods to customer). But the majority of upgraded network would refuse such tx.
Is there any workaround (besides upgrading node to include segwit and besides waiting for several confirmations for all anyone-can-spend scripts)?
From what I understand, there is no workaround to this without either upgrading or waiting for confirmations. However, that is the risk that merchants take by accepting unconfirmed transactions. Without some changes to software to recognize those transactions, then those merchants risk losing money. With that risk, they will probably upgrade to accept segwit transactions or at least recognize segwit transactions and wait for confirmations on them.
sr. member
Activity: 475
Merit: 255
January 19, 2016, 02:29:44 PM
#3
Non-upgraded node (eg. merchant selling goods) would see and accept such transaction as valid (and send goods to customer).

All miners will upgrade software, otherwise they will mine block which will be rejected by majority.

So, this transaction will be unconfirmed for this merchant. Smiley

But I recommend you to upgrade your wallet!

So waiting for at least one confirmation (if all miner upgrade) and 2-3 confirmations if majority upgrade. OR Upgrading wallet.
Exactly those two solutions I excluded and did not ask for.  Smiley
Quote
(besides upgrading node to include segwit and besides waiting for several confirmations for all anyone-can-spend scripts)
legendary
Activity: 954
Merit: 1003
January 19, 2016, 02:16:55 PM
#2
Non-upgraded node (eg. merchant selling goods) would see and accept such transaction as valid (and send goods to customer).

All miners will upgrade software, otherwise they will mine block which will be rejected by majority.

So, this transaction will be unconfirmed for this merchant. Smiley

But I recommend you to upgrade your wallet!
sr. member
Activity: 475
Merit: 255
January 19, 2016, 02:05:25 PM
#1
Hallo.
I have read BIPs 141-144 about Segregate witness and I have a question about validity of SegWit "witnessed" tx for old (non-upgraded) nodes.
Quote
Non-upgraded nodes, however, will not see nor validate the witness data and will consider all witness programs as anyone-can-spend scripts.

So they consider such transactions as valid. But what if someone constructs SegWit-like tx (but without valid SegWit script/witness program). Non-upgraded node (eg. merchant selling goods) would see and accept such transaction as valid (and send goods to customer). But the majority of upgraded network would refuse such tx.
Is there any workaround (besides upgrading node to include segwit and besides waiting for several confirmations for all anyone-can-spend scripts)?
Jump to: