EthereumJS

repository·master·Indexed 25 days ago

https://github.com/ethereumjs/ethereumjs-monorepo

A collection of TypeScript libraries providing core building blocks for the Ethereum execution layer, including the EVM, transaction handling, and blockchain data structures. Key packages include @ethereumjs/block for handling Ethereum blocks and headers, and @ethereumjs/binarytree, an experimental implementation of Binary Trees as specified in EIP-7864 for optimized state storage and proof verification.

Tokens
201.9K
Snippets
169
Records
1.9K
Agent score
82%

What's inside ethereumjs-monorepo

  1. Overview of StateManager implementations

    master

    The StateManager provides high-level access and manipulation methods for the Ethereum state (accounts, contract code, and storage) rather than low-level trie operations. It includes several implementations that satisfy the StateManager interface used by the @ethereumjs/vm library:

    • SimpleStateManager: A dependency-minimized version suitable for basic EVM bytecode operations where sophisticated caching or state root handling is not required.
    • MerkleStateManager: A Merkle-Patricia Trie-based implementation used by @ethereumjs/client and @ethereumjs/vm.
    • RPCStateManager: A lightweight implementation that fetches state and history data from an external JSON-RPC provider.
    • StatefulBinaryTreeStateManager: An experimental implementation using a stateful binary tree.
  2. Overview of @ethereumjs/vm

    master

    The @ethereumjs/vm package provides an Ethereum mainnet compatible execution context for @ethereumjs/evm. It is used to build and run blocks and transactions and to update state.

    Key Features:

    • Supports all hardforks up to Osaka (with Amsterdam in development).
    • Tree-shakeable API and controlled dependency set.
    • Flexible EIP on/off engine.
    • Ready for EIP-7702.
    • Supports EIP-7928 Block Level Access Lists (experimental in Amsterdam).
    • Flexible state retrieval (Merkle, RPC, etc.).
    • Browser-ready with a WASM-free default.
    • Small bundle size: ~668KB (170KB gzipped).
  3. Overview of @ethereumjs/block

    master
    The @ethereumjs/block package provides the core data structures and utilities for handling Ethereum blocks and block headers. It includes classes for representing blocks and headers, interfaces for various data formats (including JSON-RPC and RLP), and a suite of factory functions to create block objects from different sources such as bytes, RLP, or JSON-RPC payloads.
  4. Overview of @ethereumjs/statemanager

    master
    The @ethereumjs/statemanager package provides various implementations for managing Ethereum state, including support for Merkle Patricia Trees, Verkle Trees, and RPC-based state access. It includes specialized classes for caching (Account, Code, and Storage caches) and different state manager types such as MerkleStateManager, SimpleStateManager, and StatefulBinaryTreeStateManager.
  5. Getting Started with @ethereumjs/devp2p

    master

    The @ethereumjs/devp2p library provides low-level peer-to-peer connection and message exchange components, including Distributed Peer Table (DPT), RLPx Transport Protocol, and the Ethereum Wire Protocol (ETH/68).

    Note: This library is deprecated.

    All components expose a public events property containing an EventEmitter (using EventEmitter3). You can react to network events by listening to this emitter.

  6. Overview of @ethereumjs/binarytree

    master

    @ethereumjs/binarytree is an implementation of Binary Trees as specified in EIP-7864.

    Binary Trees are a cryptographic data structure designed to optimize Ethereum state storage and proof verification. Unlike Merkle Patricia Tries, they use a strict binary branching structure to allow for smaller proof sizes and reduced storage overhead, aiming to enhance scalability while maintaining security.

  7. Overview of @ethereumjs/devp2p

    master
    The @ethereumjs/devp2p package provides the peer-to-peer networking primitives used in the Ethereum ecosystem. It includes implementations for RLPx, Kademlia-based Distributed Peer Tables (DPT), ENR (Ethereum Node Record), and SNAP (Signed and Authenticated Peer) protocols. It provides the necessary classes and interfaces to build or interact with Ethereum nodes, including server management, peer discovery, and secure communication via ECIES.
  8. Overview of EthereumJS Monorepo

    master
    The EthereumJS monorepo contains protocol building blocks for the Ethereum blockchain execution layer. It provides TypeScript implementations of the Ethereum Virtual Machine (EVM) for Node.js and browser environments, along with core components like Transactions (@ethereumjs/tx), Blocks (@ethereumjs/block), Blockchain (@ethereumjs/blockchain), and Merkle Patricia Trees (@ethereumjs/mpt). All libraries are unified by the @ethereumjs/common library, which manages chain specifics and hardfork changes.