Skip to content

Commit

Permalink
fix naming (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying-peng authored Jun 12, 2024
1 parent 64f2f07 commit 87fb3fd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 63 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to rosetta-ethereum
# Contributing to mesh-ethereum

## Code of Conduct

Expand Down Expand Up @@ -48,6 +48,6 @@ be locked to prevent further discussion.

All support requests must be made via [our support team][3].

[1]: https://github.com/coinbase/rosetta-ethereum/issues
[1]: https://github.com/coinbase/mesh-ethereum/issues
[2]: https://chris.beams.io/posts/git-commit/#seven-rules
[3]: https://support.coinbase.com/customer/en/portal/articles/2288496-how-can-i-contact-coinbase-support-
111 changes: 53 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
<!-- HTML Graphic image –>
<p align="center">
<a href="https://www.rosetta-api.org">
<img width="90%" alt="Rosetta" src="https://www.rosetta-api.org/img/rosetta_header.png">
</a>
</p>
<!-- HTML h3 Title and Description -->
<h3 align="center">
Rosetta Ethereum
Mesh Ethereum
</h3>
<p align="center">
This repository contains a sample implementation of Rosetta API for the Ethereum blockchain.
This repository contains a sample implementation of Mesh API for the Ethereum blockchain.
</p>
<!-- Badges -->
<p align="center">
<a href="https://actions-badge.atrox.dev/coinbase/rosetta-ethereum/goto?ref=master"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcoinbase%2Frosetta-ethereum%2Fbadge%3Fref%3Dmaster&style=popout" /></a>
<!-- <a href="https://circleci.com/gh/coinbase/rosetta-ethereum/tree/master"><img src="https://circleci.com/gh/coinbase/rosetta-ethereum/tree/master.svg?style=shield" /></a> -->
<a href="https://coveralls.io/github/coinbase/rosetta-ethereum"><img src="https://coveralls.io/repos/github/coinbase/rosetta-ethereum/badge.svg" /></a>
<a href="https://goreportcard.com/report/github.com/coinbase/rosetta-ethereum"><img src="https://goreportcard.com/badge/github.com/coinbase/rosetta-ethereum" /></a>
<a href="https://github.com/coinbase/rosetta-ethereum/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/coinbase/rosetta-ethereum.svg" /></a>
<a href="https://pkg.go.dev/github.com/coinbase/rosetta-ethereum?tab=overview"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield" /></a>
<a href="https://actions-badge.atrox.dev/coinbase/mesh-ethereum/goto?ref=master"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fcoinbase%2Fmesh-ethereum%2Fbadge%3Fref%3Dmaster&style=popout" /></a>
<!-- <a href="https://circleci.com/gh/coinbase/mesh-ethereum/tree/master"><img src="https://circleci.com/gh/coinbase/mesh-ethereum/tree/master.svg?style=shield" /></a> -->
<a href="https://coveralls.io/github/coinbase/mesh-ethereum"><img src="https://coveralls.io/repos/github/coinbase/mesh-ethereum/badge.svg" /></a>
<a href="https://goreportcard.com/report/github.com/coinbase/mesh-ethereum"><img src="https://goreportcard.com/badge/github.com/coinbase/mesh-ethereum" /></a>
<a href="https://github.com/coinbase/mesh-ethereum/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/coinbase/mesh-ethereum.svg" /></a>
<a href="https://pkg.go.dev/github.com/coinbase/mesh-ethereum?tab=overview"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=shield" /></a>
</p>
<!-- Rosetta Tagline -->
<!-- Mesh Tagline -->
<p align="center">
Build once.
Integrate your blockchain everywhere.
Expand All @@ -38,9 +33,9 @@ USE AT YOUR OWN RISK.
<!-- Overview -->
## Overview

The `rosetta-ethereum` repository provides an implementation sample of the Rosetta API for Ethereum in Golang. We created this repository for developers of Ethereum-like (a.k.a., account-based) blockchains, who may find it easier to fork this implementation sample than write one from scratch.
The `mesh-ethereum` repository provides an implementation sample of the Mesh API for Ethereum in Golang. We created this repository for developers of Ethereum-like (a.k.a., account-based) blockchains, who may find it easier to fork this implementation sample than write one from scratch.

[Rosetta](https://www.rosetta-api.org/docs/welcome.html) is an open-source specification and set of tools that makes integrating with blockchains simpler, faster, and more reliable. The Rosetta API is specified in the [OpenAPI 3.0 format](https://www.openapis.org).
[Mesh](https://www.mesh-api.org/docs/welcome.html) is an open-source specification and set of tools that makes integrating with blockchains simpler, faster, and more reliable. The Mesh API is specified in the [OpenAPI 3.0 format](https://www.openapis.org).

You can craft requests and responses with auto-generated code using [Swagger Codegen](https://swagger.io/tools/swagger-codegen) or [OpenAPI Generator](https://openapi-generator.tech). These requests and responses must be human-readable (easy to debug and understand), and able to be used in servers and browsers.

Expand All @@ -62,12 +57,12 @@ Jump to:

RAM: 16 MB minimum

We tested `rosetta-ethereum` 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.
We tested `mesh-ethereum` 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 `mesh-ethereum` will exit with an OOM error.
<!-- h3 Network Settings -->
### Network Settings

To increase the load `rosetta-ethereum` can handle, we recommend these actions:
To increase the load `mesh-ethereum` can handle, we recommend these actions:

1. Tune your OS settings to allow for more connections. On a linux-based OS, run the following commands to do so ([source](http://www.tweaked.io/guide/kernel)):

Expand All @@ -79,12 +74,12 @@ 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._
_We have not tested `mesh-ethereum` with `net.ipv4.tcp_tw_recycle` and do not recommend enabling it._

2. Modify your open file settings to `100000`. You can do this on a linux-based OS with the command: `ulimit -n 100000`.

### Memory-Mapped Files
`rosetta-ethereum` uses [memory-mapped files](https://en.wikipedia.org/wiki/Memory-mapped_file) to persist data in the `indexer`. As a result, you **must** run `rosetta-ethereum` on a 64-bit architecture (the virtual address space easily exceeds 100s of GBs).
`mesh-ethereum` uses [memory-mapped files](https://en.wikipedia.org/wiki/Memory-mapped_file) to persist data in the `indexer`. As a result, you **must** run `mesh-ethereum` on a 64-bit architecture (the virtual address space easily exceeds 100s of GBs).

If you receive a kernel OOM, you may need to increase the allocated size of swap space on your OS. There is a great tutorial for how to do this on Linux [here](https://linuxize.com/post/create-a-linux-swap-file/).
<!-- h2 Configuration -->
Expand Down Expand Up @@ -133,22 +128,22 @@ make coverage-local
<!-- h2 Docker Deployment -->
## Docker Deployment

As specified in the [Rosetta API Principles](https://www.rosetta-api.org/docs/automated_deployment_testing.html), all Rosetta implementations must be deployable via Docker and support running via either an [`online` or `offline` mode](https://www.rosetta-api.org/docs/node_deployment.html#multiple-modes).
As specified in the [Mesh API Principles](https://www.mesh-api.org/docs/automated_deployment_testing.html), all Mesh implementations must be deployable via Docker and support running via either an [`online` or `offline` mode](https://www.mesh-api.org/docs/node_deployment.html#multiple-modes).

**YOU MUST INSTALL DOCKER FOR THE FOLLOWING INSTRUCTIONS TO WORK. YOU CAN DOWNLOAD DOCKER [HERE](https://www.docker.com/get-started).**
<!-- h2 Image Installation -->
### Image Installation

Running the following commands will create a Docker image called `rosetta-ethereum:latest`.
Running the following commands will create a Docker image called `mesh-ethereum:latest`.

#### Installing from GitHub

To download the pre-built Docker image from the latest release, run:

```text
curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-ethereum/master/install.sh | sh -s
curl -sSfL https://raw.githubusercontent.com/coinbase/mesh-ethereum/master/install.sh | sh -s
```
_Do not try to install rosetta-ethereum using GitHub Packages!_
_Do not try to install mesh-ethereum using GitHub Packages!_

#### Installing from Source

Expand All @@ -167,7 +162,7 @@ make build-local
**Options:** `ONLINE`, `OFFLINE`
**Default:** None

`MODE` determines if Rosetta can make outbound connections.
`MODE` determines if Mesh can make outbound connections.

**`NETWORK`**
**Type:** `String`
Expand All @@ -181,7 +176,7 @@ make build-local
**Options:** `8080`, any compatible port number
**Default:** None

`PORT` is the port to use for Rosetta.
`PORT` is the port to use for Mesh.

#### Optional Arguments

Expand All @@ -197,13 +192,13 @@ make build-local
**Options:** `TRUE`, `FALSE`
**Default:** `FALSE`

`SKIP_GETH_ADMIN` instructs Rosetta to not use the `geth` `admin` RPC calls. This is typically disabled by hosted blockchain node services.
`SKIP_GETH_ADMIN` instructs Mesh to not use the `geth` `admin` RPC calls. This is typically disabled by hosted blockchain node services.
<!-- h3 Run Docker -->
### Run Docker

Running the commands below will start a Docker container in
[detached mode](https://docs.docker.com/engine/reference/run/#detached--d), with
a data directory at `<working directory>/ethereum-data` and the Rosetta API accessible at port `8080`.
a data directory at `<working directory>/ethereum-data` and the Mesh API accessible at port `8080`.

#### Example Commands

Expand All @@ -213,7 +208,7 @@ You can run these commands from the command line. If you cloned the repository,

Uncloned repo:
```text
docker run -d --rm --ulimit "nofile=100000:100000" -v "$(pwd)/ethereum-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 30303:30303 rosetta-ethereum:latest
docker run -d --rm --ulimit "nofile=100000:100000" -v "$(pwd)/ethereum-data:/data" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -p 8080:8080 -p 30303:30303 mesh-ethereum:latest
```

Cloned repo:
Expand All @@ -225,7 +220,7 @@ make run-mainnet-online

Uncloned repo:
```text
docker run -d --rm --ulimit "nofile=100000:100000" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -e "GETH=<NODE URL>" -p 8080:8080 -p 30303:30303 rosetta-ethereum:latest
docker run -d --rm --ulimit "nofile=100000:100000" -e "MODE=ONLINE" -e "NETWORK=MAINNET" -e "PORT=8080" -e "GETH=<NODE URL>" -p 8080:8080 -p 30303:30303 mesh-ethereum:latest
```

Cloned repo:
Expand All @@ -237,7 +232,7 @@ make run-mainnet-remote geth=<NODE URL>

Uncloned repo:
```text
docker run -d --rm -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081 rosetta-ethereum:latest
docker run -d --rm -e "MODE=OFFLINE" -e "NETWORK=MAINNET" -e "PORT=8081" -p 8081:8081 mesh-ethereum:latest
```

Cloned repo:
Expand All @@ -249,7 +244,7 @@ make run-mainnet-offline

Uncloned repo:
```text
docker run -d --rm --ulimit "nofile=100000:100000" -v "$(pwd)/ethereum-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 30303:30303 rosetta-ethereum:latest
docker run -d --rm --ulimit "nofile=100000:100000" -v "$(pwd)/ethereum-data:/data" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -p 8080:8080 -p 30303:30303 mesh-ethereum:latest
```

Cloned repo:
Expand All @@ -264,7 +259,7 @@ geth attach http://127.0.0.1:8545

Uncloned repo:
```text
docker run -d --rm --ulimit "nofile=100000:100000" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -e "GETH=<NODE URL>" -p 8080:8080 -p 30303:30303 rosetta-ethereum:latest
docker run -d --rm --ulimit "nofile=100000:100000" -e "MODE=ONLINE" -e "NETWORK=TESTNET" -e "PORT=8080" -e "GETH=<NODE URL>" -p 8080:8080 -p 30303:30303 mesh-ethereum:latest
```

Cloned repo:
Expand All @@ -276,65 +271,65 @@ make run-testnet-remote geth=<NODE URL>

Uncloned repo:
```text
docker run -d --rm -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081:8081 rosetta-ethereum:latest
docker run -d --rm -e "MODE=OFFLINE" -e "NETWORK=TESTNET" -e "PORT=8081" -p 8081:8081 mesh-ethereum:latest
```

Cloned repo:
```text
make run-testnet-offline
```
<!-- h2 Testing -->
## Test the Implementation with rosetta-cli
## Test the Implementation with mesh-cli

To validate `rosetta-ethereum`, [install `rosetta-cli`](https://github.com/coinbase/rosetta-cli#install)
To validate `mesh-ethereum`, [install `mesh-cli`](https://github.com/coinbase/mesh-cli#install)
and run one of the following commands:

* `rosetta-cli check:data --configuration-file rosetta-cli-conf/testnet/config.json` - This command validates that the Data API implementation is correct using the ethereum `testnet` node. 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 Construction API implementation. It also verifies transaction construction, signing, and submissions to the `testnet` network.
* `rosetta-cli check:data --configuration-file rosetta-cli-conf/mainnet/config.json` - This command validates that the Data API implementation is correct using the ethereum `mainnet` node. It also ensures that the implementation does not miss any balance-changing operations.
* `mesh-cli check:data --configuration-file mesh-cli-conf/testnet/config.json` - This command validates that the Data API implementation is correct using the ethereum `testnet` node. It also ensures that the implementation does not miss any balance-changing operations.
* `mesh-cli check:construction --configuration-file mesh-cli-conf/testnet/config.json` - This command validates the Construction API implementation. It also verifies transaction construction, signing, and submissions to the `testnet` network.
* `mesh-cli check:data --configuration-file mesh-cli-conf/mainnet/config.json` - This command validates that the Data API implementation is correct using the ethereum `mainnet` node. It also ensures that the implementation does not miss any balance-changing operations.

Read the [How to Test your Rosetta Implementation](https://www.rosetta-api.org/docs/rosetta_test.html) documentation for additional details.
Read the [How to Test your Mesh Implementation](https://www.mesh-api.org/docs/mesh_test.html) documentation for additional details.
<!-- h2 Contributing -->
## Contributing

You may contribute to the `rosetta-ethereum` project in various ways:
You may contribute to the `mesh-ethereum` project in various ways:

* [Asking Questions](CONTRIBUTING.md/#asking-questions)
* [Providing Feedback](CONTRIBUTING.md/#providing-feedback)
* [Reporting Issues](CONTRIBUTING.md/#reporting-issues)

Read our [Contributing](CONTRIBUTING.MD) documentation for more information.

When you've finished an implementation for a blockchain, share your work in the [ecosystem category of the community site](https://community.rosetta-api.org/c/ecosystem). Platforms looking for implementations for certain blockchains will be monitoring this section of the website for high-quality implementations they can use for integration. Make sure that your implementation meets the [expectations](https://www.rosetta-api.org/docs/node_deployment.html) of any implementation.
When you've finished an implementation for a blockchain, share your work in the [ecosystem category of the community site](https://community.mesh-api.org/c/ecosystem). Platforms looking for implementations for certain blockchains will be monitoring this section of the website for high-quality implementations they can use for integration. Make sure that your implementation meets the [expectations](https://www.mesh-api.org/docs/node_deployment.html) of any implementation.

You can also find community implementations for a variety of blockchains in the [rosetta-ecosystem](https://github.com/coinbase/rosetta-ecosystem) repository.
You can also find community implementations for a variety of blockchains in the [mesh-ecosystem](https://github.com/coinbase/mesh-ecosystem) repository.
<!-- h2 Documentation -->
## Documentation

You can find the Rosetta API documentation at [rosetta-api.org](https://www.rosetta-api.org/docs/welcome.html).
You can find the Mesh API documentation at [mesh-api.org](https://www.mesh-api.org/docs/welcome.html).

Check out the [Getting Started](https://www.rosetta-api.org/docs/getting_started.html) section to start diving into Rosetta.
Check out the [Getting Started](https://www.mesh-api.org/docs/getting_started.html) section to start diving into Mesh.

Our documentation is divided into the following sections:

* [Product Overview](https://www.rosetta-api.org/docs/welcome.html)
* [Getting Started](https://www.rosetta-api.org/docs/getting_started.html)
* [Rosetta API Spec](https://www.rosetta-api.org/docs/Reference.html)
* [Samples](https://www.rosetta-api.org/docs/reference-implementations.html)
* [Testing](https://www.rosetta-api.org/docs/rosetta_cli.html)
* [Best Practices](https://www.rosetta-api.org/docs/node_deployment.html)
* [Repositories](https://www.rosetta-api.org/docs/rosetta_specifications.html)
* [Product Overview](https://www.mesh-api.org/docs/welcome.html)
* [Getting Started](https://www.mesh-api.org/docs/getting_started.html)
* [Mesh API Spec](https://www.mesh-api.org/docs/Reference.html)
* [Samples](https://www.mesh-api.org/docs/reference-implementations.html)
* [Testing](https://www.mesh-api.org/docs/mesh_cli.html)
* [Best Practices](https://www.mesh-api.org/docs/node_deployment.html)
* [Repositories](https://www.mesh-api.org/docs/mesh_specifications.html)
<!-- h2 Related Projects -->
## Related Projects

* [rosetta-geth-sdk](https://github.com/coinbase/rosetta-geth-sdk) — This SDK helps accelerate Rosetta API implementation on go-ethereum based chains.
* [rosetta-sdk-go](https://github.com/coinbase/rosetta-sdk-go) — The `rosetta-sdk-go` SDK provides a collection of packages used for interaction with the Rosetta API specification.
* [rosetta-specifications](https://github.com/coinbase/rosetta-specifications) — Much of the SDKs’ code is generated from this repository.
* [rosetta-cli](https://github.com/coinbase/rosetta-ecosystem) — Use the `rosetta-cli` tool to test your Rosetta API implementation. The tool also provides the ability to look up block contents and account balances.
* [mesh-geth-sdk](https://github.com/coinbase/mesh-geth-sdk) — This SDK helps accelerate Mesh API implementation on go-ethereum based chains.
* [mesh-sdk-go](https://github.com/coinbase/mesh-sdk-go) — The `mesh-sdk-go` SDK provides a collection of packages used for interaction with the Mesh API specification.
* [mesh-specifications](https://github.com/coinbase/mesh-specifications) — Much of the SDKs’ code is generated from this repository.
* [mesh-cli](https://github.com/coinbase/mesh-ecosystem) — Use the `mesh-cli` tool to test your Mesh API implementation. The tool also provides the ability to look up block contents and account balances.
<!-- h3 Other Implementation Samples -->
### Other Implementation Samples

You can find community implementations for a variety of blockchains in the [rosetta-ecosystem](https://github.com/coinbase/rosetta-ecosystem) repository, and in the [ecosystem category](https://community.rosetta-api.org/c/ecosystem) of our community site.
You can find community implementations for a variety of blockchains in the [mesh-ecosystem](https://github.com/coinbase/mesh-ecosystem) repository, and in the [ecosystem category](https://community.mesh-api.org/c/ecosystem) of our community site.

<!-- h2 License and Copyright -->
## License
Expand Down
Loading

0 comments on commit 87fb3fd

Please sign in to comment.