mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16:44 +00:00
Merge branch 'develop' into anvil-ci
This commit is contained in:
commit
86fc556609
18 changed files with 225 additions and 184 deletions
2
.github/ISSUE_TEMPLATE/bug.md
vendored
2
.github/ISSUE_TEMPLATE/bug.md
vendored
|
|
@ -20,7 +20,7 @@ Heimdall client version: [e.g. v0.2.10] <!--Can be found by running the command
|
||||||
|
|
||||||
OS & Version: Windows / Linux / OSX
|
OS & Version: Windows / Linux / OSX
|
||||||
|
|
||||||
Environment: Polygon Mainnet / Polygon Mumbai / Polygon Amoy / Devnet
|
Environment: Polygon Mainnet / Polygon Amoy / Devnet
|
||||||
|
|
||||||
Type of node: Validator / Sentry / Archive
|
Type of node: Validator / Sentry / Archive
|
||||||
|
|
||||||
|
|
|
||||||
20
.github/matic-cli-config.yml
vendored
20
.github/matic-cli-config.yml
vendored
|
|
@ -1,19 +1,29 @@
|
||||||
defaultStake: 10000
|
devnetType: docker
|
||||||
|
|
||||||
defaultFee: 2000
|
defaultFee: 2000
|
||||||
|
defaultStake: 10000
|
||||||
borChainId: 15001
|
borChainId: 15001
|
||||||
heimdallChainId: heimdall-15001
|
heimdallChainId: heimdall-15001
|
||||||
contractsRepo: https://github.com/0xPolygon/pos-contracts.git
|
contractsRepo: https://github.com/0xPolygon/pos-contracts.git
|
||||||
contractsBranch: anvil-pos
|
contractsBranch: anvil-pos
|
||||||
genesisContractsBranch: master
|
genesisContractsBranch: master
|
||||||
sprintSize:
|
|
||||||
- '64'
|
|
||||||
blockNumber:
|
|
||||||
- '0'
|
|
||||||
blockTime:
|
blockTime:
|
||||||
- '2'
|
- '2'
|
||||||
|
blockNumber:
|
||||||
|
- '0'
|
||||||
|
|
||||||
|
sprintSize:
|
||||||
|
- '64'
|
||||||
|
sprintSizeBlockNumber:
|
||||||
|
- '0'
|
||||||
|
|
||||||
numOfBorValidators: 3
|
numOfBorValidators: 3
|
||||||
numOfBorSentries: 0
|
numOfBorSentries: 0
|
||||||
numOfBorArchiveNodes: 0
|
numOfBorArchiveNodes: 0
|
||||||
|
|
||||||
|
devnetBorFlags: config,config,config
|
||||||
|
|
||||||
numOfErigonValidators: 0
|
numOfErigonValidators: 0
|
||||||
numOfErigonSentries: 0
|
numOfErigonSentries: 0
|
||||||
numOfErigonArchiveNodes: 0
|
numOfErigonArchiveNodes: 0
|
||||||
|
|
|
||||||
2
.github/no-response.yml
vendored
2
.github/no-response.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
# Number of days of inactivity before an Issue is closed for lack of response
|
# Number of days of inactivity before an Issue is closed for lack of response
|
||||||
daysUntilClose: 30
|
daysUntilClose: 30
|
||||||
# Label requiring a response
|
# Label requiring a response
|
||||||
responseRequiredLabel: "need:more-information"
|
responseRequiredLabel: 'need:more-information'
|
||||||
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
||||||
closeComment: >
|
closeComment: >
|
||||||
This issue has been automatically closed because there has been no response
|
This issue has been automatically closed because there has been no response
|
||||||
|
|
|
||||||
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
|
|
@ -39,7 +39,7 @@ In case this PR includes changes that must be applied only to a subset of nodes,
|
||||||
- [ ] I have added tests to CI
|
- [ ] I have added tests to CI
|
||||||
- [ ] I have tested this code manually on local environment
|
- [ ] I have tested this code manually on local environment
|
||||||
- [ ] I have tested this code manually on remote devnet using express-cli
|
- [ ] I have tested this code manually on remote devnet using express-cli
|
||||||
- [ ] I have tested this code manually on mumbai/amoy
|
- [ ] I have tested this code manually on amoy
|
||||||
- [ ] I have created new e2e tests into express-cli
|
- [ ] I have created new e2e tests into express-cli
|
||||||
|
|
||||||
### Manual tests
|
### Manual tests
|
||||||
|
|
|
||||||
2
.github/stale.yml
vendored
2
.github/stale.yml
vendored
|
|
@ -7,7 +7,7 @@ exemptLabels:
|
||||||
- pinned
|
- pinned
|
||||||
- security
|
- security
|
||||||
# Label to use when marking an issue as stale
|
# Label to use when marking an issue as stale
|
||||||
staleLabel: "status:inactive"
|
staleLabel: 'status:inactive'
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
markComment: >
|
markComment: >
|
||||||
This issue has been automatically marked as stale because it has not had
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
|
|
||||||
12
.github/workflows/amoy_deb_profiles.yml
vendored
12
.github/workflows/amoy_deb_profiles.yml
vendored
|
|
@ -29,7 +29,6 @@ jobs:
|
||||||
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
|
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
|
||||||
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
|
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: Making directory structure for yaml
|
- name: Making directory structure for yaml
|
||||||
run: mkdir -p packaging/deb/bor/var/lib/bor
|
run: mkdir -p packaging/deb/bor/var/lib/bor
|
||||||
- name: making directory structure for the systemd
|
- name: making directory structure for the systemd
|
||||||
|
|
@ -391,14 +390,3 @@ jobs:
|
||||||
packaging/deb/bor-pbss-amoy-**.deb
|
packaging/deb/bor-pbss-amoy-**.deb
|
||||||
packaging/deb/bor-amoy-**.deb.checksum
|
packaging/deb/bor-amoy-**.deb.checksum
|
||||||
packaging/deb/bor-pbss-amoy-**.deb.checksum
|
packaging/deb/bor-pbss-amoy-**.deb.checksum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
278
.github/workflows/ci.yml
vendored
278
.github/workflows/ci.yml
vendored
|
|
@ -2,12 +2,12 @@ name: CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- 'master'
|
||||||
- "qa"
|
- 'qa'
|
||||||
- "develop"
|
- 'develop'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- '**'
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
@ -16,173 +16,176 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build
|
||||||
|
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
git submodule update --init --recursive --force
|
git submodule update --init --recursive --force
|
||||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
|
|
||||||
- name: Install dependencies on Linux
|
- name: Install dependencies on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt update && sudo apt install build-essential
|
run: sudo apt update && sudo apt install build-essential
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
~/go/pkg/mod
|
~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-go-
|
restore-keys: ${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make all
|
run: make all
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
git submodule update --init --recursive --force
|
git submodule update --init --recursive --force
|
||||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
|
|
||||||
- name: Install dependencies on Linux
|
- name: Install dependencies on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt update && sudo apt install build-essential
|
run: sudo apt update && sudo apt install build-essential
|
||||||
|
|
||||||
- name: Golang-ci install
|
- name: Golang-ci install
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: make lintci-deps
|
run: make lintci-deps
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: make lint
|
run: make lint
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
git submodule update --init --recursive --force
|
git submodule update --init --recursive --force
|
||||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
|
|
||||||
- name: Install dependencies on Linux
|
- name: Install dependencies on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt update && sudo apt install build-essential
|
run: sudo apt update && sudo apt install build-essential
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
~/go/pkg/mod
|
~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-go-
|
restore-keys: ${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4.4.0
|
- uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: unitTest-coverage
|
name: unitTest-coverage
|
||||||
path: cover.out
|
path: cover.out
|
||||||
|
|
||||||
#- name: Data race tests
|
# - name: Data race tests
|
||||||
# run: make test-race
|
# run: make test-race
|
||||||
|
|
||||||
# # TODO: make it work
|
# # TODO: make it work
|
||||||
# - name: Reproducible build test
|
# - name: Reproducible build test
|
||||||
# run: |
|
# run: |
|
||||||
# make geth
|
# make geth
|
||||||
# shasum -a256 ./build/bin/geth > bor1.sha256
|
# shasum -a256 ./build/bin/geth > bor1.sha256
|
||||||
# make geth
|
# make geth
|
||||||
# shasum -a256 ./build/bin/geth > bor2.sha256
|
# shasum -a256 ./build/bin/geth > bor2.sha256
|
||||||
# if ! cmp -s bor1.sha256 bor2.sha256; then
|
# if ! cmp -s bor1.sha256 bor2.sha256; then
|
||||||
# echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1
|
# echo >&2 "Reproducible build broken"; cat bor1.sha256; cat bor2.sha256; exit 1
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
integration-tests:
|
integration-tests:
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: |
|
- run: |
|
||||||
git submodule update --init --recursive --force
|
git submodule update --init --recursive --force
|
||||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.x
|
go-version: 1.23.x
|
||||||
|
|
||||||
- name: Install dependencies on Linux
|
- name: Install dependencies on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt update && sudo apt install build-essential
|
run: sudo apt update && sudo apt install build-essential
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cache/go-build
|
~/.cache/go-build
|
||||||
~/Library/Caches/go-build
|
~/Library/Caches/go-build
|
||||||
~/go/pkg/mod
|
~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-go-
|
restore-keys: ${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: test-integration
|
- name: test-integration
|
||||||
run: make test-integration
|
run: make test-integration
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4.4.0
|
- uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: integrationTest-coverage
|
name: integrationTest-coverage
|
||||||
path: cover.out
|
path: cover.out
|
||||||
|
|
||||||
codecov:
|
codecov:
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: [unit-tests, integration-tests]
|
needs: [unit-tests, integration-tests]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4.1.8
|
uses: actions/download-artifact@v4.1.8
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] # list of os: https://github.com/actions/virtual-environments
|
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -274,14 +277,45 @@ jobs:
|
||||||
cd matic-cli/devnet
|
cd matic-cli/devnet
|
||||||
docker compose down --remove-orphans
|
docker compose down --remove-orphans
|
||||||
cd -
|
cd -
|
||||||
mkdir -p ${{ github.run_id }}/matic-cli
|
timeout 2m bash bor/integration-tests/bor_health.sh
|
||||||
sudo mv bor ${{ github.run_id }}
|
|
||||||
sudo mv matic-cli/devnet ${{ github.run_id }}/matic-cli
|
|
||||||
sudo tar czf code.tar.gz ${{ github.run_id }}
|
|
||||||
|
|
||||||
- name: Upload code and chain data
|
- name: Run smoke tests
|
||||||
if: always()
|
run: |
|
||||||
uses: actions/upload-artifact@v4.4.0
|
echo "Funding ganache accounts..."
|
||||||
with:
|
timeout 10m bash bor/integration-tests/fund_ganache_accounts.sh
|
||||||
name: code_${{ github.run_id }}
|
echo "Deposit 100 matic for each account to bor network"
|
||||||
path: code.tar.gz
|
cd matic-cli/devnet/code/contracts
|
||||||
|
npm run truffle exec scripts/deposit.js -- --network development $(jq -r .root.tokens.MaticToken contractAddresses.json) 100000000000000000000
|
||||||
|
cd -
|
||||||
|
timeout 60m bash bor/integration-tests/smoke_test.sh
|
||||||
|
|
||||||
|
- name: Run RPC Tests
|
||||||
|
run: |
|
||||||
|
echo "Starting RPC Tests..."
|
||||||
|
timeout 5m bash bor/integration-tests/rpc_test.sh
|
||||||
|
|
||||||
|
- name: Upload logs
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4.4.0
|
||||||
|
with:
|
||||||
|
name: logs_${{ github.run_id }}
|
||||||
|
path: |
|
||||||
|
matic-cli/devnet/logs
|
||||||
|
|
||||||
|
- name: Package code and chain data
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
cd matic-cli/devnet
|
||||||
|
docker compose down --remove-orphans
|
||||||
|
cd -
|
||||||
|
mkdir -p ${{ github.run_id }}/matic-cli
|
||||||
|
sudo mv bor ${{ github.run_id }}
|
||||||
|
sudo mv matic-cli/devnet ${{ github.run_id }}/matic-cli
|
||||||
|
sudo tar czf code.tar.gz ${{ github.run_id }}
|
||||||
|
|
||||||
|
- name: Upload code and chain data
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4.4.0
|
||||||
|
with:
|
||||||
|
name: code_${{ github.run_id }}
|
||||||
|
path: code.tar.gz
|
||||||
|
|
|
||||||
10
.github/workflows/codeql.yml
vendored
10
.github/workflows/codeql.yml
vendored
|
|
@ -1,10 +1,10 @@
|
||||||
name: "CodeQL"
|
name: 'CodeQL'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master", "develop" ]
|
branches: ['master', 'develop']
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master", "develop" ]
|
branches: ['master', 'develop']
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'go' ]
|
language: ['go']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
|
|
@ -43,4 +43,4 @@ jobs:
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
with:
|
with:
|
||||||
category: "/language:${{matrix.language}}"
|
category: '/language:${{matrix.language}}'
|
||||||
|
|
|
||||||
6
.github/workflows/govulncheck.yml
vendored
6
.github/workflows/govulncheck.yml
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
name: Govuln
|
name: Govuln
|
||||||
on: [ push, pull_request ]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
govulncheck:
|
govulncheck:
|
||||||
|
|
@ -8,7 +8,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23.6"
|
go-version: '1.23.6'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: technote-space/get-diff-action@v6
|
- uses: technote-space/get-diff-action@v6
|
||||||
|
|
@ -20,4 +20,4 @@ jobs:
|
||||||
Makefile
|
Makefile
|
||||||
- name: govulncheck
|
- name: govulncheck
|
||||||
run: make vulncheck
|
run: make vulncheck
|
||||||
if: "env.GIT_DIFF != ''"
|
if: env.GIT_DIFF != ''
|
||||||
|
|
|
||||||
3
.github/workflows/mainnet_deb_profiles.yml
vendored
3
.github/workflows/mainnet_deb_profiles.yml
vendored
|
|
@ -29,7 +29,6 @@ jobs:
|
||||||
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
|
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
|
||||||
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
|
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: Making directory structure for yaml
|
- name: Making directory structure for yaml
|
||||||
run: mkdir -p packaging/deb/bor/var/lib/bor
|
run: mkdir -p packaging/deb/bor/var/lib/bor
|
||||||
- name: making directory structure for the systemd
|
- name: making directory structure for the systemd
|
||||||
|
|
@ -387,8 +386,6 @@ jobs:
|
||||||
NODE: archive
|
NODE: archive
|
||||||
NETWORK: mainnet
|
NETWORK: mainnet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
############ Check and Upload ##########################
|
############ Check and Upload ##########################
|
||||||
- name: Confirming package built
|
- name: Confirming package built
|
||||||
run: ls -ltr packaging/deb/ | grep bor
|
run: ls -ltr packaging/deb/ | grep bor
|
||||||
|
|
|
||||||
3
.github/workflows/packager_deb.yml
vendored
3
.github/workflows/packager_deb.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
uses: actions/setup-go@master
|
uses: actions/setup-go@master
|
||||||
with:
|
with:
|
||||||
go-version: 1.23.6
|
go-version: 1.23.6
|
||||||
# Variables
|
# Variables
|
||||||
- name: Adding TAG to ENV
|
- name: Adding TAG to ENV
|
||||||
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
|
||||||
- name: adding version
|
- name: adding version
|
||||||
|
|
@ -97,7 +97,6 @@ jobs:
|
||||||
echo "Maintainer: devops@polygon.technology" >> packaging/deb/bor/DEBIAN/control
|
echo "Maintainer: devops@polygon.technology" >> packaging/deb/bor/DEBIAN/control
|
||||||
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control
|
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control
|
||||||
|
|
||||||
|
|
||||||
- name: Creating package for binary for bor ${{ env.ARCH }}
|
- name: Creating package for binary for bor ${{ env.ARCH }}
|
||||||
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
|
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -26,8 +26,8 @@ jobs:
|
||||||
- name: Prepare
|
- name: Prepare
|
||||||
id: prepare
|
id: prepare
|
||||||
run: |
|
run: |
|
||||||
TAG=${GITHUB_REF#refs/tags/}
|
TAG=${GITHUB_REF#refs/tags/}
|
||||||
echo ::set-output name=tag_name::${TAG}
|
echo ::set-output name=tag_name::${TAG}
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
run: |
|
run: |
|
||||||
make release
|
make release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
VERSION: ${{ steps.prepare.outputs.tag_name }}
|
VERSION: ${{ steps.prepare.outputs.tag_name }}
|
||||||
|
|
|
||||||
27
.github/workflows/stale.yml
vendored
27
.github/workflows/stale.yml
vendored
|
|
@ -7,26 +7,25 @@ name: Mark stale issues and pull requests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v9
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
|
stale-issue-message: 'This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
|
||||||
stale-pr-message: 'This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
|
stale-pr-message: 'This PR is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
|
||||||
close-issue-message: 'This issue was closed because it has been stalled for 28 days with no activity.'
|
close-issue-message: 'This issue was closed because it has been stalled for 28 days with no activity.'
|
||||||
close-pr-message: 'This PR was closed because it has been stalled for 35 days with no activity.'
|
close-pr-message: 'This PR was closed because it has been stalled for 35 days with no activity.'
|
||||||
days-before-issue-stale: 14
|
days-before-issue-stale: 14
|
||||||
days-before-pr-stale: 21
|
days-before-pr-stale: 21
|
||||||
days-before-issue-close: 14
|
days-before-issue-close: 14
|
||||||
days-before-pr-close: 14
|
days-before-pr-close: 14
|
||||||
exempt-draft-pr: true
|
exempt-draft-pr: true
|
||||||
|
|
|
||||||
1
Makefile
1
Makefile
|
|
@ -90,7 +90,6 @@ lintci-deps:
|
||||||
vulncheck:
|
vulncheck:
|
||||||
@go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
@go run golang.org/x/vuln/cmd/govulncheck@latest ./...
|
||||||
|
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
goimports -local "$(PACKAGE)" -w .
|
goimports -local "$(PACKAGE)" -w .
|
||||||
|
|
||||||
|
|
|
||||||
12
README.md
12
README.md
|
|
@ -1,9 +1,7 @@
|
||||||
# Bor Overview
|
# Bor Overview
|
||||||
Bor is the Official Golang implementation of the Polygon PoS blockchain. It is a fork of [geth](https://github.com/ethereum/go-ethereum) and is EVM compatible (upto London fork).
|
Bor is the official Golang implementation of the Polygon PoS blockchain. It is a fork of [geth](https://github.com/ethereum/go-ethereum) and is EVM compatible (upto London fork).
|
||||||
|
|
||||||
[](https://pkg.go.dev/github.com/maticnetwork/bor)
|
||||||
https://pkg.go.dev/badge/github.com/maticnetwork/bor
|
|
||||||
)](https://pkg.go.dev/github.com/maticnetwork/bor)
|
|
||||||
[](https://goreportcard.com/report/github.com/maticnetwork/bor)
|
[](https://goreportcard.com/report/github.com/maticnetwork/bor)
|
||||||

|

|
||||||
[](https://discord.com/invite/0xpolygonrnd)
|
[](https://discord.com/invite/0xpolygonrnd)
|
||||||
|
|
@ -13,15 +11,15 @@ https://pkg.go.dev/badge/github.com/maticnetwork/bor
|
||||||
|
|
||||||
The easiest way to get started with bor is to install the packages using the command below. Please take a look at the [releases](https://github.com/maticnetwork/bor/releases) section to find the latest stable version of bor.
|
The easiest way to get started with bor is to install the packages using the command below. Please take a look at the [releases](https://github.com/maticnetwork/bor/releases) section to find the latest stable version of bor.
|
||||||
|
|
||||||
curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v0.4.0 <network> <node_type>
|
curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v2.0.0 <network> <node_type>
|
||||||
|
|
||||||
The network accepts `mainnet`,`amoy` or `mumbai` and the node type accepts `validator` or `sentry` or `archive`. The installation script does the following things:
|
The network accepts `mainnet`, or `amoy` and the node type accepts `validator` or `sentry` or `archive`. The installation script does the following things:
|
||||||
- Create a new user named `bor`.
|
- Create a new user named `bor`.
|
||||||
- Install the bor binary at `/usr/bin/bor`.
|
- Install the bor binary at `/usr/bin/bor`.
|
||||||
- Dump the suitable config file (based on the network and node type provided) at `/var/lib/bor` and use it as the home dir.
|
- Dump the suitable config file (based on the network and node type provided) at `/var/lib/bor` and use it as the home dir.
|
||||||
- Create a systemd service named `bor` at `/lib/systemd/system/bor.service` which starts bor using the config file as `bor` user.
|
- Create a systemd service named `bor` at `/lib/systemd/system/bor.service` which starts bor using the config file as `bor` user.
|
||||||
|
|
||||||
The releases supports both the networks i.e. Polygon Mainnet, Amoy and Mumbai (Testnet) unless explicitly specified. Before the stable release for mainnet, pre-releases will be available marked with `beta` tag for deploying on Mumbai/Amoy (testnet). On sufficient testing, stable release for mainnet will be announced with a forum post.
|
The releases supports both the networks i.e. Polygon Mainnet, and Amoy (Testnet) unless explicitly specified. Before the stable release for mainnet, pre-releases will be available marked with `beta` tag for deploying on Amoy (testnet). On sufficient testing, stable release for mainnet will be announced with a forum post.
|
||||||
|
|
||||||
### Building from source
|
### Building from source
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/internal/cli"
|
"github.com/ethereum/go-ethereum/internal/cli"
|
||||||
|
"github.com/ethereum/go-ethereum/params"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
params.UpdateBorInfo()
|
||||||
os.Exit(cli.Run(os.Args[1:]))
|
os.Exit(cli.Run(os.Args[1:]))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ The ```bor server``` command runs the Bor client.
|
||||||
|
|
||||||
- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false)
|
- ```bor.withoutheimdall```: Run without Heimdall service (for testing purpose) (default: false)
|
||||||
|
|
||||||
- ```chain```: Name of the chain to sync ('amoy', 'mumbai', 'mainnet') or path to a genesis file (default: mainnet)
|
- ```chain```: Name of the chain to sync ('amoy', 'mainnet') or path to a genesis file (default: mainnet)
|
||||||
|
|
||||||
- ```config```: Path to the TOML configuration file
|
- ```config```: Path to the TOML configuration file
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ package params
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/ethereum/go-ethereum/metrics"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
@ -27,7 +29,20 @@ const (
|
||||||
VersionMeta = "" // Version metadata to append to the version string
|
VersionMeta = "" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
var GitCommit string
|
var (
|
||||||
|
// borInfoGauge stores Bor git commit and version details.
|
||||||
|
borInfoGauge = metrics.NewRegisteredGaugeInfo("bor/info", nil)
|
||||||
|
|
||||||
|
GitCommit string
|
||||||
|
)
|
||||||
|
|
||||||
|
// UpdateBorInfo updates the bor_info metric with the current git commit and version details.
|
||||||
|
func UpdateBorInfo() {
|
||||||
|
borInfoGauge.Update(metrics.GaugeInfoValue{
|
||||||
|
"commit": GitCommit,
|
||||||
|
"version": VersionWithMeta,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Version holds the textual version string.
|
// Version holds the textual version string.
|
||||||
var Version = func() string {
|
var Version = func() string {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue