diff --git a/README.md b/README.md index b288dc9..fe387cc 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,11 @@

ROSETTA-ETHEREUM IS CONSIDERED ALPHA SOFTWARE. -USE AT YOUR OWN RISK! COINBASE ASSUMES NO RESPONSIBILITY NOR LIABILITY IF THERE IS A BUG IN THIS IMPLEMENTATION. +USE AT YOUR OWN RISK! COINBASE ASSUMES NO RESPONSIBILITY OR LIABILITY IF THERE IS A BUG IN THIS IMPLEMENTATION.

## Overview -`rosetta-ethereum` provides a reference implementation of the Rosetta API for -Ethereum in Golang. If you haven't heard of the Rosetta API, you can find more -information [here](https://rosetta-api.org). +`rosetta-ethereum` provides a reference implementation of the Rosetta API for Ethereum in Golang. If you haven't heard of the Rosetta API, you can find more information [here](https://rosetta-api.org). ## Features * Comprehensive tracking of all ETH balance changes @@ -30,6 +28,29 @@ information [here](https://rosetta-api.org). * Atomic balance lookups using go-ethereum's GraphQL Endpoint * Idempotent access to all transaction traces and receipts +## System Requirements +`rosetta-ethereum` has been tested on an [AWS c5.2xlarge instance](https://aws.amazon.com/ec2/instance-types/c5). +This instance type has 8 vCPU and 16 GB of RAM. If you use a computer with less than 16 GB of RAM, +it is possible that `rosetta-ethereum` will exit with an OOM error. + +### Recommended OS Settings +To increase the load `rosetta-ethereum` can handle, it is recommended to tune your OS +settings to allow for more connections. On a linux-based OS, you can run the following +commands ([source](http://www.tweaked.io/guide/kernel)): +```text +sysctl -w net.ipv4.tcp_tw_reuse=1 +sysctl -w net.core.rmem_max=16777216 +sysctl -w net.core.wmem_max=16777216 +sysctl -w net.ipv4.tcp_max_syn_backlog=10000 +sysctl -w net.core.somaxconn=10000 +sysctl -p (when done) +``` +_We have not tested `rosetta-ethereum` with `net.ipv4.tcp_tw_recycle` and do not recommend +enabling it._ + +You should also modify your open file settings to `100000`. This can be done on a linux-based OS +with the command: `ulimit -n 100000`. + ## Usage As specified in the [Rosetta API Principles](https://www.rosetta-api.org/docs/automated_deployment.html), all Rosetta implementations must be deployable via Docker and support running via either an @@ -47,6 +68,9 @@ To download the pre-built Docker image from the latest release, run: curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-ethereum/master/install.sh | sh -s ``` +_Do not try to install rosetta-ethereum using GitHub Packages!_ + + #### From Source After cloning this repository, run: ```text @@ -65,6 +89,7 @@ at port `8080`. * `PORT`(required) - Which port to use for Rosetta. * `GETH` (optional) - Point to a remote `geth` node instead of initializing one * `SKIP_GETH_ADMIN` (optional, default: `FALSE`) - Instruct Rosetta to not use the `geth` `admin` RPC calls. This is typically disabled by hosted blockchain node services. +* `GETH_HEADERS` (optional) - Pass a key:value comma-separated list to be passed to the `geth` clients. e.g. `X-Auth-Token:12345-ABCDE,X-Other-Header:SomeOtherValue` #### Mainnet:Online ```text @@ -102,43 +127,17 @@ docker run -d --rm -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081 ``` _If you cloned the repository, you can run `make run-testnet-offline`._ -## System Requirements -`rosetta-ethereum` has been tested on an [AWS c5.2xlarge instance](https://aws.amazon.com/ec2/instance-types/c5). -This instance type has 8 vCPU and 16 GB of RAM. If you use a computer with less than 16 GB of RAM, -it is possible that `rosetta-ethereum` will exit with an OOM error. -### Recommended OS Settings -To increase the load `rosetta-ethereum` can handle, it is recommended to tune your OS -settings to allow for more connections. On a linux-based OS, you can run the following -commands ([source](http://www.tweaked.io/guide/kernel)): -```text -sysctl -w net.ipv4.tcp_tw_reuse=1 -sysctl -w net.core.rmem_max=16777216 -sysctl -w net.core.wmem_max=16777216 -sysctl -w net.ipv4.tcp_max_syn_backlog=10000 -sysctl -w net.core.somaxconn=10000 -sysctl -p (when done) -``` -_We have not tested `rosetta-ethereum` with `net.ipv4.tcp_tw_recycle` and do not recommend -enabling it._ - -You should also modify your open file settings to `100000`. This can be done on a linux-based OS -with the command: `ulimit -n 100000`. ## Testing with rosetta-cli To validate `rosetta-ethereum`, [install `rosetta-cli`](https://github.com/coinbase/rosetta-cli#install) and run one of the following commands: -* `rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/config.json` -* `rosetta-cli check:construction --configuration-file rosetta-cli-conf/testnet/config.json` -* `rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json` - -## Future Work -* Add ERC-20 Rosetta Module to enable reading ERC-20 token transfers and transaction construction -* [Rosetta API `/mempool/*`](https://www.rosetta-api.org/docs/MempoolApi.html) implementation -* Add more methods to the `/call` endpoint (currently only supports `eth_getBlockByNumber` and `eth_getTransactionReceipt`) -* Add CI test using `rosetta-cli` to run on each PR (likely on a regtest network) +* `rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/config.json` - This command validates that the Data API information in the `testnet` network is correct. It also ensures that the implementation does not miss any balance-changing operations. +* `rosetta-cli check:construction --configuration-file rosetta-cli-conf/testnet/config.json` - This command validates the blockchain’s construction, signing, and broadcasting. +* `rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json` - This command validates that the Data API information in the `mainnet` network is correct. It also ensures that the implementation does not miss any balance-changing operations. -_Please reach out on our [community](https://community.rosetta-api.org) if you want to tackle anything on this list!_ +## Issues +Interested in helping fix issues in this repository? You can find to-dos in the [Issues](https://github.com/coinbase/rosetta-ethereum/issues) section with the `help wanted` tag. Be sure to reach out on our [community](https://community.rosetta-api.org) before you tackle anything on this list. ## Development * `make deps` to install dependencies @@ -151,4 +150,4 @@ _Please reach out on our [community](https://community.rosetta-api.org) if you w ## License This project is available open source under the terms of the [Apache 2.0 License](https://opensource.org/licenses/Apache-2.0). -© 2021 Coinbase +© 2021 Coinbase \ No newline at end of file