Convert Figma logo to code with AI

openethereum logoparity-ethereum

The fast, light, and robust client for Ethereum-like networks.

6,809
1,683
6,809
161

Top Related Projects

Go implementation of the Ethereum protocol

2,249

A Python implementation of the Ethereum Virtual Machine

1,474

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu

3,090

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io

A robust execution client for Ethereum node operators.

Quick Overview

OpenEthereum (formerly Parity Ethereum) is an advanced, fast, and feature-rich Ethereum client implementation. It is designed to be a high-performance, reliable, and secure foundation for Ethereum-based applications and infrastructure.

Pros

  • High performance and efficiency, allowing for faster syncing and transaction processing
  • Advanced features like light client support and private transactions
  • Modular architecture, making it easier to extend and customize
  • Strong focus on security and robustness

Cons

  • Steeper learning curve compared to some other Ethereum clients
  • Less widespread adoption compared to Geth (Go Ethereum)
  • Discontinued active development by Parity Technologies (now maintained by the community)
  • Some historical security vulnerabilities, though most have been addressed

Code Examples

  1. Connecting to an Ethereum node using Web3.js:
const Web3 = require('web3');
const web3 = new Web3('http://localhost:8545');

web3.eth.getBlockNumber()
  .then(console.log)
  .catch(console.error);
  1. Sending a transaction:
const tx = {
  from: '0x1234567890123456789012345678901234567890',
  to: '0x0987654321098765432109876543210987654321',
  value: web3.utils.toWei('1', 'ether'),
  gas: 21000
};

web3.eth.sendTransaction(tx)
  .on('receipt', console.log)
  .on('error', console.error);
  1. Interacting with a smart contract:
const contractABI = [...]; // Contract ABI
const contractAddress = '0x1234567890123456789012345678901234567890';
const contract = new web3.eth.Contract(contractABI, contractAddress);

contract.methods.someFunction().call()
  .then(console.log)
  .catch(console.error);

Getting Started

To get started with OpenEthereum:

  1. Install OpenEthereum:

    bash <(curl https://get.parity.io -L)
    
  2. Start the Ethereum node:

    openethereum
    
  3. Connect to the node using Web3.js:

    const Web3 = require('web3');
    const web3 = new Web3('http://localhost:8545');
    
    web3.eth.getBlockNumber().then(console.log);
    

Note: Ensure you have Node.js and npm installed before using Web3.js.

Competitor Comparisons

Go implementation of the Ethereum protocol

Pros of go-ethereum

  • Written in Go, which is generally faster and more memory-efficient than Rust
  • Larger community and more widespread adoption, leading to better support and documentation
  • Official implementation maintained by the Ethereum Foundation, ensuring closer alignment with protocol updates

Cons of go-ethereum

  • Less modular architecture compared to parity-ethereum
  • Slower sync times for full nodes, especially on older hardware
  • Limited customization options for enterprise use cases

Code Comparison

parity-ethereum (Rust):

pub fn execute(params: &ActionParams, ext: &mut dyn Ext) -> Result<GasLeft, Error> {
    let mut gas_counter = GasCounter::new(params.gas);
    let result = Executive::new(params, ext).call(&mut gas_counter);
    match result {
        Ok(()) => Ok(GasLeft::Known(gas_counter.remaining())),
        Err(err) => Err(err),
    }
}

go-ethereum (Go):

func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas uint64, value *big.Int) (ret []byte, leftOverGas uint64, err error) {
    if evm.depth > int(params.CallCreateDepth) {
        return nil, gas, ErrDepth
    }
    // Execute the contract
    return evm.call(caller, addr, input, gas, value)
}

Both implementations handle contract execution, but parity-ethereum uses a more functional approach with explicit error handling, while go-ethereum employs a more imperative style with direct return values.

2,249

A Python implementation of the Ethereum Virtual Machine

Pros of py-evm

  • Written in Python, making it more accessible for developers familiar with the language
  • Designed as a modular and extensible implementation, allowing for easier customization
  • Focuses on being a reference implementation, prioritizing clarity and educational value

Cons of py-evm

  • Generally slower performance compared to Parity Ethereum due to Python's interpreted nature
  • Less mature and battle-tested in production environments
  • Smaller ecosystem and community support compared to Parity Ethereum

Code Comparison

py-evm (Python):

class BaseVM(Configurable, ABC):
    @classmethod
    def create_execution_context(
        cls,
        header: BlockHeader,
        prev_hashes: Iterable[Hash32],
        chain_context: ChainContext,
    ) -> ExecutionContext:
        return ExecutionContext(
            header=header,
            prev_hashes=prev_hashes,
            chain_context=chain_context,
        )

Parity Ethereum (Rust):

pub struct Executive<'a, T: 'a> {
    state: &'a mut State<T>,
    info: &'a EnvInfo,
    machine: &'a Machine,
    schedule: &'a Schedule,
    depth: usize,
    static_flag: bool,
}

The code snippets showcase the different approaches and language characteristics of each implementation.

1,474

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu

Pros of Besu

  • Written in Java, offering better enterprise integration and wider developer pool
  • Supports both public and private networks, providing more flexibility
  • Actively maintained with regular updates and strong community support

Cons of Besu

  • Generally slower performance compared to Rust-based Parity Ethereum
  • Larger memory footprint due to Java runtime

Code Comparison

Besu (Java):

public class MainnetEthHashSolver extends AbstractEthHashSolver {
  @Override
  protected void mine() {
    while (!isCancelled() && !miningTask.isSolutionFound()) {
      miningTask.nextNonce();
      if (miningTask.isSolutionFound()) {
        submitSolution(miningTask.getSolution());
      }
    }
  }
}

Parity Ethereum (Rust):

pub fn mine(&self) -> Option<Solution> {
    let mut nonce = self.initial_nonce;
    loop {
        let solution = self.solve(nonce);
        if solution.is_some() {
            return solution;
        }
        nonce += 1;
    }
}

The code snippets demonstrate the mining process in both implementations. Besu uses a more object-oriented approach with explicit task management, while Parity Ethereum employs a more functional style with a concise loop structure.

3,090

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io

Pros of Erigon

  • Significantly faster synchronization and lower disk space usage
  • Improved state management with a more efficient database structure
  • Better support for running archive nodes with full historical data

Cons of Erigon

  • Less mature and battle-tested compared to Parity Ethereum
  • Smaller community and ecosystem support
  • May have fewer features and less extensive documentation

Code Comparison

Erigon (Go):

func (s *StageState) ExecutionAt(db kv.Tx) (uint64, error) {
    data, err := db.GetOne(kv.SyncStageProgress, []byte(s.ID))
    if err != nil {
        return 0, err
    }
    return binary.BigEndian.Uint64(data), nil
}

Parity Ethereum (Rust):

pub fn execution_at(&self, db: &dyn KeyValueDB) -> Result<u64, Error> {
    match db.get(COL_EXTRA, &LAST_EXECUTED_BLOCK_KEY)? {
        Some(data) => Ok(decode::<u64>(&data)?),
        None => Ok(0),
    }
}

Both code snippets show functions for retrieving execution progress, but Erigon uses a more streamlined approach with a dedicated stage state structure and binary encoding, while Parity Ethereum relies on a more generic database interface and custom decoding.

A robust execution client for Ethereum node operators.

Pros of Nethermind

  • Written in C#, offering better performance and easier integration with .NET ecosystem
  • More actively maintained with frequent updates and new features
  • Supports advanced features like state pruning and beam sync

Cons of Nethermind

  • Smaller community and ecosystem compared to Parity Ethereum
  • Less battle-tested in production environments
  • May have compatibility issues with some Ethereum tools optimized for Go-based clients

Code Comparison

Nethermind (C#):

public class Block
{
    public Keccak Hash { get; set; }
    public BlockHeader Header { get; set; }
    public BlockBody Body { get; set; }
}

Parity Ethereum (Rust):

pub struct Block {
    pub header: Header,
    pub transactions: Vec<SignedTransaction>,
    pub uncles: Vec<Header>,
}

Both implementations represent an Ethereum block, but Nethermind uses separate Header and Body classes, while Parity Ethereum combines transactions and uncles directly in the Block struct. Nethermind's approach may offer more flexibility and modularity, while Parity Ethereum's implementation is more compact.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Parity Ethereum

The Fastest and most Advanced Ethereum Client.

» Download the latest release «

Table of Contents

  1. Description
  2. Technical Overview
  3. Building
    3.1 Building Dependencies
    3.2 Building from Source Code
    3.3 Simple One-Line Installer for Mac and Linux
    3.4 Starting Parity Ethereum
  4. Testing
  5. Documentation
  6. Toolchain
  7. Community
  8. Contributing
  9. License

1. Description

Built for mission-critical use: Miners, service providers, and exchanges need fast synchronisation and maximum uptime. Parity Ethereum provides the core infrastructure essential for speedy and reliable services.

  • Clean, modular codebase for easy customisation
  • Advanced CLI-based client
  • Minimal memory and storage footprint
  • Synchronise in hours, not days with Warp Sync
  • Modular for light integration into your service or product

2. Technical Overview

Parity Ethereum's goal is to be the fastest, lightest, and most secure Ethereum client. We are developing Parity Ethereum using the sophisticated and cutting-edge Rust programming language. Parity Ethereum is licensed under the GPLv3 and can be used for all your Ethereum needs.

By default, Parity Ethereum runs a JSON-RPC HTTP server on port :8545 and a Web-Sockets server on port :8546. This is fully configurable and supports a number of APIs.

If you run into problems while using Parity Ethereum, check out the wiki for documentation, feel free to file an issue in this repository, or hop on our Gitter or Riot chat room to ask a question. We are glad to help! For security-critical issues, please refer to the security policy outlined in SECURITY.md.

Parity Ethereum's current beta-release is 2.6. You can download it at the releases page or follow the instructions below to build from source. Please, mind the CHANGELOG.md for a list of all changes between different versions.

3. Building

3.1 Build Dependencies

Parity Ethereum requires latest stable Rust version to build.

We recommend installing Rust through rustup. If you don't already have rustup, you can install it like this:

  • Linux:

    $ curl https://sh.rustup.rs -sSf | sh
    

    Parity Ethereum also requires gcc, g++, pkg-config, file, make, and cmake packages to be installed.

  • OSX:

    $ curl https://sh.rustup.rs -sSf | sh
    

    clang is required. It comes with Xcode command line tools or can be installed with homebrew.

  • Windows: Make sure you have Visual Studio 2015 with C++ support installed. Next, download and run the rustup installer from https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe, start "VS2015 x64 Native Tools Command Prompt", and use the following command to install and set up the msvc toolchain:

    $ rustup default stable-x86_64-pc-windows-msvc
    

Once you have rustup installed, then you need to install:

Make sure that these binaries are in your PATH. After that, you should be able to build Parity Ethereum from source.

3.2 Build from Source Code

# download Parity Ethereum code
$ git clone https://github.com/paritytech/parity-ethereum
$ cd parity-ethereum

# build in release mode
$ cargo build --release --features final

This produces an executable in the ./target/release subdirectory.

Note: if cargo fails to parse manifest try:

$ ~/.cargo/bin/cargo build --release

Note, when compiling a crate and you receive errors, it's in most cases your outdated version of Rust, or some of your crates have to be recompiled. Cleaning the repository will most likely solve the issue if you are on the latest stable version of Rust, try:

$ cargo clean

This always compiles the latest nightly builds. If you want to build stable or beta, do a

$ git checkout stable

or

$ git checkout beta

3.3 Simple One-Line Installer for Mac and Linux

bash <(curl https://get.parity.io -L)

The one-line installer always defaults to the latest beta release. To install a stable release, run:

bash <(curl https://get.parity.io -L) -r stable

3.4 Starting Parity Ethereum

Manually

To start Parity Ethereum manually, just run

$ ./target/release/parity

so Parity Ethereum begins syncing the Ethereum blockchain.

Using systemd service file

To start Parity Ethereum as a regular user using systemd init:

  1. Copy ./scripts/parity.service to your systemd user directory (usually ~/.config/systemd/user).
  2. Copy release to bin folder, write sudo install ./target/release/parity /usr/bin/parity
  3. To configure Parity Ethereum, write a /etc/parity/config.toml config file, see Configuring Parity Ethereum for details.

4. Testing

Download the required test files: git submodule update --init --recursive. You can run tests with the following commands:

  • All packages

    cargo test --all
    
  • Specific package

    cargo test --package <spec>
    

Replace <spec> with one of the packages from the package list (e.g. cargo test --package evmbin).

You can show your logs in the test output by passing --nocapture (i.e. cargo test --package evmbin -- --nocapture)

5. Documentation

Official website: https://parity.io

Be sure to check out our wiki for more information.

Viewing documentation for Parity Ethereum packages

You can generate documentation for Parity Ethereum Rust packages that automatically opens in your web browser using rustdoc with Cargo (of the The Rustdoc Book), by running the the following commands:

  • All packages

    cargo doc --document-private-items --open
    
  • Specific package

    cargo doc --package <spec> -- --document-private-items --open
    

Use--document-private-items to also view private documentation and --no-deps to exclude building documentation for dependencies.

Replacing <spec> with one of the following from the details section below (i.e. cargo doc --package parity-ethereum --open):

Package List

  • Parity Ethereum (EthCore) Client Application
    parity-ethereum
    
  • Parity Ethereum Account Management, Key Management Tool, and Keys Generator
    ethcore-accounts, ethkey-cli, ethstore, ethstore-cli
    
  • Parity Chain Specification
    chainspec
    
  • Parity CLI Signer Tool & RPC Client
    cli-signer parity-rpc-client
    
  • Parity Ethereum Ethash & ProgPoW Implementations
    ethash
    
  • Parity (EthCore) Library
    ethcore
    
    • Parity Ethereum Blockchain Database, Test Generator, Configuration, Caching, Importing Blocks, and Block Information
      ethcore-blockchain
      
    • Parity Ethereum (EthCore) Contract Calls and Blockchain Service & Registry Information
      ethcore-call-contract
      
    • Parity Ethereum (EthCore) Database Access & Utilities, Database Cache Manager
      ethcore-db
      
    • Parity Ethereum Virtual Machine (EVM) Rust Implementation
      evm
      
    • Parity Ethereum (EthCore) Light Client Implementation
      ethcore-light
      
    • Parity Smart Contract based Node Filter, Manage Permissions of Network Connections
      node-filter
      
    • Parity Private Transactions
      ethcore-private-tx
      
    • Parity Ethereum (EthCore) Client & Network Service Creation & Registration with the I/O Subsystem
      ethcore-service
      
    • Parity Ethereum (EthCore) Blockchain Synchronization
      ethcore-sync
      
    • Parity Ethereum Common Types
      common-types
      
    • Parity Ethereum Virtual Machines (VM) Support Library
      vm
      
    • Parity Ethereum WASM Interpreter
      wasm
      
    • Parity Ethereum WASM Test Runner
      pwasm-run-test
      
    • Parity EVM Implementation
      evmbin
      
    • Parity Ethereum IPFS-compatible API
      parity-ipfs-api
      
    • Parity Ethereum JSON Deserialization
      ethjson
      
    • Parity Ethereum State Machine Generalization for Consensus Engines
      parity-machine
      
  • Parity Ethereum (EthCore) Miner Interface
    ethcore-miner parity-local-store price-info ethcore-stratum using_queue
    
  • Parity Ethereum (EthCore) Logger Implementation
    ethcore-logger
    
  • C bindings library for the Parity Ethereum client
    parity-clib
    
  • Parity Ethereum JSON-RPC Servers
    parity-rpc
    
  • Parity Ethereum (EthCore) Secret Store
    ethcore-secretstore
    
  • Parity Updater Service
    parity-updater parity-hash-fetch
    
  • Parity Core Libraries (Parity Util)
    ethcore-bloom-journal blooms-db dir eip-712 fake-fetch fastmap fetch ethcore-io
    journaldb keccak-hasher len-caching-lock macros memory-cache memzero
    migration-rocksdb ethcore-network ethcore-network-devp2p panic_hook
    patricia-trie-ethereum registrar rlp_compress rlp_derive parity-runtime stats
    time-utils triehash-ethereum unexpected parity-version
    

Contributing to documentation for Parity Ethereum packages

Document source code for Parity Ethereum packages by annotating the source code with documentation comments.

Example (generic documentation comment):

/// Summary
///
/// Description
///
/// # Panics
///
/// # Errors
///
/// # Safety
///
/// # Examples
///
/// Summary of Example 1
///
/// ```rust
/// // insert example 1 code here for use with documentation as tests
/// ```
///

6. Toolchain

In addition to the Parity Ethereum client, there are additional tools in this repository available:

  • evmbin - Parity Ethereum EVM Implementation.
  • ethstore - Parity Ethereum Key Management.
  • ethkey - Parity Ethereum Keys Generator.

The following tool is available in a separate repository:

  • ethabi - Parity Ethereum Encoding of Function Calls. Docs here
  • whisper - Parity Ethereum Whisper-v2 PoC Implementation.

7. Community

Join the chat!

Questions? Get in touch with us on Gitter: Gitter: Parity Gitter: Parity.js Gitter: Parity/Miners Gitter: Parity-PoA

Alternatively, join our community on Matrix: Riot: +Parity

8. Contributing

An introduction has been provided in the "So You Want to be a Core Developer" presentation slides by Hernando Castano. Additional guidelines are provided in CONTRIBUTING.

Contributor Code of Conduct

CODE_OF_CONDUCT

9. License

LICENSE