Skip to content

Commit

Permalink
Merge branch 'main' into uptime-e2e; upgrade subnet-evm
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Nov 15, 2024
2 parents d5b09f7 + 877bb36 commit 14393c7
Show file tree
Hide file tree
Showing 133 changed files with 45,224 additions and 920 deletions.
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

22 changes: 0 additions & 22 deletions .env.testnet

This file was deleted.

34 changes: 29 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"

- name: Run Go unit tests
run: |
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: "go.mod"

- name: Install Foundry
run: ./scripts/install_foundry.sh
Expand All @@ -71,7 +71,7 @@ jobs:
run: |
export PATH=$PATH:$HOME/.foundry/bin
export PATH="$PATH:$GOPATH/bin"
./scripts/local/e2e_test.sh --components teleporter
./scripts/e2e_test.sh --components teleporter
governance_e2e:
name: governance-e2e-tests
Expand All @@ -95,7 +95,7 @@ jobs:
run: |
export PATH=$PATH:$HOME/.foundry/bin
export PATH="$PATH:$GOPATH/bin"
./scripts/local/e2e_test.sh --components governance
./scripts/e2e_test.sh --components governance
validator_manager_e2e:
name: validator-manager-e2e-tests
Expand All @@ -119,4 +119,28 @@ jobs:
run: |
export PATH=$PATH:$HOME/.foundry/bin
export PATH="$PATH:$GOPATH/bin"
./scripts/local/e2e_test.sh --components validator-manager
./scripts/e2e_test.sh --components validator-manager
ictt_e2e:
name: ictt-e2e-tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repositories and submodules
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Install Foundry
run: ./scripts/install_foundry.sh

- name: Run E2E Tests
# Forge installs to BASE_DIR, but updates the PATH definition in $HOME/.bashrc
run: |
export PATH=$PATH:$HOME/.foundry/bin
export PATH="$PATH:$GOPATH/bin"
./scripts/e2e_test.sh --components ictt
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ contracts/pkg
docker-compose-test-local.yml
docker-compose-run-local.yml

# Environment and configuration values
.env

# Ginkgo
main.log
server.log
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To start developing on Teleporter, you'll need Solidity >= v0.8.25. [Foundry](ht
- Run the end-to-end tests

```sh
./scripts/local/e2e_test.sh
./scripts/e2e_test.sh
```

- Run the Solidity and Golang linters
Expand Down
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ To get started with using Teleporter, see [How to Deploy Teleporter Enabled Subn
- [Structure](#structure)
- [E2E tests](#e2e-tests)
- [Run specific E2E tests](#run-specific-e2e-tests)
- [Run the E2E tests on another network](#run-the-e2e-tests-on-another-network)
- [Upgradability](#upgradability)
- [Deploy Teleporter to a Subnet](#deploy-teleporter-to-a-subnet)
- [Deploy TeleporterRegistry to a Subnet](#deploy-teleporterregistry-to-a-subnet)
Expand Down Expand Up @@ -67,7 +66,7 @@ Release versions follow the [semver](https://semver.org/) convention of incompat
- `scripts/` includes bash scripts for interacting with Teleporter in various environments, as well as utility scripts.
- `abi_bindings.sh` generates ABI bindings for the contracts in `contracts/` and outputs them to `abi-bindings/`.
- `lint.sh` performs Solidity and Golang linting.
- `scripts/local/` includes scripts for running Teleporter in Docker.
- `scripts/` includes scripts for running Teleporter in Docker.
- `docker/` includes configurations for a local, containerized setup of Teleporter.

## E2E tests
Expand All @@ -79,21 +78,21 @@ To run the E2E tests locally, you'll need to install Gingko following the instru
Then run the following command from the root of the repository:

```bash
./scripts/local/e2e_test.sh
./scripts/e2e_test.sh
```

### Run specific E2E tests

To run a specific E2E test, specify the environment variable `GINKGO_FOCUS`, which will then look for test descriptions that match the provided input. For example, to run the `Calculate Teleporter message IDs` test:

```bash
GINKGO_FOCUS="Calculate Teleporter message IDs" ./scripts/local/e2e_test.sh
GINKGO_FOCUS="Calculate Teleporter message IDs" ./scripts/e2e_test.sh
```

A substring of the full test description can be used as well:

```bash
GINKGO_FOCUS="Calculate Teleporter" ./scripts/local/e2e_test.sh
GINKGO_FOCUS="Calculate Teleporter" ./scripts/e2e_test.sh
```

The E2E tests also supports `GINKGO_LABEL_FILTER`, making it easy to group test cases and run them together. For example, to run all E2E tests for the example cross chain applications:
Expand All @@ -107,20 +106,9 @@ The E2E tests also supports `GINKGO_LABEL_FILTER`, making it easy to group test
```
```bash
GINKGO_LABEL_FILTER="cross chain apps" ./scripts/local/e2e_test.sh
GINKGO_LABEL_FILTER="cross chain apps" ./scripts/e2e_test.sh
```
### Run the E2E tests on another network
The same E2E test flows can be executed against external network by setting the proper environment variables in `.env.testnet` and `.env`, and running the following commands:
```bash
cp .env.example .env # Set proper values after copying.
./scripts/testnet/run_testnet_e2e_flows.sh
```
The user wallet set in `.env` must have native tokens for each of the Subnets used in order for the test flows to be able to send transactions on those networks. The [Avalanche Testnet Faucet](https://core.app/tools/testnet-faucet) can be used to obtain native tokens for certain public testnet Subnets.
## Upgradability
The Teleporter contract is non-upgradeable and can not be changed once it is deployed. This provides immutability to the contracts, and ensures that the contract's behavior at each address is unchanging. However, to allow for new features and potential bug fixes, new versions of the Teleporter contract can be deployed to different addresses. The [TeleporterRegistry](./contracts/teleporter/TeleporterRegistry.sol) is used to keep track of the deployed versions of Teleporter, and to provide a standard interface for dApps to interact with the different Teleporter versions.
Expand Down
2 changes: 1 addition & 1 deletion abi-bindings/go/ProxyAdmin/ProxyAdmin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14393c7

Please sign in to comment.