Skip to content

Commit 80007e0

Browse files
committed
Merge tag 'v1.10.25'
2 parents 5fac5a2 + 69568c5 commit 80007e0

File tree

236 files changed

+3807
-2632
lines changed

Some content is hidden

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

236 files changed

+3807
-2632
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY go.sum /go-ethereum/
1414
RUN cd /go-ethereum && go mod download
1515

1616
ADD . /go-ethereum
17-
RUN cd /go-ethereum && go run build/ci.go install ./cmd/geth
17+
RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth
1818

1919
# Pull Geth into a second stage deploy alpine container
2020
FROM alpine:latest

Dockerfile.alltools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY go.sum /go-ethereum/
1414
RUN cd /go-ethereum && go mod download
1515

1616
ADD . /go-ethereum
17-
RUN cd /go-ethereum && go run build/ci.go install
17+
RUN cd /go-ethereum && go run build/ci.go install -static
1818

1919
# Pull all binaries into a second stage deploy alpine container
2020
FROM alpine:latest

accounts/abi/abi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (abi ABI) getArguments(name string, data []byte) (Arguments, error) {
9595
args = event.Inputs
9696
}
9797
if args == nil {
98-
return nil, errors.New("abi: could not locate named method or event")
98+
return nil, fmt.Errorf("abi: could not locate named method or event: %s", name)
9999
}
100100
return args, nil
101101
}

accounts/abi/bind/backends/simulated.go

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ type SimulatedBackend struct {
6868
pendingState *state.StateDB // Currently pending state that will be the active on request
6969
pendingReceipts types.Receipts // Currently receipts for the pending block
7070

71-
events *filters.EventSystem // Event system for filtering log events live
71+
events *filters.EventSystem // for filtering log events live
72+
filterSystem *filters.FilterSystem // for filtering database logs
7273

7374
config *params.ChainConfig
7475
}
@@ -86,7 +87,11 @@ func NewSimulatedBackendWithDatabase(database ethdb.Database, alloc core.Genesis
8687
blockchain: blockchain,
8788
config: genesis.Config,
8889
}
89-
backend.events = filters.NewEventSystem(&filterBackend{database, blockchain, backend}, false)
90+
91+
filterBackend := &filterBackend{database, blockchain, backend}
92+
backend.filterSystem = filters.NewFilterSystem(filterBackend, filters.Config{})
93+
backend.events = filters.NewEventSystem(backend.filterSystem, false)
94+
9095
backend.rollback(blockchain.CurrentBlock())
9196
return backend
9297
}
@@ -609,7 +614,7 @@ func (b *SimulatedBackend) callContract(ctx context.Context, call ethereum.CallM
609614
// User specified the legacy gas field, convert to 1559 gas typing
610615
call.GasFeeCap, call.GasTipCap = call.GasPrice, call.GasPrice
611616
} else {
612-
// User specified 1559 gas feilds (or none), use those
617+
// User specified 1559 gas fields (or none), use those
613618
if call.GasFeeCap == nil {
614619
call.GasFeeCap = new(big.Int)
615620
}
@@ -689,7 +694,7 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter
689694
var filter *filters.Filter
690695
if query.BlockHash != nil {
691696
// Block filter requested, construct a single-shot filter
692-
filter = filters.NewBlockFilter(&filterBackend{b.database, b.blockchain, b}, *query.BlockHash, query.Addresses, query.Topics)
697+
filter = b.filterSystem.NewBlockFilter(*query.BlockHash, query.Addresses, query.Topics)
693698
} else {
694699
// Initialize unset filter boundaries to run from genesis to chain head
695700
from := int64(0)
@@ -701,7 +706,7 @@ func (b *SimulatedBackend) FilterLogs(ctx context.Context, query ethereum.Filter
701706
to = query.ToBlock.Int64()
702707
}
703708
// Construct the range filter
704-
filter = filters.NewRangeFilter(&filterBackend{b.database, b.blockchain, b}, from, to, query.Addresses, query.Topics)
709+
filter = b.filterSystem.NewRangeFilter(from, to, query.Addresses, query.Topics)
705710
}
706711
// Run the filter and return all the logs
707712
logs, err := filter.Logs(ctx)
@@ -830,7 +835,8 @@ type filterBackend struct {
830835
backend *SimulatedBackend
831836
}
832837

833-
func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
838+
func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
839+
834840
func (fb *filterBackend) EventMux() *event.TypeMux { panic("not supported") }
835841

836842
func (fb *filterBackend) HeaderByNumber(ctx context.Context, block rpc.BlockNumber) (*types.Header, error) {
@@ -856,19 +862,8 @@ func (fb *filterBackend) GetReceipts(ctx context.Context, hash common.Hash) (typ
856862
return rawdb.ReadReceipts(fb.db, hash, *number, fb.bc.Config()), nil
857863
}
858864

859-
func (fb *filterBackend) GetLogs(ctx context.Context, hash common.Hash) ([][]*types.Log, error) {
860-
number := rawdb.ReadHeaderNumber(fb.db, hash)
861-
if number == nil {
862-
return nil, nil
863-
}
864-
receipts := rawdb.ReadReceipts(fb.db, hash, *number, fb.bc.Config())
865-
if receipts == nil {
866-
return nil, nil
867-
}
868-
logs := make([][]*types.Log, len(receipts))
869-
for i, receipt := range receipts {
870-
logs[i] = receipt.Logs
871-
}
865+
func (fb *filterBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error) {
866+
logs := rawdb.ReadLogs(fb.db, hash, number, fb.bc.Config())
872867
return logs, nil
873868
}
874869

accounts/abi/reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func mustArrayToByteSlice(value reflect.Value) reflect.Value {
9999
func set(dst, src reflect.Value) error {
100100
dstType, srcType := dst.Type(), src.Type()
101101
switch {
102-
case dstType.Kind() == reflect.Interface && dst.Elem().IsValid():
102+
case dstType.Kind() == reflect.Interface && dst.Elem().IsValid() && (dst.Elem().Type().Kind() == reflect.Ptr || dst.Elem().CanSet()):
103103
return set(dst.Elem(), src)
104104
case dstType.Kind() == reflect.Ptr && dstType.Elem() != reflect.TypeOf(big.Int{}):
105105
return set(dst.Elem(), src)

accounts/abi/reflect_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type reflectTest struct {
3232

3333
var reflectTests = []reflectTest{
3434
{
35-
name: "OneToOneCorrespondance",
35+
name: "OneToOneCorrespondence",
3636
args: []string{"fieldA"},
3737
struc: struct {
3838
FieldA int `abi:"fieldA"`

accounts/abi/unpack_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ func TestMethodMultiReturn(t *testing.T) {
352352
&[]interface{}{&expected.Int, &expected.String},
353353
"",
354354
"Can unpack into a slice",
355+
}, {
356+
&[]interface{}{&bigint, ""},
357+
&[]interface{}{&expected.Int, expected.String},
358+
"",
359+
"Can unpack into a slice without indirection",
355360
}, {
356361
&[2]interface{}{&bigint, new(string)},
357362
&[2]interface{}{&expected.Int, &expected.String},

accounts/keystore/account_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func waitForAccounts(wantAccounts []accounts.Account, ks *KeyStore) error {
318318
func TestUpdatedKeyfileContents(t *testing.T) {
319319
t.Parallel()
320320

321-
// Create a temporary kesytore to test with
321+
// Create a temporary keystore to test with
322322
rand.Seed(time.Now().UnixNano())
323323
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
324324
ks := NewKeyStore(dir, LightScryptN, LightScryptP)

accounts/keystore/file_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type fileCache struct {
3939
func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, error) {
4040
t0 := time.Now()
4141

42-
// List all the failes from the keystore folder
42+
// List all the files from the keystore folder
4343
files, err := os.ReadDir(keyDir)
4444
if err != nil {
4545
return nil, nil, nil, err
@@ -61,7 +61,7 @@ func (fc *fileCache) scan(keyDir string) (mapset.Set, mapset.Set, mapset.Set, er
6161
log.Trace("Ignoring file on account scan", "path", path)
6262
continue
6363
}
64-
// Gather the set of all and fresly modified files
64+
// Gather the set of all and freshly modified files
6565
all.Add(path)
6666

6767
info, err := fi.Info()

accounts/keystore/keystore_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func TestSignRace(t *testing.T) {
214214
// Tests that the wallet notifier loop starts and stops correctly based on the
215215
// addition and removal of wallet event subscriptions.
216216
func TestWalletNotifierLifecycle(t *testing.T) {
217-
// Create a temporary kesytore to test with
217+
// Create a temporary keystore to test with
218218
_, ks := tmpKeyStore(t, false)
219219

220220
// Ensure that the notification updater is not running yet

accounts/usbwallet/trezor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ func (w *trezorDriver) trezorDerive(derivationPath []uint32) (common.Address, er
196196
if _, err := w.trezorExchange(&trezor.EthereumGetAddress{AddressN: derivationPath}, address); err != nil {
197197
return common.Address{}, err
198198
}
199-
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary fomats
199+
if addr := address.GetAddressBin(); len(addr) > 0 { // Older firmwares use binary formats
200200
return common.BytesToAddress(addr), nil
201201
}
202-
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal fomats
202+
if addr := address.GetAddressHex(); len(addr) > 0 { // Newer firmwares use hexadecimal formats
203203
return common.HexToAddress(addr), nil
204204
}
205205
return common.Address{}, errors.New("missing derived address")

accounts/usbwallet/wallet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ func (w *wallet) selfDerive() {
380380
// of legacy-ledger, the first account on the legacy-path will
381381
// be shown to the user, even if we don't actively track it
382382
if i < len(nextAddrs)-1 {
383-
w.log.Info("Skipping trakcking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
383+
w.log.Info("Skipping tracking first account on legacy path, use personal.deriveAccount(<url>,<path>, false) to track",
384384
"path", path, "address", nextAddrs[i])
385385
break
386386
}

arbitrum/apibackend.go

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,28 @@ type SyncProgressBackend interface {
8383
SyncProgressMap() map[string]interface{}
8484
}
8585

86-
func createRegisterAPIBackend(backend *Backend, sync SyncProgressBackend, fallbackClientUrl string, fallbackClientTimeout time.Duration) error {
86+
func createRegisterAPIBackend(backend *Backend, sync SyncProgressBackend, filterConfig filters.Config, fallbackClientUrl string, fallbackClientTimeout time.Duration) (*filters.FilterSystem, error) {
8787
fallbackClient, err := CreateFallbackClient(fallbackClientUrl, fallbackClientTimeout)
8888
if err != nil {
89-
return err
89+
return nil, err
9090
}
9191
backend.apiBackend = &APIBackend{
9292
b: backend,
9393
fallbackClient: fallbackClient,
9494
sync: sync,
9595
}
96-
backend.stack.RegisterAPIs(backend.apiBackend.GetAPIs())
97-
return nil
96+
filterSystem := filters.NewFilterSystem(backend.apiBackend, filterConfig)
97+
backend.stack.RegisterAPIs(backend.apiBackend.GetAPIs(filterSystem))
98+
return filterSystem, nil
9899
}
99100

100-
func (a *APIBackend) GetAPIs() []rpc.API {
101+
func (a *APIBackend) GetAPIs(filterSystem *filters.FilterSystem) []rpc.API {
101102
apis := ethapi.GetAPIs(a)
102103

103104
apis = append(apis, rpc.API{
104105
Namespace: "eth",
105106
Version: "1.0",
106-
Service: filters.NewFilterAPI(a, false, 5*time.Minute),
107+
Service: filters.NewFilterAPI(filterSystem, false),
107108
Public: true,
108109
})
109110

@@ -491,16 +492,8 @@ func (a *APIBackend) BloomStatus() (uint64, uint64) {
491492
return a.b.config.BloomBitsBlocks, sections
492493
}
493494

494-
func (a *APIBackend) GetLogs(ctx context.Context, blockHash common.Hash) ([][]*types.Log, error) {
495-
receipts := a.blockChain().GetReceiptsByHash(blockHash)
496-
if receipts == nil {
497-
return nil, nil
498-
}
499-
logs := make([][]*types.Log, len(receipts))
500-
for i, receipt := range receipts {
501-
logs[i] = receipt.Logs
502-
}
503-
return logs, nil
495+
func (a *APIBackend) GetLogs(ctx context.Context, hash common.Hash, number uint64) ([][]*types.Log, error) {
496+
return rawdb.ReadLogs(a.ChainDb(), hash, number, a.ChainConfig()), nil
504497
}
505498

506499
func (a *APIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) {

arbitrum/backend.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/ethereum/go-ethereum/core"
77
"github.com/ethereum/go-ethereum/core/bloombits"
88
"github.com/ethereum/go-ethereum/core/types"
9+
"github.com/ethereum/go-ethereum/eth/filters"
910
"github.com/ethereum/go-ethereum/ethdb"
1011
"github.com/ethereum/go-ethereum/event"
1112
"github.com/ethereum/go-ethereum/internal/shutdowncheck"
@@ -32,7 +33,7 @@ type Backend struct {
3233
chanNewBlock chan struct{} //create new L2 block unless empty
3334
}
3435

35-
func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publisher ArbInterface, sync SyncProgressBackend) (*Backend, error) {
36+
func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publisher ArbInterface, sync SyncProgressBackend, filterConfig filters.Config) (*Backend, *filters.FilterSystem, error) {
3637
backend := &Backend{
3738
arb: publisher,
3839
stack: stack,
@@ -50,12 +51,12 @@ func NewBackend(stack *node.Node, config *Config, chainDb ethdb.Database, publis
5051
}
5152

5253
backend.bloomIndexer.Start(backend.arb.BlockChain())
53-
err := createRegisterAPIBackend(backend, sync, config.ClassicRedirect, config.ClassicRedirectTimeout)
54+
filterSystem, err := createRegisterAPIBackend(backend, sync, filterConfig, config.ClassicRedirect, config.ClassicRedirectTimeout)
5455
if err != nil {
55-
return nil, err
56+
return nil, nil, err
5657
}
5758
backend.shutdownTracker.MarkStartup()
58-
return backend, nil
59+
return backend, filterSystem, nil
5960
}
6061

6162
func (b *Backend) APIBackend() *APIBackend {

build/checksums.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# This file contains sha256 checksums of optional build dependencies.
22

3-
4525aa6b0e3cecb57845f4060a7075aafc9ab752bb7b6b4cf8a212d43078e1e4 go1.18.4.src.tar.gz
4-
315e1a2b21a827c68da1b7f492b5dcbe81d8df8a79ebe50922df9588893f87f0 go1.18.4.darwin-amd64.tar.gz
5-
04eed623d5143ffa44965b618b509e0beccccfd3a4a1bfebc0cdbcf906046769 go1.18.4.darwin-arm64.tar.gz
6-
e5244fdcd6b6eaf785dbd8c6e02b4804a4d00409e7edecc63cd59fc8f37c34c5 go1.18.4.freebsd-386.tar.gz
7-
fb00f8aaffcc80e0a2bd39db1d8e8e21ef0a691c564f7b7601383dd6adad4042 go1.18.4.freebsd-amd64.tar.gz
8-
418232d905e18ece6cb13c4884bb1c68963d7d3b4d889671b3e5be8bd4059862 go1.18.4.linux-386.tar.gz
9-
c9b099b68d93f5c5c8a8844a89f8db07eaa58270e3a1e01804f17f4cf8df02f5 go1.18.4.linux-amd64.tar.gz
10-
35014d92b50d97da41dade965df7ebeb9a715da600206aa59ce1b2d05527421f go1.18.4.linux-arm64.tar.gz
11-
7dfeab572e49638b0f3d9901457f0622c27b73301c2b99db9f5e9568ff40460c go1.18.4.linux-armv6l.tar.gz
12-
f80acc4dc054ddc89ccc4869664e331bf16e0ac6e07830e94554162e66f66961 go1.18.4.linux-ppc64le.tar.gz
13-
7e932f36e8f347feea2e706dcd32c1a464b1e5767ab2928ae460a37a975fe4a3 go1.18.4.linux-s390x.tar.gz
14-
6343010a13ab783e553786b3cc3b4d63080128f61cf1e963505139c71ca66a0d go1.18.4.windows-386.zip
15-
dfb93c517e050ba0cfc066802b38a8e7cda2ef666efd634859356b33f543cc49 go1.18.4.windows-amd64.zip
16-
7d0d7b73592019d276f2bd44ee3cda0d8bd99356fdbf04fdb40c263518108ae4 go1.18.4.windows-arm64.zip
3+
9920d3306a1ac536cdd2c796d6cb3c54bc559c226fc3cc39c32f1e0bd7f50d2a go1.18.5.src.tar.gz
4+
828eeca8b5abea3e56921df8fa4b1101380a5ebcfee10acbc8ffe7ec0bf5876b go1.18.5.darwin-amd64.tar.gz
5+
923a377c6fc9a2c789f5db61c24b8f64133f7889056897449891f256af34065f go1.18.5.darwin-arm64.tar.gz
6+
c3d90264a706e2d88cfb44126dc6f0d008a48f00732e04bc377cea1a2b716a7c go1.18.5.freebsd-386.tar.gz
7+
0de23843c568d388bc0f0e390a8966938cccaae0d74b698325f7175bac04e0c6 go1.18.5.freebsd-amd64.tar.gz
8+
0c44f85d146c6f98c34e8ff436a42af22e90e36fe232d3d9d3101f23fd61362b go1.18.5.linux-386.tar.gz
9+
9e5de37f9c49942c601b191ac5fba404b868bfc21d446d6960acc12283d6e5f2 go1.18.5.linux-amd64.tar.gz
10+
006f6622718212363fa1ff004a6ab4d87bbbe772ec5631bab7cac10be346e4f1 go1.18.5.linux-arm64.tar.gz
11+
d5ac34ac5f060a5274319aa04b7b11e41b123bd7887d64efb5f44ead236957af go1.18.5.linux-armv6l.tar.gz
12+
2e37fb9c7cbaedd4e729492d658aa4cde821fc94117391a8105c13b25ca1c84b go1.18.5.linux-ppc64le.tar.gz
13+
e3d536e7873639f85353e892444f83b14cb6670603961f215986ae8e28e8e07a go1.18.5.linux-s390x.tar.gz
14+
7b3142ec0c5db991e7f73a231662a92429b90ee151fe47557acb566d8d9ae4d3 go1.18.5.windows-386.zip
15+
73753620602d4b4469770040c53db55e5dd6af2ad07ecc18f71f164c3224eaad go1.18.5.windows-amd64.zip
16+
4d154626affff12ef73ea1017af0e5b52dbc839ef92f6f9e76cf4f71278a5744 go1.18.5.windows-arm64.zip
1717

1818
658078aaaf7608693f37c4cf1380b2af418ab8b2d23fdb33e7e2d4339328590e golangci-lint-1.46.2-darwin-amd64.tar.gz
1919
81f9b4afd62ec5e612ef8bc3b1d612a88b56ff289874831845cdad394427385f golangci-lint-1.46.2-darwin-arm64.tar.gz

0 commit comments

Comments
 (0)