Friday, May 9, 2025
Social icon element need JNews Essential plugin to be activated.
BLOC PRESS
  • Home
  • Cryptocurrency
  • Bitcoin
  • Ethereum
  • Blockchain
  • Altcoin
  • Crypto Mining
  • Nft
  • Market & Analysis
No Result
View All Result
BLOC PRESS
No Result
View All Result

Hive: How we strived for a clean fork

Andrew Aldridge by Andrew Aldridge
May 3, 2024
in Ethereum
0
Dodging a bullet: Ethereum State Problems

[ad_1]

The DAO soft-fork attempt was difficult. Not only did it turn out that we underestimated the side effects on the consensus protocol (i.e. DoS vulnerability), but we also managed to introduce a data race into the rushed implementation that was a ticking time bomb. It was not ideal, and even though averted at the last instance, the fast approaching hard-fork deadline looked eerily bleak to say the least. We needed a new strategy…

Related articles

Ethereum ETFs soar to $428M in inflows: ETH a step closer to $4K now?

Ethereum ETFs soar to $428M in inflows: ETH a step closer to $4K now?

December 7, 2024
Ethereum To Pull A BTC 2021-Like Rally? Analyst Weighs In

Ethereum To Pull A BTC 2021-Like Rally? Analyst Weighs In

December 7, 2024

The stepping stone towards this was an idea borrowed from Google (courtesy of Nick Johnson): writing up a detailed postmortem of the event, aiming to assess the root causes of the issue, focusing solely on the technical aspects and appropriate measures to prevent recurrence.

Technical solutions scale and persist; blaming people does not. ~ Nick

From the postmortem, one interesting discovery from the perspective of this blog post was made. The soft-fork code inside [go-ethereum](https://github.com/ethereum/go-ethereum) seemed solid from all perspectives: a) it was thoroughly covered by unit tests with a 3:1 test-to-code ratio; b) it was thoroughly reviewed by six foundation developers; and c) it was even manually live tested on a private network… Yet still, a fatal data race remained, which could have potentially caused severe network disruption.

It transpired that the flaw could only ever occur in a network consisting of multiple nodes, multiple miners and multiple blocks being minted simultaneously. Even if all of those scenarios held true, there was only a slight chance for the bug to surface. Unit tests cannot catch it, code reviewers may or may not catch it, and manual testing catching it would be unlikely. Our conclusion was that the development teams needed more tools to perform reproducible tests that would cover the intricate interplay of multiple nodes in a concurrent networked scenario. Without such a tool, manually checking the various edge cases is unwieldy; and without doing these checks continuously as part of the development workflow, rare errors would become impossible to discover in time.

And thus, hive was born…

What is hive?

Ethereum grew large to the point where testing implementations became a huge burden. Unit tests are fine for checking various implementation quirks, but validating that a client conforms to some baseline quality, or validating that clients can play nicely together in a multi client environment, is all but simple.

Hive is meant to serve as an easily expandable test harness where anyone can add tests (be those simple validations or network simulations) in any programming language that they are comfortable with, and hive should simultaneously be able to run those tests against all potential clients. As such, the harness is meant to do black box testing where no client specific internal details/state can be tested and/or inspected, rather emphasis would be put on adherence to official specs or behaviors under different circumstances.

Most importantly, hive was designed from the ground up to run as part of any clients’ CI workflow!

How does hive work?

Hive’s body and soul is [docker](https://www.docker.com/). Every client implementation is a docker image; every validation suite is a docker image; and every network simulation is a docker image. Hive itself is an all encompassing docker image. This is a very powerful abstraction…

Since Ethereum clients are docker images in hive, developers of the clients can assemble the best possible environment for their clients to run in (dependency, tooling and configuration wise). Hive will spin up as many instances as needed, all of them running in their own Linux systems.

Similarly, as test suites validating Ethereum clients are docker images, the writer of the tests can use any programing environment he is most familiar with. Hive will ensure a client is running when it starts the tester, which can then validate if the particular client conforms to some desired behavior.

Lastly, network simulations are yet again defined by docker images, but compared to simple tests, simulators not only execute code against a running client, but can actually start and terminate clients at will. These clients run in the same virtual network and can freely (or as dictated by the simulator container) connect to each other, forming an on-demand private Ethereum network.

How did hive aid the fork?

Hive is neither a replacement for unit testing nor for thorough reviewing. All current employed practices are essential to get a clean implementation of any feature. Hive can provide validation beyond what’s feasible from an average developer’s perspective: running extensive tests that can require complex execution environments; and checking networking corner cases that can take hours to set up.

In the case of the DAO hard-fork, beyond all the consensus and unit tests, we needed to ensure most importantly that nodes partition cleanly into two subsets at the networking level: one supporting and one opposing the fork. This was essential since it’s impossible to predict what adverse effects running two competing chains in one network might have, especially from the minority’s perspective.

As such we’ve implemented three specific network simulations in hive:

  • The first to check that miners running the full Ethash DAGs generate correct block extra-data fields for both pro-forkers and no-forkers, even when trying to naively spoof.

  • The second to verify that a network consisting of mixed pro-fork and no-fork nodes/miners correctly splits into two when the fork block arrives, also maintaining the split afterwards.

  • The third to check that given an already forked network, newly joining nodes can sync, fast sync and light sync to the chain of their choice.

The interesting question though is: did hive actually catch any errors, or did is just act as an extra confirmation that everything’s all right? And the answer is, both. Hive caught three fork-unrelated bugs in Geth, but also heavily aided Geth’s hard-fork development by continuously providing feedback on how changes affected network behavior.

There was some criticism of the go-ethereum team for taking their time on the hard-fork implementation. Hopefully people will now see what we were up to, while concurrently implementing the fork itself. All in all, I believe hive turned out to play quite an important role in the cleanness of this transition.

What is hive’s future?

The Ethereum GitHub organization features [4 test tools already](https://github.com/ethereum?utf8=%E2%9C%93&query=test), with at least one EVM benchmark tool cooking in some external repository. They are not being utilised to their full extent. They have a ton of dependencies, generate a ton of junk and are very complicated to use.

With hive, we’re aiming to aggregate all the various scattered tests under one universal client validator that has minimal dependencies, can be extended by anyone, and can run as part of the daily CI workflow of client developers.

We welcome anyone to make contributions to the project, be that adding new clients to validate, validators to test with, or simulators to find interesting networking issues. In the meantime, we’ll try to further polish hive itself, adding support for running benchmarks as well as mixed-client simulations.

With a bit or work, maybe we’ll even have support for running hive in the cloud, allowing it to run network simulations at a much more interesting scale.


[ad_2]

Source link

Tags: CleanForkHivestrived
Previous Post

SOL Price Pops 10%, Can Solana Bulls Regain Strength?

Next Post

Alliance DAO is attracting fewer US founders amid crypto crackdown

Categories

  • ! Без рубрики
  • 1
  • 10000_sat
  • 10000_sat3
  • 10000_tr
  • 10000_wa
  • 10000_wa2
  • 10000sat
  • 10000sat2
  • 10000sat6
  • 10000sat7
  • 10005sat
  • 10030_sat
  • 10050_wa
  • 10050sat
  • 10050tr
  • 10060_wa
  • 10065_wa
  • 10100_sat
  • 10100_sat2
  • 10100_tr
  • 10100_wa
  • 10110_sat
  • 10150_sat
  • 10150_tr
  • 10200_prod3
  • 10200_sat
  • 10200_tr
  • 10200_wa
  • 10200_wa2
  • 10210_wa
  • 10250_prod
  • 10250_sat
  • 10250_wa
  • 10280_tr
  • 10300_sat
  • 10300_wa
  • 10300sat
  • 1030i
  • 10350_tr
  • 10400_prod
  • 10400_prod2
  • 10400_sat
  • 10400_sat3
  • 10450_wa
  • 10480_sat
  • 10500_sat
  • 10500_sat2
  • 10500_sat3
  • 10500_wa
  • 10500_wa2
  • 10510_tr
  • 10510_wa
  • 10525_sat
  • 10550_sat
  • 10550_sat2
  • 10600_prod2
  • 10600_sat
  • 10600_sat2
  • 10600_tr
  • 10600_wa
  • 10655_pr
  • 10700_pr
  • 10700_sat
  • 10700_wa
  • 10700_wa2
  • 10710_wa
  • 10800_wa
  • 10831_wa
  • 10850_sat
  • 10985_wa
  • 11000prod3
  • 11380_wa
  • 11400_prod
  • 11400_wa
  • 11800_prod
  • 1Win Brasil
  • 1win Brazil
  • 1win casino spanish
  • 1win fr
  • 1win India
  • 1WIN Official In Russia
  • 1win Turkiye
  • 1win uzbekistan
  • 1winios
  • 1winiphone
  • 1winlegal
  • 1winRussia
  • 1xbet arabic
  • 1xbet Casino AZ
  • 1xbet casino BD
  • 1xbet Korea
  • 1xbet KR
  • 1xbet malaysia
  • 1xbet Morocco
  • 1xbet RU
  • 1xbet russia
  • 1xbet russian1
  • 1xbet-argentinos.org
  • 1xbet-download.info
  • 1xbetapps.site
  • 1xbetofficial.co.za
  • 2
  • 2060
  • 21
  • 22bet
  • 22bet IT
  • 26
  • 28
  • 280i
  • 2876
  • 30
  • 31
  • 32
  • 365i
  • 560
  • 5hbetcom.net
  • 656bet.net
  • 691
  • 7777777
  • 8550_tr
  • 8600_tr2
  • 888starz bd
  • 8mbet.site
  • 9030_wa
  • 9110_wa
  • 9220_wa
  • 9600_wa
  • 9617_tr
  • 9700_sat
  • 9700_sat2
  • 9760_sat
  • 979bet.biz
  • 9800_wa
  • 9900_sat
  • 9900_sat2
  • 9900_wa
  • 992betbr
  • 9950_tr
  • 9950_wa
  • 9985_sat
  • 9990_tr
  • 9990sat
  • 9bet-app.com
  • adobe generative ai 1
  • adobe generative ai 3
  • adobe photoshop
  • ai bot name 2
  • AI News
  • ai sales bot 4
  • Altcoin
  • Altcoin News
  • Altcoins
  • argentinos-1xbet.com
  • Artificial Intelligence
  • austria
  • aviator
  • aviator brazil
  • aviator casino DE
  • aviator casino fr
  • aviator ke
  • aviator mz
  • aviator ng
  • aviator.li
  • aviatordeposit.in
  • azurebetbd
  • b1bet brazil
  • baji-live.plus
  • baji999-live-login.com
  • Bankobet
  • Basaribet
  • BBBB
  • BBCC
  • BBET
  • bbrbet colombia
  • bbrbet mx
  • bc-fun-game.com
  • bc-game-belarus.com
  • bc-game-uae.com
  • BCCCC
  • bcg-download.com
  • bcg-mirrors
  • bcg-nigeria.com
  • bcgame-argentinos.com
  • bcgame-fr.com
  • bcgame-myanmar.com
  • bcgame-ru
  • bcgame-ru.net
  • bd-bajilive.com
  • BET-1
  • BET-2
  • bet-winner-br
  • betandreas-mobile.com
  • betnaga.pro
  • bettafunclub.com
  • BetWinner team 03-25-3
  • BetWinner team-4
  • BetWinner-2
  • betwinner-bj.com
  • betwinner-deutsch.com
  • betwinner-gn.com
  • betwinner-italiano
  • betwinner-rw.com
  • betwinner-spanish
  • betwinner-turkish
  • betwinner-uganda.live
  • betwinner-yallah
  • betwinner-yazhou.com
  • betwinnerar
  • betwinnerbrasil.com.br
  • betwinnercameroon.com
  • betwinnercasinos
  • betwinnereal.com
  • betwinnereg.com
  • betwinnermobilindir.com.tr
  • betwinneronline.net
  • betwinnerug.com
  • BH
  • Bitcoin
  • bizzo casino
  • Blockchain
  • Blockchain Games
  • book of ra
  • book of ra it
  • Bookkeeping
  • Breaking News
  • BT
  • Business
  • casibom tr
  • casino
  • casino en ligne
  • casino en ligne fr
  • casino onlina ca
  • Casino online
  • casino online ar
  • casinò online it
  • casino zonder crucks netherlands
  • casino-goldenpanda
  • casino-vivi.com
  • casinoggbet.com
  • casinomagius
  • casinos
  • casinos-nongamstop26
  • casinotwisterwins.com
  • coinfliphub.net
  • crazy time
  • Crypto
  • Crypto Mining
  • Cryptocurrencies
  • Cryptocurrency
  • Cryptocurrency News
  • Cryptocurrency service
  • Culture
  • Defi
  • diplomrum
  • Economy
  • Education
  • en1win
  • Entertainment
  • ES_steroids
  • Ethereum
  • EXN
  • EXX
  • Fair Go Casino
  • Featured
  • FinTech
  • flashdash-casino.com
  • Forex Trading
  • fortune tiger brazil
  • fortuneclock-casino
  • fr
  • fromstillstomotion.com
  • galaxyspins-online
  • Gambling
  • Games
  • gatesofolympussiteleri.net
  • ggbet-casino-pl.net
  • ggbet-pl.win anchor
  • ggbetkasyno.net 2
  • ggbetpolska.net
  • global-bcgame.com
  • Governance
  • habtam-bet.net
  • hazybet.net
  • Health
  • html
  • IGAMING
  • indiabetwinner.com
  • istitutocomprensivoviamicheli.it
  • IT Vacancies
  • IT Вакансії
  • IT Образование
  • izzi
  • japan-bcgame.com
  • jardiance
  • jeetwin-bangladesh.onlin
  • Kasyno
  • Kasyno Online PL
  • kasyno-ggbet.net
  • kasyno-vulkan.net
  • kasynoggbet.net
  • katanaspin-online
  • khelo24bet-india1.com
  • king johnnie
  • kz-betandreas.com
  • laopcion.com.co
  • lekarenprevas.sk
  • Lifestyle
  • lovecasino1-online.com
  • lyrica
  • Maribet casino TR
  • Market
  • Market & Analysis
  • Masalbet
  • medic
  • Monobrand
  • mostbet hungary
  • mostbet italy
  • mostbet norway
  • mostbet ozbekistonda
  • Mostbet Russia
  • mostbet tr
  • mostbet-official.co.in
  • mx-bbrbet-casino
  • n_ch
  • n_pb
  • nationalbetcasino.co
  • New Post
  • News
  • Nft
  • Online Casino
  • online casino au
  • ovensofpatagonia
  • ozwin au casino
  • palmsbetbg.net anchor
  • pelican casino PL
  • Pin UP
  • pinco
  • Plinko
  • plinko in
  • plinko UK
  • pocket-option
  • pocket-option-in
  • pocket-option-in.com
  • pocket-option.fund
  • pocket-option3
  • pocket-option3.com
  • pocket-zerkalo.ru
  • pocket0ption-broker
  • pocket0ption-broker.com
  • pocketopt1on
  • pocketoption-1.com
  • pocketoption-forex.com
  • pocketoption-trade.org
  • pocketoption-vip.net
  • pocketoption-web.com
  • pokiesoz.com
  • POOO
  • POOP
  • PPOO
  • primexbt-2024
  • primexbt-exchange.com
  • primexbt-online
  • primexbt-option
  • primexbt-profit
  • primexbt-team
  • primexbt-trade
  • primexbt-traders
  • primexbt-trades
  • primexbt-wallet
  • primexbtforex
  • primexbtinvest.com
  • primexbtnew
  • primexbtnew.com
  • primexbttrading
  • pu++
  • pyramid-spins-casino
  • qwickbet.org
  • Ramenbet
  • raularagon.com.ar
  • result_1743
  • Review
  • reviewer
  • reviewprimexbt.com
  • ricky casino australia
  • savaspin
  • se
  • settings.kz
  • skovoroda.in.ua
  • slot
  • slot-gacor
  • Slots
  • slottica
  • sluts
  • Sober living
  • Software development
  • spins-heaven.com
  • Sports
  • strawmarysmith
  • sugar rush
  • Sumatriptan
  • sweet bonanza
  • sweet bonanza TR
  • The_Evolution
  • theskystore.in
  • Top News
  • top-news
  • trading-pocketoption
  • tribuna
  • uncategorised
  • Uncategorized
  • UUUU
  • vavada-croatia.casin
  • vavadaa.net
  • vavadaily.com
  • verde casino hungary
  • verde casino romania
  • vivi-bet-uz.com
  • vivi-latvia.com
  • Vovan Casino
  • vulkan-kasyno.com
  • vulkan-kasyno.net
  • Web 3.0
  • World
  • World News
  • www.artupdate.nl
  • www.cauciucuribucuresti.ro
  • www.coronatest-rv.de
  • www.ella-hoy.es
  • www.fortunetiger.com.br
  • www.sigarenfabrieken.nl
  • www.un-film-sur-riquet.fr
  • www.weisse-magie.co
  • xarelto
  • YYYY
  • zsolovi.cz
  • Без категории
  • Комета Казино
  • Финтех
  • Форекс Брокеры
  • Форекс обучение
  • Швеция

Calendar

May 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  
« Apr   May »

Converter

Cryptocurrency Prices 

© 2023 BLOC PRESS | All Rights Reserved

No Result
View All Result
  • Home
  • Cryptocurrency
  • Bitcoin
  • Ethereum
  • Blockchain
  • Altcoin
  • Crypto Mining
  • Nft
  • Market & Analysis

© 2023 BLOC PRESS | All Rights Reserved