Skip to content

Commit

Permalink
Stable 2021 10 02 (#2794)
Browse files Browse the repository at this point in the history
* begin 2021.10.2 release cycle

* Revert "rpcdaemon: (#2752)" (#2762)

This reverts commit 2afd028.

* Pool v2: --txpool.pricelimit support (#2763)

* --txpoo.pricelimit support

* Pool v2: --txpool.accountslots flag support (#2765)

* Update signal_windows.go (#2767)

Trap os.interrupt instead of SIGINT and SIGTERM

* Update stage_finish.go : notifications to rpc daemon (#2755)

* Dockerfile: switch to go1.17 and alpine3.14 (#2766)

* add logs in recoverFromDb func (#2769)

* eip 1559 in miner (#2773)

* Inner errors (#2774)

* Clean up DEBUG category logs (#2776)

- move many DEBUG logs into TRACE category

* Decoding incarnation implemented (#2764)

* WIP decoding incarnation specifically

* Changed decodeIncarnation to be an external function

* added tests to for decoding incarnations

* ran gofmt -w -s

* changed test name, and changed incarnations to 4

* Created a test which tests if it returns an error when there is one

* ran gofmt

* Capitalized all tests and made breaking test

* added an error check

* changed decodingForStorage for decodingIncarnationFromStorage

* ran gofmt -w -s

* No senders is fine (#2775)

* IntermediateHash stage - switch from incremental to re-generate mode - if jump > 100K blocks (#2781)

* Enable "State stream" by default (#2780)

* No json rpc streaming (#2779)

* reduce_bach_concurrency_default

* RPCDaemon: reduce --rpc.batch.concurrency default from 50 to 2 (#2784)

* Integration to print right stage in logs (#2785)

* remove debug prints

* RemoteDB: don't spend time to close cursors on end of tx - server will cleanup everything well (#2786)

* Fermion genesis block (#2787)

* updated Fermion genesis block

* Updated Fermion genesis block: added precompiles

* Rpcdaemon: add  --tevm flag to enable experiment (#2788)

* Reworkings of state compression experiments (#2790)

* Changes

* Progress

* Another way

* More

* More

* Produce encoding

* Add uncoded characters

* cleanup

* Add sortdict

* Fixes

* Use patricia from erigon-lib

* Cleanup

* Switch to dynamic programming, optimise allocations in FindMatches

* Optimise allocations

* Reduce allocations

* Switch to main branch of erigon-lib, reduce allocations further

Co-authored-by: Alexey Sharp <[email protected]>
Co-authored-by: Alex Sharp <[email protected]>

* Ignore MaxPeers param for staticpeers (#2789)

Co-authored-by: Aleksandr Borodulin <[email protected]>

* less warnings

* Update skip_analysis.go (#2792)

* Extend preverified hashes for mainnet and ropsten (#2793)

Co-authored-by: Alexey Sharp <[email protected]>

Co-authored-by: Alex Sharov <[email protected]>
Co-authored-by: Andrea Lanfranchi <[email protected]>
Co-authored-by: Enrique Jose  Avila Asapche <[email protected]>
Co-authored-by: e-danko <[email protected]>
Co-authored-by: ledgerwatch <[email protected]>
Co-authored-by: Alexey Sharp <[email protected]>
Co-authored-by: Alex Sharp <[email protected]>
Co-authored-by: Alexandr Borodulin <[email protected]>
Co-authored-by: Aleksandr Borodulin <[email protected]>
  • Loading branch information
10 people authored Oct 7, 2021
1 parent ef80fd5 commit 8b4d31f
Show file tree
Hide file tree
Showing 154 changed files with 3,844 additions and 1,642 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM docker.io/library/golang:1.16-alpine3.13 AS builder
FROM docker.io/library/golang:1.17-alpine3.14 AS builder

RUN apk --no-cache add make gcc g++ linux-headers git bash ca-certificates libgcc libstdc++

Expand All @@ -9,7 +9,7 @@ ADD . .
# expect that host run `git submodule update --init`
RUN make erigon rpcdaemon integration sentry

FROM docker.io/library/alpine:3.13
FROM docker.io/library/alpine:3.14

RUN apk add --no-cache ca-certificates libgcc libstdc++ tzdata
COPY --from=builder /app/build/bin/* /usr/local/bin/
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/argument.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (argument *Argument) UnmarshalJSON(data []byte) error {
var arg ArgumentMarshaling
err := json.Unmarshal(data, &arg)
if err != nil {
return fmt.Errorf("argument json err: %v", err)
return fmt.Errorf("argument json err: %w", err)
}

argument.Type, err = NewType(arg.Type, arg.InternalType, arg.Components)
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/backends/simulated.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ func (b *SimulatedBackend) SendTransaction(ctx context.Context, tx types.Transac
signer := types.MakeSigner(b.m.ChainConfig, b.pendingBlock.NumberU64())
sender, senderErr := tx.Sender(*signer)
if senderErr != nil {
return fmt.Errorf("invalid transaction: %v", senderErr)
return fmt.Errorf("invalid transaction: %w", senderErr)
}
nonce := b.pendingState.GetNonce(sender)
if tx.GetNonce() != nonce {
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/bind/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
if opts.Nonce == nil {
nonce, err = c.transactor.PendingNonceAt(ensureContext(opts.Context), opts.From)
if err != nil {
return nil, fmt.Errorf("failed to retrieve account nonce: %v", err)
return nil, fmt.Errorf("failed to retrieve account nonce: %w", err)
}
} else {
nonce = opts.Nonce.Uint64()
Expand Down Expand Up @@ -252,7 +252,7 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
msg := ethereum.CallMsg{From: opts.From, To: contract, GasPrice: gasPrice, Value: value, Data: input}
gasLimit, err = c.transactor.EstimateGas(ensureContext(opts.Context), msg)
if err != nil {
return nil, fmt.Errorf("failed to estimate gas needed: %v", err)
return nil, fmt.Errorf("failed to estimate gas needed: %w", err)
}
}
// Create the transaction, sign it and schedule it for execution
Expand Down
2 changes: 1 addition & 1 deletion accounts/abi/bind/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]
if lang == LangGo {
code, err := format.Source(buffer.Bytes())
if err != nil {
return "", fmt.Errorf("%v\n%s", err, buffer)
return "", fmt.Errorf("%w\n%s", err, buffer)
}
return string(code), nil
}
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
typ.Elem = &embeddedType
typ.Size, err = strconv.Atoi(intz[0])
if err != nil {
return Type{}, fmt.Errorf("abi: error parsing variable size: %v", err)
return Type{}, fmt.Errorf("abi: error parsing variable size: %w", err)
}
typ.stringKind = embeddedType.stringKind + sliced
} else {
Expand All @@ -124,7 +124,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
var err error
varSize, err = strconv.Atoi(parsedType[2])
if err != nil {
return Type{}, fmt.Errorf("abi: error parsing variable size: %v", err)
return Type{}, fmt.Errorf("abi: error parsing variable size: %w", err)
}
} else {
if parsedType[0] == "uint" || parsedType[0] == "int" {
Expand Down
4 changes: 2 additions & 2 deletions accounts/abi/unpack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ type unpackTest struct {
func (test unpackTest) checkError(err error) error {
if err != nil {
if len(test.err) == 0 {
return fmt.Errorf("expected no err but got: %v", err)
return fmt.Errorf("expected no err but got: %w", err)
} else if err.Error() != test.err {
return fmt.Errorf("expected err: '%v' got err: %q", test.err, err)
return fmt.Errorf("expected err: '%v' got err: %w", test.err, err)
}
} else if len(test.err) > 0 {
return fmt.Errorf("expected err: %v but got none", test.err)
Expand Down
14 changes: 7 additions & 7 deletions cmd/hack/db/lmdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,13 +945,13 @@ func TextInfo(chaindata string, visStream io.Writer) error {

f, err := os.Open(datafile)
if err != nil {
return fmt.Errorf("opening %v: %v", MdbxDataFile, err)
return fmt.Errorf("opening %v: %w", MdbxDataFile, err)
}
defer f.Close()
var meta [PageSize]byte
// Read meta page 0
if _, err = f.ReadAt(meta[:], 0*PageSize); err != nil {
return fmt.Errorf("reading meta page 0: %v", err)
return fmt.Errorf("reading meta page 0: %w", err)
}

header1 := new(header)
Expand All @@ -967,12 +967,12 @@ func TextInfo(chaindata string, visStream io.Writer) error {
// meta1.print()

if err != nil {
return fmt.Errorf("reading meta page 0: %v", err)
return fmt.Errorf("reading meta page 0: %w", err)
}

// Read meta page 1
if _, err = f.ReadAt(meta[:], 1*PageSize); err != nil {
return fmt.Errorf("reading meta page 1: %v", err)
return fmt.Errorf("reading meta page 1: %w", err)
}

header2 := new(header)
Expand All @@ -988,7 +988,7 @@ func TextInfo(chaindata string, visStream io.Writer) error {
// meta2.print()

if err != nil {
return fmt.Errorf("reading meta page 1: %v", err)
return fmt.Errorf("reading meta page 1: %w", err)
}

var freeRoot, mainRoot uint32
Expand Down Expand Up @@ -1115,7 +1115,7 @@ func _conditions(f io.ReaderAt, visStream io.Writer, node *mdbx_node, _header *h
func readPages(f io.ReaderAt, visStream io.Writer, pgno uint32, blockID *int, parentBlock int, level *int) error {
var page [PageSize]byte
if _, err := f.ReadAt(page[:], int64(pgno*PageSize)); err != nil {
return fmt.Errorf("reading page: %v, error: %v", pgno, err)
return fmt.Errorf("reading page: %v, error: %w", pgno, err)
}

_header := new(header)
Expand Down Expand Up @@ -1193,7 +1193,7 @@ func readPages(f io.ReaderAt, visStream io.Writer, pgno uint32, blockID *int, pa
func freeDBPages(f io.ReaderAt, visStream io.Writer, freeRoot uint32) error {
var page [PageSize]byte
if _, err := f.ReadAt(page[:], int64(freeRoot*PageSize)); err != nil {
return fmt.Errorf("reading page: %v, error: %v", freeRoot, err)
return fmt.Errorf("reading page: %v, error: %w", freeRoot, err)
}

_header := new(header)
Expand Down
Loading

0 comments on commit 8b4d31f

Please sign in to comment.