-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
843 changed files
with
258,917 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.ci | ||
.github | ||
.gitignore | ||
.golangci.yml | ||
.idea | ||
.vscode | ||
|
||
LICENSE | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Each line is a file pattern followed by one or more owners. | ||
|
||
# These owners will be the default code owners for everything in the repo. | ||
|
||
# Unless a later match takes precedence, these owners will be requested for | ||
|
||
# review whenever someone opens a pull request. | ||
|
||
* @aaronbuchwald @darioush @ceyonur |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 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 | ||
smallest of fixes! | ||
|
||
If you'd like to contribute to coreth, 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 | ||
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://go.dev/doc/effective_go#formatting) guidelines | ||
(i.e. uses [gofmt](https://pkg.go.dev/cmd/gofmt)). | ||
* Code must be documented adhering to the official Go | ||
[commentary](https://go.dev/doc/effective_go#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" | ||
|
||
## Can I have feature X | ||
|
||
Before you submit a feature request, please check and make sure that it isn't | ||
possible through some other means. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior. | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Logs** | ||
If applicable, please include the relevant logs that indicate a problem and/or the log directory of your node. By default, this can be found at `~/.avalanchego/logs/`. | ||
|
||
**Metrics** | ||
If applicable, please include any metrics gathered from your node to assist us in diagnosing the problem. | ||
|
||
**Operating System** | ||
Which OS you used to reveal the bug. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. | ||
|
||
Avalanche Bug Bounty program can be found [here](https://hackenproof.com/avalanche/avalanche-protocol). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Why this should be merged | ||
|
||
## How this works | ||
|
||
## How this was tested |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
avalanchegoRepo: | ||
description: 'avalanchego github repository' | ||
required: true | ||
default: 'ava-labs/avalanchego' | ||
avalanchegoBranch: | ||
description: 'avalanchego branch' | ||
required: true | ||
default: 'master' | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.avalanchegoRepo }} | ||
ref: ${{ github.event.inputs.avalanchegoBranch }} | ||
path: avalanchego | ||
token: ${{ secrets.AVALANCHE_PAT }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.20.12' | ||
check-latest: true | ||
- name: change avalanchego dep | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego | ||
go mod tidy | ||
go clean -modcache # avoid conflicts with the golangci-lint-action cache | ||
- run: ./scripts/lint_allowed_geth_imports.sh | ||
shell: bash | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54 | ||
working-directory: . | ||
args: --timeout 3m | ||
test: | ||
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-11.0, ubuntu-20.04, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.avalanchegoRepo }} | ||
ref: ${{ github.event.inputs.avalanchegoBranch }} | ||
path: avalanchego | ||
token: ${{ secrets.AVALANCHE_PAT }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.20.12' | ||
check-latest: true | ||
- name: change avalanchego dep | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego | ||
go mod tidy | ||
- run: go mod download | ||
shell: bash | ||
- run: ./scripts/build.sh evm | ||
shell: bash | ||
- run: ./scripts/build_test.sh | ||
shell: bash | ||
- run: ./scripts/coverage.sh | ||
shell: bash | ||
test-race: | ||
name: Golang Unit Tests Race Detection v${{ matrix.go }} (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.avalanchegoRepo }} | ||
ref: ${{ github.event.inputs.avalanchegoBranch }} | ||
path: avalanchego | ||
token: ${{ secrets.AVALANCHE_PAT }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.20.12' | ||
check-latest: true | ||
- name: change avalanchego dep | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego | ||
go mod tidy | ||
- run: go mod download | ||
shell: bash | ||
- run: ./scripts/build.sh evm | ||
shell: bash | ||
- run: ./scripts/build_test.sh -race | ||
shell: bash | ||
avalanchego_e2e: | ||
name: AvalancheGo E2E Tests v${{ matrix.go }} (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-20.04 ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }} | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.avalanchegoRepo }} | ||
ref: ${{ github.event.inputs.avalanchegoBranch }} | ||
path: avalanchego | ||
token: ${{ secrets.AVALANCHE_PAT }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.20.12' | ||
check-latest: true | ||
- name: Run e2e tests | ||
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh | ||
shell: bash | ||
- name: Upload testnet network dir | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: testnet-data | ||
path: ~/.testnetctl/networks/1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ master ] | ||
schedule: | ||
- cron: '44 11 * * 4' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# 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 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
./main | ||
|
||
*.log | ||
*~ | ||
.DS_Store | ||
|
||
awscpu | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
*.profile | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# ignore GoLand metafiles directory | ||
.idea/ | ||
|
||
*logs/ | ||
|
||
.vscode* | ||
|
||
*.pb* | ||
|
||
*cpu[0-9]* | ||
*mem[0-9]* | ||
*lock[0-9]* | ||
*.profile | ||
*.swp | ||
*.aux | ||
*.fdb* | ||
*.fls | ||
*.gz | ||
|
||
.coverage | ||
|
||
bin/ | ||
build/ | ||
|
||
# Used for e2e testing | ||
avalanchego |
Oops, something went wrong.