GithubHelp home page GithubHelp logo

anfegu / anfegeth Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 20 KB

This Rust project demonstrates how to perform a handshake with a P2P local node using the `web3` crate and `coregeth`.

Shell 0.82% Rust 99.18%

anfegeth's Introduction

AnfeGETH 1.0 P2P Handshake

This Rust project demonstrates how to perform a handshake with a P2P local node using the web3 crate and coregeth.

Prerequisites

  • Rust (latest stable version recommended)
  • coregeth (latest version recommended)

Installation

  1. Install Rust by following the instructions on the Rust website.
  2. Install coregeth by following the instructions on the Geth website. Or the next:

Prerequisites

  • Go 1.16 or higher
  • go-ethereum v1.10.26 or higher

Getting Started

  1. Download and install Go from the Go website.

  2. Install go-ethereum version v1.10.26:

    go get -u github.com/ethereum/[email protected]

    unzip and follow the usual Linux: place it in the preferred directory (e.g usr/local/) and continue.


  1. Clone this repository:

    git clone https://github.com/anfegu/anfegeth

  2. Navigate to the root directory of the project and install the dependencies:

    cd anfegeth

    cargo install

Running the AnfeGETH 1.0 P2P Handshake

  1. Start coregeth in a separate terminal window:

    Run geth with the --http and --network flags:

    in the installed directory:

     ./geth --http --network=my-network-id
    

NETWORKS LIST AVAILABLES:

  • "id": "1", "name": "Mainnet"
  • "id": "3", "name": "Ropsten"
  • "id": "4", "name": "Rinkeby"
  • "id": "5", "name": "Goerli"
  • "id": "1337802", "name": "Kiln"
  • "id": "11155111", "name": "Sepolia"
  1. In the terminal window where you installed the project, run the anfeGETH 1.0 P2P Handshake:

    cargo run

  2. Follow the prompts in the console menu to perform the handshake with the local geth node.

    If the handshake is successful, you should see a message indicating that the handshake was completed.

Testing

To run the tests for this project, use the cargo test command:

cargo test

This will run all the tests in the project and show the results.

You can also use the --verbose flag to see more detailed output:

cargo test --verbose

Or, you can specify the name of a specific test or test module to run a subset of the tests:

cargo test my_test

cargo test my_module

Documentation

To generate documentation for this project, use the cargo doc command:

cargo doc

This will generate documentation for all the crates in the project and create an HTML file that can be viewed in a web browser. The documentation will be available in the target/doc directory.

You can also use the --open flag to automatically open the documentation in your default web browser:

cargo doc --open

Additional Resources

anfegeth's People

Contributors

anfegu avatar

Watchers

 avatar

Forkers

rwinwij

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.