mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
commit
ea03ce418a
28 changed files with 45 additions and 43 deletions
|
|
@ -88,7 +88,7 @@ them using your favourite package manager. Once the dependencies are installed,
|
||||||
|
|
||||||
### Submit your PR
|
### 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))
|
- 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]`
|
- 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)?
|
- 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
|
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
|
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
|
make test-integration
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// The ABI holds information about a contract's context and available
|
// 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.
|
// packs data accordingly.
|
||||||
type ABI struct {
|
type ABI struct {
|
||||||
Constructor Method
|
Constructor Method
|
||||||
|
|
|
||||||
|
|
@ -803,7 +803,7 @@ func TestTransactionInBlock(t *testing.T) {
|
||||||
|
|
||||||
transaction, err = sim.TransactionInBlock(bgCtx, lastBlock.Hash(), uint(0))
|
transaction, err = sim.TransactionInBlock(bgCtx, lastBlock.Hash(), uint(0))
|
||||||
if err != nil {
|
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() {
|
if signedTx.Hash().String() != transaction.Hash().String() {
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
|
||||||
backend.Commit()
|
backend.Commit()
|
||||||
notContentCreation := errors.New("tx is not contract creation")
|
notContentCreation := errors.New("tx is not contract creation")
|
||||||
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != notContentCreation.Error() {
|
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.
|
// Create a transaction that is not mined.
|
||||||
|
|
@ -131,7 +131,7 @@ func TestWaitDeployedCornerCases(t *testing.T) {
|
||||||
go func() {
|
go func() {
|
||||||
contextCanceled := errors.New("context canceled")
|
contextCanceled := errors.New("context canceled")
|
||||||
if _, err := bind.WaitDeployed(ctx, backend, tx); err.Error() != contextCanceled.Error() {
|
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)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ type Event struct {
|
||||||
// These are two events that have the same name:
|
// These are two events that have the same name:
|
||||||
// * foo(int,int)
|
// * foo(int,int)
|
||||||
// * foo(uint,uint)
|
// * foo(uint,uint)
|
||||||
// The event name of the first one wll be resolved as foo while the second one
|
// The event name of the first one will be resolved as foo while the second one
|
||||||
// will be resolved as foo0.
|
// will be resolved as foo0.
|
||||||
Name string
|
Name string
|
||||||
// RawName is the raw event name parsed from ABI.
|
// RawName is the raw event name parsed from ABI.
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ func ParseSelector(unescapedSelector string) (SelectorMarshaling, error) {
|
||||||
return SelectorMarshaling{}, fmt.Errorf("failed to parse selector '%s': unexpected string '%s'", unescapedSelector, rest)
|
return SelectorMarshaling{}, fmt.Errorf("failed to parse selector '%s': unexpected string '%s'", unescapedSelector, rest)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reassemble the fake ABI and constuct the JSON
|
// Reassemble the fake ABI and construct the JSON
|
||||||
fakeArgs, err := assembleArgs(args)
|
fakeArgs, err := assembleArgs(args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return SelectorMarshaling{}, fmt.Errorf("failed to parse selector: %v", err)
|
return SelectorMarshaling{}, fmt.Errorf("failed to parse selector: %v", err)
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ type fileCache struct {
|
||||||
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
|
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
|
||||||
t0 := time.Now()
|
t0 := time.Now()
|
||||||
|
|
||||||
// List all the failes from the keystore folder
|
// List all the fails from the keystore folder
|
||||||
files, err := ioutil.ReadDir(keyDir)
|
files, err := ioutil.ReadDir(keyDir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ func merge(slice []Wallet, wallets ...Wallet) []Wallet {
|
||||||
return slice
|
return slice
|
||||||
}
|
}
|
||||||
|
|
||||||
// drop is the couterpart of merge, which looks up wallets from within the sorted
|
// drop is the counterpart of merge, which looks up wallets from within the sorted
|
||||||
// cache and removes the ones specified.
|
// cache and removes the ones specified.
|
||||||
func drop(slice []Wallet, wallets ...Wallet) []Wallet {
|
func drop(slice []Wallet, wallets ...Wallet) []Wallet {
|
||||||
for _, wallet := range wallets {
|
for _, wallet := range wallets {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ func TestURLMarshalJSON(t *testing.T) {
|
||||||
url := URL{Scheme: "https", Path: "ethereum.org"}
|
url := URL{Scheme: "https", Path: "ethereum.org"}
|
||||||
json, err := url.MarshalJSON()
|
json, err := url.MarshalJSON()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpcted error: %v", err)
|
t.Errorf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
if string(json) != "\"https://ethereum.org\"" {
|
if string(json) != "\"https://ethereum.org\"" {
|
||||||
t.Errorf("expected: %v, got: %v", "\"https://ethereum.org\"", string(json))
|
t.Errorf("expected: %v, got: %v", "\"https://ethereum.org\"", string(json))
|
||||||
|
|
@ -65,7 +65,7 @@ func TestURLUnmarshalJSON(t *testing.T) {
|
||||||
url := &URL{}
|
url := &URL{}
|
||||||
err := url.UnmarshalJSON([]byte("\"https://ethereum.org\""))
|
err := url.UnmarshalJSON([]byte("\"https://ethereum.org\""))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("unexpcted error: %v", err)
|
t.Errorf("unexpected error: %v", err)
|
||||||
}
|
}
|
||||||
if url.Scheme != "https" {
|
if url.Scheme != "https" {
|
||||||
t.Errorf("expected: %v, got: %v", "https", url.Scheme)
|
t.Errorf("expected: %v, got: %v", "https", url.Scheme)
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ func (w *ledgerDriver) ledgerDerive(derivationPath []uint32) (common.Address, er
|
||||||
}
|
}
|
||||||
hexstr := reply[1 : 1+int(reply[0])]
|
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
|
var address common.Address
|
||||||
if _, err = hex.Decode(address[:], hexstr); err != nil {
|
if _, err = hex.Decode(address[:], hexstr); err != nil {
|
||||||
return common.Address{}, err
|
return common.Address{}, err
|
||||||
|
|
|
||||||
|
|
@ -84,14 +84,14 @@ func (w *trezorDriver) Status() (string, error) {
|
||||||
|
|
||||||
// Open implements usbwallet.driver, attempting to initialize the connection to
|
// Open implements usbwallet.driver, attempting to initialize the connection to
|
||||||
// the Trezor hardware wallet. Initializing the Trezor is a two or three phase operation:
|
// the Trezor hardware wallet. Initializing the Trezor is a two or three phase operation:
|
||||||
// * The first phase is to initialize the connection and read the wallet's
|
// - The first phase is to initialize the connection and read the wallet's
|
||||||
// features. This phase is invoked if the provided passphrase is empty. The
|
// features. This phase is invoked if the provided passphrase is empty. The
|
||||||
// device will display the pinpad as a result and will return an appropriate
|
// device will display the pinpad as a result and will return an appropriate
|
||||||
// error to notify the user that a second open phase is needed.
|
// error to notify the user that a second open phase is needed.
|
||||||
// * The second phase is to unlock access to the Trezor, which is done by the
|
// - The second phase is to unlock access to the Trezor, which is done by the
|
||||||
// user actually providing a passphrase mapping a keyboard keypad to the pin
|
// user actually providing a passphrase mapping a keyboard keypad to the pin
|
||||||
// number of the user (shuffled according to the pinpad displayed).
|
// number of the user (shuffled according to the pinpad displayed).
|
||||||
// * If needed the device will ask for passphrase which will require calling
|
// - If needed the device will ask for passphrase which will require calling
|
||||||
// open again with the actual passphrase (3rd phase)
|
// open again with the actual passphrase (3rd phase)
|
||||||
func (w *trezorDriver) Open(device io.ReadWriter, passphrase string) error {
|
func (w *trezorDriver) Open(device io.ReadWriter, passphrase string) error {
|
||||||
w.device, w.failure = device, nil
|
w.device, w.failure = device, nil
|
||||||
|
|
@ -196,10 +196,12 @@ func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, er
|
||||||
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
|
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
|
||||||
return common.Address{}, err
|
return common.Address{}, err
|
||||||
}
|
}
|
||||||
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary fomats
|
|
||||||
|
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary formats
|
||||||
return common.BytesToAddress(addr), nil
|
return common.BytesToAddress(addr), nil
|
||||||
}
|
}
|
||||||
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal fomats
|
|
||||||
|
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal formats
|
||||||
return common.HexToAddress(addr), nil
|
return common.HexToAddress(addr), nil
|
||||||
}
|
}
|
||||||
return common.Address{}, errors.New("missing derived address")
|
return common.Address{}, errors.New("missing derived address")
|
||||||
|
|
|
||||||
|
|
@ -593,7 +593,7 @@ func doDocker(cmdline []string) {
|
||||||
}
|
}
|
||||||
if mismatch {
|
if mismatch {
|
||||||
// Build numbers mismatching, retry in a short time to
|
// Build numbers mismatching, retry in a short time to
|
||||||
// avoid concurrent failes in both publisher images. If
|
// avoid concurrent fails in both publisher images. If
|
||||||
// however the retry failed too, it means the concurrent
|
// however the retry failed too, it means the concurrent
|
||||||
// builder is still crunching, let that do the publish.
|
// builder is still crunching, let that do the publish.
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# - NSIS Large Strings build, http://nsis.sourceforge.net/Special_Builds
|
# - 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)
|
# - 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.
|
# files found in Stub.
|
||||||
#
|
#
|
||||||
# based on: http://nsis.sourceforge.net/A_simple_installer_with_start_menu_shortcut_and_uninstaller
|
# based on: http://nsis.sourceforge.net/A_simple_installer_with_start_menu_shortcut_and_uninstaller
|
||||||
|
|
|
||||||
|
|
@ -478,7 +478,7 @@ func FindnodeAmplificationWrongIP(t *utesting.T) {
|
||||||
// If we receive a NEIGHBORS response, the attack worked and the test fails.
|
// If we receive a NEIGHBORS response, the attack worked and the test fails.
|
||||||
reply, _, _ := te.read(te.l2)
|
reply, _, _ := te.read(te.l2)
|
||||||
if reply != nil {
|
if reply != nil {
|
||||||
t.Error("Got NEIGHORS response for FINDNODE from wrong IP")
|
t.Error("Got NEIGHBORS response for FINDNODE from wrong IP")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ func Transition(ctx *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
body, _ := rlp.EncodeToBytes(txs)
|
body, _ := rlp.EncodeToBytes(txs)
|
||||||
// Dump the excution result
|
// Dump the execution result
|
||||||
collector := make(Alloc)
|
collector := make(Alloc)
|
||||||
s.DumpToCollector(collector, nil)
|
s.DumpToCollector(collector, nil)
|
||||||
return dispatchOutput(ctx, baseDir, result, collector, body)
|
return dispatchOutput(ctx, baseDir, result, collector, body)
|
||||||
|
|
|
||||||
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`.
|
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.
|
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`.
|
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
|
The alloc portion contains one contract (`0x000000000000000000000000000000000000aaaa`), containing the
|
||||||
following code: `0x5854505854`: `PC ;SLOAD; POP; PC; SLOAD`.
|
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`.
|
The alloc also contains some funds on `0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b`.
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ dir=./testdata/8 && ./evm t8n --state.fork=Berlin --input.alloc=$dir/alloc.json
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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 \
|
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
|
The alloc portion contains one contract (`0x000000000000000000000000000000000000aaaa`), containing the
|
||||||
following code: `0x58585454`: `PC; PC; SLOAD; SLOAD`.
|
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`.
|
The alloc also contains some funds on `0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ The `faucet` is a single binary app (everything included) with all configuration
|
||||||
|
|
||||||
First thing's 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:
|
First thing's 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 containin the network `genesis.json`
|
- `--genesis` is a path to a file containing the network `genesis.json`
|
||||||
- `--network` is the devp2p network id used during connection
|
- `--network` is the devp2p network id used during connection
|
||||||
- `--bootnodes` is a list of `enode://` ids to join the network through
|
- `--bootnodes` is a list of `enode://` ids to join the network through
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -533,7 +533,7 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
f.lock.Unlock()
|
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 !fund {
|
||||||
if err = sendError(wsconn, fmt.Errorf("%s left until next allowance", common.PrettyDuration(time.Until(timeout)))); err != nil { // nolint: gosimple
|
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)
|
log.Warn("Failed to send funding error to client", "err", err)
|
||||||
|
|
@ -645,7 +645,7 @@ func (f *faucet) loop() {
|
||||||
f.lock.RUnlock()
|
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 {
|
for {
|
||||||
select {
|
select {
|
||||||
case head := <-heads:
|
case head := <-heads:
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,7 @@ func setDefaultMumbaiGethConfig(ctx *cli.Context, config *gethConfig) {
|
||||||
config.Eth.SyncMode = downloader.FullSync
|
config.Eth.SyncMode = downloader.FullSync
|
||||||
config.Eth.NetworkId = 80001
|
config.Eth.NetworkId = 80001
|
||||||
config.Eth.Miner.GasCeil = 20000000
|
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.NoLocals = true
|
||||||
config.Eth.TxPool.AccountSlots = 16
|
config.Eth.TxPool.AccountSlots = 16
|
||||||
config.Eth.TxPool.GlobalSlots = 131072
|
config.Eth.TxPool.GlobalSlots = 131072
|
||||||
|
|
@ -343,7 +343,7 @@ func setDefaultBorMainnetGethConfig(ctx *cli.Context, config *gethConfig) {
|
||||||
config.Eth.SyncMode = downloader.FullSync
|
config.Eth.SyncMode = downloader.FullSync
|
||||||
config.Eth.NetworkId = 137
|
config.Eth.NetworkId = 137
|
||||||
config.Eth.Miner.GasCeil = 20000000
|
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.NoLocals = true
|
||||||
config.Eth.TxPool.AccountSlots = 16
|
config.Eth.TxPool.AccountSlots = 16
|
||||||
config.Eth.TxPool.GlobalSlots = 131072
|
config.Eth.TxPool.GlobalSlots = 131072
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
"name": "Geth DoS via MULMOD",
|
"name": "Geth DoS via MULMOD",
|
||||||
"uid": "GETH-2020-04",
|
"uid": "GETH-2020-04",
|
||||||
"summary": "A denial-of-service issue can be used to crash Geth nodes during block processing",
|
"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": [
|
"links": [
|
||||||
"https://blog.ethereum.org/2020/11/12/geth_security_release/",
|
"https://blog.ethereum.org/2020/11/12/geth_security_release/",
|
||||||
"https://github.com/ethereum/go-ethereum/security/advisories/GHSA-jm5c-rv3w-w83m",
|
"https://github.com/ethereum/go-ethereum/security/advisories/GHSA-jm5c-rv3w-w83m",
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ var (
|
||||||
Value: "",
|
Value: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
// UseHeimdallApp flag for using internall heimdall app to fetch data
|
// UseHeimdallApp flag for using internal heimdall app to fetch data
|
||||||
UseHeimdallAppFlag = cli.BoolFlag{
|
UseHeimdallAppFlag = cli.BoolFlag{
|
||||||
Name: "bor.useheimdallapp",
|
Name: "bor.useheimdallapp",
|
||||||
Usage: "Use child heimdall process to fetch data, Only works when bor.runheimdall is true",
|
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"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Validator represets Volatile state for each Validator
|
// Validator represents Volatile state for each Validator
|
||||||
type Validator struct {
|
type Validator struct {
|
||||||
ID uint64 `json:"ID"`
|
ID uint64 `json:"ID"`
|
||||||
Address common.Address `json:"signer"`
|
Address common.Address `json:"signer"`
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ func TestClique(t *testing.T) {
|
||||||
},
|
},
|
||||||
failure: errUnauthorizedSigner,
|
failure: errUnauthorizedSigner,
|
||||||
}, {
|
}, {
|
||||||
// An authorized signer that signed recenty should not be able to sign again
|
// An authorized signer that signed recently should not be able to sign again
|
||||||
signers: []string{"A", "B"},
|
signers: []string{"A", "B"},
|
||||||
votes: []testerVote{
|
votes: []testerVote{
|
||||||
{signer: "A"},
|
{signer: "A"},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue