GithubHelp home page GithubHelp logo

ethereum-optimism / integration-tests Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 9.0 1.8 MB

[Optimism] Service Integration Tests

License: MIT License

Shell 0.63% TypeScript 60.50% Solidity 38.20% JavaScript 0.67%

integration-tests's Introduction

[DEPRECATED] This repository is now deprecated in favour of the new development monorepo.

Integration Tests

Typescript based integration test repo for Optimistic Ethereum.

Test suites are defined as a package in the packages directory. This repo can be ran on its own or as part of Optimism Integration.

Running with Optimism Integration

The Optimism Integration repo can be used to automatically configure and run the test suites found in this repo. See the README for usage information.

It is assumed that each test suite gets a fresh state when running this way. This means that the packages must not depend on each other.

Docker images found on Dockerhub are used when running the test suites this way.

Running locally

This repo can be ran locally against existing services but the configuration must be handled by the user. A .env file will be used to populate the configuration when then environment variable NODE_ENV is set to local.

There should be a yarn script for each package found in packages.

$ yarn test:x-domain
$ yarn test:tx-ingestion
$ yarn test:sequencer-interactions

The environment variables that are used by this repository can be found in the Config class in common.ts.

Environment Variable Description
L1_NODE_WEB3_URL L1 HTTP endpoint
L2_NODE_WEB3_URL L2 HTTP endpoint
MNEMONIC Mnemonic used to derive keys
ETH1_ADDRESS_RESOLVER_ADDRESS Address Resolver Address
SEQUENCER_PRIVATE_KEY Private key used by sequencer
DEPLOYER_PRIVATE_KEY Private key used by deployer
TARGET_GAS_LIMIT L2 gas limit
CHAIN_ID L2 Chain ID

The test suites must not run in parallel.

integration-tests's People

Contributors

alexanderattar avatar annieke avatar ben-chain avatar gakonst avatar smartcontracts avatar snario avatar tynes avatar willmeister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

integration-tests's Issues

Add integration test for L1ToL2Transaction ingestion into Postgres

Context

Before we push deposits to testnet, we will need solid integration tests around the tx ingestion process. This ticket just covers the process of ingesting L1ToL2Transactions into Postgres, and we'll have another ticket for ingestion into Geth.

Details

  • Add integration test
  • Fix any relevant bugs

Caveats

None

This Is Done When...

  • There is a working integration test which verifies the L1ToL2 Transaction is successfully submitted to Postgres

Add test that a failed safety check returns safety check revert message

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Upgrade test suite to easily run against a live testnet

Is your feature request related to a problem? Please describe.
Considerations are

  • differences in API between hardhat node and a live L1 testnet,
  • adjusting timeouts
  • gas prices

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Deduplicate docker related files

Is your feature request related to a problem? Please describe.
There are copy/pasted Dockerfiles and docker-compose files between the various repos, these can all be consolidated into a single place and used between all of the projects. It seems pretty unlikely that anybody will run docker-compose from the geth repo now that the optimism-integration repo exists.

Describe the solution you'd like
Unify the Dockerfiles and docker-compose files into either a single repo that can be a submodule or another place that makes sense.

Describe alternatives you've considered
Having lots of dockerfiles is not scalable. They could also be kept in this repo or in the optimism-integration repo.

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.