Giter Site home page Giter Site logo

nethermindeth / nethermind Goto Github PK

View Code? Open in Web Editor NEW
1.1K 50.0 373.0 327.36 MB

A robust execution client for Ethereum node operators.

Home Page: https://nethermind.io/nethermind-client

License: GNU General Public License v3.0

C# 99.63% Dockerfile 0.01% Shell 0.14% Python 0.03% CSS 0.01% Solidity 0.03% Makefile 0.01% JavaScript 0.16%
ethereum blockchain evm ethereum-client eth

nethermind's Introduction

Nethermind

Nethermind Ethereum client

Tests Chat on Discord Follow us on Twitter Ask on Discourse GitPOAPs

Nethermind is a high-performance, highly configurable Ethereum execution client built on .NET that runs on Linux, Windows, and macOS and supports Clique, Aura, and Ethash. With breakneck sync speeds and support for external plugins, it provides reliable access to rich on-chain data thanks to a high-performance JSON-RPC interface and node health monitoring with Grafana and Seq.

Documentation

Nethermind documentation is available at docs.nethermind.io.

Supported networks

Mainnet Goerli Sepolia Holesky Gnosis (xDai) Chiado Energy Web Volta

Download and run

Release builds are available on the Releases page and at downloads.nethermind.io.

On Linux

Install using PPA

  1. sudo add-apt-repository ppa:nethermindeth/nethermind
    If command not found: sudo apt-get install software-properties-common
  2. sudo apt-get install nethermind
  3. nethermind -c mainnet

On Windows

Prerequisites

In some cases, Visual C++ Redistributable may need an update:

winget install Microsoft.VCRedist.2015+.x64

Install using Windows Package Manager

  1. winget install nethermind
  2. nethermind -c mainnet

On macOS

Install using Homebrew

  1. brew tap nethermindeth/nethermind
  2. brew install nethermind
  3. nethermind -c mainnet

Docker image

The official Docker images of Nethermind are available on Docker Hub.

Get the digest of the Docker image

In case of any Docker image need to be updated in the repository, you can update the digest of these images as follows:

docker inspect --format='{{index .RepoDigests 0}}' <image_name>

The output should show the image digest, and then you can copy that to the FROM tag in the Dockerfile.

Building from source

Prerequisites

Install .NET SDK.

Clone the repository

git clone --recursive https://github.com/nethermindeth/nethermind.git

Build and run

cd nethermind/src/Nethermind/Nethermind.Runner
dotnet run -c release -- -c mainnet

Test

cd nethermind/src/Nethermind

# Run Nethermind tests:
dotnet test Nethermind.sln -c release

# Run Ethereum Foundation tests:
dotnet test EthereumTests.sln -c release

Contributing

BEFORE you start work on a feature or fix, please read and follow our contribution guide to help avoid any wasted or duplicate effort.

Security

If you believe you have found a security vulnerability in our code, please report it to us as described in our security policy.

License

Nethermind is an open-source software licensed under the LGPL-3.0.

nethermind's People

Contributors

ak88 avatar asdacap avatar benaadams avatar dceleda avatar deffrian avatar demuirgos avatar emlautarom1 avatar falcoxyz avatar flcl42 avatar github-actions[bot] avatar glesniakiewicz avatar jmederosalvarado avatar kamilchodola avatar kasiagankiewicz avatar kjazgar avatar lukaszrozmej avatar marcindsobczak avatar marekm25 avatar matilote avatar micahzoltu avatar one-three-three-seven avatar rlanga avatar rubo avatar scooletz avatar sebastiandremo avatar sgryphon avatar smartprogrammer93 avatar spetz avatar tanishqjasoria avatar tkstanczak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nethermind's Issues

Rename HashLib keccak class

IDEs resolve HashLib or Nethermind.Core Keccak class which may lead to confusion. We almost always want to resolve Nethermind.Core.Keccak.

Implement Aura (Kovan PoA)

As you can see below - Gitcoin bounty has been funded for this issue (kudos to Gitcoin team).
Below you will find more information on what is expected:

PoA / Aura spec is available here:

Best place to seek help from the team is Gitter:

  1. Write ISealEngine implementation representing Aura block sealing.
  2. Write IBlockValidator / IBlockHeaderValidator to validate properly repurposed fields in BlockHeader
  3. Make necessary changes to IChainSpecLoader to allow different seal engine to be loaded and change the Runner behaviour so the Clique seal engine and validators are loaded if chainspec declares them.
  4. Create unit tests for ISealEngine implementation, unit tests for the new IBlockValidator / IBlockHeaderValidator.
  5. Launch Nethermind and sync with Kovan test network (by providing a Kovan chainID).
  6. Launch 4 nodes using RunnerSpawner to test a Aura based private network behaviour and proof that the nodes can publish and validate nodes.
  7. An implementation that is capable of (5) and (6) will be accepted. Core Nethermind team will be glad to provide all the help needed and introduce changes required to make code more consistent with the whole Nethermind codebase.

Implement signed Int256 in Dirichlet

The code is in a separate solution - Nethermind.Dirichlet which is a fork of the UInt128 library.
There is code for unsigned UInt and signed one has never been written - both are needed for an improved EVM performance.

Clean the EVM direct vs contract calls

TransactionProcessor and VirtualMachine both have a slightly different approach to creates and calls by which I mean that there is code that decides on what to do depending on whether we are the top level call or deeper. I believe some improvements can be done here to make the code more readable.

Implement UInt256 division

In the Nethermind.Dirichlet submodule we have started some work on UInt256. For now, we use it for subtraction and addition. We would like to add reminding operations that would lead all the way to the division operator.

Make builds public

We run private TeamCity builds and we would like to allow community to contribute and run tests. Explore options and setup public continuous integration.

LogTests failing after memory UInt256 changes

LogTests.Test(log0_logMemStartTooHigh_d0g0v0_Byzantium) |  
LogTests.Test(log0_logMemStartTooHigh_d0g0v0_EIP150) |  
LogTests.Test(log0_logMemStartTooHigh_d0g0v0_EIP158) |  
LogTests.Test(log0_logMemStartTooHigh_d0g0v0_Frontier) |  
LogTests.Test(log0_logMemStartTooHigh_d0g0v0_Homestead) |  
LogTests.Test(log1_logMemStartTooHigh_d0g0v0_Byzantium) |  
LogTests.Test(log1_logMemStartTooHigh_d0g0v0_EIP150) |  
LogTests.Test(log1_logMemStartTooHigh_d0g0v0_EIP158) |  
LogTests.Test(log1_logMemStartTooHigh_d0g0v0_Frontier) |  
LogTests.Test(log1_logMemStartTooHigh_d0g0v0_Homestead) |  
LogTests.Test(log2_logMemStartTooHigh_d0g0v0_Byzantium) |  
LogTests.Test(log2_logMemStartTooHigh_d0g0v0_EIP150) |  
LogTests.Test(log2_logMemStartTooHigh_d0g0v0_EIP158) |  
LogTests.Test(log2_logMemStartTooHigh_d0g0v0_Frontier) |  
LogTests.Test(log2_logMemStartTooHigh_d0g0v0_Homestead) |  
LogTests.Test(log3_logMemStartTooHigh_d0g0v0_Byzantium) |  
LogTests.Test(log3_logMemStartTooHigh_d0g0v0_EIP150) |  
LogTests.Test(log3_logMemStartTooHigh_d0g0v0_EIP158) |  
LogTests.Test(log3_logMemStartTooHigh_d0g0v0_Frontier) |  
LogTests.Test(log3_logMemStartTooHigh_d0g0v0_Homestead) |  
LogTests.Test(log4_logMemStartTooHigh_d0g0v0_Byzantium) |  
LogTests.Test(log4_logMemStartTooHigh_d0g0v0_EIP150) |  
LogTests.Test(log4_logMemStartTooHigh_d0g0v0_EIP158) |  
LogTests.Test(log4_logMemStartTooHigh_d0g0v0_Frontier) |  
LogTests.Test(log4_logMemStartTooHigh_d0g0v0_Homestead)

Remove Hex class

It was introduced early to support easier testing and some strong typing but it seems to be more confusing than helpful nowadays. Also expected performance benefits are not there as string and byte[] contexts are mostly exclusive.

Implement Clique

As you can see below - Gitcoin bounty has been funded for this issue (kudos to Gitcoin team).
Below you will find more information on what is expected:

Clique spec is available here:
ethereum/EIPs#225

Best place to seek help from the team is Gitter:
https://gitter.im/nethermindeth/nethermind

  1. Write ISealEngine implementation representing Clique block sealing.
  2. Write IBlockValidator / IBlockHeaderValidator to validate properly repurposed fields in BlockHeader
  3. Make necessary changes to IChainSpecLoader to allow different seal engine to be loaded and change the Runner behaviour so the Clique seal engine and validators are loaded if chainspec declares them.
  4. Create unit tests for ISealEngine implementation, unit tests for the new IBlockValidator / IBlockHeaderValidator.
  5. Launch Nethermind and sync with Rinkeby test network (by providing a Rinkeby chainID).
  6. Launch 4 nodes using RunnerSpawner to test a Clique based private network behaviour and proof that the ndoes can publish and validate nodes.
  7. An implementation that is capable of (5) and (6) will be accepted. Core Nethermind team will be glad to provide all the help needed and introduce changes required to make code more consistent with the whole Nethermind codebase.

Clean RLP APIs

We would like to have RLP as a relatively independent library (either as a single project or coupled with Nethermind.Core only).

At the moment there are numerous APIs in RLP to allow for greater code optimization in Patricia Tree and other areas. As a result, the APIs can be confusing and not easily reusable in other projects.

Any changes here would need to assure that the existing optimizations are still supported.

In general, we have three approaches now:

  1. original that does quite a lot of allocations
  2. new one with creating buffers and block copy
  3. newer one with spans

They also take different arguments depending on the level of optimizations needed (with Patricia Tree going most hardcore).

It would be great to review, improve and systematize the RLP APIs.

Create a set of consistent rules for EvmMemory locations.

While tests are passing we can clearly expose some attack vectors since memory is indexed through int and long values and location and size are specified as UInt256 in the yellowpaper.
Confront the rules with those in Parity and Geth.

Limit the block queue size.

At the moment the growing block queue size breaks the mainnet syncs at the latest blocks. There should be a limit on blocks awaiting execution.

Possibly we should continue downloading blocks and just not keep them in memory and then allow the sync process to switch to loading blocks from DB when exhausting the blocks from memory.

Support chainspec files fully

Read the seal engine spec and some EIP transition parameters from chainspec file. Possibly reogranize the spec provider approach to be more in line with chainspec files.

Whisper / SHH support

Below you will find more information on what is expected:

Whisper spec and documentation can be collected from various Ethereum sites. Among them:

It is encouraged to contact other core devs who are working on Whisper to exchange implementation ideas and seek help.

Best place to seek help from the Nethermind team is Gitter:
https://gitter.im/nethermindeth/nethermind

What is expected for the pull request to be approved:

  1. Write P2P subprotocol handler for Whisper
  2. Create Whisper messages and serializers based on the approach used for Eth protocol
  3. Support Whisper RPC commands as an RPC module (extending ModuleBase)
  4. Create a wnode like diagnostic tool
  5. Create an integration test with 4 nodes exchanging messages
  6. Write unit tests for protocol handler, messages and message serializers

Nethermind core team will be glad to implement / link any cryptographical constructs necessary for the implementation of Whisper.

Remove unused hashlib code

We have incorporated HashLib into our solution but are only using a small subset of the assembly (Keccak256/512, RIPEMD, SHA3). It would make sense to remove everything else and add back only if needed.

Integrate puppeth with Nethermind

Need to confirm that puppeth is client agnostic and that it could be used to create nethermind based private networks.
In case that is not possible we would like to see a puppeth-like tool for Nethermind

Support Warp sync (PAR) in Nethermind

During DevCon there have been talks about the new approach to fast syncing and redesign of archive node storage.

Warp Sync spec is here:
https://wiki.parity.io/Warp-Sync

And there is a big chance that it is outdated and not very detailed. The warp sync integration may require a significant amount of reverse engineering from Parity source code (as with AuRa).

As such Warp Sync should only be considered after the fast sync work is finished.

Setup a public build server

We currently use a private TeamCity build server. For any open source contribution it would be desired to have a public build server where contributors can check their code for bugs before creating a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.