Tuesday, November 28, 2023
HomeBitcointransactions - Are all three Bitcoin handle sorts interoperable (legacy, segwit, native...

transactions – Are all three Bitcoin handle sorts interoperable (legacy, segwit, native segwit)?


is it potential to ship transactions backwards and forwards between all 3 handle sorts (legacy, segwit, native segwit-bech32)?

Sure, in fact. It’s very regular at protocol stage.

Identical to what Murch had mentioned:

There aren’t any restrictions on sending from any sort of outputs to any handle sort within the Bitcoin protocol

The power to restrict the place the “unlocked” bitcoin (UTXO) might go is definitely a lacking function of bitcoin, referred to as “covenants”. At present individuals might solely use tips like presigned time-locked transactions to realize comparable objectives. Sooner or later perhaps this might be performed in a extra intuitive and highly effective method.


Nonetheless, an outdated pockets (or a cryptocurrency alternate with lazy/conservative technical workforce) could not have the ability to recognise native bech32 addresses, so that you just will not have the ability to ship bitcoins from such an outdated pockets (or withdraw from such a lazy cryptocurrency alternate) to a local bech32 SegWit handle – that is the one vital draw back.

To summarize:

Miner payment: (Most costly) 1-starting legacy handle > 3-starting p2sh-segwit > bc1-starting bech32 (least expensive)

Compatibility: (Most suitable) 1-starting legacy handle ≈ 3-starting p2sh-segwit (almostly as suitable as legacy) > bc1-starting bech32 (potential compatibility/interoperability concern)

Additionally, clearly you’ll be able to’t generate any SegWit handle with an outdated pockets with none SegWit help, so to’t obtain bitcoins with any SegWit handle utilizing such a pockets – the answer to this drawback is easy: simply improve the pockets to SegWit-supporting model, or change to a different pockets with correct SegWit help.

If somebody who is just too cussed to improve/change his/her pockets, it would not matter, as a result of (1) you’ll be able to nonetheless give him/her a 3-starting SegWit handle; (2) you’ll be able to completely ship transactions backwards and forwards between all 3 handle sorts utilizing a pockets with correct SegWit help.


(A transaction sending bitcoins all from) 1-starting P2PKH legacy addresses would not take pleasure in reductions of SegWit, in order that it has the costliest miner charges amongst these three handle sorts. Its digital byte depend is strictly the identical with precise/on-wire byte depend.

(A transaction sending bitcoins from) bc1-starting native Bech32 SegWit handle has the least knowledge measurement (byte depend), both digital (vByte) or precise/on-wire, in order that it enjoys the most affordable miner charges.

The truth is SegWit (v0) would not scale back transaction knowledge measurement a lot, its low-cost miner payment is principally a man-made low cost. Nonetheless SegWit transactions indeedly has technical benefit over legacy ones, like, avoiding the quadratic sighash drawback.

(A transaction sending bitcoins from) 3-starting P2SH-wrapped “suitable” SegWit handle truly consumes extra bytes than a legacy 1-starting handle (primarily as a result of P2SH “script hash” itself consumes 20 bytes), nonetheless, it nonetheless has cheaper miner payment than 1-starting legacy handle as a consequence of reductions.


A 3-starting handle is P2SH, which was introduced by Gavin Andresen at very early stage of the historical past of bitcoin (2012), in order that it is now extremely unbelievable to see a pockets which may’t recognise 3-starting P2SH addresses.

SegWit make the most of P2SH to “wrap” its particular “anyone-can-spend” script.

P2SH can truly “wrap” something. Its typical utilization has been multi-sig for fairly a very long time, a lot sooner than SegWit.

When an outdated pockets sends bitcoins to a 3-starting handle, it (the payer) would not care about what sort of stuff is “wrapped inside” that handle in any respect. It may be both a legacy multi-sig, SegWit, or one thing different – no matter, it would not matter.

(It might even be a very unspendable handle!)

It is then the accountability of the payee to make sure that (s)he can nonetheless spend the bitcoins on that 3-starting handle.


Then what’s “anyone-can-spend”?

Previous variations (pre-0.13) of bitcoin full nodes do not learn about SegWit in any respect in fact, in order that they clearly can not validate SegWit transactions (or blocks containing SegWit transactions) in accordance with the newly outlined SegWit guidelines.

Nonetheless they’d nonetheless settle for SegWit blocks as if these blocks had been legitimate, regardless of they can’t absolutely validate them – the ahead compatibility (often referred to as “backwards compatibility” by plenty of builders) remains to be retained, within the sense that outdated nodes which aren’t SegWit-aware can nonetheless work as regular.

As for SegWit transactions, these outdated nodes will not settle for/ahead/mine any SegWit transactions (besides sending to a 3-starting P2SH-wrapped SegWit handle). They might settle for confirmed SegWit transactions solely, in different phrases, SegWit blocks solely. Subsequently, if you wish to break SegWit guidelines, you will need to a minimum of turn into a (solo) miner your self, an almostly cost-free try like sending invalid “robbing” transaction from some SegWit addresses will not work in any respect. (Right here comes the minor draw back of SegWit that outdated non-SegWit-aware full nodes cannot see 0-confirmation SegWit transactions)

SegWit was rigorously designed to realize this. It is truly fairly much like what P2SH had performed.

There is a idea referred to as “standardness guidelines” in bitcoin, that such guidelines are simply self-discipline, in order that they solely limit the behavoir of a full node itself. “Standardness guidelines” do not apply to the blockchain, which accommodates blocks mined by numerous kinds of different nodes.

Solely “validity guidelines” or “consensus guidelines” apply to the blockchain.

SegWit handle truly means “anybody can spend bitcoins on this handle” in accordance with outdated validity guidelines, in order that outdated nodes would nonetheless settle for SegWit blocks. (Subsequently, there’s indeedly a theoretical, unavoidable danger {that a} chain break up might occur, if some malicious miners would insist on mining/extending an invalid blockchain “robbing” SegWit addresses – nonetheless it might be nonetheless clearly distinguishable between the legitimate chain and the invalid chain. SegWit-aware new nodes would solely settle for the legitimate chain) It violates the outdated standardness guidelines, in order that outdated nodes will not mine any SegWit transactions into their very own blocks.

Based on new validity guidelines, spending bitcoins from SegWit handle (sometimes) should present legitimate signatures, with out all-valid signatures it might be an invalid transaction, in order that new nodes would reject both such an invalid transaction, or a (thus invalid) block together with any invalid transaction. New nodes will not mine any invalid transaction into their very own blocks both, in fact. Nonetheless, in accordance with the new standardness guidelines, (legitimate) SegWit transactions can also be normal (not violating the brand new standardness guidelines), in order that new nodes would fortunately mine legitimate SegWit transactions into their very own blocks.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments