mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
Merge branch 'develop' into mardizzone/upstream-merge
This commit is contained in:
commit
a2da3bb438
21 changed files with 28 additions and 30 deletions
|
|
@ -88,7 +88,7 @@ them using your favourite package manager. Once the dependencies are installed,
|
|||
|
||||
### Submit your PR
|
||||
|
||||
- After your changes are commited to your GitHub fork, submit a pull request (PR) to the `master` branch of the `maticnetwork/bor` repo
|
||||
- After your changes are committed to your GitHub fork, submit a pull request (PR) to the `master` branch of the `maticnetwork/bor` repo
|
||||
- In your PR description, reference the issue it resolves (see [linking a pull request 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))
|
||||
- ex. `Updates out of date content [Fixes #1234]`
|
||||
- Why not say hi and draw attention to your PR in [our discord server](https://discord.gg/zdwkdvMNY2)?
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ These integration tests are included in the bor repo via using the git submodule
|
|||
The version used is the last stable release, tagged as v10.4 from branch develop in ethereum/tests
|
||||
Details on release code can be found here https://github.com/ethereum/tests/commit/a380655e5ffab1a5ea0f4d860224bdb19013f06a
|
||||
|
||||
To run the tests, we hava a `make` command:
|
||||
To run the tests, we have a `make` command:
|
||||
```
|
||||
make test-integration
|
||||
```
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import (
|
|||
)
|
||||
|
||||
// The ABI holds information about a contract's context and available
|
||||
// invokable methods. It will allow you to type check function calls and
|
||||
// invocable methods. It will allow you to type check function calls and
|
||||
// packs data accordingly.
|
||||
type ABI struct {
|
||||
Constructor Method
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ func TestTransactionInBlock(t *testing.T) {
|
|||
|
||||
transaction, err = sim.TransactionInBlock(bgCtx, lastBlock.Hash(), uint(0))
|
||||
if err != nil {
|
||||
t.Errorf("could not get transaction in the lastest block with hash %v: %v", lastBlock.Hash().String(), err)
|
||||
t.Errorf("could not get transaction in the latest block with hash %v: %v", lastBlock.Hash().String(), err)
|
||||
}
|
||||
|
||||
if signedTx.Hash().String() != transaction.Hash().String() {
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
|
|||
|
||||
notContentCreation := errors.New("tx is not contract creation")
|
||||
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != notContentCreation.Error() {
|
||||
t.Errorf("error missmatch: want %q, got %q, ", notContentCreation, err)
|
||||
t.Errorf("error mismatch: want %q, got %q, ", notContentCreation, err)
|
||||
}
|
||||
|
||||
// Create a transaction that is not mined.
|
||||
|
|
@ -136,7 +136,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
|
|||
go func() {
|
||||
contextCanceled := errors.New("context canceled")
|
||||
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != contextCanceled.Error() {
|
||||
t.Errorf("error missmatch: want %q, got %q, ", contextCanceled, err)
|
||||
t.Errorf("error mismatch: want %q, got %q, ", contextCanceled, err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ func TestURLMarshalJSON(t *testing.T) {
|
|||
|
||||
json, err := url.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Errorf("unexpcted error: %v", err)
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
if string(json) != "\"https://ethereum.org\"" {
|
||||
|
|
@ -71,7 +71,7 @@ func TestURLUnmarshalJSON(t *testing.T) {
|
|||
|
||||
err := url.UnmarshalJSON([]byte("\"https://ethereum.org\""))
|
||||
if err != nil {
|
||||
t.Errorf("unexpcted error: %v", err)
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
}
|
||||
|
||||
if url.Scheme != "https" {
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ func (w *ledgerDriver) ledgerDerive(derivationPath []uint32) (common.Address, er
|
|||
|
||||
hexstr := reply[1 : 1+int(reply[0])]
|
||||
|
||||
// Decode the hex sting into an Ethereum address and return
|
||||
// Decode the hex string into an Ethereum address and return
|
||||
var address common.Address
|
||||
if _, err = hex.Decode(address[:], hexstr); err != nil {
|
||||
return common.Address{}, err
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# - NSIS Large Strings build, http://nsis.sourceforge.net/Special_Builds
|
||||
# - SFP, http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin (put dll in NSIS\Plugins\x86-ansi)
|
||||
#
|
||||
# After intalling NSIS extra the NSIS Large Strings build zip and replace the makensis.exe and the
|
||||
# After installing NSIS extra the NSIS Large Strings build zip and replace the makensis.exe and the
|
||||
# files found in Stub.
|
||||
#
|
||||
# based on: http://nsis.sourceforge.net/A_simple_installer_with_start_menu_shortcut_and_uninstaller
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ Example:
|
|||
},
|
||||
{
|
||||
"type": "Info",
|
||||
"message": "User should see this aswell"
|
||||
"message": "User should see this as well"
|
||||
}
|
||||
],
|
||||
"meta": {
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ func FindnodeAmplificationWrongIP(t *utesting.T) {
|
|||
// If we receive a NEIGHBORS response, the attack worked and the test fails.
|
||||
reply, _, _ := te.read(te.l2)
|
||||
if reply != nil {
|
||||
t.Error("Got NEIGHORS response for FINDNODE from wrong IP")
|
||||
t.Error("Got NEIGHBORS response for FINDNODE from wrong IP")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ func Transition(ctx *cli.Context) error {
|
|||
}
|
||||
|
||||
body, _ := rlp.EncodeToBytes(txs)
|
||||
// Dump the excution result
|
||||
// Dump the execution result
|
||||
collector := make(Alloc)
|
||||
s.DumpToCollector(collector, nil)
|
||||
|
||||
|
|
|
|||
2
cmd/evm/testdata/3/readme.md
vendored
2
cmd/evm/testdata/3/readme.md
vendored
|
|
@ -1,2 +1,2 @@
|
|||
These files examplify a transition where a transaction (excuted on block 5) requests
|
||||
These files examplify a transition where a transaction (executed on block 5) requests
|
||||
the blockhash for block `1`.
|
||||
|
|
|
|||
2
cmd/evm/testdata/4/readme.md
vendored
2
cmd/evm/testdata/4/readme.md
vendored
|
|
@ -1,3 +1,3 @@
|
|||
These files examplify a transition where a transaction (excuted on block 5) requests
|
||||
These files examplify a transition where a transaction (executed on block 5) requests
|
||||
the blockhash for block `4`, but where the hash for that block is missing.
|
||||
It's expected that executing these should cause `exit` with errorcode `4`.
|
||||
|
|
|
|||
4
cmd/evm/testdata/8/readme.md
vendored
4
cmd/evm/testdata/8/readme.md
vendored
|
|
@ -7,7 +7,7 @@ This test contains testcases for EIP-2930, which uses transactions with access l
|
|||
The alloc portion contains one contract (`0x000000000000000000000000000000000000aaaa`), containing the
|
||||
following code: `0x5854505854`: `PC ;SLOAD; POP; PC; SLOAD`.
|
||||
|
||||
Essentialy, this contract does `SLOAD(0)` and `SLOAD(3)`.
|
||||
Essentially, this contract does `SLOAD(0)` and `SLOAD(3)`.
|
||||
|
||||
The alloc also contains some funds on `0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b`.
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ dir=./testdata/8 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json
|
|||
{"pc":4,"op":84,"gas":"0x48456","gasCost":"0x64","memSize":0,"stack":["0x3"],"depth":1,"refund":0,"opName":"SLOAD"}
|
||||
```
|
||||
|
||||
Simlarly, we can provide the input transactions via `stdin` instead of as file:
|
||||
Similarly, we can provide the input transactions via `stdin` instead of as file:
|
||||
|
||||
```
|
||||
$ dir=./testdata/8 \
|
||||
|
|
|
|||
2
cmd/evm/testdata/9/readme.md
vendored
2
cmd/evm/testdata/9/readme.md
vendored
|
|
@ -7,7 +7,7 @@ This test contains testcases for EIP-1559, which uses an new transaction type an
|
|||
The alloc portion contains one contract (`0x000000000000000000000000000000000000aaaa`), containing the
|
||||
following code: `0x58585454`: `PC; PC; SLOAD; SLOAD`.
|
||||
|
||||
Essentialy, this contract does `SLOAD(0)` and `SLOAD(1)`.
|
||||
Essentially, this contract does `SLOAD(0)` and `SLOAD(1)`.
|
||||
|
||||
The alloc also contains some funds on `0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b`.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,9 @@ The `faucet` is a single binary app (everything included) with all configuration
|
|||
|
||||
First things first, the `faucet` needs to connect to an Ethereum network, for which it needs the necessary genesis and network infos. Each of the following flags must be set:
|
||||
|
||||
- `-genesis` is a path to a file containing the network `genesis.json`. or using:
|
||||
- `-goerli` with the faucet with Görli network config
|
||||
- `-sepolia` with the faucet with Sepolia network config
|
||||
- `-network` is the devp2p network id used during connection
|
||||
- `-bootnodes` is a list of `enode://` ids to join the network through
|
||||
- `--genesis` is a path to a file containing the network `genesis.json`
|
||||
- `--network` is the devp2p network id used during connection
|
||||
- `--bootnodes` is a list of `enode://` ids to join the network through
|
||||
|
||||
The `faucet` will use the `les` protocol to join the configured Ethereum network and will store its data in `$HOME/.faucet` (currently not configurable).
|
||||
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
f.lock.Unlock()
|
||||
|
||||
// Send an error if too frequent funding, othewise a success
|
||||
// Send an error if too frequent funding, otherwise a success
|
||||
if !fund {
|
||||
if err = sendError(wsconn, fmt.Errorf("%s left until next allowance", common.PrettyDuration(time.Until(timeout)))); err != nil { // nolint: gosimple
|
||||
log.Warn("Failed to send funding error to client", "err", err)
|
||||
|
|
@ -694,7 +694,7 @@ func (f *faucet) loop() {
|
|||
f.lock.RUnlock()
|
||||
}
|
||||
}()
|
||||
// Wait for various events and assing to the appropriate background threads
|
||||
// Wait for various events and assign to the appropriate background threads
|
||||
for {
|
||||
select {
|
||||
case head := <-heads:
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ func setDefaultMumbaiGethConfig(ctx *cli.Context, config *gethConfig) {
|
|||
config.Eth.SyncMode = downloader.FullSync
|
||||
config.Eth.NetworkId = 80001
|
||||
config.Eth.Miner.GasCeil = 20000000
|
||||
//--miner.gastarget is depreceated, No longed used
|
||||
//--miner.gastarget is deprecated, No longed used
|
||||
config.Eth.TxPool.NoLocals = true
|
||||
config.Eth.TxPool.AccountSlots = 16
|
||||
config.Eth.TxPool.GlobalSlots = 131072
|
||||
|
|
@ -359,7 +359,7 @@ func setDefaultBorMainnetGethConfig(ctx *cli.Context, config *gethConfig) {
|
|||
config.Eth.SyncMode = downloader.FullSync
|
||||
config.Eth.NetworkId = 137
|
||||
config.Eth.Miner.GasCeil = 20000000
|
||||
//--miner.gastarget is depreceated, No longed used
|
||||
//--miner.gastarget is deprecated, No longed used
|
||||
config.Eth.TxPool.NoLocals = true
|
||||
config.Eth.TxPool.AccountSlots = 16
|
||||
config.Eth.TxPool.GlobalSlots = 131072
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
"name": "Geth DoS via MULMOD",
|
||||
"uid": "GETH-2020-04",
|
||||
"summary": "A denial-of-service issue can be used to crash Geth nodes during block processing",
|
||||
"description": "Affected versions suffer from a vulnerability which can be exploited through the `MULMOD` operation, by specifying a modulo of `0`: `mulmod(a,b,0)`, causing a `panic` in the underlying library. \nThe crash was in the `uint256` library, where a buffer [underflowed](https://github.com/holiman/uint256/blob/4ce82e695c10ddad57215bdbeafb68b8c5df2c30/uint256.go#L442).\n\n\tif `d == 0`, `dLen` remains `0`\n\nand https://github.com/holiman/uint256/blob/4ce82e695c10ddad57215bdbeafb68b8c5df2c30/uint256.go#L451 will try to access index `[-1]`.\n\nThe `uint256` library was first merged in this [commit](https://github.com/ethereum/go-ethereum/commit/cf6674539c589f80031f3371a71c6a80addbe454), on 2020-06-08. \nExploiting this vulnerabilty would cause all vulnerable nodes to drop off the network. \n\nThe issue was brought to our attention through a [bug report](https://github.com/ethereum/go-ethereum/issues/21367), showing a `panic` occurring on sync from genesis on the Ropsten network.\n \nIt was estimated that the least obvious way to fix this would be to merge the fix into `uint256`, make a new release of that library and then update the geth-dependency.\n",
|
||||
"description": "Affected versions suffer from a vulnerability which can be exploited through the `MULMOD` operation, by specifying a modulo of `0`: `mulmod(a,b,0)`, causing a `panic` in the underlying library. \nThe crash was in the `uint256` library, where a buffer [underflowed](https://github.com/holiman/uint256/blob/4ce82e695c10ddad57215bdbeafb68b8c5df2c30/uint256.go#L442).\n\n\tif `d == 0`, `dLen` remains `0`\n\nand https://github.com/holiman/uint256/blob/4ce82e695c10ddad57215bdbeafb68b8c5df2c30/uint256.go#L451 will try to access index `[-1]`.\n\nThe `uint256` library was first merged in this [commit](https://github.com/ethereum/go-ethereum/commit/cf6674539c589f80031f3371a71c6a80addbe454), on 2020-06-08. \nExploiting this vulnerability would cause all vulnerable nodes to drop off the network. \n\nThe issue was brought to our attention through a [bug report](https://github.com/ethereum/go-ethereum/issues/21367), showing a `panic` occurring on sync from genesis on the Ropsten network.\n \nIt was estimated that the least obvious way to fix this would be to merge the fix into `uint256`, make a new release of that library and then update the geth-dependency.\n",
|
||||
"links": [
|
||||
"https://blog.ethereum.org/2020/11/12/geth_security_release/",
|
||||
"https://github.com/ethereum/go-ethereum/security/advisories/GHSA-jm5c-rv3w-w83m",
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ var (
|
|||
Value: "",
|
||||
}
|
||||
|
||||
// UseHeimdallApp flag for using internall heimdall app to fetch data
|
||||
// UseHeimdallApp flag for using internal heimdall app to fetch data
|
||||
UseHeimdallAppFlag = &cli.BoolFlag{
|
||||
Name: "bor.useheimdallapp",
|
||||
Usage: "Use child heimdall process to fetch data, Only works when bor.runheimdall is true",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common"
|
||||
)
|
||||
|
||||
// Validator represets Volatile state for each Validator
|
||||
// Validator represents Volatile state for each Validator
|
||||
type Validator struct {
|
||||
ID uint64 `json:"ID"`
|
||||
Address common.Address `json:"signer"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue