Releasing the Attacknet: A brand new device for locating bugs in blockchain nodes utilizing chaos testing

By Benjamin Samuels (@thebensams)

At present, Path of Bits is publishing The attack neta brand new device that addresses the restrictions of conventional runtime verification instruments, inbuilt collaboration with the Ethereum Basis. Attacknet is meant to reinforce the EF’s present check strategies by subjecting their execution and consensus purchasers to among the most difficult community circumstances possible.

Blockchain nodes have to be held to the very best stage of safety assurance attainable. Traditionally, the first instruments used to attain this objective have been exhaustive specification, checks, shopper range, guide audits, and testnets. Whereas these instruments have historically finished their job nicely, they collectively have critical limitations that may result in important bugs manifesting in a manufacturing setting, such because the May 2023 finality incident that occurred on Ethereum mainnet. Attacknet addresses these limitations by subjecting devnets to a a lot wider vary of community circumstances and misconfigurations than is feasible on a standard testnet.

How Attacknet works

Attacknet makes use of chaos engineeringa testing methodology that proactively injects faults right into a manufacturing setting to confirm that the system is tolerant to sure failures. These faults reproduce real-world downside situations and misconfigurations, and can be utilized to create exaggerated situations to check the boundary circumstances of the blockchain.

Attacknet makes use of Chaos Mesh to inject faults right into a devnet setting generated by Kurtosis. By constructing on prime of Kurtosis and Chaos Mesh, Attacknet can create numerous community topologies with ensembles of various sorts of faults to push a blockchain community to its most excessive edge circumstances.

Among the faults embody:

  • Clock skew, the place a node’s clock is skewed forwards or backwards for a selected period. Path of Bits was capable of reproduce the Ethereum finality incident utilizing a clock skew fault, as detailed in our TrustX talk last year.
  • Community latency, the place a node’s connection to the community (or its corresponding EL/CL shopper) is delayed by a sure period of time. This fault can assist reproduce world latency circumstances or assist detect unintentional synchronicity assumptions within the blockchain’s consensus.
  • Community partition, the place the community is cut up into two or extra halves that can’t talk with one another. This fault can check the community’s fork selection rule, skill to re-org, and different edge circumstances.
  • Community packet drop/corruption, the place gossip packets are dropped or have their contents corrupted by a specific amount. This fault can check a node’s gossip validation and check the robustness of the community below hostile community circumstances.
  • Compelled node crashes/offlining, the place a sure shopper or kind of shopper is ungracefully shut down. This fault can check the community’s resilience to validator inactivity, and check the flexibility of purchasers to re-sync to the community.
  • I/O disk faults/latency, the place a specific amount of latency or error fee is utilized to all I/O operations a node makes. This fault can assist profile nodes to know their useful resource necessities, as I/O is commonly the biggest limiting issue of node efficiency.

As soon as the fault concludes, Attacknet performs a battery of well being checks towards every node within the community to confirm that they have been capable of recuperate from the fault. If all nodes recuperate from the fault, Attacknet strikes on to the following configured fault. If a number of nodes fail well being checks, Attacknet will generate an artifact of logs and check data to permit debugging.

Future work

On this first launch, Attacknet helps two run modes: one with a manually configured community topology and fault parameters, and a “planner mode” the place a variety of faults are run towards a selected shopper with loosely outlined topology parameters. Sooner or later, we plan on including an “Exploration mode” that may dynamically outline fault parameters, inject them, and monitor community well being repeatedly, just like a fuzzer.

Attacknet is at the moment getting used to check the Dencun arduous fork, and is being frequently up to date to enhance protection, efficiency, and debugging UX. Nonetheless, Attacknet will not be an Ethereum-specific device, and was designed to be modular and simply prolonged to assist different varieties of chains with drastically totally different designs and topologies. Sooner or later, we plan on extending Attacknet to focus on different chains, together with different varieties of blockchain methods corresponding to L2s.

In case you’re curious about integrating Attacknet together with your chain/L2’s testing course of, please contact us.

Author: Path of Bits
Date: 2024-03-18 09:00:59

Source link



Related articles

Alina A, Toronto
Alina A, Toronto
Alina A, an UofT graduate & Google Certified Cyber Security analyst, currently based in Toronto, Canada. She is passionate for Research and to write about Cyber-security related issues, trends and concerns in an emerging digital world.


Please enter your comment!
Please enter your name here