Rosetta End-to-End Testing Prerequisites

Rosetta End-to-End Testing Requirements

Before we begin testing a Rosetta implementation, we usually need to collect important information about deployment nuances and/or communicate the testing settings we use (for the rosetta-cli).

In an effort to expedite testing, we’ve shared a list of details you should provide when submitting your implementation and a list of end conditions we use when testing. Please reach out if you have any questions!

Deployment Details

Please include the following information in the README of your Rosetta submission.

Hardware

Requirements to run an archive node (syncing from genesis):

  • CPU
  • Memory
  • Disk Space

Ports

List of ports used in a node deployment, specifically the following:

  • Peering port: does it need to be accessible from a public subnet?
  • Online API port: port that Online API listens to
  • Offline API port: port that Offline API listens to

Dockerfile

  • We must be able to build the docker image from anywhere using the provided Dockerfile. If the Dockerfile relies on an external build context, the context should be accessible through git.
    For example, rosetta-bitcoin relies on its codebase as the build context. This is allowed as long as it can be replaced with

    # COPY . src
    RUN git clone https://github.com/coinbase/rosetta-bitcoin.git /app/src
    
  • Provide environment variable to specify the network, e.g., NETWORK=mainnet

  • Provide environment variable to specify the mode, e.g., MODE=offline

A full list of docker expectations can be found here.

Syncing Time

  • How long does it take the node to sync (this gives us a better sense of how long it would take to run the test).
    • If the node takes a long time to sync (> 12 hours), can you provide a link to a snapshot (privately is ok)?

rosetta-cli Configuration

  • Provide the rosetta-cli configuration file for both Mainnet and Testnet. See rosetta-ethereum for an example.

Testing

We use rosetta-cli for our E2E testing and will run the following commands:

rosetta-cli check:data --configuration-file <config.json>

rosetta-cli check:construction --configuration-file <config.json>

End Conditions

To pass E2E testing, both of these commands must pass with the following end conditions:

check:data

      "end_conditions": {
        "reconciliation_coverage": {
          "coverage": 0.95,
          "from_tip": true,
          "tip": true
        }
      }

check:construction

      "end_conditions": {
        "create_account": 10,
        "transfer": 10
      }