Bitcoin Forum
May 07, 2024, 09:41:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SegWit question  (Read 892 times)
ZephramC (OP)
Sr. Member
****
Offline Offline

Activity: 475
Merit: 255



View Profile
January 19, 2016, 07: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)?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
pianist
Legendary
*
Offline Offline

Activity: 954
Merit: 1003


View Profile
January 19, 2016, 07: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!
ZephramC (OP)
Sr. Member
****
Offline Offline

Activity: 475
Merit: 255



View Profile
January 19, 2016, 07: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)
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6631


Just writing some code


View Profile WWW
January 19, 2016, 10: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.

shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1520


No I dont escrow anymore.


View Profile WWW
January 20, 2016, 05: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?

Im not really here, its just your imagination.
ZephramC (OP)
Sr. Member
****
Offline Offline

Activity: 475
Merit: 255



View Profile
January 20, 2016, 10: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!