Giter Site home page Giter Site logo

sf-ethereum's Introduction

Ethereum on StreamingFast

reference License

Requirements (clone repos, build stuff...)

Install Geth

git clone [email protected]:streamingfast/go-ethereum.git
cd go-ethereum
git checkout release/geth-1.10.x-dm
go install ./cmd/geth
go install ./cmd/bootnode

Install sfeth

git clone [email protected]:streamingfast/sf-ethereum.git
cd sf-ethereum
go install ./cmd/sfeth

Quickstart, connecting to an existing chain

  • Start from a clean folder

  • Create a file named sf.yaml and put the following content:

    start:
    args:
    - merger
    - firehose
    - mindreader-node
    - relayer
    flags:
      common-chain-id: "1"
      common-network-id: "1"
      mindreader-node-bootstrap-data-url: ./mindreader/genesis.json
      mindreader-node-log-to-zap: false
      mindreader-node-arguments: "+--bootnodes=enode://<enode1>@<ip>:<port>,enode://<enode2>@<ip>:<port>"
    

    Note Up to date boot nodes info for Geth supported network(s) can be found here.

  • Create a folder mindreader

  • Copy the genesis.json file of the chain into the mindreader folder.

    Note It's possible to use geth dumpgenesis to dump actual genesis file to disk

    • Mainnet - geth --mainnet dumpgenesis > ./mindreader/genesis.json
    • Ropsten - geth --ropsten dumpgenesis > ./mindreader/genesis.json
    • Goerli - geth --goerli dumpgenesis > ./mindreader/genesis.json
    • Rinkeby - geth --rinkeby dumpgenesis > ./mindreader/genesis.json
  • sfeth start -vv

    Note It's recommended to launch with -vv the first time to more easily see what's happening under the hood.

  • Wait around a minute leaving enough time for the Geth process to start the syncing process. You should then have some merged blocks under ./sf-data/storage/merged-blocks. You should also be able to test that Firehose is able to stream some blocks to you.

    `grpcurl -plaintext -import-path ../proto -import-path ./proto -proto sf/ethereum/type/v1/type.proto -proto sf/firehose/v1/firehose.proto -d '{"start_block_num": -1}' localhost:13042 sf.firehose.v1.Stream.Blocks"

    Note You will need to have grpcurl and a clone of https://github.com/streamingfast/proto, we assume they are sibling of the folder you are currently in, adjust -import-path ... flags in the command above to where the files are located.

Release

Use the ./bin/release.sh Bash script to perform a new release. It will ask you questions as well as driving all the required commands, performing the necessary operation automatically. The Bash script runs in dry-mode by default, so you can check first that everything is all right.

Releases are performed using goreleaser.

Contributing

Issues and PR in this repo related strictly to the Ethereum on StreamingFast.

Report any protocol-specific issues in their respective repositories

Please first refer to the general StreamingFast contribution guide, if you wish to contribute to this code base.

This codebase uses unit tests extensively, please write and run tests.

License

Apache 2.0

sf-ethereum's People

Contributors

billettc avatar maoueh avatar froch avatar eduard-voiculescu avatar colindickson avatar jubeless avatar sduchesneau avatar 0xbe1 avatar

Watchers

James Cloos avatar  avatar

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.