Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AshAvalanche/subnet-evm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.8
Choose a base ref
...
head repository: AshAvalanche/subnet-evm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 857 changed files with 75,291 additions and 28,814 deletions.
9 changes: 1 addition & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -6,12 +6,5 @@

# review whenever someone opens a pull request.

* @ceyonur @darioush @patrick-ogrady @aaronbuchwald
* @ceyonur @darioush @aaronbuchwald

# These owners will be the owner of the contract-examples sub-directory.

contract-examples/ @dasconnor @anusha-ctrl

# These owners will be the owner of the scripts sub-directory.

scripts/ @anusha-ctrl
52 changes: 31 additions & 21 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
# Contributing

Thank you for considering to help out with the source code! We welcome
contributions from anyone on the internet, and are grateful for even the
Thank you for considering to help out with the source code! We welcome
contributions from anyone on the internet, and are grateful for even the
smallest of fixes!

If you'd like to contribute to coreth, please fork, fix, commit and send a
If you'd like to contribute to subnet-evm, please fork, fix, commit and send a
pull request for the maintainers to review and merge into the main code base. If
you wish to submit more complex changes though, please check up with the core
devs first on [Discord](https://chat.avalabs.org) to
ensure those changes are in line with the general philosophy of the project
you wish to submit more complex changes though, please check up with the core
devs first on [Discord](https://chat.avalabs.org) to
ensure those changes are in line with the general philosophy of the project
and/or get some early feedback which can make both your efforts much lighter as
well as our review and merge procedures quick and simple.

## Coding guidelines

Please make sure your contributions adhere to our coding guidelines:

* Code must adhere to the official Go
[formatting](https://golang.org/doc/effective_go.html#formatting) guidelines
(i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
* Code must be documented adhering to the official Go
[commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
* Pull requests need to be based on and opened against the `master` branch.
* Pull reuqests should include a detailed description
* Commits are required to be signed. See [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
for information on signing commits.
* Commit messages should be prefixed with the package(s) they modify.
* E.g. "eth, rpc: make trace configs optional"
Please make sure your contributions adhere to our coding and documentation
guidelines:

- Code must adhere to the official Go
[formatting](https://go.dev/doc/effective_go#formatting) guidelines
(i.e. uses [gofmt](https://pkg.go.dev/cmd/gofmt)).
- Pull requests need to be based on and opened against the `master` branch.
- Pull reuqests should include a detailed description
- Commits are required to be signed. See [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
for information on signing commits.
- Commit messages should be prefixed with the package(s) they modify.
- E.g. "eth, rpc: make trace configs optional"

## Documentation guidelines

- Code should be well commented, so it is easier to read and maintain.
Any complex sections or invariants should be documented explicitly.
- Code must be documented adhering to the official Go
[commentary](https://go.dev/doc/effective_go#commentary) guidelines.
- Changes with user facing impact (e.g., addition or modification of flags and
options) should be accompanied by a link to a pull request to the [avalanche-docs](https://github.com/ava-labs/avalanche-docs)
repository. [example](https://github.com/ava-labs/avalanche-docs/pull/1119/files).
- Changes that modify a package significantly or add new features should
either update the existing or include a new `README.md` file in that package.

## Can I have feature X

Before you submit a feature request, please check and make sure that it isn't
Before you submit a feature request, please check and make sure that it isn't
possible through some other means.

30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Release Checklist
about: Create a ticket to track a release
title: ''
labels: release
assignees: ''

---

## Release

The release version and a description of the planned changes to be included in the release.

## Issues

Link the major issues planned to be included in the release.

## Documentation

Link the relevant documentation PRs for this release.

## Checklist

- [ ] Update version in plugin/evm/version.go
- [ ] Bump AvalancheGo dependency in go.mod for RPCChainVM Compatibility
- [ ] Update AvalancheGo dependency in scripts/versions.sh for e2e tests.
- [ ] Add new entry in compatibility.json for RPCChainVM Compatibility
- [ ] Update AvalancheGo compatibility in README
- [ ] Deploy to WAGMI
- [ ] Confirm goreleaser job has successfully generated binaries by checking the releases page
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -3,3 +3,5 @@
## How this works

## How this was tested

## How is this documented
24 changes: 24 additions & 0 deletions .github/workflows/auto-generated-code-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Auto-Generated Code Checker
on:
push:
tags:
- "*"
branches:
- master
- dev
pull_request:

jobs:
mock_gen:
name: Mocks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- shell: bash
run: scripts/mock.gen.sh
- shell: bash
run: .github/workflows/check-clean-branch.sh
20 changes: 20 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Bench

on:
workflow_dispatch:
pull_request:

jobs:
bench:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- run: go mod download
shell: bash
- run: ./scripts/build_bench_precompiles.sh
shell: bash

9 changes: 9 additions & 0 deletions .github/workflows/check-clean-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Exits if any uncommitted changes are found.

set -o errexit
set -o nounset
set -o pipefail

git update-index --really-refresh >> /dev/null
git diff-index --quiet HEAD
170 changes: 170 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: Build + Test + Lint

on:
push:
branches:
- master
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:

jobs:
lint_test:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: ./scripts/lint_allowed_geth_imports.sh
shell: bash
- uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
working-directory: .
args: --timeout 10m

unit_test:
name: Golang Unit Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- run: go mod download
shell: bash
- run: ./scripts/build.sh ./build/subnetevm
shell: bash
- run: ./scripts/build_test.sh -race
shell: bash
- run: ./scripts/coverage.sh
shell: bash

e2e_precompile:
name: e2e precompile tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.15"
- name: NPM Clean Install
run: npm ci
working-directory: ./contracts
- name: Hardhat Clean
run: npx hardhat clean
working-directory: ./contracts
- name: Hardhat Compile
run: npx hardhat compile
working-directory: ./contracts
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run E2E Precompile Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/precompile-data ./scripts/run_ginkgo_precompile.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-precompile
path: /tmp/network-runner-root-data*/
retention-days: 5
e2e_warp:
name: e2e warp tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.15"
- name: NPM Clean Install
run: npm ci
working-directory: ./contracts
- name: Hardhat Clean
run: npx hardhat clean
working-directory: ./contracts
- name: Hardhat Compile
run: npx hardhat compile
working-directory: ./contracts
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run Warp E2E Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/warp-data ./scripts/run_ginkgo_warp.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-warp
path: /tmp/network-runner-root-data*/
retention-days: 5
e2e_load:
name: e2e load tests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '~1.20.12'
check-latest: true
- name: Install AvalancheGo Release
shell: bash
run: BASEDIR=/tmp/e2e-test AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/install_avalanchego_release.sh
- name: Build Subnet-EVM Plugin Binary
shell: bash
run: ./scripts/build.sh /tmp/e2e-test/avalanchego/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
- name: Run E2E Load Tests
shell: bash
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego DATA_DIR=/tmp/e2e-test/load-data ./scripts/run_ginkgo_load.sh
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: subnet-evm-e2e-logs-load
path: /tmp/network-runner-root-data*/
retention-days: 5

build_image:
name: Build Docker Image
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: echo ${{ secrets.docker_pass }} | docker login --username ${{ secrets.docker_username }} --password-stdin
shell: bash
- run: CURRENT_BRANCH=${{ github.head_ref || github.ref_name }} PUSH_DOCKER_IMAGE=true ./scripts/build_image.sh
shell: bash
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -67,5 +67,5 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

Loading