Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge v0.3.9-alpha to qa #824

Merged
merged 70 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0270258
commit logs
JekaMas Oct 12, 2022
be0a2ad
CI: test launch devnet without hardcoded sleep time (pos-534)
Raneet10 Nov 25, 2022
ca5fbad
CI: test: use bor in matic-cli
Raneet10 Nov 25, 2022
c686660
CI: try using checked out bor path
Raneet10 Nov 25, 2022
5df25bd
CI: fix missing ;
Raneet10 Nov 25, 2022
e378b5f
CI: fix assignment operator
Raneet10 Nov 25, 2022
7cb5978
CI: echo peers and block no.
Raneet10 Nov 25, 2022
9155cfc
CI: cleanup
Raneet10 Nov 25, 2022
806ed05
minor chg: add new line
Raneet10 Nov 25, 2022
ba58225
Merge pull request #599 from maticnetwork/raneet10/pos-534
temaniarpit27 Nov 30, 2022
50a7782
dev: add: pos-944: snyk and govuln integration (#578)
marcello33 Dec 6, 2022
abed2a5
Merge branch 'develop' of github.com:maticnetwork/bor into block-comm…
temaniarpit27 Dec 11, 2022
a75eb71
fix linters
temaniarpit27 Dec 11, 2022
f261c93
upgrade grpc version
temaniarpit27 Dec 12, 2022
469bd29
add ignore rule for net/http2
temaniarpit27 Dec 12, 2022
b1d86bd
Shivam/txpool tracing (#604)
0xsharma Dec 12, 2022
19fe8b4
Merge pull request #546 from maticnetwork/block-commit-stats
temaniarpit27 Dec 12, 2022
243d231
Reduce txArriveTimeout to 100ms
builder90210 Dec 8, 2022
9cba79e
init : remove exit on keystore err
0xsharma Dec 19, 2022
43cafc0
add : multiple keystore tolerance
0xsharma Dec 19, 2022
828801f
lint : fix linters
0xsharma Dec 19, 2022
513127c
chg : use standard logging
0xsharma Dec 20, 2022
7b52c93
chg : logging strings
0xsharma Dec 20, 2022
d8fcda3
Merge pull request #640 from maticnetwork/shivam/POS-1041
0xsharma Dec 20, 2022
4aa56c5
Merge pull request #627 from builder90210/faster_tx_fetch
temaniarpit27 Dec 22, 2022
ad69ccd
Added flags to run heimdall as a child process (#597)
0xKrishna Dec 23, 2022
5ae1b16
dev: chg: update PR template to include nodes audience check (#641)
marcello33 Jan 9, 2023
a323b5b
sonarqube integration (#658)
marcello33 Jan 11, 2023
9aeaf03
Merge branch 'qa' and 'master' into develop (#663)
0xsharma Jan 13, 2023
213d0cd
CI: use matic-cli master branch
Raneet10 Jan 16, 2023
af5d882
trigger ci
Raneet10 Jan 16, 2023
e06376c
Merge pull request #674 from maticnetwork/raneet10/pos-1029
Raneet10 Jan 16, 2023
a671c9e
internal/cli/server : fix : added triesInMemory in config (#677)
0xsharma Jan 18, 2023
d6899d7
update requirements in README (#681)
d10r Jan 19, 2023
2ad6dcf
consensus/bor : add : devFakeAuthor flag
0xsharma Jan 20, 2023
cb97328
core,eth,internal/cli,internal/ethapi: add --rpc.allow-unprotected-tx…
Raneet10 Jan 27, 2023
a1871ad
internal/cli: add `skiptrace` flag for profiling (#715)
manav2401 Feb 2, 2023
9880d75
Added flag in Status to wait for backend, and fixed panic issue. (#708)
pratikspatil024 Feb 7, 2023
c6d7f59
Revert "Reduce txArriveTimeout to 100ms" (#707)
ephess Feb 7, 2023
a4f1ac1
consensus/bor : add : devFakeAuthor flag (#697)
0xsharma Feb 9, 2023
c46aae2
add check for empty lists in txpool (#704)
JekaMas Feb 9, 2023
ad936ed
dev: chg: POS-215 move sonarqube to own ci (#733)
marcello33 Feb 9, 2023
c4f3332
Added verbosity flag, supports log-level as well, but will remove tha…
pratikspatil024 Feb 10, 2023
0ed78b9
Check if block is nil to prevent panic (#736)
dkeysil Feb 10, 2023
53fd1fe
miner: use env for tracing instead of block object (#728)
manav2401 Feb 13, 2023
87deea0
Add : mutex pprof profile (#731)
0xsharma Feb 14, 2023
6f153f0
chg : commit tx logs from info to debug (#673)
0xsharma Feb 14, 2023
ec14a06
Add : commit details to bor version (#730)
0xsharma Feb 14, 2023
2c35dcc
core,docs/cli,internal/cli/server: make docs
Raneet10 Feb 15, 2023
4917fde
builder,docs/cli,packaging: update toml files
Raneet10 Feb 16, 2023
808259b
mardizzone/hotfix-snyk: remove vcs build when running snyk (#745)
marcello33 Feb 17, 2023
9e9efe4
Feat : SetMaxPeers (#726)
0xsharma Feb 24, 2023
4c68a7c
Update wiki link (#762)
0xKrishna Mar 2, 2023
39b37b6
Heimdall App implementation (#646)
0xKrishna Mar 6, 2023
c917e6f
Merge pull request #705 from maticnetwork/raneet10/pos-1126
Raneet10 Mar 16, 2023
238b449
added support for miner.recommit flag (#743)
pratikspatil024 Mar 17, 2023
71eadd0
interrupting commit experiment (#556)
JekaMas Mar 20, 2023
584856b
internal/cli: added missing flags (#744)
pratikspatil024 Mar 20, 2023
08a871c
internal/ethapi: set rpc gas cap as default gas limit when creating a…
Raneet10 Mar 27, 2023
b0ff49d
Merge pull request #791 from maticnetwork/raneet10/pos-1345
Raneet10 Mar 27, 2023
6f05151
add : testcase for CommitInterruptExperiment (#792)
0xsharma Mar 28, 2023
aaf5fe3
dev: chg: continue on error when uploading snyk results to GH (#795)
marcello33 Mar 28, 2023
bec3c39
consensus/bor: revert handle unauthorized signer in consensus.Prepare
Raneet10 Mar 29, 2023
7bd393f
Revert "consensus/bor: handle unauthorized signer in consensus.Prepar…
Raneet10 Mar 30, 2023
ef8f0ab
Merge pull request #797 from maticnetwork/raneet10/revert-consensus-e…
Raneet10 Mar 30, 2023
b39e64c
eth/downloader/whitelist: skip future chain validation (#796)
manav2401 Mar 31, 2023
4522e5c
Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 ru…
djpolygon Apr 5, 2023
7abbf23
Merge pull request #811 from maticnetwork/djpolygon/18.04Updates
djpolygon Apr 5, 2023
ded7767
Merge qa to develop (#814)
manav2401 Apr 10, 2023
7d276c4
Merge branch 'qa' into v0.3.9-alpha
marcello33 Apr 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: 'type:bug'
assignees: ''
---

Our support team has aggregated some common issues and their solutions from past which are faced while running or interacting with a bor client. In order to prevent redundant efforts, we would encourage you to have a look at the [FAQ's section](https://docs.polygon.technology/docs/faq/technical-faqs) of our documentation mentioning the same, before filing an issue here. In case of additional support, you can also join our [discord](https://discord.com/invite/zdwkdvMNY2) server
Our support team has aggregated some common issues and their solutions from past which are faced while running or interacting with a bor client. In order to prevent redundant efforts, we would encourage you to have a look at the [FAQ's section](https://wiki.polygon.technology/docs/faq/technical-faqs/) of our documentation mentioning the same, before filing an issue here. In case of additional support, you can also join our [discord](https://discord.com/invite/zdwkdvMNY2) server

<!--
NOTE: Please make sure to check of any addresses / private keys / rpc url's / IP's before sharing the logs or anything from the additional information section (start.sh or heimdall config).
Expand Down
17 changes: 12 additions & 5 deletions .github/matic-cli-config.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
defaultStake: 10000
defaultFee: 2000
borChainId: "15001"
borChainId: 15001
heimdallChainId: heimdall-15001
contractsBranch: jc/v0.3.1-backport
sprintSize: 64
blockNumber: '0'
blockTime: '2'
contractsBranch: 2ed59de3641c407c64def1b40bcd090cb9cc048a
genesisContractsBranch: master
sprintSize:
- '64'
blockNumber:
- '0'
blockTime:
- '2'
numOfValidators: 3
numOfNonValidators: 0
ethURL: http://ganache:9545
ethHostUser: ubuntu
devnetType: docker
borDockerBuildContext: "../../bor"
heimdallDockerBuildContext: "https://github.com/maticnetwork/heimdall.git#develop"
sprintSizeBlockNumber:
- '0'
numOfArchiveNodes: 0
7 changes: 6 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ Please provide a detailed description of what was done in this PR
- [ ] Hotfix (change that solves an urgent issue, and requires immediate attention)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (change that is not backwards-compatible and/or changes current functionality)
- [ ] Changes only for a subset of nodes

# Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

# Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

# Checklist

- [ ] I have added at least 2 reviewer or the whole pos-v1 team
Expand Down Expand Up @@ -41,4 +46,4 @@ Please complete this section with the steps you performed if you ran manual test

# Additional comments

Please post additional comments in this section if you have them, otherwise delete it
Please post additional comments in this section if you have them, otherwise delete it
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: maticnetwork/matic-cli
ref: arpit/pos-655-2
ref: master
path: matic-cli

- name: Install dependencies on Linux
Expand All @@ -119,7 +119,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '10.17.0'
node-version: '16.17.1'
cache: 'npm'
cache-dependency-path: |
matic-cli/package-lock.json
Expand All @@ -142,11 +142,11 @@ jobs:
bash docker-heimdall-start-all.sh
bash docker-bor-setup.sh
bash docker-bor-start-all.sh
sleep 120 && bash ganache-deployment-bor.sh
sleep 120 && bash ganache-deployment-sync.sh
sleep 120
docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'admin.peers'"
docker exec bor0 bash -c "bor attach /root/.bor/data/bor.ipc -exec 'eth.blockNumber'"
cd -
timeout 2m bash bor/integration-tests/bor_health.sh
cd -
bash ganache-deployment-bor.sh
bash ganache-deployment-sync.sh

- name: Run smoke tests
run: |
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/security-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Security CI
on: [ push, pull_request ]

jobs:
snyk:
name: Snyk and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/golang@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
GOFLAGS: "-buildvcs=false"
with:
args: --org=${{ secrets.SNYK_ORG }} --severity-threshold=medium --sarif-file-output=snyk.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
continue-on-error: true
with:
sarif_file: snyk.sarif

snyk-code:
name: Snyk Code and Publish
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout Source
uses: actions/checkout@master
- name: Run Snyk SAST to check for code vulnerabilities
uses: snyk/actions/golang@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --org=${{ secrets.SNYK_ORG }} --sarif-file-output=snyk.sarif
command: code test
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
continue-on-error: true
with:
sarif_file: snyk.sarif

govuln:
name: Run govuln check and Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Running govulncheck
uses: Templum/govulncheck-action@v0.0.8
continue-on-error: true
env:
DEBUG: "true"
with:
go-version: 1.19
vulncheck-version: latest
package: ./...
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-vuln: true

- name: Upload govulncheck report
uses: actions/upload-artifact@v3
with:
name: raw-report
path: raw-report.json
32 changes: 32 additions & 0 deletions .github/workflows/security-sonarqube-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: SonarQube CI
on:
push:
branches:
- develop

jobs:
sonarqube:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting.
fetch-depth: 0

# Triggering SonarQube analysis as results of it are required by Quality Gate check.
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

# Check the Quality Gate status.
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time.
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@ profile.cov

dist

.dccache

*.csv
10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ linters:
- gocognit
- gofmt
# - gomnd
- gomoddirectives
# - gomoddirectives
- gosec
- makezero
- nestif
Expand Down Expand Up @@ -65,10 +65,10 @@ linters-settings:

goimports:
local-prefixes: github.com/ethereum/go-ethereum

nestif:
min-complexity: 5

prealloc:
for-loops: true

Expand All @@ -79,7 +79,7 @@ linters-settings:
# By default list of stable checks is used.
enabled-checks:
- badLock
- filepathJoin
- filepathJoin
- sortSlice
- sprintfQuotedString
- syncMapLoadAndDelete
Expand Down Expand Up @@ -185,4 +185,4 @@ issues:
max-issues-per-linter: 0
max-same-issues: 0
#new: true
new-from-rev: origin/master
new-from-rev: origin/master
41 changes: 41 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
'snyk:lic:golang:github.com:karalabe:usb:LGPL-3.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:06:37.028Z
'snyk:lic:golang:github.com:mitchellh:cli:MPL-2.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:07:42.661Z
'snyk:lic:golang:github.com:hashicorp:hcl:v2:MPL-2.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:08.112Z
'snyk:lic:golang:github.com:hashicorp:go-multierror:MPL-2.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:14.673Z
'snyk:lic:golang:github.com:hashicorp:go-bexpr:MPL-2.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:21.843Z
'snyk:lic:golang:github.com:hashicorp:errwrap:MPL-2.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:28.257Z
'snyk:lic:golang:github.com:ethereum:go-ethereum:LGPL-3.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:35.273Z
'snyk:lic:golang:github.com:maticnetwork:polyproto:GPL-3.0':
- '*':
reason: 'As open source org, we have no issues with licenses'
created: 2022-11-11T08:09:41.635Z
'SNYK-GOLANG-GOLANGORGXNETHTTP2-3160322':
- '*':
reason: 'grpc working on a release to fix the issue'
created: 2022-12-12T06:50:00.000Z
patch: {}
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ GORUN = env GO111MODULE=on go run
GOPATH = $(shell go env GOPATH)

GIT_COMMIT ?= $(shell git rev-list -1 HEAD)
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
GIT_TAG ?= $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`)

PACKAGE = github.com/ethereum/go-ethereum
GO_FLAGS += -buildvcs=false
GO_FLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} -X ${PACKAGE}/params.GitBranch=${GIT_BRANCH} -X ${PACKAGE}/params.GitTag=${GIT_TAG}"
GO_LDFLAGS += -ldflags "-X ${PACKAGE}/params.GitCommit=${GIT_COMMIT} "

TESTALL = $$(go list ./... | grep -v go-ethereum/cmd/)
TESTE2E = ./tests/...
GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) -p 1
GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) $(GO_LDFLAGS) -p 1

bor:
mkdir -p $(GOPATH)/bin/
go build -o $(GOBIN)/bor ./cmd/cli/main.go
go build -o $(GOBIN)/bor $(GO_LDFLAGS) ./cmd/cli/main.go
cp $(GOBIN)/bor $(GOPATH)/bin/
@echo "Done building."

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ We believe one of the things that makes Polygon special is its coherent design a

### Building the source

- Building `bor` requires both a Go (version 1.14 or later) and a C compiler. You can install
- Building `bor` requires both a Go (version 1.19 or later) and a C compiler. You can install
them using your favourite package manager. Once the dependencies are installed, run

```shell
Expand All @@ -74,7 +74,7 @@ them using your favourite package manager. Once the dependencies are installed,
2. Commit and prepare for pull request (PR). In your PR commit message, reference the issue it resolves (see [how to link a commit message to an issue using a keyword](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).


Checkout our [Git-Rules](https://docs.polygon.technology/docs/contribute/orientation#git-rules)
Checkout our [Git-Rules](https://wiki.polygon.technology/docs/contribute/orientation/#git-rules)

```
$ git commit -m "brief description of changes [Fixes #1234]"
Expand Down
Loading