Skip to content

Commit b64819d

Browse files
committed
Merge coreth
2 parents b5f92be + 7f049b9 commit b64819d

File tree

843 files changed

+258917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

843 files changed

+258917
-0
lines changed

coreth/.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.ci
2+
.github
3+
.gitignore
4+
.golangci.yml
5+
.idea
6+
.vscode
7+
8+
LICENSE
9+
*.md

coreth/.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Each line is a file pattern followed by one or more owners.
2+
3+
# These owners will be the default code owners for everything in the repo.
4+
5+
# Unless a later match takes precedence, these owners will be requested for
6+
7+
# review whenever someone opens a pull request.
8+
9+
* @aaronbuchwald @darioush @ceyonur

coreth/.github/CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
Thank you for considering to help out with the source code! We welcome
4+
contributions from anyone on the internet, and are grateful for even the
5+
smallest of fixes!
6+
7+
If you'd like to contribute to coreth, please fork, fix, commit and send a
8+
pull request for the maintainers to review and merge into the main code base. If
9+
you wish to submit more complex changes though, please check up with the core
10+
devs first on [Discord](https://chat.avalabs.org) to
11+
ensure those changes are in line with the general philosophy of the project
12+
and/or get some early feedback which can make both your efforts much lighter as
13+
well as our review and merge procedures quick and simple.
14+
15+
## Coding guidelines
16+
17+
Please make sure your contributions adhere to our coding guidelines:
18+
19+
* Code must adhere to the official Go
20+
[formatting](https://go.dev/doc/effective_go#formatting) guidelines
21+
(i.e. uses [gofmt](https://pkg.go.dev/cmd/gofmt)).
22+
* Code must be documented adhering to the official Go
23+
[commentary](https://go.dev/doc/effective_go#commentary) guidelines.
24+
* Pull requests need to be based on and opened against the `master` branch.
25+
* Pull reuqests should include a detailed description
26+
* Commits are required to be signed. See [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)
27+
for information on signing commits.
28+
* Commit messages should be prefixed with the package(s) they modify.
29+
* E.g. "eth, rpc: make trace configs optional"
30+
31+
## Can I have feature X
32+
33+
Before you submit a feature request, please check and make sure that it isn't
34+
possible through some other means.
35+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior.
15+
16+
**Expected behavior**
17+
A clear and concise description of what you expected to happen.
18+
19+
**Screenshots**
20+
If applicable, add screenshots to help explain your problem.
21+
22+
**Logs**
23+
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/`.
24+
25+
**Metrics**
26+
If applicable, please include any metrics gathered from your node to assist us in diagnosing the problem.
27+
28+
**Operating System**
29+
Which OS you used to reveal the bug.
30+
31+
**Additional context**
32+
Add any other context about the problem here.
33+
34+
Avalanche Bug Bounty program can be found [here](https://hackenproof.com/avalanche/avalanche-protocol).
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

coreth/.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Why this should be merged
2+
3+
## How this works
4+
5+
## How this was tested

coreth/.github/workflows/ci.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
workflow_dispatch:
8+
inputs:
9+
avalanchegoRepo:
10+
description: 'avalanchego github repository'
11+
required: true
12+
default: 'ava-labs/avalanchego'
13+
avalanchegoBranch:
14+
description: 'avalanchego branch'
15+
required: true
16+
default: 'master'
17+
18+
jobs:
19+
lint:
20+
name: Lint
21+
runs-on: ubuntu-20.04
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
25+
if: ${{ github.event_name == 'workflow_dispatch' }}
26+
uses: actions/checkout@v3
27+
with:
28+
repository: ${{ github.event.inputs.avalanchegoRepo }}
29+
ref: ${{ github.event.inputs.avalanchegoBranch }}
30+
path: avalanchego
31+
token: ${{ secrets.AVALANCHE_PAT }}
32+
- uses: actions/setup-go@v3
33+
with:
34+
go-version: '~1.20.12'
35+
check-latest: true
36+
- name: change avalanchego dep
37+
if: ${{ github.event_name == 'workflow_dispatch' }}
38+
run: |
39+
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego
40+
go mod tidy
41+
go clean -modcache # avoid conflicts with the golangci-lint-action cache
42+
- run: ./scripts/lint_allowed_geth_imports.sh
43+
shell: bash
44+
- name: golangci-lint
45+
uses: golangci/golangci-lint-action@v3
46+
with:
47+
version: v1.54
48+
working-directory: .
49+
args: --timeout 3m
50+
test:
51+
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }})
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
matrix:
55+
os: [macos-11.0, ubuntu-20.04, windows-latest]
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
59+
if: ${{ github.event_name == 'workflow_dispatch' }}
60+
uses: actions/checkout@v3
61+
with:
62+
repository: ${{ github.event.inputs.avalanchegoRepo }}
63+
ref: ${{ github.event.inputs.avalanchegoBranch }}
64+
path: avalanchego
65+
token: ${{ secrets.AVALANCHE_PAT }}
66+
- uses: actions/setup-go@v3
67+
with:
68+
go-version: '~1.20.12'
69+
check-latest: true
70+
- name: change avalanchego dep
71+
if: ${{ github.event_name == 'workflow_dispatch' }}
72+
run: |
73+
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego
74+
go mod tidy
75+
- run: go mod download
76+
shell: bash
77+
- run: ./scripts/build.sh evm
78+
shell: bash
79+
- run: ./scripts/build_test.sh
80+
shell: bash
81+
- run: ./scripts/coverage.sh
82+
shell: bash
83+
test-race:
84+
name: Golang Unit Tests Race Detection v${{ matrix.go }} (${{ matrix.os }})
85+
runs-on: ${{ matrix.os }}
86+
strategy:
87+
matrix:
88+
os: [ubuntu-20.04]
89+
steps:
90+
- uses: actions/checkout@v3
91+
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
92+
if: ${{ github.event_name == 'workflow_dispatch' }}
93+
uses: actions/checkout@v3
94+
with:
95+
repository: ${{ github.event.inputs.avalanchegoRepo }}
96+
ref: ${{ github.event.inputs.avalanchegoBranch }}
97+
path: avalanchego
98+
token: ${{ secrets.AVALANCHE_PAT }}
99+
- uses: actions/setup-go@v3
100+
with:
101+
go-version: '~1.20.12'
102+
check-latest: true
103+
- name: change avalanchego dep
104+
if: ${{ github.event_name == 'workflow_dispatch' }}
105+
run: |
106+
go mod edit -replace github.com/ava-labs/avalanchego=./avalanchego
107+
go mod tidy
108+
- run: go mod download
109+
shell: bash
110+
- run: ./scripts/build.sh evm
111+
shell: bash
112+
- run: ./scripts/build_test.sh -race
113+
shell: bash
114+
avalanchego_e2e:
115+
name: AvalancheGo E2E Tests v${{ matrix.go }} (${{ matrix.os }})
116+
runs-on: ${{ matrix.os }}
117+
strategy:
118+
matrix:
119+
os: [ ubuntu-20.04 ]
120+
steps:
121+
- uses: actions/checkout@v3
122+
- name: check out ${{ github.event.inputs.avalanchegoRepo }} ${{ github.event.inputs.avalanchegoBranch }}
123+
if: ${{ github.event_name == 'workflow_dispatch' }}
124+
uses: actions/checkout@v3
125+
with:
126+
repository: ${{ github.event.inputs.avalanchegoRepo }}
127+
ref: ${{ github.event.inputs.avalanchegoBranch }}
128+
path: avalanchego
129+
token: ${{ secrets.AVALANCHE_PAT }}
130+
- uses: actions/setup-go@v3
131+
with:
132+
go-version: '~1.20.12'
133+
check-latest: true
134+
- name: Run e2e tests
135+
run: E2E_SERIAL=1 ./scripts/tests.e2e.sh
136+
shell: bash
137+
- name: Upload testnet network dir
138+
uses: actions/upload-artifact@v3
139+
if: always()
140+
with:
141+
name: testnet-data
142+
path: ~/.testnetctl/networks/1000
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '44 11 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'go' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1
71+

coreth/.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
./main
2+
3+
*.log
4+
*~
5+
.DS_Store
6+
7+
awscpu
8+
9+
# Binaries for programs and plugins
10+
*.exe
11+
*.exe~
12+
*.dll
13+
*.so
14+
*.dylib
15+
*.profile
16+
17+
# Test binary, build with `go test -c`
18+
*.test
19+
20+
# Output of the go coverage tool, specifically when used with LiteIDE
21+
*.out
22+
23+
# ignore GoLand metafiles directory
24+
.idea/
25+
26+
*logs/
27+
28+
.vscode*
29+
30+
*.pb*
31+
32+
*cpu[0-9]*
33+
*mem[0-9]*
34+
*lock[0-9]*
35+
*.profile
36+
*.swp
37+
*.aux
38+
*.fdb*
39+
*.fls
40+
*.gz
41+
*.pdf
42+
43+
.coverage
44+
45+
bin/
46+
build/
47+
48+
# Used for e2e testing
49+
avalanchego

0 commit comments

Comments
 (0)