ODIN Implements SegWit — Let’s Talk About What That Means
Status Update!
As of today, January 6th, 2020, SegWit has been successfully implemented into the core ODIN Blockchain protocol. This article was made some months before the implementation and therefore the language will speak in ‘what if’ and ‘soon to come’ terms. We are happy to announce that over the past few months SegWit has been successfully hard coded into the core blockchain and is now in full effect on the main chain!
This article intends to provide a basic understanding of the SegWit (Segregated Witness) core protocol and how implementation will affect ODIN Blockchain in the near and long term. It should be noted that ODIN Blockchain’s lineage is as such: Bitcoin → PIVX → Phore → ODIN (with ODIN specific code hard written on top of parent chains being used.) Thus explaining the usage of core protocols updates such as SegWit. This is common practice and is seen by chains such as Litecoin.
Definitions
Testnet — “A testing network for a decentralized project, that allows testing of experimental features.
The testnet is an alternative blockchain, to be used for testing. Testnet coins are separate and distinct from actual coins, and are never supposed to have any value. This allows application developers or [ODIN] testers to experiment, without having to use real bitcoins or worrying about breaking the main [ODIN] chain.” (TokenMarket.net)
SegWit — “SegWit is the process by which the block size limit on a blockchain is increased by removing signature data from transactions. When certain parts of a transaction are removed, this frees up space or capacity to add more transactions to the chain.
Segregate means to separate, and Witnesses are the transaction signatures. Hence, Segregated Witness in short, means to separate transaction signatures.
The concept of SegWit was formulated by bitcoin developer Pieter Wuille.” (Investopedia.com)
SegWit
“SegWit (short for Segregated Witness) is a protocol upgrade that changes the way data is stored.” (CoinDesk)
If you’re unfamiliar with the SegWit protocol, let me suggest a very informative Q&A by, Andreas M. Antonopoulos, that breaks it down into an easy to understand concept. You can watch that here.
Benefits of SegWit
- SegWit Fixes Transaction Malleability
- Capacity Increases
- Preemptive Measure Against Scaling Issues
Fixes for Transaction Malleability
Bitcoin transactions are identified by a 64-digit hexadecimal hash called a transaction identifier (txid) which is based on both the coins being spent and on who will be able to spend the results of the transaction. . .Segwit prevents third-party and scriptSig malleability by allowing users to move the malleable parts of the transaction into the transaction witness, and segregating that witness so that changes to the witness does not affect calculation of the txid.(BitcoinCore.org)
What’s so bad about transaction malleability if the funds ultimately go from the original sender to the intended receiver?
Anyone spending unconfirmed transactions: if Alice pays Bob in transaction 1, Bob uses that payment to pay Charlie in transaction 2, and then Alice’s payment gets malleated and confirmed with a different txid, then transaction 2 is now invalid and Charlie has not been paid. If Bob is trustworthy, he will reissue the payment to Charlie; but if he isn’t, he can simply keep those [coins] for himself. (BitcoinCore.Org)
Wallet authors tracking spent bitcoins: it’s easiest to monitor the status of your own outgoing transactions by simply looking them up by txid. But in a system with third-party malleability, wallets must implement extra code to be able to deal with changed txids. (BitcoinCore.Org)
Ultimately ODIN Blockchain prioritizes both user experience and user security when providing Blockchain-based products and services. If bad actors, i.e., untrustworthy third parties chose to edit transaction IDs on a trade maliciously, the user of our product or service, if hosted on a chain vulnerable to such acts, would suffer. An experience like this isn’t good for the user, which ultimately isn’t suitable for the ecosphere as a whole. As crypto inches toward pure trustless systems, we intend to be on the cutting edge — providing our user base the best experience possible.
Capacity Increases
“Since old nodes will only download the witness-stripped block, they only enforce the 1 MB block size limit rule on that data. New nodes, which understand the full block with witness data, are therefore free to replace this limit with a new one, allowing for larger block sizes. Segregated witness, therefore, takes advantage of this opportunity to raise the block size limit to nearly 4 MB, and adds a new cost limit to ensure blocks remain balanced in their resource use (this effectively results in an effective limit closer to 1.6 to 2 MB).” (BitcoinCore.org)
In instances where the block size is limited to 1MB, 99% of that space is taken up by transaction data. Of that 99%, 65% is taken up by signature data. SegWit allows for this signature data to be segregated (hence SegWit) and stored toward the end of the block. This results in more predictable transaction ID calculations.
A brilliantly simple explanation of this block data organizational structure can be seen here.
Scaling Solution
Linear Scaling vs Quadratic Scaling (BitcoinCore.org)
“A major problem with simple approaches to increasing the [blocksize] is that for certain transactions, signature-hashing scales quadratically rather than linearly.”
When considering consensus algorithms like that of ODIN’s, as transaction size increases, the signature hash required would scale quadratically rather than linearly in some instances. This increases transaction time, sometimes as much as to three minutes for maliciously edited transaction IDs — this means safer transactions from large scale investors and payments to mining pools and the like. All in all, scaling quadratically means longer transaction verification times. Which, frankly, no one wants. SegWit solves that.
What does this mean for ODIN?
Several times throughout this article I’ve mentioned ODIN’s lineage. This lineage makes the implementation of core protocols like SegWit in theory much easier than ground-up builds providing the advancements of parent chains to ODIN. This, in my opinion, is simply a win-win. We have the advantage of implementing tech from arguably the most developed chain as well as hard writing new code specific to that of ODIN.
I understand that SegWit in TestNet went well. When can we expect in on the core ODIN Blockchain?
Estimates from ODIN lead technical advisor and ODIN Blockchain Chairperson, Vaughn Bullock, have full primary chain implementation in the coming 4–6 weeks. Stay tuned for more.
In closing
Technical development like this is often taken for granted. The difficulty and ingenuity of such cannot be understated. With this, I would welcome any critiques as to my understandings so I can present the most accurate of data. Stop by our Discord or comment below with any editorial suggestions.
Where do I find out more about ODIN?
Discord Reddit Telegram ODIN Blockchain M.A.S.H. Odin.Chat
Read more about how to get Ø(ODIN) here.
Come on by our discord and @ [nondescript | ODIN] to have a discussion around the topics in this article.