Tuesday, May 12, 2026
The BLOCKCHAIN Page
No Result
View All Result
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoins
  • DeFi
  • Ethereum
  • Dogecoin
  • XRP
  • Regulations
  • NFTs
The BLOCKCHAIN Page
No Result
View All Result
Home Ethereum

Why Not Just Use X? An Instructive Example from Bitcoin

by admin
June 5, 2024
in Ethereum
0
Dodging a bullet: Ethereum State Problems
0
SHARES
11
VIEWS
Share on FacebookShare on Twitter


Bitcoin developer Gregory Maxwell writes the next on Reddit:

There’s a design flaw within the Bitcoin protocol the place its potential for a 3rd occasion to take a legitimate transaction of yours and mutate it in a means which leaves it legitimate and functionally similar however with a distinct transaction ID. This significantly complicates writing right pockets software program, and it may be used abusively to invalidate lengthy chains of unconfirmed transactions that rely on the non-mutant transaction (since transactions refer to one another by txid).

This difficulty arises from a number of sources, certainly one of them being OpenSSL’s willingness to simply accept and make sense of signatures with invalid encodings. A traditional ECDSA signature encodes two massive integers, the encoding isn’t fixed size— if there are main zeros you might be presupposed to drop them.

It’s straightforward to put in writing software program that assumes the signature shall be a continuing size after which depart further main zeros in them.

It is a very attention-grabbing cautionary story, and is especially essential as a result of conditions like these are a part of the rationale why we’ve got made sure design selections in our growth philosophy. Particularly, the difficulty is that this: many individuals proceed to carry up the purpose that we’re in lots of locations unnecessarily reinventing the wheel, creating our personal serialization format, RLP, as a substitute of utilizing the prevailing protobuf and we’re constructing an application-specific scripting language as a substitute of “simply utilizing Lua”. It is a very legitimate concern; not-invented-here syndrome is a commonly-used pejorative, so doing such in-house growth does require justification.

And the cautionary story I quoted above supplies exactly the right instance of the justification that I’ll present. Exterior applied sciences, whether or not protobuf, Lua or OpenSSL, are superb, and have years of growth behind them, however in lots of instances they had been by no means designed with the right consensus, determinism and cryptographic integrity in thoughts that cryptocurrencies require. The OpenSSL scenario above is the right instance; other than cryptocurrencies, there actually isn’t any different conditions the place the truth that you possibly can take a legitimate signature and switch it into one other legitimate signature with a distinct hash is a big drawback, and but right here it’s deadly. Certainly one of our core rules in Ethereum is simplicity; the protocol needs to be so simple as potential, and the protocol shouldn’t comprise any black containers. Each single characteristic of each single sub-protocol needs to be exactly 100% documented on the whitepaper or wiki, and carried out utilizing that as a specification (ie. test-driven growth). Doing this for an present software program package deal is arguably virtually as exhausting as constructing a completely new package deal from scratch; in truth, it could even be tougher, since present software program packages usually have extra complexity than they should in an effort to be feature-complete, whereas our alternate options don’t – learn the protobuf spec and examine it to the RLP spec to know what I imply.

Be aware that the above precept has its limits. For instance, we’re definitely not silly sufficient to begin inventing our personal hash algorithms, as a substitute utilizing the universally acclaimed and well-vetted SHA3, and for signatures we’re utilizing the identical previous secp256k1 as Bitcoin, though we’re utilizing RLP to retailer the v,r,s triple (the v is an additional two bits for public key restoration functions) as a substitute of the OpenSSL buffer protocol. These sorts of conditions are those the place “simply utilizing X” is exactly the fitting factor to do, as a result of X has a clear and well-understood interface and there are not any refined variations between totally different implementations. The SHA3 of the empty string is c5d2460186…a470 in C++, in Python, and in Javascript; there’s no debate about it. In between these two extremes, it’s principally a matter of discovering the fitting steadiness.



Source link

Tags: BitcoinInstructive
admin

admin

Recommended

Crypto markets close in on bullish week

Crypto markets close in on bullish week

3 years ago
Web 3.0 Company Treehouse Acquires Origins, Targets Its NFT-Related Tools

Web 3.0 Company Treehouse Acquires Origins, Targets Its NFT-Related Tools

3 years ago

Popular News

  • Protocol-Owned Liquidity: A Sustainable Path for DeFi

    Protocol-Owned Liquidity: A Sustainable Path for DeFi

    0 shares
    Share 0 Tweet 0
  • Cryptocurrency for College: Exploring DeFi Scholarship Models

    0 shares
    Share 0 Tweet 0
  • What are rebase tokens, and how do they work?

    0 shares
    Share 0 Tweet 0
  • What is Velodrome Finance (VELO): why it’s a next-gen AMM

    0 shares
    Share 0 Tweet 0
  • $10 XRP Price Envisioned By Fund Manager As Ripple Mounts Trillion-Dollar Payment Markets ⋆ ZyCrypto

    0 shares
    Share 0 Tweet 0

Latest

Linux Mint vs. Elementary OS: I compared both distros, and here’s my advice

Linux Mint vs. Elementary OS: I compared both distros, and here’s my advice

May 12, 2026
Ripple Gets Major Boost For Prime Brokerage Growth: $200M Debt Facility Announced

Ripple Gets Major Boost For Prime Brokerage Growth: $200M Debt Facility Announced

May 12, 2026

Categories

  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • DeFi
  • Dogecoin
  • Ethereum
  • Market & Analysis
  • NFTs & Metaverse
  • Regulations
  • XRP

Follow us

Recommended

  • Linux Mint vs. Elementary OS: I compared both distros, and here’s my advice
  • Ripple Gets Major Boost For Prime Brokerage Growth: $200M Debt Facility Announced
  • XRP NEWS: JPMorgan and Mastercard Leverage XRP Ledger for Tokenized Treasury Redemptions
  • Microsoft is boosting the launch time of key Windows apps and features – here’s how
  • My home’s Wi-Fi dead zones were worse than I thought – here’s what fixed them
  • About us
  • Privacy Policy
  • Terms & Conditions

© 2023 TheBlockchainPage | All Rights Reserved

No Result
View All Result
  • Home
  • Cryptocurrency
  • Blockchain
  • Bitcoin
  • Market & Analysis
  • Altcoins
  • DeFi
  • Ethereum
  • Dogecoin
  • XRP
  • Regulations
  • NFTs

© 2023 TheBlockchainPage | All Rights Reserved