Tuesday, September 1, 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

Hive: How we strived for a clean fork

by admin
December 9, 2023
in Ethereum
0
Dodging a bullet: Ethereum State Problems
0
SHARES
14
VIEWS
Share on FacebookShare on Twitter


The DAO soft-fork try was tough. Not solely did it prove that we underestimated the negative effects on the consensus protocol (i.e. DoS vulnerability), however we additionally managed to introduce a knowledge race into the rushed implementation that was a ticking time bomb. It was not supreme, and despite the fact that averted on the final occasion, the quick approaching hard-fork deadline regarded eerily bleak to say the least. We wanted a brand new technique…

The stepping stone in direction of this was an concept borrowed from Google (courtesy of Nick Johnson): writing up an in depth postmortem of the occasion, aiming to evaluate the basis causes of the difficulty, focusing solely on the technical points and applicable measures to stop recurrence.

Technical options scale and persist; blaming individuals doesn’t. ~ Nick

From the postmortem, one fascinating discovery from the angle of this weblog put up was made. The soft-fork code inside [go-ethereum](https://github.com/ethereum/go-ethereum) appeared strong from all views: a) it was completely coated by unit exams with a 3:1 test-to-code ratio; b) it was completely reviewed by six basis builders; and c) it was even manually reside examined on a non-public community… But nonetheless, a deadly knowledge race remained, which might have doubtlessly prompted extreme community disruption.

It transpired that the flaw might solely ever happen in a community consisting of a number of nodes, a number of miners and a number of blocks being minted concurrently. Even when all of these eventualities held true, there was solely a slight probability for the bug to floor. Unit exams can not catch it, code reviewers could or could not catch it, and guide testing catching it will be unlikely. Our conclusion was that the event groups wanted extra instruments to carry out reproducible exams that might cowl the intricate interaction of a number of nodes in a concurrent networked situation. With out such a instrument, manually checking the assorted edge circumstances is unwieldy; and with out doing these checks constantly as a part of the event workflow, uncommon errors would grow to be inconceivable to find in time.

And thus, hive was born…

What’s hive?

Ethereum grew massive to the purpose the place testing implementations turned an enormous burden. Unit exams are high quality for checking varied implementation quirks, however validating {that a} shopper conforms to some baseline high quality, or validating that purchasers can play properly collectively in a multi shopper atmosphere, is all however easy.

Hive is supposed to function an simply expandable check harness the place anybody can add exams (be these easy validations or community simulations) in any programming language that they’re snug with, and hive ought to concurrently be capable to run these exams in opposition to all potential purchasers. As such, the harness is supposed to do black field testing the place no shopper particular inside particulars/state will be examined and/or inspected, relatively emphasis can be placed on adherence to official specs or behaviors below completely different circumstances.

Most significantly, hive was designed from the bottom as much as run as a part of any purchasers’ CI workflow!

How does hive work?

Hive’s physique and soul is [docker](https://www.docker.com/). Each shopper implementation is a docker picture; each validation suite is a docker picture; and each community simulation is a docker picture. Hive itself is an all encompassing docker picture. This can be a very highly effective abstraction…

Since Ethereum clients are docker photos in hive, builders of the purchasers can assemble the very best atmosphere for his or her purchasers to run in (dependency, tooling and configuration clever). Hive will spin up as many cases as wanted, all of them working in their very own Linux techniques.

Equally, as test suites validating Ethereum purchasers are docker photos, the author of the exams can use any programing atmosphere he’s most accustomed to. Hive will guarantee a shopper is working when it begins the tester, which may then validate if the actual shopper conforms to some desired habits.

Lastly, network simulations are but once more outlined by docker photos, however in comparison with easy exams, simulators not solely execute code in opposition to a working shopper, however can truly begin and terminate purchasers at will. These purchasers run in the identical digital community and might freely (or as dictated by the simulator container) join to one another, forming an on-demand non-public Ethereum community.

How did hive assist the fork?

Hive is neither a substitute for unit testing nor for thorough reviewing. All present employed practices are important to get a clear implementation of any characteristic. Hive can present validation past what’s possible from a median developer’s perspective: working in depth exams that may require advanced execution environments; and checking networking nook circumstances that may take hours to arrange.

Within the case of the DAO hard-fork, past all of the consensus and unit exams, we would have liked to make sure most significantly that nodes partition cleanly into two subsets on the networking stage: one supporting and one opposing the fork. This was important because it’s inconceivable to foretell what hostile results working two competing chains in a single community might need, particularly from the minority’s perspective.

As such we have carried out three particular community simulations in hive:

  • The first to verify that miners working the total Ethash DAGs generate appropriate block extra-data fields for each pro-forkers and no-forkers, even when attempting to naively spoof.

  • The second to confirm {that a} community consisting of combined pro-fork and no-fork nodes/miners accurately splits into two when the fork block arrives, additionally sustaining the break up afterwards.

  • The third to verify that given an already forked community, newly becoming a member of nodes can sync, quick sync and lightweight sync to the chain of their selection.

The fascinating query although is: did hive truly catch any errors, or did is simply act as an additional affirmation that all the things’s all proper? And the reply is, each. Hive caught three fork-unrelated bugs in Geth, however additionally closely aided Geth’s hard-fork improvement by constantly offering suggestions on how adjustments affected community habits.

There was some criticism of the go-ethereum staff for taking their time on the hard-fork implementation. Hopefully individuals will now see what we have been as much as, whereas concurrently implementing the fork itself. All in all, I imagine hive turned out to play fairly an vital function within the cleanness of this transition.

What’s hive’s future?

The Ethereum GitHub group options [4 test tools already](https://github.com/ethereum?utf8=%E2percent9Cpercent93&question=check), with a minimum of one EVM benchmark instrument cooking in some exterior repository. They don’t seem to be being utilised to their full extent. They’ve a ton of dependencies, generate a ton of junk and are very difficult to make use of.

With hive, we’re aiming to mixture all the assorted scattered exams below one common shopper validator that has minimal dependencies, will be prolonged by anybody, and might run as a part of the each day CI workflow of shopper builders.

We welcome anybody to contribute to the mission, be that including new purchasers to validate, validators to check with, or simulators to seek out fascinating networking points. Within the meantime, we’ll attempt to additional polish hive itself, including assist for working benchmarks in addition to mixed-client simulations.

With a bit or work, possibly we’ll even have assist for working hive within the cloud, permitting it to run community simulations at a way more fascinating scale.




Source link

Tags: CleanForkHIVEstrived
admin

admin

Recommended

‘Run It Back’ – Crypto Analyst Predicts Massive Rallies for Ethereum and Solana, Says October Will Be ‘Lit’

‘Run It Back’ – Crypto Analyst Predicts Massive Rallies for Ethereum and Solana, Says October Will Be ‘Lit’

2 years ago
Os avanços na construção de um ecossistema DeFi no Bitcoin | Opinião

Os avanços na construção de um ecossistema DeFi no Bitcoin | Opinião

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

The 10 most popular products ZDNET readers bought this month (including lots of phone cases)

The 10 most popular products ZDNET readers bought this month (including lots of phone cases)

September 1, 2026
Microsoft’s latest Windows update breaks cursors, wallpaper, and more – what to do if you’re affected

Microsoft’s latest Windows update breaks cursors, wallpaper, and more – what to do if you’re affected

August 31, 2026

Categories

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

Follow us

Recommended

  • The 10 most popular products ZDNET readers bought this month (including lots of phone cases)
  • Microsoft’s latest Windows update breaks cursors, wallpaper, and more – what to do if you’re affected
  • 3 surveys deliver the same uncomfortable truth about adopting agentic AI
  • stillOS offers one of the best Linux onboarding experiences I’ve ever seen
  • This pocket AI voice recorder took me back to the good old days of dictation (and shorthand)
  • 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