Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.75 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.75 KB

The current version of this code can be found at https://github.com/ethereum/pyethereum

Purpose of the Repository

This repository contains the implementation of the Ethereum blockchain protocol in Python. It includes the core components required to run an Ethereum node, such as block processing, transaction handling, and state management.

Main Components

  • blocks.py: Contains the Block class, which represents a block in the Ethereum blockchain.
  • transactions.py: Contains the Transaction class, which represents a transaction in the Ethereum blockchain.
  • trie.py: Contains the Trie class, which is used for state management in the Ethereum blockchain.
  • manager.py: Contains functions for managing the blockchain, such as generating addresses and receiving objects.
  • processblock.py: Contains functions for processing blocks and evaluating contracts.
  • parser.py: Contains the parse function for parsing input data.
  • rlp.py: Contains functions for encoding and decoding data using Recursive Length Prefix (RLP) encoding.
  • trietest.py: Contains the trie_test function for testing the Trie class.

Setting Up the Development Environment

To set up the development environment, follow these steps:

  1. Clone the repository:

    git clone https://github.com/ethereum/pyethereum.git
    cd pyethereum
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Running Tests

To run the tests, follow these steps:

  1. Ensure that the development environment is set up and activated.

  2. Run the tests using pytest:

    pytest