mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46:43 +00:00
Merge pull request #1332 from maticnetwork/1.4.0-candidate
v1.4.0 release
This commit is contained in:
commit
e69e4c8bdf
22 changed files with 163 additions and 43 deletions
2
.github/ISSUE_TEMPLATE/bug.md
vendored
2
.github/ISSUE_TEMPLATE/bug.md
vendored
|
|
@ -6,7 +6,7 @@ labels: 'type:bug'
|
||||||
assignees: ''
|
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://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/0xPolygonDevs) 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/0xPolygonCommunity) 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).
|
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).
|
||||||
|
|
|
||||||
2
.github/ISSUE_TEMPLATE/question.md
vendored
2
.github/ISSUE_TEMPLATE/question.md
vendored
|
|
@ -8,4 +8,4 @@ assignees: ''
|
||||||
|
|
||||||
This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation.
|
This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation.
|
||||||
|
|
||||||
For general questions please join our [discord](https://discord.com/invite/0xPolygonDevs) server.
|
For general questions please join our [discord](https://discord.com/invite/0xPolygonCommunity) server.
|
||||||
|
|
|
||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -107,7 +107,7 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: unitTest-coverage
|
name: unitTest-coverage
|
||||||
path: cover.out
|
path: cover.out
|
||||||
|
|
@ -158,7 +158,7 @@ jobs:
|
||||||
- name: test-integration
|
- name: test-integration
|
||||||
run: make test-integration
|
run: make test-integration
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: integrationTest-coverage
|
name: integrationTest-coverage
|
||||||
path: cover.out
|
path: cover.out
|
||||||
|
|
@ -174,7 +174,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v2
|
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
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ jobs:
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: logs_${{ github.run_id }}
|
name: logs_${{ github.run_id }}
|
||||||
path: |
|
path: |
|
||||||
|
|
@ -277,7 +277,7 @@ jobs:
|
||||||
|
|
||||||
- name: Upload code and chain data
|
- name: Upload code and chain data
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: code_${{ github.run_id }}
|
name: code_${{ github.run_id }}
|
||||||
path: code.tar.gz
|
path: code.tar.gz
|
||||||
|
|
|
||||||
2
.github/workflows/govuln.yml
vendored
2
.github/workflows/govuln.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
fail-on-vuln: true
|
fail-on-vuln: true
|
||||||
|
|
||||||
- name: Upload govulncheck report
|
- name: Upload govulncheck report
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4.4.0
|
||||||
with:
|
with:
|
||||||
name: raw-report
|
name: raw-report
|
||||||
path: raw-report.json
|
path: raw-report.json
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
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/github.com/maticnetwork/bor)
|
||||||
[](https://goreportcard.com/report/github.com/maticnetwork/bor)
|
[](https://goreportcard.com/report/github.com/maticnetwork/bor)
|
||||||

|

|
||||||
[](https://discord.gg/0xpolygon)
|
[](https://discord.com/invite/0xpolygonrnd)
|
||||||
[](https://twitter.com/0xPolygon)
|
[](https://twitter.com/0xPolygon)
|
||||||
|
|
||||||
### Installing bor using packaging
|
### Installing bor using packaging
|
||||||
|
|
@ -79,4 +79,4 @@ included in our repository in the `COPYING` file.
|
||||||
|
|
||||||
## Join our Discord server
|
## Join our Discord server
|
||||||
|
|
||||||
Join Polygon community – share your ideas or just say hi over [on Discord](https://discord.com/invite/0xPolygonDevs).
|
Join Polygon community – share your ideas or just say hi over on [Polygon Community Discord](https://discord.com/invite/0xPolygonCommunity) or on [Polygon R&D Discord](https://discord.com/invite/0xpolygonrnd).
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
|
"github.com/ethereum/go-ethereum/core/state"
|
||||||
"github.com/ethereum/go-ethereum/internal/ethapi"
|
"github.com/ethereum/go-ethereum/internal/ethapi"
|
||||||
"github.com/ethereum/go-ethereum/rpc"
|
"github.com/ethereum/go-ethereum/rpc"
|
||||||
)
|
)
|
||||||
|
|
@ -11,4 +12,5 @@ import (
|
||||||
//go:generate mockgen -destination=./caller_mock.go -package=api . Caller
|
//go:generate mockgen -destination=./caller_mock.go -package=api . Caller
|
||||||
type Caller interface {
|
type Caller interface {
|
||||||
Call(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *ethapi.StateOverride, blockOverrides *ethapi.BlockOverrides) (hexutil.Bytes, error)
|
Call(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *ethapi.StateOverride, blockOverrides *ethapi.BlockOverrides) (hexutil.Bytes, error)
|
||||||
|
CallWithState(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, state *state.StateDB, overrides *ethapi.StateOverride, blockOverrides *ethapi.BlockOverrides) (hexutil.Bytes, error)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,13 +119,13 @@ func (gc *GenesisContractsClient) LastStateId(state *state.StateDB, number uint6
|
||||||
toAddress := common.HexToAddress(gc.StateReceiverContract)
|
toAddress := common.HexToAddress(gc.StateReceiverContract)
|
||||||
gas := (hexutil.Uint64)(uint64(math.MaxUint64 / 2))
|
gas := (hexutil.Uint64)(uint64(math.MaxUint64 / 2))
|
||||||
|
|
||||||
// Do a call with state so that we can fetch the last state ID from a given (incoming)
|
// BOR: Do a 'CallWithState' so that we can fetch the last state ID from a given (incoming)
|
||||||
// state instead of local(canonical) chain.
|
// state instead of local(canonical) chain's state.
|
||||||
result, err := gc.ethAPI.Call(context.Background(), ethapi.TransactionArgs{
|
result, err := gc.ethAPI.CallWithState(context.Background(), ethapi.TransactionArgs{
|
||||||
Gas: &gas,
|
Gas: &gas,
|
||||||
To: &toAddress,
|
To: &toAddress,
|
||||||
Data: &msgData,
|
Data: &msgData,
|
||||||
}, &rpc.BlockNumberOrHash{BlockNumber: &blockNr, BlockHash: &hash}, nil, nil)
|
}, &rpc.BlockNumberOrHash{BlockNumber: &blockNr, BlockHash: &hash}, state, nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -495,9 +495,15 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
|
||||||
ret, err := evm.interpreter.PreRun(contract, nil, false, nil)
|
ret, err := evm.interpreter.PreRun(contract, nil, false, nil)
|
||||||
|
|
||||||
// Check whether the max code size has been exceeded, assign err if the case.
|
// Check whether the max code size has been exceeded, assign err if the case.
|
||||||
if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize {
|
if err == nil && evm.chainRules.IsEIP158 {
|
||||||
|
if evm.chainConfig.Bor != nil && evm.chainConfig.Bor.IsAhmedabad(evm.Context.BlockNumber) {
|
||||||
|
if len(ret) > params.MaxCodeSizePostAhmedabad {
|
||||||
err = ErrMaxCodeSizeExceeded
|
err = ErrMaxCodeSizeExceeded
|
||||||
}
|
}
|
||||||
|
} else if len(ret) > params.MaxCodeSize {
|
||||||
|
err = ErrMaxCodeSizeExceeded
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
||||||
if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon {
|
if err == nil && len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1377,7 +1377,7 @@ func (e *revertError) ErrorData() interface{} {
|
||||||
// Note, this function doesn't make and changes in the state/blockchain and is
|
// Note, this function doesn't make and changes in the state/blockchain and is
|
||||||
// useful to execute and retrieve values.
|
// useful to execute and retrieve values.
|
||||||
func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *StateOverride, blockOverrides *BlockOverrides) (hexutil.Bytes, error) {
|
func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, overrides *StateOverride, blockOverrides *BlockOverrides) (hexutil.Bytes, error) {
|
||||||
return s.CallWithState(ctx, args, *blockNrOrHash, nil, overrides, blockOverrides)
|
return s.CallWithState(ctx, args, blockNrOrHash, nil, overrides, blockOverrides)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CallWithState executes the given transaction on the given state for
|
// CallWithState executes the given transaction on the given state for
|
||||||
|
|
@ -1389,8 +1389,8 @@ func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrO
|
||||||
//
|
//
|
||||||
// Note, this function doesn't make and changes in the state/blockchain and is
|
// Note, this function doesn't make and changes in the state/blockchain and is
|
||||||
// useful to execute and retrieve values.
|
// useful to execute and retrieve values.
|
||||||
func (s *BlockChainAPI) CallWithState(ctx context.Context, args TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, state *state.StateDB, overrides *StateOverride, blockOverrides *BlockOverrides) (hexutil.Bytes, error) {
|
func (s *BlockChainAPI) CallWithState(ctx context.Context, args TransactionArgs, blockNrOrHash *rpc.BlockNumberOrHash, state *state.StateDB, overrides *StateOverride, blockOverrides *BlockOverrides) (hexutil.Bytes, error) {
|
||||||
result, err := DoCall(ctx, s.b, args, blockNrOrHash, state, overrides, blockOverrides, s.b.RPCEVMTimeout(), s.b.RPCGasCap())
|
result, err := DoCall(ctx, s.b, args, *blockNrOrHash, state, overrides, blockOverrides, s.b.RPCEVMTimeout(), s.b.RPCGasCap())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor
|
Source: bor
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor
|
Source: bor
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor-profile
|
Source: bor-profile
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor-profile
|
Source: bor-profile
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor-profile
|
Source: bor-profile
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
Source: bor-profile
|
Source: bor-profile
|
||||||
Version: 1.3.7
|
Version: 1.4.0
|
||||||
Section: develop
|
Section: develop
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Polygon <release-team@polygon.technology>
|
Maintainer: Polygon <release-team@polygon.technology>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -134,6 +134,7 @@ const (
|
||||||
DefaultElasticityMultiplier = 2 // Bounds the maximum gas limit an EIP-1559 block may have.
|
DefaultElasticityMultiplier = 2 // Bounds the maximum gas limit an EIP-1559 block may have.
|
||||||
|
|
||||||
MaxCodeSize = 24576 // Maximum bytecode to permit for a contract
|
MaxCodeSize = 24576 // Maximum bytecode to permit for a contract
|
||||||
|
MaxCodeSizePostAhmedabad = 32768 // Maximum bytecode to permit for a contract post Ahmedabad hard fork (bor / polygon pos) (32KB)
|
||||||
MaxInitCodeSize = 2 * MaxCodeSize // Maximum initcode to permit in a creation transaction and create instructions
|
MaxInitCodeSize = 2 * MaxCodeSize // Maximum initcode to permit in a creation transaction and create instructions
|
||||||
|
|
||||||
// Precompiled contract gas prices
|
// Precompiled contract gas prices
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VersionMajor = 1 // Major version component of the current release
|
VersionMajor = 1 // Major version component of the current release
|
||||||
VersionMinor = 3 // Minor version component of the current release
|
VersionMinor = 4 // Minor version component of the current release
|
||||||
VersionPatch = 7 // Patch version component of the current release
|
VersionPatch = 0 // Patch version component of the current release
|
||||||
VersionMeta = "" // Version metadata to append to the version string
|
VersionMeta = "" // Version metadata to append to the version string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue