Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.

Commit 227207f

Browse files
authored
Merge pull request #31 from makerdao/upgrade/v1.10.16
Upgrade/v1.10.16
2 parents ce4ab96 + 47b8165 commit 227207f

File tree

125 files changed

+3827
-1238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+3827
-1238
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
path = tests/testdata
33
url = https://github.com/ethereum/tests
44
shallow = true
5+
[submodule "evm-benchmarks"]
6+
path = tests/evm-benchmarks
7+
url = https://github.com/ipsilon/evm-benchmarks
8+
shallow = true

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file configures github.com/golangci/golangci-lint.
22

33
run:
4-
timeout: 5m
4+
timeout: 20m
55
tests: true
66
# default is true. Enables skipping of directories:
77
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ saving your blockchain as well as map the default ports. There is also an `alpin
174174
available for a slim version of the image.
175175

176176
Do not forget `--http.addr 0.0.0.0`, if you want to access RPC from other containers
177-
and/or hosts. By default, `geth` binds to the local interface and RPC endpoints is not
177+
and/or hosts. By default, `geth` binds to the local interface and RPC endpoints are not
178178
accessible from the outside.
179179

180180
### Programmatically interfacing `geth` nodes

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Audit reports are published in the `docs` folder: https://github.com/ethereum/go
1919

2020
**Please do not file a public ticket** mentioning the vulnerability.
2121

22-
To find out how to disclose a vulnerability in Ethereum visit [https://bounty.ethereum.org](https://bounty.ethereum.org) or email [email protected]. Please read the [disclosure page](https://github.com/ethereum/go-ethereum/security/advisories?state=published) for more information about publically disclosed security vulnerabilities.
22+
To find out how to disclose a vulnerability in Ethereum visit [https://bounty.ethereum.org](https://bounty.ethereum.org) or email [email protected]. Please read the [disclosure page](https://github.com/ethereum/go-ethereum/security/advisories?state=published) for more information about publicly disclosed security vulnerabilities.
2323

2424
Use the built-in `geth version-check` feature to check whether the software is affected by any known vulnerability. This command will fetch the latest [`vulnerabilities.json`](https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json) file which contains known security vulnerabilities concerning `geth`, and cross-check the data against its own version number.
2525

accounts/abi/argument.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,7 @@ func (arguments Arguments) Unpack(data []byte) ([]interface{}, error) {
8181
if len(arguments) != 0 {
8282
return nil, fmt.Errorf("abi: attempting to unmarshall an empty string while arguments are expected")
8383
}
84-
// Nothing to unmarshal, return default variables
85-
nonIndexedArgs := arguments.NonIndexed()
86-
defaultVars := make([]interface{}, len(nonIndexedArgs))
87-
for index, arg := range nonIndexedArgs {
88-
defaultVars[index] = reflect.New(arg.Type.GetType())
89-
}
90-
return defaultVars, nil
84+
return make([]interface{}, 0), nil
9185
}
9286
return arguments.UnpackValues(data)
9387
}

accounts/abi/bind/backends/simulated.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ func (b *SimulatedBackend) TransactionReceipt(ctx context.Context, txHash common
230230
defer b.mu.Unlock()
231231

232232
receipt, _, _, _ := rawdb.ReadReceipt(b.database, txHash, b.config)
233+
if receipt == nil {
234+
return nil, ethereum.NotFound
235+
}
233236
return receipt, nil
234237
}
235238

@@ -639,25 +642,24 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
639642
}
640643

641644
// SendTransaction updates the pending block to include the given transaction.
642-
// It panics if the transaction is invalid.
643645
func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error {
644646
b.mu.Lock()
645647
defer b.mu.Unlock()
646648

647649
// Get the last block
648650
block, err := b.blockByHash(ctx, b.pendingBlock.ParentHash())
649651
if err != nil {
650-
panic("could not fetch parent")
652+
return fmt.Errorf("could not fetch parent")
651653
}
652654
// Check transaction validity
653655
signer := types.MakeSigner(b.blockchain.Config(), block.Number())
654656
sender, err := types.Sender(signer, tx)
655657
if err != nil {
656-
panic(fmt.Errorf("invalid transaction: %v", err))
658+
return fmt.Errorf("invalid transaction: %v", err)
657659
}
658660
nonce := b.pendingState.GetNonce(sender)
659661
if tx.Nonce() != nonce {
660-
panic(fmt.Errorf("invalid transaction nonce: got %d, want %d", tx.Nonce(), nonce))
662+
return fmt.Errorf("invalid transaction nonce: got %d, want %d", tx.Nonce(), nonce)
661663
}
662664
// Include tx in chain
663665
blocks, _ := core.GenerateChain(b.config, block, ethash.NewFaker(), b.database, 1, func(number int, block *core.BlockGen) {

accounts/abi/bind/util.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"errors"
2222
"time"
2323

24+
"github.com/ethereum/go-ethereum"
2425
"github.com/ethereum/go-ethereum/common"
2526
"github.com/ethereum/go-ethereum/core/types"
2627
"github.com/ethereum/go-ethereum/log"
@@ -35,14 +36,16 @@ func WaitMined(ctx context.Context, b DeployBackend, tx *types.Transaction) (*ty
3536
logger := log.New("hash", tx.Hash())
3637
for {
3738
receipt, err := b.TransactionReceipt(ctx, tx.Hash())
38-
if receipt != nil {
39+
if err == nil {
3940
return receipt, nil
4041
}
41-
if err != nil {
42-
logger.Trace("Receipt retrieval failed", "err", err)
43-
} else {
42+
43+
if errors.Is(err, ethereum.NotFound) {
4444
logger.Trace("Transaction not yet mined")
45+
} else {
46+
logger.Trace("Receipt retrieval failed", "err", err)
4547
}
48+
4649
// Wait for the next round.
4750
select {
4851
case <-ctx.Done():

accounts/accounts.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const (
4646
// accounts (derived from the same seed).
4747
type Wallet interface {
4848
// URL retrieves the canonical path under which this wallet is reachable. It is
49-
// user by upper layers to define a sorting order over all wallets from multiple
49+
// used by upper layers to define a sorting order over all wallets from multiple
5050
// backends.
5151
URL() URL
5252

@@ -89,7 +89,7 @@ type Wallet interface {
8989
// accounts.
9090
//
9191
// Note, self derivation will increment the last component of the specified path
92-
// opposed to decending into a child path to allow discovering accounts starting
92+
// opposed to descending into a child path to allow discovering accounts starting
9393
// from non zero components.
9494
//
9595
// Some hardware wallets switched derivation paths through their evolution, so
@@ -105,7 +105,7 @@ type Wallet interface {
105105
// or optionally with the aid of any location metadata from the embedded URL field.
106106
//
107107
// If the wallet requires additional authentication to sign the request (e.g.
108-
// a password to decrypt the account, or a PIN code o verify the transaction),
108+
// a password to decrypt the account, or a PIN code to verify the transaction),
109109
// an AuthNeededError instance will be returned, containing infos for the user
110110
// about which fields or actions are needed. The user may retry by providing
111111
// the needed details via SignDataWithPassphrase, or by other means (e.g. unlock
@@ -124,13 +124,13 @@ type Wallet interface {
124124
// or optionally with the aid of any location metadata from the embedded URL field.
125125
//
126126
// If the wallet requires additional authentication to sign the request (e.g.
127-
// a password to decrypt the account, or a PIN code o verify the transaction),
127+
// a password to decrypt the account, or a PIN code to verify the transaction),
128128
// an AuthNeededError instance will be returned, containing infos for the user
129129
// about which fields or actions are needed. The user may retry by providing
130130
// the needed details via SignTextWithPassphrase, or by other means (e.g. unlock
131131
// the account in a keystore).
132132
//
133-
// This method should return the signature in 'canonical' format, with v 0 or 1
133+
// This method should return the signature in 'canonical' format, with v 0 or 1.
134134
SignText(account Account, text []byte) ([]byte, error)
135135

136136
// SignTextWithPassphrase is identical to Signtext, but also takes a password

accounts/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var ErrInvalidPassphrase = errors.New("invalid password")
4242
var ErrWalletAlreadyOpen = errors.New("wallet already open")
4343

4444
// ErrWalletClosed is returned if a wallet is attempted to be opened the
45-
// secodn time.
45+
// second time.
4646
var ErrWalletClosed = errors.New("wallet closed")
4747

4848
// AuthNeededError is returned by backends for signing requests where the user

accounts/scwallet/wallet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ func (w *Wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Accoun
638638
// accounts.
639639
//
640640
// Note, self derivation will increment the last component of the specified path
641-
// opposed to decending into a child path to allow discovering accounts starting
641+
// opposed to descending into a child path to allow discovering accounts starting
642642
// from non zero components.
643643
//
644644
// Some hardware wallets switched derivation paths through their evolution, so

0 commit comments

Comments
 (0)