Merge pull request #879 from maticnetwork/qa-copy-psp

Merge qa to develop
This commit is contained in:
Pratik Patil 2023-05-31 12:04:02 +05:30 committed by GitHub
commit 97689e8931
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 28 additions and 43 deletions

View file

@ -47,7 +47,7 @@ jobs:
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:
ARCH: amd64 ARCH: amd64
- name: Running package build - name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
@ -366,7 +366,7 @@ jobs:
ARCH: amd64 ARCH: amd64
NODE: archive NODE: archive
NETWORK: mainnet NETWORK: mainnet
- name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
ARCH: amd64 ARCH: amd64
@ -519,7 +519,7 @@ jobs:
ARCH: arm64 ARCH: arm64
NODE: sentry NODE: sentry
NETWORK: mainnet NETWORK: mainnet
- name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
ARCH: arm64 ARCH: arm64
@ -629,13 +629,13 @@ jobs:
ARCH: arm64 ARCH: arm64
NODE: validator NODE: validator
NETWORK: mainnet NETWORK: mainnet
- name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
ARCH: arm64 ARCH: arm64
NODE: validator NODE: validator
NETWORK: mainnet NETWORK: mainnet
- name: Updating the control file to use with the arm64 profile - name: Updating the control file to use with the arm64 profile
run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/bor/DEBIAN/control run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/bor/DEBIAN/control
@ -675,7 +675,7 @@ jobs:
ARCH: arm64 ARCH: arm64
NODE: archive NODE: archive
NETWORK: mumbai NETWORK: mumbai
- name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
ARCH: arm64 ARCH: arm64
@ -718,7 +718,7 @@ jobs:
ARCH: arm64 ARCH: arm64
NODE: archive NODE: archive
NETWORK: mainnet NETWORK: mainnet
- name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - name: Building bor ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}
env: env:
ARCH: arm64 ARCH: arm64

View file

@ -25,7 +25,7 @@ GOTEST = GODEBUG=cgocheck=0 go test $(GO_FLAGS) $(GO_LDFLAGS) -p 1
bor: bor:
mkdir -p $(GOPATH)/bin/ mkdir -p $(GOPATH)/bin/
go build -o $(GOBIN)/bor $(GO_LDFLAGS) ./cmd/cli/main.go go build -o $(GOBIN)/bor $(GO_LDFLAGS) ./cmd/cli/main.go
cp $(GOBIN)/bor $(GOPATH)/bin/ cp $(GOBIN)/bor $(GOPATH)/bin/
@echo "Done building." @echo "Done building."

View file

@ -16,4 +16,4 @@
- ```save-key```: path to save the ecdsa private key - ```save-key```: path to save the ecdsa private key
- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false) - ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false)

View file

@ -10,4 +10,4 @@ The ```debug pprof <enode>``` command will create an archive containing bor ppro
- ```output```: Output directory - ```output```: Output directory
- ```skiptrace```: Skip running the trace (default: false) - ```skiptrace```: Skip running the trace (default: false)

View file

@ -35,9 +35,9 @@ devfakeauthor = false # Run miner without validator set authorization
port = 30303 # Network listening port port = 30303 # Network listening port
nodiscover = false # Disables the peer discovery mechanism (manual peer addition) nodiscover = false # Disables the peer discovery mechanism (manual peer addition)
nat = "any" # NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>) nat = "any" # NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>)
netrestrict = "" # Restricts network communication to the given IP networks (CIDR masks) netrestrict = "" # Restricts network communication to the given IP networks (CIDR masks)
nodekey = "" # P2P node key file nodekey = "" # P2P node key file
nodekeyhex = "" # P2P node key as hex nodekeyhex = "" # P2P node key as hex
txarrivalwait = "500ms" # Maximum duration to wait before requesting an announced transaction txarrivalwait = "500ms" # Maximum duration to wait before requesting an announced transaction
[p2p.discovery] [p2p.discovery]
v5disc = false # Enables the experimental RLPx V5 (Topic Discovery) mechanism v5disc = false # Enables the experimental RLPx V5 (Topic Discovery) mechanism
@ -130,7 +130,7 @@ devfakeauthor = false # Run miner without validator set authorization
metrics = false # Enable metrics collection and reporting metrics = false # Enable metrics collection and reporting
expensive = false # Enable expensive metrics collection and reporting expensive = false # Enable expensive metrics collection and reporting
prometheus-addr = "127.0.0.1:7071" # Address for Prometheus Server prometheus-addr = "127.0.0.1:7071" # Address for Prometheus Server
opencollector-endpoint = "" # OpenCollector Endpoint (host:port) opencollector-endpoint = "" # OpenCollector Endpoint (host:port)
[telemetry.influx] [telemetry.influx]
influxdb = false # Enable metrics export/push to an external InfluxDB database (v1) influxdb = false # Enable metrics export/push to an external InfluxDB database (v1)
endpoint = "" # InfluxDB API endpoint to report metrics to endpoint = "" # InfluxDB API endpoint to report metrics to

View file

@ -258,7 +258,7 @@ The ```bor server``` command runs the Bor client.
- ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071) - ```metrics.prometheus-addr```: Address for Prometheus Server (default: 127.0.0.1:7071)
- ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) - ```metrics.opencollector-endpoint```: OpenCollector Endpoint (host:port) (default: 127.0.0.1:4317)
- ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false) - ```metrics.influxdbv2```: Enable metrics export/push to an external InfluxDB v2 database (default: false)
@ -290,4 +290,4 @@ The ```bor server``` command runs the Bor client.
- ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768) - ```txpool.globalqueue```: Maximum number of non-executable transaction slots for all accounts (default: 32768)
- ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s) - ```txpool.lifetime```: Maximum amount of time non-executable transaction are queued (default: 3h0m0s)

2
go.sum
View file

@ -149,6 +149,7 @@ github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJ
github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE= github.com/btcsuite/btcd/btcec/v2 v2.1.3 h1:xM/n3yIhHAhHy04z4i43C8p4ehixJZMsnrVJkgl+MTE=
github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
@ -323,6 +324,7 @@ github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M=
github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=

View file

@ -129,6 +129,7 @@ type Config struct {
// ParallelEVM has the parallel evm related settings // ParallelEVM has the parallel evm related settings
ParallelEVM *ParallelEVMConfig `hcl:"parallelevm,block" toml:"parallelevm,block"` ParallelEVM *ParallelEVMConfig `hcl:"parallelevm,block" toml:"parallelevm,block"`
// Develop Fake Author mode to produce blocks without authorisation // Develop Fake Author mode to produce blocks without authorisation
DevFakeAuthor bool `hcl:"devfakeauthor,optional" toml:"devfakeauthor,optional"` DevFakeAuthor bool `hcl:"devfakeauthor,optional" toml:"devfakeauthor,optional"`
@ -311,9 +312,10 @@ type SealerConfig struct {
GasPriceRaw string `hcl:"gasprice,optional" toml:"gasprice,optional"` GasPriceRaw string `hcl:"gasprice,optional" toml:"gasprice,optional"`
// The time interval for miner to re-create mining work. // The time interval for miner to re-create mining work.
Recommit time.Duration `hcl:"-,optional" toml:"-"` Recommit time.Duration `hcl:"-,optional" toml:"-"`
RecommitRaw string `hcl:"recommit,optional" toml:"recommit,optional"` RecommitRaw string `hcl:"recommit,optional" toml:"recommit,optional"`
CommitInterruptFlag bool `hcl:"commitinterrupt,optional" toml:"commitinterrupt,optional"`
CommitInterruptFlag bool `hcl:"commitinterrupt,optional" toml:"commitinterrupt,optional"`
} }
type JsonRPCConfig struct { type JsonRPCConfig struct {

View file

@ -212,7 +212,7 @@ var (
// Test accounts // Test accounts
testBankKey, _ = crypto.GenerateKey() testBankKey, _ = crypto.GenerateKey()
TestBankAddress = crypto.PubkeyToAddress(testBankKey.PublicKey) TestBankAddress = crypto.PubkeyToAddress(testBankKey.PublicKey)
testBankFunds = big.NewInt(8000000000000000000) testBankFunds = big.NewInt(9000000000000000000)
testUserKey, _ = crypto.GenerateKey() testUserKey, _ = crypto.GenerateKey()
testUserAddress = crypto.PubkeyToAddress(testUserKey.PublicKey) testUserAddress = crypto.PubkeyToAddress(testUserKey.PublicKey)

View file

@ -421,27 +421,13 @@ func (w *worker) mainLoopWithDelay(ctx context.Context, delay uint, opcodeDelay
txset := types.NewTransactionsByPriceAndNonce(w.current.signer, txs, cmath.FromBig(w.current.header.BaseFee)) txset := types.NewTransactionsByPriceAndNonce(w.current.signer, txs, cmath.FromBig(w.current.header.BaseFee))
tcount := w.current.tcount tcount := w.current.tcount
var interruptCtx = context.Background() w.commitTransactions(w.current, txset, nil, context.Background())
stopFn := func() {}
defer func() {
stopFn()
}()
if w.interruptCommitFlag {
interruptCtx, stopFn = getInterruptTimer(ctx, w.current, w.chain.CurrentBlock())
// nolint : staticcheck
interruptCtx = vm.PutCache(interruptCtx, w.interruptedTxCache)
}
w.commitTransactionsWithDelay(w.current, txset, nil, interruptCtx)
// Only update the snapshot if any new transactions were added // Only update the snapshot if any new transactions were added
// to the pending block // to the pending block
if tcount != w.current.tcount { if tcount != w.current.tcount {
w.updateSnapshot(w.current) w.updateSnapshot(w.current)
} }
stopFn()
} else { } else {
// Special case, if the consensus engine is 0 period clique(dev mode), // Special case, if the consensus engine is 0 period clique(dev mode),
// submit sealing work here since all empty submission will be rejected // submit sealing work here since all empty submission will be rejected
@ -497,7 +483,7 @@ func (w *worker) commitWorkWithDelay(ctx context.Context, interrupt *int32, noem
return return
} }
// nolint : contextcheck //nolint:contextcheck
var interruptCtx = context.Background() var interruptCtx = context.Background()
stopFn := func() {} stopFn := func() {}

View file

@ -1627,7 +1627,7 @@ func (w *worker) commitWork(ctx context.Context, interrupt *int32, noempty bool,
return return
} }
// nolint : contextcheck // nolint:contextcheck
var interruptCtx = context.Background() var interruptCtx = context.Background()
stopFn := func() {} stopFn := func() {}

View file

@ -793,11 +793,6 @@ func BenchmarkBorMining(b *testing.B) {
chain, _ := core.NewBlockChain(db2, nil, back.chain.Config(), engine, vm.Config{}, nil, nil, nil) chain, _ := core.NewBlockChain(db2, nil, back.chain.Config(), engine, vm.Config{}, nil, nil, nil)
defer chain.Stop() defer chain.Stop()
// Ignore empty commit here for less noise.
w.skipSealHook = func(task *task) bool {
return len(task.receipts) == 0
}
// fulfill tx pool // fulfill tx pool
const ( const (
totalGas = testGas + params.TxGas totalGas = testGas + params.TxGas

View file

@ -43,7 +43,7 @@ var VersionWithMeta = func() string {
return v return v
}() }()
// VersionWithMetaCommitDetails holds the textual version string including the metadata and Git Details. // VersionWithCommitDetails holds the textual version string including the metadata and Git Details.
var VersionWithMetaCommitDetails = func() string { var VersionWithMetaCommitDetails = func() string {
v := Version v := Version
if VersionMeta != "" { if VersionMeta != "" {