Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/vm: use optimized bigint #26021

Merged
merged 1 commit into from
Oct 27, 2022
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Oct 21, 2022

This PR changes the precompile to use a more optimized version of big.Int

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link

@mohammadfarari1360 mohammadfarari1360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

@holiman holiman added this to the 1.11.0 milestone Oct 25, 2022
@holiman holiman merged commit 9d795d0 into ethereum:master Oct 27, 2022
roberto-bayardo added a commit to mdehoog/go-ethereum that referenced this pull request Nov 4, 2022
* cmd. core: save preimages on genesis creation (ethereum#25538)

force preimage dump for genesis

* rlp/rlpgen: fix error handling when target type not found (ethereum#25547)

typ will be nil when lookupStructType returns an error. cfg.Type should be used instead.

* trie: improve node rlp decoding performance (ethereum#25357)

This avoids copying the input []byte while decoding trie nodes. In most
cases, particularly when the input slice is provided by the underlying
database, this optimization is safe to use.

For cases where the origin of the input slice is unclear, the copying version
is retained. The new code performs better even when the input must be
copied, because it is now only copied once in decodeNode.

* all: fix some typos (ethereum#25551)

* Fix some typos

* Fix some mistakes

* Revert 4byte.json

* Fix an incorrect fix

* Change files to fails

* internal/ethapi: fix comment typo (ethereum#25548)

* accounts/abi/bind/backends: typo fix (ethereum#25549)

* eth, les: unlock downloader peerSet if there's an error (ethereum#25546)

Unlock peerSet if there's an error in the downloader

* cmd/geth: parse uint64 value with ParseUint instead of Atoi (ethereum#25545)

Parse uint64 value with ParseUint instead of Atoi

* consensus/beacon: check ttd reached on pos blocks (ethereum#25552)

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* eth/filters: add global block logs cache (ethereum#25459)

This adds a cache for block logs which is shared by all filters. The cache
size of is configurable using the `--cache.blocklogs` flag.

Co-authored-by: Felix Lange <[email protected]>

* accounts/abi: fix set function (ethereum#25477)

* accounts/abi: fix set function

* don't break things

* update test

* internal/ethapi: fix build regression (ethereum#25555)

* eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)

* eth/fetcher: introduce some lag in tx fetching

* eth/fetcher: change conditions a bit

* eth/fetcher: use per-batch quota check

* eth/fetcher: fix some comments

* eth/fetcher: address review concerns

* eth/fetcher: fix panic + add warn log

* eth/fetcher: fix log

* eth/fetcher: fix log

* cmd/devp2p/internal/ethtest: fix ignorign tx announcements from prev. tests

* cmd/devp2p/internal/ethtest: fix TestLargeTxRequest

This increases the number of tx relay messages the test waits for. Since
go-ethereum now processes incoming txs in smaller batches, the
announcement messages it sends are also smaller.

Co-authored-by: Felix Lange <[email protected]>

* Revert "eth/fetcher: don't spend too much time on transaction inclusion" (ethereum#25567)

Revert "eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)"

This reverts commit 0ce494b.

* eth/catalyst: warn less frequently if no beacon client is available (ethereum#25569)

* eth/catalyst: warn less frequently if no beacon client is available

* eth/catalyst: tweak warning frequency a bit

* eth/catalyst: some more tweaks

* Update api.go

Co-authored-by: Felix Lange <[email protected]>

* params: release go-ethereum v1.10.22

* params: begin v1.10.23 release cycle

* core, eth/downloader: handle spurious junk bodies from racey rollbacks (ethereum#25578)

* eth/downloader: handle junkbodies/receipts in the beacon sync

* core: check for header presence when checking for blocks

* core/state, trie: fix trie flush order for proper pruning

* consensus/beacon: don't ignore errors

* params: release Geth v1.10.23

* params: begin v1.10.24 release cycle

* params: begin go-ethereum v1.11 release cycle

* internal/ethapi: rename debug getters to match spec (ethereum#25176)

Some small fixes to get the existing debug methods to conform to the spec. Mainly dropping the encoding information from the method name as it should be deduced from the debug context and allowing the method to be invoked by either block number or block hash. It also adds the method debug_getTransaction which returns the raw tx bytes by tx hash. This is pretty much equivalent to the eth_getRawTransactionByHash method.

* accounts/abi/bind: add const for tx fee elasticity multiplier (ethereum#25504)


Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>

* all: remove duplicate word in comments (ethereum#25618)

Signed-off-by: Abirdcfly <[email protected]>

Signed-off-by: Abirdcfly <[email protected]>

* cmd/geth: fix legacy receipt detection for empty db (ethereum#25609)

* build: fix ignored errors (ethereum#25591)

* docs: specify execution client (ethereum#25566)


Co-authored-by: Felix Lange <[email protected]>

* ethclient: add 'finalized' and 'safe' block number support (ethereum#25580)

* node: change JWT error status to 401 Unauthorized (ethereum#25629)

* node: fix regression in TestJWT (ethereum#25635)

* all: move genesis initialization to blockchain (ethereum#25523)

* all: move genesis initialization to blockchain

* core: add one more check

* core: fix tests

* eth/catalyst: adjust eta for themerge (ethereum#25601)

* eth/catalyst: adjust eta for themerge

* squash

* squash

* eth/catalyst: address review concerns

* mobile: close node on error (ethereum#25643)

* graphql: return correct logs for tx (ethereum#25612)

* graphql: fix tx logs

* minor

* Use optimized search for selecting tx logs

* trie: fix grammar in comment (ethereum#25648)

* eth/protocols/snap: fix problems due to idle-but-busy peers

* trie: cleanup stateTrie (ethereum#25640)

It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly.

Recently there are a few tickets ethereum#25613 ethereum#25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top.

Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing.

Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state.

The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR.

* eth/catalyst: prevent division by zero (ethereum#25654)

eth/catalyst: prevent diff by zero

* trie: better error reporting (ethereum#25645)

* core/state: filter out nil trie for copy (ethereum#25575)

* mobile: register filter APIs (ethereum#25642)

This fixes a regression introduced in PR ethereum#25459.

* README.md: improve grammar (ethereum#25646)


Co-authored-by: Felix Lange <[email protected]>

* eth/tracers/js: fill in log.refund field (ethereum#25661)

For some reason, an accessor method for this field exists in JS, but
the value was never actually assigned.

* eth/fetcher: throttle peers which deliver many invalid transactions (ethereum#25573)

Co-authored-by: Felix Lange <[email protected]>

* node, rpc: add JWT auth support in client (ethereum#24911)

This adds a generic mechanism for 'dial options' in the RPC client,
and also implements a specific dial option for the JWT authentication
mechanism used by the engine API. Some real tests for the server-side
authentication handling are also added.

Co-authored-by: Joshua Gutow <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* rpc: check that "version" is "2.0" in request objects (ethereum#25570)

The JSON-RPC spec requires the "version" field to be exactly "2.0",
so we should verify that. This change is not backwards-compatible with
sloppy client implementations, but I decided to go ahead with it anyway
because the failure will be caught via the returned error.

* trie: fix typo in comment (ethereum#25667)

* trie: fix unhandled error in test (ethereum#25628)

* eth/tracers/js: improve integer types in log object (ethereum#25668)

All fields related to gas must be represented as uint64. Depth is
internally tracked as int, so it makes sense to also store it as int.

* trie: check childrens' existence concurrently for snap heal

* core, light, trie: remove DiskDB function from trie database (ethereum#25690)

* params: update chts (ethereum#25707)

* core/vm: rename RANDOM to PREVRANDAO (ethereum#25691)

See: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4399.md

>  This EIP supplants the semantics of the return value of existing DIFFICULTY (0x44) opcode and renames the opcode to PREVRANDAO (0x44).

* all: cleanup tests (ethereum#25641)

Follow-up to PR ethereum#25523 to cleanup all relevant tests.

* eth, les: rework chain tracer (ethereum#25143)

This PR simplifies the logic of chain tracer and also adds the unit tests.

The most important change has been made in this PR is the state management. Whenever a tracing state is acquired there is a corresponding release function be returned as well. It must be called once the state is used up, otherwise resource leaking can happen.

And also the logic of state management has been simplified a lot. Specifically, the state provider(eth backend, les backend) should ensure the state is available and referenced. State customers can use the state according to their own needs, or build other states based on the given state. But once the release function is called, there is no guarantee of the availability of the state.


Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>

* eth/tracer: fix broken test (ethereum#25715)

* trie: update comments + err check for preimages (ethereum#25672)

This PR includes minor updates to comments in trie/committer that reference insertion to the db, and adds an err != nil check for the return value of preimages.commit.

* eth/protocols/snap: throttle trie heal requests when peers DoS us (ethereum#25666)

* eth/protocols/snap: throttle trie heal requests when peers DoS us

* eth/protocols/snap: lower heal throttle log to debug

Co-authored-by: Martin Holst Swende <[email protected]>

* eth/protocols/snap: fix comment

Co-authored-by: Martin Holst Swende <[email protected]>

* p2p/msgrate: be more lenient when calculating 'mean' (ethereum#25653)

The p2p msgrate tracker is a thing which tries to estimate some mean round-trip times. However, it did so in a very curious way: if a node had 200 peers, it would sort their 200 respective rtt estimates, and then it would pick item number 2 as the mean. So effectively taking third fastest and calling it mean. This probably works "ok" when the number of peers are low (there are other factors too, such as ttlScaling which takes some of the edge off this) -- however when the number of peers is high, it becomes very skewed.

This PR instead bases the 'mean' on the square root of the length of the list. Still pretty harsh, but a bit more lenient.

* rpc: improve error codes for internal server errors (ethereum#25678)

This changes the error code returned by the RPC server in certain situations:

- handler panic: code -32603
- result marshaling error: code -32603
- attempt to subscribe via HTTP: code -32001

In all of the above cases, the server previously returned the default error
code -32000.

Co-authored-by: Nicholas Zhao <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* core: place a cap on reorglogs (ethereum#25711)

This PR makes the event-sending for deleted and new logs happen in batches, to prevent OOM situation due to large reorgs. 

Co-authored-by: Felix Lange <[email protected]>

* build: upgrade to go 1.19 (ethereum#25726)

This changes the CI / release builds to use the latest Go version. It also
upgrades golangci-lint to a newer version compatible with Go 1.19.

In Go 1.19, godoc has gained official support for links and lists. The
syntax for code blocks in doc comments has changed and now requires a
leading tab character. gofmt adapts comments to the new syntax
automatically, so there are a lot of comment re-formatting changes in this
PR. We need to apply the new format in order to pass the CI lint stage with
Go 1.19.

With the linter upgrade, I have decided to disable 'gosec' - it produces
too many false-positive warnings. The 'deadcode' and 'varcheck' linters
have also been removed because golangci-lint warns about them being
unmaintained. 'unused' provides similar coverage and we already have it
enabled, so we don't lose much with this change.

* p2p/discover/v5wire: reject packets smaller than 63 bytes (ethereum#25740)

* core: preallocate maps in TxPool helper methods (ethereum#25737)

* accounts/abi: fix typo in error message (ethereum#25742)

* graphql: fixes missing tx logs (ethereum#25745)

* graphql: fix tx logs

* graphql: refactor test service setup

* graphql: add test for tx logs

* cmd/geth: add a verkle subcommand (ethereum#25718)

* cmd/geth: add a verkle subcommand

* fix copyright year

* remove unused command parameters

* check that the output file was successfully written to

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/geth: goimports fix

Co-authored-by: Martin Holst Swende <[email protected]>

* node: fix HTTP server always force closing (ethereum#25755)


Co-authored-by: Felix Lange <[email protected]>

* core: fix log order in "Imported new chain segment" (ethereum#25768)

* node: fix lint issue in rpcstack.go (ethereum#25774)

* les/catalyst/api: add support for ExchangeTransitionConfigurationV1 (ethereum#25752)

This method is missing in light client mode and breaks consensus clients
that require a valid response.

* params: set TerminalTotalDifficultyPassed to true (ethereum#25769)

* params: set TerminalTotalDifficultyPassed to true

* Update params/config.go

Co-authored-by: Martin Holst Swende <[email protected]>

* trie: handle more batch commit errors in Database (ethereum#25674)

* core/rawdb: fix leak of backoff timer (ethereum#25776)

* crypto/bls12381: docfix of g1 Affine (ethereum#25729)

bls12381: docfix of g1 Affine.

* internal/ethapi: return error when requesting invalid trie key (ethereum#25762)

This change makes eth_getProof and eth_getStorageAt return an error when
the argument contains invalid hex in storage keys.

Co-authored-by: Felix Lange <[email protected]>

* core: don't cache zero nonce in txNoncer (ethereum#25603)

This changes the nonce cache used by TxPool to not store cached
nonces for non-existing accounts.

* core: more compact bad block report (ethereum#25714)

This shortens the chain config summary in bad block reports,
and adds go-ethereum version information as well.

Co-authored-by: Felix Lange <[email protected]>

* core: move build version reading to its own package (ethereum#25806)

This fixes the build with Go 1.17, which does not have BuildInfo.Settings yet.

* eth: fix a rare datarace on CHT challenge reply / shutdown

* core/vm: return copy of input slice in identity precompile, avoid returndata copy (ethereum#25183)

* core/vm: return copy of input slice in identity precompile.  don't deep copy return data slice upon call completion

* make use of common.CopyBytes

* core/blockchain: downgrade tx indexing and unindexing logs  (ethereum#25832)

core/blockchain: downgrade tx indexing and unindexing logs from info to debug

If a user has a finite tx lookup limit, they will see an "unindexing" info level log each time a block is imported. This information might help a user understand that they are removing the index each block and some txs may not be retrievable by hash, but overall it is generally more of a nuisance than a benefit. This change downgrades the log to a debug log.

* eth/tracers: fix trace config for `TraceCall` (ethereum#25821)

Co-authored-by:  AtomicAzzaz  <[email protected]>
Co-authored-by:  ewile <[email protected]>

* eth/catalyst: add locking around newpayload (ethereum#25816)

Sometimes we get stuck on db compaction, and the CL re-issues the "same" command to us multiple times. Each request get stuck on the same place, in the middle of the handler.

This changes makes it so we do not reprocess the same payload, but instead detects it early.

* eth/catalyst: make tests run faster (ethereum#25818)

* cmd/utils: make --authrpc.jwtsecret a DirectoryFlag (ethereum#25849)


Signed-off-by: Delweng <[email protected]>

* eth/protocols/snap: make log messages more clear that sync is ongoing (ethereum#25837)

* eth/protocols/snap: make log messages more clear that sync is ongoing

* Update sync.go

Co-authored-by: Felix Lange <[email protected]>

* .github: add CL client to issue template (ethereum#25814)

* p2p: add channel buffers to avoid goroutine leaks in tests (ethereum#24929)

* internal/version: use gitCommit injection in version handling code (ethereum#25851)

This changes the CI build to store the git commit and date into package
internal/version instead of package main. Doing this essentially merges our
two ways of tracking the go-ethereum version into a single place, achieving
two objectives:

- Bad block reports, which use version.Info(), will now have the git commit
  information even when geth is built in an environment such as
  launchpad.net where git access is unavailable.

- For geth builds created by `go build ./cmd/geth` (i.e. not using `go run
  build/ci.go install`), git information stored by the go tool is now used
  in the p2p node name as well as in `geth version` and `geth
  version-check`.

* cmd/abigen: change --exc to exclude by type name (ethereum#22620)

The abigen exclusion pattern, previously on the form "path:type", now supports wildcards. Examples "*:type" to exclude a named type in all files, or "/path/to/foo.sol:*" all types in foo.sol.

* tests, les, eth: remove mentions of deprecated Morden testnet (ethereum#23570)

* remove morden

* Update commons.go

* Update handler.go

* empty commit to make appveyor happy

* all: clean up the configs for pruner and snapshotter (ethereum#22396)

This PR cleans up the configurations for pruner and snapshotter by passing a config struct.

And also, this PR disables the snapshot background generation if the chain is opened in "read-only" mode. The read-only mode is necessary in some cases. For example, we have a list of commands to open the etheruem node in "read-only" mode, like export-chain. In these cases, the snapshot background generation is non expected and should be banned explicitly.

* cmd/puppeth, cmd/utils: finalize removal of gasTarget flag (ethereum#24370)

This PR fully removes the --miner.gastarget flag, as previously it was only hidden from the geth --help command, but could still be used.

* core/types: improve accuracy of header.Size() (ethereum#25859)

The header.Size() method did not take the basefee into account.

* eth/tracers: pad memory slice on OOB case (ethereum#25213)

* eth/tracers: pad memory slice on oob case

* eth/tracers/js: fix testfailure due to err msg capitalization

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/faucet: fix readme typos (ethereum#25867)

* Fix: typos

Fix: typos

* Undo change

Undo change

* core: fix datarace in txpool, fixes ethereum#25870 and ethereum#25869  (ethereum#25872)

core: fix datarace in txpool pendingnoce, fixes ethereum#25870

* eth/downloader, les/downloader: fix subtle flaw in queue delivery (ethereum#25861)

* fix queue.deliver

* les/downloader: fix queue.deliver

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: better handle error on eip activation check (ethereum#25131)

* core/vm: correct logic for eip check of NewEVMInterpreter

* refactor

* cmd/geth: make dumpgenesis load genesis datadir if it exists (ethereum#25135)

`geth dumpgenesis` currently does not respect the content of the data directory. Instead, it outputs the genesis block created by command-line flags. This PR fixes it to read the genesis from the database, if the database already exists.


Co-authored-by: Martin Holst Swende <[email protected]>

* tests: fix state test error checking (ethereum#25702)

Some tests define an 'expectException' error but the tests runner does not check for conditions where this test value is filled (error expected) but in which no error is returned by the test runner.

An example of this scenario is GeneralStateTests/stTransactionTest/HighGasPrice.json, which expects a 'TR_NoFunds' error, but the test runner does not return any error.

Signed-off-by: meows <[email protected]>

* eth/tracers: use gencodec for native tracers (ethereum#25637)

The call tracer and prestate tracer store data JSON-encoded in memory. In order to support alternative encodings (specifically RLP), it's better to keep data a native format during tracing. This PR does marshalling at the end, using gencodec.

OBS! 
This PR changes the call tracer result slightly:

-  Order of type and value fields are changed (should not matter). 
-  Output fields are completely omitted when they're empty (no more output: "0x"). Previously, this was only _sometimes_ omitted (e.g. when call ended in a non-revert error) and otherwise 0x when the output was actually empty.

* cmd, core, eth, les, light: track deleted nodes (ethereum#25757)

* cmd, core, eth, les, light: track deleted nodes

* trie: add docs

* trie: address comments

* cmd, core, eth, les, light, trie: trie id

* trie: add tests

* trie, core: updates

* trie: fix imports

* trie: add utility print-method for nodeset

* trie: import err

* trie: fix go vet warnings

Co-authored-by: Martin Holst Swende <[email protected]>

* eth: return state error via GetEVM (ethereum#25876)

* make vmError more useful

* fix for review

* Update api.go

* revert calling site

Co-authored-by: rjl493456442 <[email protected]>

* eth/downloader: make flakey test less flakey (ethereum#25879)

* ethclient/gethclient: fix bugs in override object encoding (ethereum#25616)

This fixes a bug where contract code would be overridden to empty code ("0x")
when the Code field of OverrideAccount was left nil. The change also cleans up
the encoding of overrides to only send necessary fields, and improves documentation.

Fixes ethereum#25615

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* trie, eth/protocols/snap: less tiny db-writes during trie-healing (ethereum#25681)

This PR prevent making tiny writes during state healing, by only performing the batch-write if the accumulated data is large enough to be meaningful.

* accounts/abi/bind/backends: fix AdjustTime to respect Fork (ethereum#25225)

* tests: report mgas/s metric in evm benchmarks (ethereum#25700)

* test(state): report mgas/s metric in EVM benchmark

* revert testdata submodule update

* aggregate mgas/s results

* calculate elapsed time better

* tests: benchmarks - handle access list + take refund into account

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: minor trivial clean up (ethereum#25880)

* dropped `vm.keccakState` for `crypto.KeccakState`

* cleaned up `OpCode.IsPush()`

* eth/tracers: fix a bug in prestateTracer (ethereum#25884)

* internal/ethapi: handle odd length hex in decodeHash (ethereum#25883)

This change adds zero-padding (prefix) of odd nibbles in the decodeHash function. 

Co-authored-by: ty <[email protected]>

* core: rework tx indexer (ethereum#25723)

This PR reworks tx indexer a bit. Compared to the original version, one scenario is no longer handled - upgrading  from legacy geth without indexer support. 

The tx indexer was introduced in 2020 and have been present through hardforks, so it can be assumed that all Geth nodes have tx indexer already. So we can simplify the tx indexer logic a bit:

-    If the tail flag is not present, it means node is just initialized may or may not with an ancient store attached. In this case all blocks are regarded as unindexed
-   If the tail flag is present, it means blocks below tail are unindexed, blocks above tail are indexed

This change also address some weird cornercases that could make the indexer not work after a crash.

* accounts/abi: return toGoType error immediately (ethereum#25565)

* eth/tracers: remove revertReasonTracer, add revert reason to callTracer (ethereum#25508)

* eth/tracers: add revertReason to callTracer

* update callframe gen json

* add revertal to calltrace test

* accounts/abi/bind: parse ABI only once on bind (ethereum#25574)

* accounts/abi/bind: parse ABI once on bind

* accounts/abi/bind: suppress 'imported and not used' error for abi package

* internal/flags: fix issue with stringslice migration (ethereum#25830)

This fixes a cornercase bug where the flag migration would mess
up the value of StringSlice flags.

* cmd/geth, cmd/utils: geth attach with custom headers (ethereum#25829)

This PR makes it possible to set custom headers, in particular for two scenarios: 

- geth attach
- geth commands which can use --remotedb, e..g geth db inspect

The ability to use custom headers is typically useful for connecting to cloud-apis, e.g. providing an infura- or alchemy key, or for that matter access-keys for environments behind cloudflare.  

Co-authored-by: Felix Lange <[email protected]>

* core/types: add a testcase to TestLegacyReceiptDecoding (ethereum#25909)

add a testcase to TestLegacyReceiptDecoding

* eth/protocols/snap: serve snap requests when possible (ethereum#25644)

This PR makes it so that the snap server responds to trie heal requests when possible, even if the snapshot does not exist. The idea being that it might prolong the lifetime of a state root, so we don't have to pivot quite as often.

* eth, miner: add timeout for building sealing block (ethereum#25407)

* eth, miner: add timeout for building sealing block

* eth, cmd, miner: add newpayloadtimeout flag

* eth, miner, cmd: address comments

* eth, miner: minor fixes

Co-authored-by: Martin Holst Swende <[email protected]>

* all: fix docstrings

* core: fix linter complaint (ethereum#25927)

* eth/tracers: add diffMode to prestateTracer (ethereum#25422)

Backwards compatibility warning: The result will from now on omit empty fields instead
of including a zero value (e.g. no more `balance: '0x'`).

The prestateTracer will now take an option `diffMode: bool`. In this mode
the tracer will output the pre state and post data for the modified parts of state.
Read-only accesses will be completely omitted. Creations (be it account or slot)
will be signified by omission in the `pre` list and inclusion in `post`. Whereas
deletion (be it account or slot) will be signified by inclusion in `pre` and omission
in `post` list.

Signed-off-by: Delweng <[email protected]>

* eth/traces: add state limit (ethereum#25812)

This PR introduces a new mechanism in chain tracer for preventing creating too many trace states.

The workflow of chain tracer can be divided into several parts:

- state creator generates trace state in a thread
- state tracer retrieves the trace state and applies the tracing on top in another thread
- state collector gathers all result from state tracer and stream to users

It's basically a producer-consumer model here, while if we imagine that the state producer generates states too fast, then it will lead to accumulate lots of unused states in memory. Even worse, in path-based state scheme it will only keep the latest 128 states in memory, and the newly generated state will invalidate the oldest one by marking it as stale.

The solution for fixing it is to limit the speed of state generation. If there are over 128 states un-consumed in memory, then the creation will be paused until the states are be consumed properly.

* core/bloombits: speed up windows-test (ethereum#25844)

core/bloombits: remove micro-sleep

* core, ethclient/gethclient: improve flaky tests (ethereum#25918)

* ethclient/gethclient: improve time-sensitive flaky test

* eth/catalyst: fix (?) flaky test

* core: stop blockchains in tests after use

* core: fix dangling blockchain instances

* core: rm whitespace

* eth/gasprice, eth/tracers, consensus/clique: stop dangling blockchains in tests

* all: address review concerns

* core: goimports

* eth/catalyst: fix another time-sensitive test

* consensus/clique: add snapshot test run function

* core: rename stop() to stopWithoutSaving()

Co-authored-by: Felix Lange <[email protected]>

* node: prevent exposing engine API on unauthenticated endpoint (ethereum#25939)

* node: prevent exposing engine API on unauthenticated endpoint

* node: improve RPC setup

* eth/filters: fix for eth_getLogs failing with finalized- and safe tag  (ethereum#25922)

Prior to this change, f.begin (and possibly end) stay negative, leading to strange results later in the code. With this change, filters using "safe" and "finalized" block produce results consistent w/ the overall behavior of this RPC method.

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/geth: fix help output issues (ethereum#25941)

This update resolves an issue where StringSliceFlag would not be
rendered correctly in help output + mention that -H can be used multiple times

Co-authored-by: Martin Holst Swende <[email protected]>

* accounts/usbwallet: support Ledger Nano S Plus and FTS (ethereum#25933)

* usbwallet support Ledger Nano S Plus

* accounts/usbwallet: add definitions + ref to ledger docs

Co-authored-by: Martin Holst Swende <[email protected]>

* all: fix spelling mistakes (ethereum#25961)

* cmd/geth, core: fix typo in comment (ethereum#25954)

* fix typo on comment

* typo "can't accept"

* core/rawdb: provide more info on 'gap in the chain' error (ethereum#25938)

* core/types: add more context around ErrInvalidChainID (ethereum#25367)

This changes the error message for mismatching chain ID to show
the given and expected value. Callers expecting this error must be
changed to use errors.Is.

* common/math: optimized modexp (+ fuzzer) (ethereum#25525)

This adds a 
* core/vm, tests: optimized modexp + fuzzer

* common/math: modexp optimizations

* core/vm: special case base 1 in big modexp

* core/vm: disable fastexp

* tests/fuzzers/modexp: gofmt (ethereum#25972)

* node: drop support for static & trusted node list files (ethereum#25610)

This changes the node setup to ignore datadir files

    static-nodes.json
    trusted-nodes.json

When these files are present, it an error will be printed to the log.

* accounts/keystore: faster tests (ethereum#25827)

This PR removes some optimistic tests -- a'la "do something,
wait a while, and hope it has trickled through and continue" -- and
instead uses some introspection to ensure that prerequisites are met.

* eth/protocols/eth: fix typo in log message (ethereum#25969)

* eth/filters, ethclient/gethclient: add fullTx option to pending tx filter (ethereum#25186)

This PR adds a way to subscribe to the _full_ pending transactions, as opposed to just being notified about hashes. 

In use cases where client subscribes to newPendingTransactions and gets txhashes only to then request the actual transaction, the caller can now shortcut that flow and obtain the transactions directly. 


Co-authored-by: Felix Lange <[email protected]>

* go.mod: upgrade github.com/dop251/goja (ethereum#25955)

This upgrade pulls in a fix to handling of 'continue' in loops.

* eth/tracers: fix the issue of panic in prestate with diffmode (ethereum#25957)

In some cases, inner contract creation may not be successful, and an inner contract was not created. This PR fixes a crash that could occur when doing tracing in such situations.

* Revert "go.mod: upgrade github.com/dop251/goja" (ethereum#25975)

Revert "go.mod: upgrade github.com/dop251/goja (ethereum#25955)"

This reverts commit 9207e34.

* common/math, tests/fuzzers: use big.Int clone (ethereum#26006)

* common/math, tests/fuzzers: use big.Int clone

* common/math: license

* cmd/utils: enable snapshot generation in import-mode (ethereum#25990)

This PR fixes a regression causing snapshots not to be generated in "geth --import" mode.  It also fixes the geth export command to be truly readonly, and adds a new test for geth export.

* core/rawdb: refactor db key prefix (ethereum#26000)

Co-authored-by: seven <[email protected]>

* core/rawdb: open meta file in read only mode (ethereum#26009)

* internal/ethapi, accounts/abi/backends: use error defined in core (ethereum#26012)

Co-authored-by: seven <[email protected]>

* eth/tracers: fix the issue prestate missing existing contract state (ethereum#25996)

The prestate tracer did not report accounts that existed at a given address prior to a contract being created at that address.

Signed-off-by: Delweng <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* eth/tracers: simplify test framework (ethereum#25973)

Co-authored-by: Sina Mahmoodi <[email protected]>

* all: refactor txpool into it's own package in prep for 4844

* core/types: rename tx files to group them better together

* core, eth: for types with accurate size calcs, return uint64, not float (ethereum#26046)

* core, eth: for types with accurate size calcs, return uint64, not float

* core/types: proper tx size tests

* core/types: extend tx size test with decoded sizes, fix error

* core/txpool: fix linter

Co-authored-by: Martin Holst Swende <[email protected]>

* build: upgrade -dlgo version to Go 1.19.2

* accounts/scwallet: fix keycard data signing error (ethereum#25331)

accounts/scwallet: fix keycard data signing

* build: make ios work again (ethereum#26052)

* core/vm: use optimized bigint (ethereum#26021)

* eth/filters: change filter block to be by-ref (ethereum#26054)

This PR changes the block field in the filter to be a pointer, to disambiguate between empty hash and no hash

* core/rawdb: refactor db inspector for extending multiple ancient store (ethereum#25896)

This PR ports a few changes from PBSS:

- Fix the snapshot generator waiter in case the generation is not even initialized
- Refactor db inspector for ancient store

* cmd/evm: calc base fee if parent data is present (ethereum#26051)

Currently, in order to chain together sequential valid t8n transitions the caller must manually calculate the block base fee. This PR adds support for the necessary parent fee market data to calculate the base fee for the current transition.

Concretely, env is extended to accept the following:

    parentBaseFee
    parentGasUsed
    parentGasLimit

Example usage can be found in ./cmd/evm/testdata/25.

Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: fix gasUsed for native and JS tracers (ethereum#26048)

* eth/tracers: fix gasUsed in call tracer

* fix js tracers gasUsed

* fix legacy prestate tracer

* fix restGas in test

* drop intrinsicGas field from js tracers

* cmd, eth: implement full-sync tester (ethereum#26035)

This PR adds a parameter to startup, --synctarget. The synctarget flag is a developer-flag, that can be useful in some scenarios as a replacement for a CL node. It defines a fixed block sync target:

geth --syncmode=full --synctarget=./block_15816882.hex_rlp 

The --synctarget is only made available during syncmode=full

* rpc: update docstring (ethereum#26072)

Co-authored-by: seven <[email protected]>

* Fix trace call for inner reverts (ethereum#25971)

Inner call reverts will now return the reason similar to the top-level call. Separately, if top-level call is of type CREATE and it fails, its `to` field will now be cleared to `0x00...00` instead of being set to the created address.

* eth: implement eth/68 (ethereum#25980)

* eth: implement eth/68

* eth/protocols/eth: added tx size to announcement

* eth/protocols/eth: check equal lengths on receiving announcement

* eth/protocols/eth: add +1 to tx size because of the type byte

* eth: happy lint, add eth68 tests, enable eth68

* eth: various nitpick fixes on eth/68

* eth/protocols/eth: fix announced tx size wrt type byte

Co-authored-by: MariusVanDerWijden <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>

* eth/tracers: add withLog to callTracer (ethereum#25991)

In some cases, it is desirable to capture what is triggered by each trace, when using the `callTracer`. For example: call `USDT.transfer` will trigger a `Transfer(from, to, value)` event.

This PR adds the option to capture logs to the call tracer, by specifying `{"withLog": true}` in the tracerconfig. 
Any logs belonging to failed/reverted call-scopes are removed from the output, to prevent interpretation mistakes.

Signed-off-by: Delweng <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* eth/tracers: prestateTracer - exclude unchanged storage slots in diffMode (ethereum#25944)

Fixes ethereum#25943

* accounts/abi: return error on fixed bytes with size larger than 32 bytes (ethereum#26075)

* fixed bytes with size larger than 32 bytes is not allowed

* add testcase

* consensus/ethash: fix typo (ethereum#26016)

fix typo

* docs/postmortems: remove wrong parentheses (ethereum#26066)

Removed parentheses in line 71 because line 80 doesn't have them either.

* miner, eth: implement recommit mechanism for payload building (ethereum#25836)

* miner, eth: implement recommit for payload building

* miner: address comments from marius

* miner: fail early if core.NewBlockChain fails (ethereum#26079)

don't ignore errors returned by core.NewBlockChain when initializing tests

* p2p/discover: fix handling of distance 256 in lookupDistances (ethereum#26087)

Noticed that lookupDistances for FINDNODE requests didn't consider 256 a valid
distance. This is actually part of the example in the comment above the
function, surprised that wasn't tested before.

* rlp: add more tests for nil pointer / optional field encoding (ethereum#26077)

* rpc: handle wrong HTTP batch response length (ethereum#26064)

* cmd/clef: add `list-accounts` and `list-wallets` to CLI (ethereum#26080)

This commit adds support for two new commands to clef, making it possible to list accounts / wallets from the command-line-interface. 

Co-authored-by: Martin Holst Swende <[email protected]>

* merge devnet-v3 with latest master, part 1

* crypto/bls12381: docs - fix broken links to references (ethereum#26095)

Signed-off-by: Abirdcfly <[email protected]>
Signed-off-by: Delweng <[email protected]>
Signed-off-by: meows <[email protected]>
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: Justin Traglia <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: zhiqiangxu <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: xinbenlv <[email protected]>
Co-authored-by: Abirdcfly <[email protected]>
Co-authored-by: uji <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: Rachel Bousfield <[email protected]>
Co-authored-by: Seungbae Yu <[email protected]>
Co-authored-by: Jakub Freebit <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: xternet <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Joshua Gutow <[email protected]>
Co-authored-by: Amir Hossein <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Nicholas Zhao <[email protected]>
Co-authored-by: Benjamin Prosnitz <[email protected]>
Co-authored-by: Nicolas Gotchac <[email protected]>
Co-authored-by: pinkiebell <[email protected]>
Co-authored-by: George Carder <[email protected]>
Co-authored-by: jwasinger <[email protected]>
Co-authored-by: makcandrov <[email protected]>
Co-authored-by: AtomicAzzaz  <[email protected]>
Co-authored-by: ewile <[email protected]>
Co-authored-by: Delweng <[email protected]>
Co-authored-by: Boqin@MetaSecureLabs <[email protected]>
Co-authored-by: Sebastian Stammler <[email protected]>
Co-authored-by: Zachinquarantine <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Leon <[email protected]>
Co-authored-by: meowsbits <[email protected]>
Co-authored-by: Janko Simonovic <[email protected]>
Co-authored-by: Alexey Shekhirin <[email protected]>
Co-authored-by: lmittmann <[email protected]>
Co-authored-by: TY <[email protected]>
Co-authored-by: ty <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Mikhail Vazhnov <[email protected]>
Co-authored-by: Ryan Schneider <[email protected]>
Co-authored-by: jin <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: Jens W <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: seven <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: vdwijden <[email protected]>
Co-authored-by: Sebastian Supreme <[email protected]>
Co-authored-by: Jordan Krage <[email protected]>
Co-authored-by: Joseph Cook <[email protected]>
roberto-bayardo added a commit to mdehoog/go-ethereum that referenced this pull request Nov 16, 2022
* merge devnet-v3 with latest master (#43)

* cmd. core: save preimages on genesis creation (ethereum#25538)

force preimage dump for genesis

* rlp/rlpgen: fix error handling when target type not found (ethereum#25547)

typ will be nil when lookupStructType returns an error. cfg.Type should be used instead.

* trie: improve node rlp decoding performance (ethereum#25357)

This avoids copying the input []byte while decoding trie nodes. In most
cases, particularly when the input slice is provided by the underlying
database, this optimization is safe to use.

For cases where the origin of the input slice is unclear, the copying version
is retained. The new code performs better even when the input must be
copied, because it is now only copied once in decodeNode.

* all: fix some typos (ethereum#25551)

* Fix some typos

* Fix some mistakes

* Revert 4byte.json

* Fix an incorrect fix

* Change files to fails

* internal/ethapi: fix comment typo (ethereum#25548)

* accounts/abi/bind/backends: typo fix (ethereum#25549)

* eth, les: unlock downloader peerSet if there's an error (ethereum#25546)

Unlock peerSet if there's an error in the downloader

* cmd/geth: parse uint64 value with ParseUint instead of Atoi (ethereum#25545)

Parse uint64 value with ParseUint instead of Atoi

* consensus/beacon: check ttd reached on pos blocks (ethereum#25552)

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* eth/filters: add global block logs cache (ethereum#25459)

This adds a cache for block logs which is shared by all filters. The cache
size of is configurable using the `--cache.blocklogs` flag.

Co-authored-by: Felix Lange <[email protected]>

* accounts/abi: fix set function (ethereum#25477)

* accounts/abi: fix set function

* don't break things

* update test

* internal/ethapi: fix build regression (ethereum#25555)

* eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)

* eth/fetcher: introduce some lag in tx fetching

* eth/fetcher: change conditions a bit

* eth/fetcher: use per-batch quota check

* eth/fetcher: fix some comments

* eth/fetcher: address review concerns

* eth/fetcher: fix panic + add warn log

* eth/fetcher: fix log

* eth/fetcher: fix log

* cmd/devp2p/internal/ethtest: fix ignorign tx announcements from prev. tests

* cmd/devp2p/internal/ethtest: fix TestLargeTxRequest

This increases the number of tx relay messages the test waits for. Since
go-ethereum now processes incoming txs in smaller batches, the
announcement messages it sends are also smaller.

Co-authored-by: Felix Lange <[email protected]>

* Revert "eth/fetcher: don't spend too much time on transaction inclusion" (ethereum#25567)

Revert "eth/fetcher: don't spend too much time on transaction inclusion (ethereum#25524)"

This reverts commit 0ce494b.

* eth/catalyst: warn less frequently if no beacon client is available (ethereum#25569)

* eth/catalyst: warn less frequently if no beacon client is available

* eth/catalyst: tweak warning frequency a bit

* eth/catalyst: some more tweaks

* Update api.go

Co-authored-by: Felix Lange <[email protected]>

* params: release go-ethereum v1.10.22

* params: begin v1.10.23 release cycle

* core, eth/downloader: handle spurious junk bodies from racey rollbacks (ethereum#25578)

* eth/downloader: handle junkbodies/receipts in the beacon sync

* core: check for header presence when checking for blocks

* core/state, trie: fix trie flush order for proper pruning

* consensus/beacon: don't ignore errors

* params: release Geth v1.10.23

* params: begin v1.10.24 release cycle

* params: begin go-ethereum v1.11 release cycle

* internal/ethapi: rename debug getters to match spec (ethereum#25176)

Some small fixes to get the existing debug methods to conform to the spec. Mainly dropping the encoding information from the method name as it should be deduced from the debug context and allowing the method to be invoked by either block number or block hash. It also adds the method debug_getTransaction which returns the raw tx bytes by tx hash. This is pretty much equivalent to the eth_getRawTransactionByHash method.

* accounts/abi/bind: add const for tx fee elasticity multiplier (ethereum#25504)


Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>

* all: remove duplicate word in comments (ethereum#25618)

Signed-off-by: Abirdcfly <[email protected]>

Signed-off-by: Abirdcfly <[email protected]>

* cmd/geth: fix legacy receipt detection for empty db (ethereum#25609)

* build: fix ignored errors (ethereum#25591)

* docs: specify execution client (ethereum#25566)


Co-authored-by: Felix Lange <[email protected]>

* ethclient: add 'finalized' and 'safe' block number support (ethereum#25580)

* node: change JWT error status to 401 Unauthorized (ethereum#25629)

* node: fix regression in TestJWT (ethereum#25635)

* all: move genesis initialization to blockchain (ethereum#25523)

* all: move genesis initialization to blockchain

* core: add one more check

* core: fix tests

* eth/catalyst: adjust eta for themerge (ethereum#25601)

* eth/catalyst: adjust eta for themerge

* squash

* squash

* eth/catalyst: address review concerns

* mobile: close node on error (ethereum#25643)

* graphql: return correct logs for tx (ethereum#25612)

* graphql: fix tx logs

* minor

* Use optimized search for selecting tx logs

* trie: fix grammar in comment (ethereum#25648)

* eth/protocols/snap: fix problems due to idle-but-busy peers

* trie: cleanup stateTrie (ethereum#25640)

It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly.

Recently there are a few tickets ethereum#25613 ethereum#25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top.

Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing.

Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state.

The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR.

* eth/catalyst: prevent division by zero (ethereum#25654)

eth/catalyst: prevent diff by zero

* trie: better error reporting (ethereum#25645)

* core/state: filter out nil trie for copy (ethereum#25575)

* mobile: register filter APIs (ethereum#25642)

This fixes a regression introduced in PR ethereum#25459.

* README.md: improve grammar (ethereum#25646)


Co-authored-by: Felix Lange <[email protected]>

* eth/tracers/js: fill in log.refund field (ethereum#25661)

For some reason, an accessor method for this field exists in JS, but
the value was never actually assigned.

* eth/fetcher: throttle peers which deliver many invalid transactions (ethereum#25573)

Co-authored-by: Felix Lange <[email protected]>

* node, rpc: add JWT auth support in client (ethereum#24911)

This adds a generic mechanism for 'dial options' in the RPC client,
and also implements a specific dial option for the JWT authentication
mechanism used by the engine API. Some real tests for the server-side
authentication handling are also added.

Co-authored-by: Joshua Gutow <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* rpc: check that "version" is "2.0" in request objects (ethereum#25570)

The JSON-RPC spec requires the "version" field to be exactly "2.0",
so we should verify that. This change is not backwards-compatible with
sloppy client implementations, but I decided to go ahead with it anyway
because the failure will be caught via the returned error.

* trie: fix typo in comment (ethereum#25667)

* trie: fix unhandled error in test (ethereum#25628)

* eth/tracers/js: improve integer types in log object (ethereum#25668)

All fields related to gas must be represented as uint64. Depth is
internally tracked as int, so it makes sense to also store it as int.

* trie: check childrens' existence concurrently for snap heal

* core, light, trie: remove DiskDB function from trie database (ethereum#25690)

* params: update chts (ethereum#25707)

* core/vm: rename RANDOM to PREVRANDAO (ethereum#25691)

See: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4399.md

>  This EIP supplants the semantics of the return value of existing DIFFICULTY (0x44) opcode and renames the opcode to PREVRANDAO (0x44).

* all: cleanup tests (ethereum#25641)

Follow-up to PR ethereum#25523 to cleanup all relevant tests.

* eth, les: rework chain tracer (ethereum#25143)

This PR simplifies the logic of chain tracer and also adds the unit tests.

The most important change has been made in this PR is the state management. Whenever a tracing state is acquired there is a corresponding release function be returned as well. It must be called once the state is used up, otherwise resource leaking can happen.

And also the logic of state management has been simplified a lot. Specifically, the state provider(eth backend, les backend) should ensure the state is available and referenced. State customers can use the state according to their own needs, or build other states based on the given state. But once the release function is called, there is no guarantee of the availability of the state.


Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>

* eth/tracer: fix broken test (ethereum#25715)

* trie: update comments + err check for preimages (ethereum#25672)

This PR includes minor updates to comments in trie/committer that reference insertion to the db, and adds an err != nil check for the return value of preimages.commit.

* eth/protocols/snap: throttle trie heal requests when peers DoS us (ethereum#25666)

* eth/protocols/snap: throttle trie heal requests when peers DoS us

* eth/protocols/snap: lower heal throttle log to debug

Co-authored-by: Martin Holst Swende <[email protected]>

* eth/protocols/snap: fix comment

Co-authored-by: Martin Holst Swende <[email protected]>

* p2p/msgrate: be more lenient when calculating 'mean' (ethereum#25653)

The p2p msgrate tracker is a thing which tries to estimate some mean round-trip times. However, it did so in a very curious way: if a node had 200 peers, it would sort their 200 respective rtt estimates, and then it would pick item number 2 as the mean. So effectively taking third fastest and calling it mean. This probably works "ok" when the number of peers are low (there are other factors too, such as ttlScaling which takes some of the edge off this) -- however when the number of peers is high, it becomes very skewed.

This PR instead bases the 'mean' on the square root of the length of the list. Still pretty harsh, but a bit more lenient.

* rpc: improve error codes for internal server errors (ethereum#25678)

This changes the error code returned by the RPC server in certain situations:

- handler panic: code -32603
- result marshaling error: code -32603
- attempt to subscribe via HTTP: code -32001

In all of the above cases, the server previously returned the default error
code -32000.

Co-authored-by: Nicholas Zhao <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* core: place a cap on reorglogs (ethereum#25711)

This PR makes the event-sending for deleted and new logs happen in batches, to prevent OOM situation due to large reorgs. 

Co-authored-by: Felix Lange <[email protected]>

* build: upgrade to go 1.19 (ethereum#25726)

This changes the CI / release builds to use the latest Go version. It also
upgrades golangci-lint to a newer version compatible with Go 1.19.

In Go 1.19, godoc has gained official support for links and lists. The
syntax for code blocks in doc comments has changed and now requires a
leading tab character. gofmt adapts comments to the new syntax
automatically, so there are a lot of comment re-formatting changes in this
PR. We need to apply the new format in order to pass the CI lint stage with
Go 1.19.

With the linter upgrade, I have decided to disable 'gosec' - it produces
too many false-positive warnings. The 'deadcode' and 'varcheck' linters
have also been removed because golangci-lint warns about them being
unmaintained. 'unused' provides similar coverage and we already have it
enabled, so we don't lose much with this change.

* p2p/discover/v5wire: reject packets smaller than 63 bytes (ethereum#25740)

* core: preallocate maps in TxPool helper methods (ethereum#25737)

* accounts/abi: fix typo in error message (ethereum#25742)

* graphql: fixes missing tx logs (ethereum#25745)

* graphql: fix tx logs

* graphql: refactor test service setup

* graphql: add test for tx logs

* cmd/geth: add a verkle subcommand (ethereum#25718)

* cmd/geth: add a verkle subcommand

* fix copyright year

* remove unused command parameters

* check that the output file was successfully written to

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/geth: goimports fix

Co-authored-by: Martin Holst Swende <[email protected]>

* node: fix HTTP server always force closing (ethereum#25755)


Co-authored-by: Felix Lange <[email protected]>

* core: fix log order in "Imported new chain segment" (ethereum#25768)

* node: fix lint issue in rpcstack.go (ethereum#25774)

* les/catalyst/api: add support for ExchangeTransitionConfigurationV1 (ethereum#25752)

This method is missing in light client mode and breaks consensus clients
that require a valid response.

* params: set TerminalTotalDifficultyPassed to true (ethereum#25769)

* params: set TerminalTotalDifficultyPassed to true

* Update params/config.go

Co-authored-by: Martin Holst Swende <[email protected]>

* trie: handle more batch commit errors in Database (ethereum#25674)

* core/rawdb: fix leak of backoff timer (ethereum#25776)

* crypto/bls12381: docfix of g1 Affine (ethereum#25729)

bls12381: docfix of g1 Affine.

* internal/ethapi: return error when requesting invalid trie key (ethereum#25762)

This change makes eth_getProof and eth_getStorageAt return an error when
the argument contains invalid hex in storage keys.

Co-authored-by: Felix Lange <[email protected]>

* core: don't cache zero nonce in txNoncer (ethereum#25603)

This changes the nonce cache used by TxPool to not store cached
nonces for non-existing accounts.

* core: more compact bad block report (ethereum#25714)

This shortens the chain config summary in bad block reports,
and adds go-ethereum version information as well.

Co-authored-by: Felix Lange <[email protected]>

* core: move build version reading to its own package (ethereum#25806)

This fixes the build with Go 1.17, which does not have BuildInfo.Settings yet.

* eth: fix a rare datarace on CHT challenge reply / shutdown

* core/vm: return copy of input slice in identity precompile, avoid returndata copy (ethereum#25183)

* core/vm: return copy of input slice in identity precompile.  don't deep copy return data slice upon call completion

* make use of common.CopyBytes

* core/blockchain: downgrade tx indexing and unindexing logs  (ethereum#25832)

core/blockchain: downgrade tx indexing and unindexing logs from info to debug

If a user has a finite tx lookup limit, they will see an "unindexing" info level log each time a block is imported. This information might help a user understand that they are removing the index each block and some txs may not be retrievable by hash, but overall it is generally more of a nuisance than a benefit. This change downgrades the log to a debug log.

* eth/tracers: fix trace config for `TraceCall` (ethereum#25821)

Co-authored-by:  AtomicAzzaz  <[email protected]>
Co-authored-by:  ewile <[email protected]>

* eth/catalyst: add locking around newpayload (ethereum#25816)

Sometimes we get stuck on db compaction, and the CL re-issues the "same" command to us multiple times. Each request get stuck on the same place, in the middle of the handler.

This changes makes it so we do not reprocess the same payload, but instead detects it early.

* eth/catalyst: make tests run faster (ethereum#25818)

* cmd/utils: make --authrpc.jwtsecret a DirectoryFlag (ethereum#25849)


Signed-off-by: Delweng <[email protected]>

* eth/protocols/snap: make log messages more clear that sync is ongoing (ethereum#25837)

* eth/protocols/snap: make log messages more clear that sync is ongoing

* Update sync.go

Co-authored-by: Felix Lange <[email protected]>

* .github: add CL client to issue template (ethereum#25814)

* p2p: add channel buffers to avoid goroutine leaks in tests (ethereum#24929)

* internal/version: use gitCommit injection in version handling code (ethereum#25851)

This changes the CI build to store the git commit and date into package
internal/version instead of package main. Doing this essentially merges our
two ways of tracking the go-ethereum version into a single place, achieving
two objectives:

- Bad block reports, which use version.Info(), will now have the git commit
  information even when geth is built in an environment such as
  launchpad.net where git access is unavailable.

- For geth builds created by `go build ./cmd/geth` (i.e. not using `go run
  build/ci.go install`), git information stored by the go tool is now used
  in the p2p node name as well as in `geth version` and `geth
  version-check`.

* cmd/abigen: change --exc to exclude by type name (ethereum#22620)

The abigen exclusion pattern, previously on the form "path:type", now supports wildcards. Examples "*:type" to exclude a named type in all files, or "/path/to/foo.sol:*" all types in foo.sol.

* tests, les, eth: remove mentions of deprecated Morden testnet (ethereum#23570)

* remove morden

* Update commons.go

* Update handler.go

* empty commit to make appveyor happy

* all: clean up the configs for pruner and snapshotter (ethereum#22396)

This PR cleans up the configurations for pruner and snapshotter by passing a config struct.

And also, this PR disables the snapshot background generation if the chain is opened in "read-only" mode. The read-only mode is necessary in some cases. For example, we have a list of commands to open the etheruem node in "read-only" mode, like export-chain. In these cases, the snapshot background generation is non expected and should be banned explicitly.

* cmd/puppeth, cmd/utils: finalize removal of gasTarget flag (ethereum#24370)

This PR fully removes the --miner.gastarget flag, as previously it was only hidden from the geth --help command, but could still be used.

* core/types: improve accuracy of header.Size() (ethereum#25859)

The header.Size() method did not take the basefee into account.

* eth/tracers: pad memory slice on OOB case (ethereum#25213)

* eth/tracers: pad memory slice on oob case

* eth/tracers/js: fix testfailure due to err msg capitalization

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/faucet: fix readme typos (ethereum#25867)

* Fix: typos

Fix: typos

* Undo change

Undo change

* core: fix datarace in txpool, fixes ethereum#25870 and ethereum#25869  (ethereum#25872)

core: fix datarace in txpool pendingnoce, fixes ethereum#25870

* eth/downloader, les/downloader: fix subtle flaw in queue delivery (ethereum#25861)

* fix queue.deliver

* les/downloader: fix queue.deliver

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: better handle error on eip activation check (ethereum#25131)

* core/vm: correct logic for eip check of NewEVMInterpreter

* refactor

* cmd/geth: make dumpgenesis load genesis datadir if it exists (ethereum#25135)

`geth dumpgenesis` currently does not respect the content of the data directory. Instead, it outputs the genesis block created by command-line flags. This PR fixes it to read the genesis from the database, if the database already exists.


Co-authored-by: Martin Holst Swende <[email protected]>

* tests: fix state test error checking (ethereum#25702)

Some tests define an 'expectException' error but the tests runner does not check for conditions where this test value is filled (error expected) but in which no error is returned by the test runner.

An example of this scenario is GeneralStateTests/stTransactionTest/HighGasPrice.json, which expects a 'TR_NoFunds' error, but the test runner does not return any error.

Signed-off-by: meows <[email protected]>

* eth/tracers: use gencodec for native tracers (ethereum#25637)

The call tracer and prestate tracer store data JSON-encoded in memory. In order to support alternative encodings (specifically RLP), it's better to keep data a native format during tracing. This PR does marshalling at the end, using gencodec.

OBS! 
This PR changes the call tracer result slightly:

-  Order of type and value fields are changed (should not matter). 
-  Output fields are completely omitted when they're empty (no more output: "0x"). Previously, this was only _sometimes_ omitted (e.g. when call ended in a non-revert error) and otherwise 0x when the output was actually empty.

* cmd, core, eth, les, light: track deleted nodes (ethereum#25757)

* cmd, core, eth, les, light: track deleted nodes

* trie: add docs

* trie: address comments

* cmd, core, eth, les, light, trie: trie id

* trie: add tests

* trie, core: updates

* trie: fix imports

* trie: add utility print-method for nodeset

* trie: import err

* trie: fix go vet warnings

Co-authored-by: Martin Holst Swende <[email protected]>

* eth: return state error via GetEVM (ethereum#25876)

* make vmError more useful

* fix for review

* Update api.go

* revert calling site

Co-authored-by: rjl493456442 <[email protected]>

* eth/downloader: make flakey test less flakey (ethereum#25879)

* ethclient/gethclient: fix bugs in override object encoding (ethereum#25616)

This fixes a bug where contract code would be overridden to empty code ("0x")
when the Code field of OverrideAccount was left nil. The change also cleans up
the encoding of overrides to only send necessary fields, and improves documentation.

Fixes ethereum#25615

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* trie, eth/protocols/snap: less tiny db-writes during trie-healing (ethereum#25681)

This PR prevent making tiny writes during state healing, by only performing the batch-write if the accumulated data is large enough to be meaningful.

* accounts/abi/bind/backends: fix AdjustTime to respect Fork (ethereum#25225)

* tests: report mgas/s metric in evm benchmarks (ethereum#25700)

* test(state): report mgas/s metric in EVM benchmark

* revert testdata submodule update

* aggregate mgas/s results

* calculate elapsed time better

* tests: benchmarks - handle access list + take refund into account

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: minor trivial clean up (ethereum#25880)

* dropped `vm.keccakState` for `crypto.KeccakState`

* cleaned up `OpCode.IsPush()`

* eth/tracers: fix a bug in prestateTracer (ethereum#25884)

* internal/ethapi: handle odd length hex in decodeHash (ethereum#25883)

This change adds zero-padding (prefix) of odd nibbles in the decodeHash function. 

Co-authored-by: ty <[email protected]>

* core: rework tx indexer (ethereum#25723)

This PR reworks tx indexer a bit. Compared to the original version, one scenario is no longer handled - upgrading  from legacy geth without indexer support. 

The tx indexer was introduced in 2020 and have been present through hardforks, so it can be assumed that all Geth nodes have tx indexer already. So we can simplify the tx indexer logic a bit:

-    If the tail flag is not present, it means node is just initialized may or may not with an ancient store attached. In this case all blocks are regarded as unindexed
-   If the tail flag is present, it means blocks below tail are unindexed, blocks above tail are indexed

This change also address some weird cornercases that could make the indexer not work after a crash.

* accounts/abi: return toGoType error immediately (ethereum#25565)

* eth/tracers: remove revertReasonTracer, add revert reason to callTracer (ethereum#25508)

* eth/tracers: add revertReason to callTracer

* update callframe gen json

* add revertal to calltrace test

* accounts/abi/bind: parse ABI only once on bind (ethereum#25574)

* accounts/abi/bind: parse ABI once on bind

* accounts/abi/bind: suppress 'imported and not used' error for abi package

* internal/flags: fix issue with stringslice migration (ethereum#25830)

This fixes a cornercase bug where the flag migration would mess
up the value of StringSlice flags.

* cmd/geth, cmd/utils: geth attach with custom headers (ethereum#25829)

This PR makes it possible to set custom headers, in particular for two scenarios: 

- geth attach
- geth commands which can use --remotedb, e..g geth db inspect

The ability to use custom headers is typically useful for connecting to cloud-apis, e.g. providing an infura- or alchemy key, or for that matter access-keys for environments behind cloudflare.  

Co-authored-by: Felix Lange <[email protected]>

* core/types: add a testcase to TestLegacyReceiptDecoding (ethereum#25909)

add a testcase to TestLegacyReceiptDecoding

* eth/protocols/snap: serve snap requests when possible (ethereum#25644)

This PR makes it so that the snap server responds to trie heal requests when possible, even if the snapshot does not exist. The idea being that it might prolong the lifetime of a state root, so we don't have to pivot quite as often.

* eth, miner: add timeout for building sealing block (ethereum#25407)

* eth, miner: add timeout for building sealing block

* eth, cmd, miner: add newpayloadtimeout flag

* eth, miner, cmd: address comments

* eth, miner: minor fixes

Co-authored-by: Martin Holst Swende <[email protected]>

* all: fix docstrings

* core: fix linter complaint (ethereum#25927)

* eth/tracers: add diffMode to prestateTracer (ethereum#25422)

Backwards compatibility warning: The result will from now on omit empty fields instead
of including a zero value (e.g. no more `balance: '0x'`).

The prestateTracer will now take an option `diffMode: bool`. In this mode
the tracer will output the pre state and post data for the modified parts of state.
Read-only accesses will be completely omitted. Creations (be it account or slot)
will be signified by omission in the `pre` list and inclusion in `post`. Whereas
deletion (be it account or slot) will be signified by inclusion in `pre` and omission
in `post` list.

Signed-off-by: Delweng <[email protected]>

* eth/traces: add state limit (ethereum#25812)

This PR introduces a new mechanism in chain tracer for preventing creating too many trace states.

The workflow of chain tracer can be divided into several parts:

- state creator generates trace state in a thread
- state tracer retrieves the trace state and applies the tracing on top in another thread
- state collector gathers all result from state tracer and stream to users

It's basically a producer-consumer model here, while if we imagine that the state producer generates states too fast, then it will lead to accumulate lots of unused states in memory. Even worse, in path-based state scheme it will only keep the latest 128 states in memory, and the newly generated state will invalidate the oldest one by marking it as stale.

The solution for fixing it is to limit the speed of state generation. If there are over 128 states un-consumed in memory, then the creation will be paused until the states are be consumed properly.

* core/bloombits: speed up windows-test (ethereum#25844)

core/bloombits: remove micro-sleep

* core, ethclient/gethclient: improve flaky tests (ethereum#25918)

* ethclient/gethclient: improve time-sensitive flaky test

* eth/catalyst: fix (?) flaky test

* core: stop blockchains in tests after use

* core: fix dangling blockchain instances

* core: rm whitespace

* eth/gasprice, eth/tracers, consensus/clique: stop dangling blockchains in tests

* all: address review concerns

* core: goimports

* eth/catalyst: fix another time-sensitive test

* consensus/clique: add snapshot test run function

* core: rename stop() to stopWithoutSaving()

Co-authored-by: Felix Lange <[email protected]>

* node: prevent exposing engine API on unauthenticated endpoint (ethereum#25939)

* node: prevent exposing engine API on unauthenticated endpoint

* node: improve RPC setup

* eth/filters: fix for eth_getLogs failing with finalized- and safe tag  (ethereum#25922)

Prior to this change, f.begin (and possibly end) stay negative, leading to strange results later in the code. With this change, filters using "safe" and "finalized" block produce results consistent w/ the overall behavior of this RPC method.

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/geth: fix help output issues (ethereum#25941)

This update resolves an issue where StringSliceFlag would not be
rendered correctly in help output + mention that -H can be used multiple times

Co-authored-by: Martin Holst Swende <[email protected]>

* accounts/usbwallet: support Ledger Nano S Plus and FTS (ethereum#25933)

* usbwallet support Ledger Nano S Plus

* accounts/usbwallet: add definitions + ref to ledger docs

Co-authored-by: Martin Holst Swende <[email protected]>

* all: fix spelling mistakes (ethereum#25961)

* cmd/geth, core: fix typo in comment (ethereum#25954)

* fix typo on comment

* typo "can't accept"

* core/rawdb: provide more info on 'gap in the chain' error (ethereum#25938)

* core/types: add more context around ErrInvalidChainID (ethereum#25367)

This changes the error message for mismatching chain ID to show
the given and expected value. Callers expecting this error must be
changed to use errors.Is.

* common/math: optimized modexp (+ fuzzer) (ethereum#25525)

This adds a 
* core/vm, tests: optimized modexp + fuzzer

* common/math: modexp optimizations

* core/vm: special case base 1 in big modexp

* core/vm: disable fastexp

* tests/fuzzers/modexp: gofmt (ethereum#25972)

* node: drop support for static & trusted node list files (ethereum#25610)

This changes the node setup to ignore datadir files

    static-nodes.json
    trusted-nodes.json

When these files are present, it an error will be printed to the log.

* accounts/keystore: faster tests (ethereum#25827)

This PR removes some optimistic tests -- a'la "do something,
wait a while, and hope it has trickled through and continue" -- and
instead uses some introspection to ensure that prerequisites are met.

* eth/protocols/eth: fix typo in log message (ethereum#25969)

* eth/filters, ethclient/gethclient: add fullTx option to pending tx filter (ethereum#25186)

This PR adds a way to subscribe to the _full_ pending transactions, as opposed to just being notified about hashes. 

In use cases where client subscribes to newPendingTransactions and gets txhashes only to then request the actual transaction, the caller can now shortcut that flow and obtain the transactions directly. 


Co-authored-by: Felix Lange <[email protected]>

* go.mod: upgrade github.com/dop251/goja (ethereum#25955)

This upgrade pulls in a fix to handling of 'continue' in loops.

* eth/tracers: fix the issue of panic in prestate with diffmode (ethereum#25957)

In some cases, inner contract creation may not be successful, and an inner contract was not created. This PR fixes a crash that could occur when doing tracing in such situations.

* Revert "go.mod: upgrade github.com/dop251/goja" (ethereum#25975)

Revert "go.mod: upgrade github.com/dop251/goja (ethereum#25955)"

This reverts commit 9207e34.

* common/math, tests/fuzzers: use big.Int clone (ethereum#26006)

* common/math, tests/fuzzers: use big.Int clone

* common/math: license

* cmd/utils: enable snapshot generation in import-mode (ethereum#25990)

This PR fixes a regression causing snapshots not to be generated in "geth --import" mode.  It also fixes the geth export command to be truly readonly, and adds a new test for geth export.

* core/rawdb: refactor db key prefix (ethereum#26000)

Co-authored-by: seven <[email protected]>

* core/rawdb: open meta file in read only mode (ethereum#26009)

* internal/ethapi, accounts/abi/backends: use error defined in core (ethereum#26012)

Co-authored-by: seven <[email protected]>

* eth/tracers: fix the issue prestate missing existing contract state (ethereum#25996)

The prestate tracer did not report accounts that existed at a given address prior to a contract being created at that address.

Signed-off-by: Delweng <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* eth/tracers: simplify test framework (ethereum#25973)

Co-authored-by: Sina Mahmoodi <[email protected]>

* all: refactor txpool into it's own package in prep for 4844

* core/types: rename tx files to group them better together

* core, eth: for types with accurate size calcs, return uint64, not float (ethereum#26046)

* core, eth: for types with accurate size calcs, return uint64, not float

* core/types: proper tx size tests

* core/types: extend tx size test with decoded sizes, fix error

* core/txpool: fix linter

Co-authored-by: Martin Holst Swende <[email protected]>

* build: upgrade -dlgo version to Go 1.19.2

* accounts/scwallet: fix keycard data signing error (ethereum#25331)

accounts/scwallet: fix keycard data signing

* build: make ios work again (ethereum#26052)

* core/vm: use optimized bigint (ethereum#26021)

* eth/filters: change filter block to be by-ref (ethereum#26054)

This PR changes the block field in the filter to be a pointer, to disambiguate between empty hash and no hash

* core/rawdb: refactor db inspector for extending multiple ancient store (ethereum#25896)

This PR ports a few changes from PBSS:

- Fix the snapshot generator waiter in case the generation is not even initialized
- Refactor db inspector for ancient store

* cmd/evm: calc base fee if parent data is present (ethereum#26051)

Currently, in order to chain together sequential valid t8n transitions the caller must manually calculate the block base fee. This PR adds support for the necessary parent fee market data to calculate the base fee for the current transition.

Concretely, env is extended to accept the following:

    parentBaseFee
    parentGasUsed
    parentGasLimit

Example usage can be found in ./cmd/evm/testdata/25.

Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: fix gasUsed for native and JS tracers (ethereum#26048)

* eth/tracers: fix gasUsed in call tracer

* fix js tracers gasUsed

* fix legacy prestate tracer

* fix restGas in test

* drop intrinsicGas field from js tracers

* cmd, eth: implement full-sync tester (ethereum#26035)

This PR adds a parameter to startup, --synctarget. The synctarget flag is a developer-flag, that can be useful in some scenarios as a replacement for a CL node. It defines a fixed block sync target:

geth --syncmode=full --synctarget=./block_15816882.hex_rlp 

The --synctarget is only made available during syncmode=full

* rpc: update docstring (ethereum#26072)

Co-authored-by: seven <[email protected]>

* Fix trace call for inner reverts (ethereum#25971)

Inner call reverts will now return the reason similar to the top-level call. Separately, if top-level call is of type CREATE and it fails, its `to` field will now be cleared to `0x00...00` instead of being set to the created address.

* eth: implement eth/68 (ethereum#25980)

* eth: implement eth/68

* eth/protocols/eth: added tx size to announcement

* eth/protocols/eth: check equal lengths on receiving announcement

* eth/protocols/eth: add +1 to tx size because of the type byte

* eth: happy lint, add eth68 tests, enable eth68

* eth: various nitpick fixes on eth/68

* eth/protocols/eth: fix announced tx size wrt type byte

Co-authored-by: MariusVanDerWijden <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>

* eth/tracers: add withLog to callTracer (ethereum#25991)

In some cases, it is desirable to capture what is triggered by each trace, when using the `callTracer`. For example: call `USDT.transfer` will trigger a `Transfer(from, to, value)` event.

This PR adds the option to capture logs to the call tracer, by specifying `{"withLog": true}` in the tracerconfig. 
Any logs belonging to failed/reverted call-scopes are removed from the output, to prevent interpretation mistakes.

Signed-off-by: Delweng <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* eth/tracers: prestateTracer - exclude unchanged storage slots in diffMode (ethereum#25944)

Fixes ethereum#25943

* accounts/abi: return error on fixed bytes with size larger than 32 bytes (ethereum#26075)

* fixed bytes with size larger than 32 bytes is not allowed

* add testcase

* consensus/ethash: fix typo (ethereum#26016)

fix typo

* docs/postmortems: remove wrong parentheses (ethereum#26066)

Removed parentheses in line 71 because line 80 doesn't have them either.

* miner, eth: implement recommit mechanism for payload building (ethereum#25836)

* miner, eth: implement recommit for payload building

* miner: address comments from marius

* miner: fail early if core.NewBlockChain fails (ethereum#26079)

don't ignore errors returned by core.NewBlockChain when initializing tests

* p2p/discover: fix handling of distance 256 in lookupDistances (ethereum#26087)

Noticed that lookupDistances for FINDNODE requests didn't consider 256 a valid
distance. This is actually part of the example in the comment above the
function, surprised that wasn't tested before.

* rlp: add more tests for nil pointer / optional field encoding (ethereum#26077)

* rpc: handle wrong HTTP batch response length (ethereum#26064)

* cmd/clef: add `list-accounts` and `list-wallets` to CLI (ethereum#26080)

This commit adds support for two new commands to clef, making it possible to list accounts / wallets from the command-line-interface. 

Co-authored-by: Martin Holst Swende <[email protected]>

* merge devnet-v3 with latest master, part 1

* crypto/bls12381: docs - fix broken links to references (ethereum#26095)

Signed-off-by: Abirdcfly <[email protected]>
Signed-off-by: Delweng <[email protected]>
Signed-off-by: meows <[email protected]>
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: Justin Traglia <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: zhiqiangxu <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: xinbenlv <[email protected]>
Co-authored-by: Abirdcfly <[email protected]>
Co-authored-by: uji <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: Rachel Bousfield <[email protected]>
Co-authored-by: Seungbae Yu <[email protected]>
Co-authored-by: Jakub Freebit <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: xternet <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Joshua Gutow <[email protected]>
Co-authored-by: Amir Hossein <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Nicholas Zhao <[email protected]>
Co-authored-by: Benjamin Prosnitz <[email protected]>
Co-authored-by: Nicolas Gotchac <[email protected]>
Co-authored-by: pinkiebell <[email protected]>
Co-authored-by: George Carder <[email protected]>
Co-authored-by: jwasinger <[email protected]>
Co-authored-by: makcandrov <[email protected]>
Co-authored-by: AtomicAzzaz  <[email protected]>
Co-authored-by: ewile <[email protected]>
Co-authored-by: Delweng <[email protected]>
Co-authored-by: Boqin@MetaSecureLabs <[email protected]>
Co-authored-by: Sebastian Stammler <[email protected]>
Co-authored-by: Zachinquarantine <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Leon <[email protected]>
Co-authored-by: meowsbits <[email protected]>
Co-authored-by: Janko Simonovic <[email protected]>
Co-authored-by: Alexey Shekhirin <[email protected]>
Co-authored-by: lmittmann <[email protected]>
Co-authored-by: TY <[email protected]>
Co-authored-by: ty <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Mikhail Vazhnov <[email protected]>
Co-authored-by: Ryan Schneider <[email protected]>
Co-authored-by: jin <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: Jens W <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: seven <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: vdwijden <[email protected]>
Co-authored-by: Sebastian Supreme <[email protected]>
Co-authored-by: Jordan Krage <[email protected]>
Co-authored-by: Joseph Cook <[email protected]>

* remove legacy kzg verification, put all initialization on top (#44)

* add header & block fields for Withdrawals (#45)

* add header & block fields for Withdrawals

* Update cmd/evm/internal/t8ntool/block.go

Co-authored-by: Inphi <[email protected]>

Co-authored-by: Inphi <[email protected]>

* use go-kzg PolyLinComb instead of local impl

* make verify_kzg_proof apis more closely mimic the specs (#46)

* move more low-level kzg stuff into kzg_new (#48)

* start using custom types from the 4844 spec

* move ComputePowers into kzg_new

* 1) move BlobsToKZGCommitment functionality into kzg_new and make it more closely follow the spec.

2) Remove the BlobsBatch stuff which seems only to be for legacy benchmarking.

* Replace kzg-related data_blob.go type methods Parse, ComputeCommitment, and
Point, so we can move methods that depend on them into the kzg package.

* Remove ComputeCommitments which is unused.

* Add BytesToBLSField go kzg_new, use it instead of hashToFr

* Update KZG library according to latest consensus spec changes (#49)

* Replace kzg-related data_blob.go type methods Parse, ComputeCommitment, and
Point, so we can move methods that depend on them into the kzg package.

* Remove ComputeCommitments which is unused.

* Migrate remaining EIP-4844 consensus spec code into kzg_new,
updated to include the latest consensus spec updates.

* Start implementing a bytes API with appropriate interfaces

Also fix incorrect hash type (Keccac -> Sha256) when
computing versioned hash.

* pure bytes API for VerifyKZGProof per 3097, and move kzg_new back into kzg.go now that updates are near complete

* rename verifyBlobs validateBlobTransactionWrapper per updated spec, and make implementation more closely follow it

* fix tests & type bug in kzg verification

* more consensus layer support in kzg package

* remove aggregated proof from blobs bundle

* propagate malformed blob errors when processing a sent transaction so that these get rejected

* move more CL eip-4844 methods from prysm to shared lib (#50)

Signed-off-by: Abirdcfly <[email protected]>
Signed-off-by: Delweng <[email protected]>
Signed-off-by: meows <[email protected]>
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: Justin Traglia <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: zhiqiangxu <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: xinbenlv <[email protected]>
Co-authored-by: Abirdcfly <[email protected]>
Co-authored-by: uji <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: Rachel Bousfield <[email protected]>
Co-authored-by: Seungbae Yu <[email protected]>
Co-authored-by: Jakub Freebit <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: xternet <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Joshua Gutow <[email protected]>
Co-authored-by: Amir Hossein <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Nicholas <[email protected]>
Co-authored-by: Nicholas Zhao <[email protected]>
Co-authored-by: Benjamin Prosnitz <[email protected]>
Co-authored-by: Nicolas Gotchac <[email protected]>
Co-authored-by: pinkiebell <[email protected]>
Co-authored-by: George Carder <[email protected]>
Co-authored-by: jwasinger <[email protected]>
Co-authored-by: makcandrov <[email protected]>
Co-authored-by: AtomicAzzaz  <[email protected]>
Co-authored-by: ewile <[email protected]>
Co-authored-by: Delweng <[email protected]>
Co-authored-by: Boqin@MetaSecureLabs <[email protected]>
Co-authored-by: Sebastian Stammler <[email protected]>
Co-authored-by: Zachinquarantine <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Leon <[email protected]>
Co-authored-by: meowsbits <[email protected]>
Co-authored-by: Janko Simonovic <[email protected]>
Co-authored-by: Alexey Shekhirin <[email protected]>
Co-authored-by: lmittmann <[email protected]>
Co-authored-by: TY <[email protected]>
Co-authored-by: ty <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Mikhail Vazhnov <[email protected]>
Co-authored-by: Ryan Schneider <[email protected]>
Co-authored-by: jin <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: Jens W <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: seven <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: vdwijden <[email protected]>
Co-authored-by: Sebastian Supreme <[email protected]>
Co-authored-by: Jordan Krage <[email protected]>
Co-authored-by: Joseph Cook <[email protected]>
Co-authored-by: Inphi <[email protected]>
holiman added a commit that referenced this pull request Mar 8, 2023
reverts #26021, to use the upstream bigint instead.
roberto-bayardo added a commit to mdehoog/go-ethereum that referenced this pull request Mar 17, 2023
* travis, build: update Go to 1.20.1 (ethereum#26653)

travis, build: update Go to 1.20

* core: check genesis state presence by disk read (ethereum#26703)

* core, eth/downloader: make body validation more strict (ethereum#26704)

* eth/downloader: fix empty-body case in queue fetchresult (ethereum#26707)

* eth/downloader: fix typo (ethereum#26716)

* all: remove deprecated uses of math.rand (ethereum#26710)

This PR is a (superior) alternative to ethereum#26708, it handles deprecation, primarily two specific cases. 

`rand.Seed` is typically used in two ways
- `rand.Seed(time.Now().UnixNano())` -- we seed it, just to be sure to get some random, and not always get the same thing on every run. This is not needed, with global seeding, so those are just removed. 
- `rand.Seed(1)` this is typically done to ensure we have a stable test. If we rely on this, we need to fix up the tests to use a deterministic prng-source. A few occurrences like this has been replaced with a proper custom source. 

`rand.Read` has been replaced by `crypto/rand`.`Read` in this PR.

* params: go-ethereum v1.11.1 stable

* params: begin v1.11.2 release cycle

* eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (ethereum#26696)

This change will break one hive test, but pass another and it will be the better way going forward

* ci: disable coverage reporting in appveyor and travis

* eth/catalyst: request too large error (ethereum#26722)

The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <[email protected]>

* core/trie: remove trie tracer (ethereum#26665)

This PR contains a small portion of the full pbss PR, namely

    Remove the tracer from trie (and comitter), and instead using an accessList.
    Related changes to the Nodeset.


---------

Co-authored-by: Gary Rong <[email protected]>

* rpc: fix unmarshaling of null result in CallContext (ethereum#26723)

The change fixes unmarshaling of JSON null results into json.RawMessage.

---------

Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>

* build: ship bootstrapper Go along with builder for PPA (ethereum#26731)

* build: fix setting env var, temp early exit

* build: fix gobootstrap path for the PPA

* build: add some PPA debug logs, sigh

* internal/build: revert raising the chunk size for PPA

* build: yet another weird PPA fix

* build: fix (finaly?) the PPA env vars for Go bootstrapping

* build: fix Go 1.19.0 bootstrapper issues on 386 PPA

* build: enable Lunar Lobster PPA builds

* Revert "core/trie: remove trie tracer (ethereum#26665)" (ethereum#26732)

This reverts commit 7c749c9.

* cmd/geth: clarify dumpconfig options (ethereum#26729)

Clarifies the documentation around dumpconfi

Signed-off-by: Sungwoo Kim <[email protected]>

* core, eth: merge snap-sync chain download progress logs (ethereum#26676)

* core: fix accessor mismatch for genesis state (ethereum#26747)

* core/rawdb: expose chain freezer constructor without internals (ethereum#26748)

* all: use unified emptyRootHash and emptyCodeHash (ethereum#26718)

The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot

* eth/filters: fix a breaking change and return rpctransaction (ethereum#26757)

* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <[email protected]>

* common/math: allow HexOrDecimal to accept unquoted decimals too (ethereum#26758)

* params: release Geth v1.11.2

* params: begin v.1.11.3 release cycle

* log: improve documentation (ethereum#26753)

Add usage examples

* core/rawdb, node: use standalone flock dependency (ethereum#26633)

* eth: use the last announced finalized block as the sync ancient limit (ethereum#26685)

* cmd/devp2p: faster crawling + less verbose dns updates (ethereum#26697)

This improves the speed of DHT crawling by using concurrent requests.
It also removes logging of individual DNS updates.

* eth/tracers: add native flatCallTracer (aka parity style tracer) (ethereum#26377)

Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <[email protected]>

* core: improve withdrawal index assignment in GenerateChain (ethereum#26756)

This fixes an issue where the withdrawal index was not calculated correctly
for multiple withdrawals in a single block.

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix range compaction (ethereum#26771)

* ethdb/pebble: fix range compaction

* ethdb/pebble: add comment

* ethdb/pebble: fix max memorytable size (ethereum#26776)

* ethclient: include withdrawals in ethclient block responses (ethereum#26778)

* include withdrawals in ethclient responses

* omit empty withdrawals array in json serialization

* all: change chain head markers from block to header (ethereum#26777)

* core/rawdb, ethdb/pebble: disable pebble on openbsd (ethereum#26801)

* core: fix a merge fault (ethereum#26802)

* README, go.mod, event, internal/version: bump min Go to 1.19 (ethereum#26803)

* travi: remove strange leftover Go version

* core, params: schedule Shanghai on goerli (ethereum#26795)

* core: params: schedule Shanghai on goerli

* core/forkid: fix comment

* eth: remove admin.peers[i].eth.head and difficulty (ethereum#26804)

* core/types: add EffectiveGasPrice in Receipt (ethereum#26713)

This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.

Co-authored-by: PulsarAI <[email protected]>

* core, eth/catalyst: fix race conditions in tests (ethereum#26790)

Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.

* metrics: improve accuracy of CPU gauges (ethereum#26793)

This PR changes metrics collection to actually measure the time interval between collections, rather
than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).

---------

Co-authored-by: Felix Lange <[email protected]>

* ethclient: fix panic when requesting missing blocks (ethereum#26817)

This fixes a regression introduced by ethereum#26723.
Fixes ethereum#26816.

* core, miner: revert block gas counter in case of invalid transaction (ethereum#26799)

This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes ethereum#26791

* internal/ethapi: add tests for transaction types JSON marshal/unmarshal (ethereum#26667)

Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/evm: correct `alloc` for `t8n` testdata (ethereum#26822)

Fixes a minor error in the testdata

* eth/tracers/native: set created address to nil in case of failure (ethereum#26779)

Fixes ethereum#26073

* accounts/usbwallet: mitigate ledger app chunking issue (ethereum#26773)

This PR mitigates an issue with Ledger's on-device RLP deserialization, see
LedgerHQ/app-ethereum#409

Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)

Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.

We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.

* beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (ethereum#26698)

This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <[email protected]>

* build: update to go 1.20.2 (ethereum#26824)

* params: go-ethereum v1.11.3 stable

* params: begin v1.11.4 release cycle

* core/rawdb: find smallest block stored in key-value store when chain gapped (ethereum#26719)

This change prints out more information about the problem, in the case where geth detects a gap between leveldb and ancients, so we can determine more exactly where the gap is (what the first missing is). Also prints out more metadata. 

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* signer/core: accept all solidity primitive types for EIP-712 signing  (ethereum#26770)

Accept all primitive types in Solidity for EIP-712 from intN, uintN, intN[], uintN[] for N as 0 to 256 in multiples of 8

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* params: remove EF azure bootnodes (ethereum#26828)

* core/vm: use golang native big.Int (ethereum#26834)

reverts ethereum#26021, to use the upstream bigint instead.

* core/vm: fix typo in comment (ethereum#26838)

fixes eip 220 ->  2200

* core/forkid: fix issue in validation test (ethereum#26544)

This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.

* cmd/evm: update readmes for the tests (ethereum#26841)

* core, core/types: plain Message struct (ethereum#25977)

Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4 (November 2016).

The core.Message interface was added in December 2014, in commit
db49417, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <[email protected]>

* travis: only build PPAs nightly, not on every push, too heavy (ethereum#26846)

* p2p: small comment typo (ethereum#26850)

Update server.go

* core: add Timestamp method in BlockGen (ethereum#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.

* core/txpool: implement additional DoS defenses (ethereum#26648)

This adds two new rules to the transaction pool:

- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.

---

Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* params: go-ethereum v1.11.4 stable

* params: begin v1.11.5 release cycle

* tests: define `MuirGlacier` fork (ethereum#26856)

add muir glacier to t8n

* code/vm: fix comment typo (ethereum#26865)

it should be constantinople rather than contantinople

* core: minor code refactor (ethereum#26852)

* core: refactor code

* core: drop it from this anonymous goroutine func

* core/txpool: use priceList.Put instead of heap.Push (ethereum#26863)

Minor refactor to use the 'intended' accessor

* eth: return error if 'safe' or 'finalized' tag used pre-merge (ethereum#26862)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* .travis.yml: reenable PPA build on tag push (ethereum#26873)

* core/state, trie: port changes from PBSS (ethereum#26763)

* p2p/discover: pass invalid discv5 packets to Unhandled channel (ethereum#26699)

This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.

* all: update links in documentation (ethereum#26882)


Co-authored-by: Stephen Flynn <[email protected]>

* Increase websocket frame size (from erigon rpc client) (ethereum#26883)

This increases the maximum allowed message size to 32MB.

Originally submitted at erigontech/erigon#2739

example block failure: https://etherscan.io/tx/0x1317d973a55cedf9b0f2df6ea48e8077dd176f5444a3423368a46d6e4db89982#internal

* cmd/devp2p, cmd/geth: add version in --help output (ethereum#26895)

Not sure why this was removed, it's pretty useful to see the version
also in --help.

* Update core/gaspool.go

Co-authored-by: Inphi <[email protected]>

---------

Signed-off-by: Sungwoo Kim <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Roman Krasiuk <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Sungwoo Kim <[email protected]>
Co-authored-by: Yier <[email protected]>
Co-authored-by: Catror <[email protected]>
Co-authored-by: Nate Armstrong <[email protected]>
Co-authored-by: Chris Ziogas <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Dan Cline <[email protected]>
Co-authored-by: Peter (bitfly) <[email protected]>
Co-authored-by: PulsarAI <[email protected]>
Co-authored-by: turboboost55 <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: James Prestwich <[email protected]>
Co-authored-by: Daniel Fernandes <[email protected]>
Co-authored-by: Rafael Matias <[email protected]>
Co-authored-by: xiyang <[email protected]>
Co-authored-by: panicalways <[email protected]>
Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Jonathan Otto <[email protected]>
Co-authored-by: Inphi <[email protected]>
sduchesneau pushed a commit to streamingfast/go-ethereum that referenced this pull request Mar 20, 2023
gitteri pushed a commit to paxosglobal/go-ethereum that referenced this pull request May 1, 2023
* cmd/bootnode, cmd/utils: add 'pmp:<IP>' to --nat flag description (ethereum#26381)

* cmd/evm: fix typo in README.md (ethereum#26500)

* build: upgrade -dlgo version to Go 1.19.5 (ethereum#26472)

* cmd/evm: typo fix in docs (ethereum#26506)

* metrics/influxdb: fix time ticker leaks (ethereum#26507)

* eth/filters: fix typo in comment (ethereum#26515)

* les/fetcher : fix requestTimer leak (ethereum#26514)

les/fetcher : fix requestTimer leak

* core/txpool: check if initcode size is exceeded (ethereum#26504)

* core/txpool: check if initcode size is exceeded

* core/txpool: move check

* all: remove Kiln testnet (ethereum#26522)

Kiln was deprecated after the merge.

* console, internal/jsre: fix autocomplete issues (ethereum#26518)

Fixes ethereum#26505 where the console crashed when a property getter
raised an exception during autocompletion. I also noticed while fixing this
issue that autocomplete wasn't working for objects/fields with numbers in
them (most importantly web3.<tab><tab>) which is also now fixed.

* go.mod: upgrade to go-bip39 v1.1.0 (ethereum#26527)

* go.sum: tidy (ethereum#26525)

* .travis.yml: go1.19.5 for android builds (ethereum#26524)

* params: define cancun and prague as timestamp based forks (ethereum#26481)

* params: define cancun and osaka as timestamp based forks

* core, params: change osaka to prague

* params: fix

* signer/core: don't require capital lettered reference types (ethereum#26462)

* miner, cmd, eth: require explicit etherbase address (ethereum#26413)

This change introduces a breaking change to miner.etherbase is configured.

Previously, users did not need to explicitly set the  etherbase address via flag, since 'first' local account was used as etherbase automatically. This change removes the  "default first account" feature.

In Proof-of-stake world, the fee recipient address is provided by CL, and not configured in Geth any more - meaning that miner.etherbase is mostly for legacy networks(pow, clique networks etc).

* go.mod: upgrade to latest goja (ethereum#26523)


Co-authored-by: Felix Lange <[email protected]>

* go.sum: go mod tidy (ethereum#26536)

* all: use http package to replace http method names (ethereum#26535)

* cmd/utils: improve parsing of --miner.etherbase address (ethereum#26541)

This fixes a regression where the flag did not accept values without
the 0x prefix anymore. What's worse, if an invalid value was passed,
the client would just log an INFO level message and continue.

* all: make timestamp-based fork checks based on uint64 (ethereum#26474)

This PR changes the API so that uint64 is used for fork timestamps.
It's a good choice because types.Header also uses uint64 for time.

Co-authored-by: Felix Lange <[email protected]>

* all: implement withdrawals (EIP-4895)  (ethereum#26484)

This change implements withdrawals as specified in EIP-4895.

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: marioevz <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* cmd/utils: fix error at geth startup in --dev mode (ethereum#26550)

This fixes a regression in ethereum#26541 where we turned the miner address
being missing into a startup error. The address was not configured in
--dev mode.

* eth/catalyst: error on nil withdrawals post-shanghai (ethereum#26549)

This adds explicit checks for the presence of withdrawals in the engine API.

Co-authored-by: Felix Lange <[email protected]>

* eth/catalyst: implement exchangeCapabilities method (ethereum#26555)

Spec: ethereum/execution-apis#364

* params: fix timestamp display in fork banner (ethereum#26553)

* params: remove deprecated bootnodes (ethereum#26530)

This change removes the Infura rinkeby bootnode as well as two deprecated ropsten bootnodes. 

Co-authored-by: Nicola Cocchiaro <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* go.mod: gnark-crypto upgrade (ethereum#26545)

* cmd/evm: add blocktest subcommand to evm (ethereum#26526)

Adds blocktest subcommand to the evm command, which is very similar to statetest, but instead of loading a StateTest static test it loads a BlockchainTest from a json file and runs it.

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: lightclient <[email protected]>

* eth/catalyst: fix panic in TestWithdrawals (ethereum#26563)

Fixes a regression introduced in ethereum#26549

* log: fix typo in comment (ethereum#26569)

* cmd/devp2p: fix broken link in readme(ethereum#26576)

fix broken link to DNS discovery tutorial

* log: better sanitation (ethereum#26556)

* ethclient/gethclient: fix typo (ethereum#26580)

fix grammar typo

* eth/tracer: rename to revertReason (ethereum#26574)

* internal/ethapi: always return block withdrawals if present (ethereum#26565)

The execution-apis specification says that the full list of withdrawals should always be returned when requesting a block over RPC:

https://github.com/ethereum/execution-apis/blob/378c4304f75b5af2c9b5263c9c76b511e33e8984/src/schemas/block.yaml#L90-L94

This change adopts the expected behavior.

* cmd/puppeth: remove puppeth

* core: improve ambiguous block validation message (ethereum#26582)

* eth/catalyst: return invalid params instead of invalid payload params (ethereum#26591)

* cmd, eth, node: deprecate personal namespace (ethereum#26390)

* eth: cmd: deprecate personal namespace

* eth: cmd: move deprecation to node

* node: disable toml of enablepersonal

* node: disable personal on ipc as well

* Update node/node.go

Co-authored-by: Martin Holst Swende <[email protected]>

* console: error -> warn

* node: less roulette

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* accounts, build, mobile: remove Andriod and iOS support

* core/vm: improve EVM instance reusability (ethereum#26341)

This change improves reusability of the EVM struct. Two methods are added:

- SetBlockContext(...)
- SetTracer(...)

Other attributes like the TransactionContext and the StateDB can already be updated.
BlockContext and Tracer are partially not updateable right now. This change fixes it and
opens the potential to reuse an EVM struct in more ways.

Co-authored-by: Felix Lange <[email protected]>

* eth/catalyst: implement engine_getPayloadBodiesByHash/Range methods (ethereum#26232)

This change implements engine_getPayloadBodiesByHash and engine_getPayloadBodiesByRange, according to the specification at https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#specification-4 .

Co-authored-by: Martin Holst Swende <[email protected]>

* readme: fix broken link  (ethereum#26612)

* rpc: fix off-by-one in ipc endpoint length check (ethereum#26614)

This change fixes a minor flaw in the check for ipc endpoint length. The max_path_size is the max path that an ipc endpoint can have, which is 208. However, that size concerns the null-terminated pathname, so we need to account for an extra null-character too.

* core/vm: add bn256ScalarMul testcase for zero scalar value (ethereum#26607)

EIP-196 allows a zero value in the scalar argument to precompile `0x07`. This change adds a test for that case.

* README: remove text about GPU mining (ethereum#26609)


Co-authored-by: Felix Lange <[email protected]>

* all: prepare for path-based trie storage (ethereum#26603)

This PR moves some trie-related db accessor methods to a different file, and also removes the schema type. Instead of the schema type, a string is used to distinguish between hashbased/pathbased db accessors.
This also moves some code from trie package to rawdb package.

This PR is intended to be a no-functionality-change prep PR for ethereum#25963 .

---------

Co-authored-by: Gary Rong <[email protected]>

* beacon/engine: move core/beacon to beacon/engine (ethereum#26616)

This PR moves core/beacon to beacon/engine so that beacon-chain related code has its own top level package which also can house the the beacon lightclient-code.

* build: upgrade to golangci-lint v1.51.1 (ethereum#26618)

* tests: update (ethereum#26548)

This updates the reference tests to the latest version.

Co-authored-by: Felix Lange <[email protected]>

* accounts/abi: fix integer encoding/decoding (ethereum#26568)

This PR fixes this abi encoder/decoder to be more stringent.

* rpc: remove DecimalOrHex type (ethereum#26629)

It's the same as math.HexOrDecimal64, which has more uses across the codebase.

* eth/catalyst,miner: include withdrawals in payload id calculation (ethereum#26554)

According to the spec the payloadID needs to be random or dependent on all arguments, to prevent two payloads from clashing. This change adds withdrawals into the payload derivation. 

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* light: fix receiver name from Python style to Go (ethereum#26631)

Co-authored-by: Halil Yildirim <[email protected]>

* log: allow tabs in log messages (ethereum#26630)

* log: allow tabs in log messages

This fixes a regression where panic reports in RPC handlers were quoted
because they contain tab characters.

* Update format.go

* all: remove database commit callback, rework noderesolver (ethereum#26637)

This change ports some changes from the main PBSS PR:

  - get rid of callback function in `trie.Database.Commit` which is not required anymore
  - rework the `nodeResolver` in `trie.Iterator` to make it compatible with multiple state scheme
  - some other shallow changes in tests and typo-fixes

* eth/catalyst: make getPayloadBodiesByRange take hex inputs (ethereum#26624)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>

* all: remove support for Ropsten (ethereum#26644)

* ethdb: pebble backend (64bit platforms only) (ethereum#26517)

* ethdb: use pebble

Co-authored-by: Gary Rong <[email protected]>

foo

update

* apply suggested changes

* flags: go format

node: fix ddir lookup mistake

accounts/abi/bind: fix go.mod replacement for generated binding

deps: update pebble + with fix 32-bit build

* ethdb/pebble: respect max memtable size

* core/rawdb, ethdb: enable pebble on non-32bit platforms only

* core/rawdb: fix build tags, fix some review concerns

* core/rawdb: refactor methods for database opening

* core/rawdb: remove erroneous build tag

* cmd/geth: fix the flag default handling + testcase

* cmd/geth: improve testing regarding custom backends

* ethdb/pebble, deps: update pebble dependency

* core/rawdb: replace method with Open

* ethdb/pebble: several updates for pebble (ethereum#49)

* ethdb/pebble: fix size count in batch

* ethdb/pebble: disable seek compaction

* ethdb/pebble: more fixes

* ethdb, core, cmd: polish and fixes (ethereum#50)

* cmd/utils, core/rawdb, ethdb/pebble: address some review concerns

* Update flags.go

* ethdb/pebble: minor refactors

* ethdb/pebble: avoid copy on batch replay

* ethdb: fix compilation flaw

* cmd: fix test fail due to mismatching error message

* cmd/geth, node: rename backingdb to db.engine

---------

Co-authored-by: Jared Wasinger <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>

* eth/catalyst: disallow forkchoiceupdate v1 post-shanghai (ethereum#26645)

* common/prque: generic priority queue (ethereum#26290)

* common, core, eth, les, trie: make prque generic

* les/vflux/server: fixed issues in priorityPool

* common, core, eth, les, trie: make priority also generic in prque

* les/flowcontrol: add test case for priority accumulator overflow

* les/flowcontrol: avoid priority value overflow

* common/prque: use int priority in some tests

No need to convert to int64 when we can just change the type used by the
queue.

* common/prque: remove comment about int64 range

---------

Co-authored-by: Zsolt Felfoldi <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix nil callbacks (ethereum#26650)

* eth/downloader: fix timeout resurrection panic (ethereum#26652)

* common/prque, eth/downloader: fix timeout resurrection panic

* common/prque: revert -1 hack for les, temporaryly!

* core/state, trie: remove unused error-return from trie Commit operation (ethereum#26641)

* go.mod: update pebble to latest master (ethereum#26654)

* core/vm: set tracer-observable `value` of a delegatecall to match parent `value` (ethereum#26632)

This is a breaking change in the tracing hooks API as well as semantics of the callTracer:

- CaptureEnter hook provided a nil value argument in case of DELEGATECALL. However to stay consistent with how delegate calls behave in EVM this hook is changed to pass in the value of the parent call.
- callTracer will return parent call's value for DELEGATECALL frames.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* ethdb: add benchmark test suite (ethereum#26659)

* params: schedule shanghai fork on sepolia (ethereum#26662)

* params: schedule shanghai fork on sepolia

* params: u64 -> newUint64

* eth/filters: avoid block body retrieval when no matching logs (ethereum#25199)

Logs stored on disk have minimal information. Contextual information such as block
number, index of log in block, index of transaction in block are filled in upon request.
We can fill in all these fields only having the block header and list of receipts.
But determining the transaction hash of a log requires the block body.

The goal of this PR is postponing this retrieval until we are sure we the transaction hash.
It happens often that the header bloom filter signals there might be matches in a block,
but after actually checking them reveals the logs do not match. We want to avoid fetching
the body in this case.

Note that this changes the semantics of Backend.GetLogs. Downstream callers of
GetLogs now assume log context fields have not been derived, and need to call
DeriveFields on the logs if necessary.

* eth/tracers: more fork overrides in traceBlockToFile (ethereum#26655)

This change allows all post-Berlin forks to be specified as overrides for futureForkBlock in the config parameter for traceBlockToFile.

* tests/fuzzers: supply gnark multiexp config, fixes ethereum#26669 (ethereum#26670)

This change fixes a fuzzer which broke when we updated the gnark dependency earlier.

* cmd/devp2p: reduce output of node crawler (ethereum#26674)

Our discovery crawler spits out a huge amount of logs, most of which is pretty non-interesting. This change moves the very verbose output to Debug, and adds a 8-second status log message giving the general idea about what's going on.

* params: update mainnet + rinkeby CHT (ethereum#26677)

This change updates the CHT entries for mainnet and rinkeby

* eth/filters: replace atomic pointer with value (ethereum#26689)

* eth/filters: replace atomic.Pointer

* fix

* improve

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* p2p/dnsdisc: fix tests with Go 1.20 (ethereum#26690)

* eth/catalyst: return error if withdrawals are nil post-shanghai (ethereum#26691)

Spec: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#request

* ethdb/pebble: Fix `MemTableStopWritesThreshold` (ethereum#26692)

MemTableStopWritesThreshold was set to the max size of all memtables before blocking writing but should be set to the max number of memtables. This is documented [here](https://github.com/cockroachdb/pebble/blob/master/options.go#L738-L742).

* eth/downloader: handle missing withdrawals if empty list is expected (ethereum#26675)

This PR relaxes the block body ingress handling a bit: if block body withdrawals are missing (but expected to be empty), the body withdrawals are set to 'empty list' before being passed to upper layers. 

This fixes an issue where a block passed from EthereumJS to geth was deemed invalid.

* params: go-ethereum v1.11.0 stable

* params: begin v1.11.1 release cycle

* travis, build: update Go to 1.20.1 (ethereum#26653)

travis, build: update Go to 1.20

* core: check genesis state presence by disk read (ethereum#26703)

* core, eth/downloader: make body validation more strict (ethereum#26704)

* eth/downloader: fix empty-body case in queue fetchresult (ethereum#26707)

* eth/downloader: fix typo (ethereum#26716)

* all: remove deprecated uses of math.rand (ethereum#26710)

This PR is a (superior) alternative to ethereum#26708, it handles deprecation, primarily two specific cases. 

`rand.Seed` is typically used in two ways
- `rand.Seed(time.Now().UnixNano())` -- we seed it, just to be sure to get some random, and not always get the same thing on every run. This is not needed, with global seeding, so those are just removed. 
- `rand.Seed(1)` this is typically done to ensure we have a stable test. If we rely on this, we need to fix up the tests to use a deterministic prng-source. A few occurrences like this has been replaced with a proper custom source. 

`rand.Read` has been replaced by `crypto/rand`.`Read` in this PR.

* params: go-ethereum v1.11.1 stable

* params: begin v1.11.2 release cycle

* eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (ethereum#26696)

This change will break one hive test, but pass another and it will be the better way going forward

* ci: disable coverage reporting in appveyor and travis

* eth/catalyst: request too large error (ethereum#26722)

The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <[email protected]>

* core/trie: remove trie tracer (ethereum#26665)

This PR contains a small portion of the full pbss PR, namely

    Remove the tracer from trie (and comitter), and instead using an accessList.
    Related changes to the Nodeset.


---------

Co-authored-by: Gary Rong <[email protected]>

* rpc: fix unmarshaling of null result in CallContext (ethereum#26723)

The change fixes unmarshaling of JSON null results into json.RawMessage.

---------

Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>

* build: ship bootstrapper Go along with builder for PPA (ethereum#26731)

* build: fix setting env var, temp early exit

* build: fix gobootstrap path for the PPA

* build: add some PPA debug logs, sigh

* internal/build: revert raising the chunk size for PPA

* build: yet another weird PPA fix

* build: fix (finaly?) the PPA env vars for Go bootstrapping

* build: fix Go 1.19.0 bootstrapper issues on 386 PPA

* build: enable Lunar Lobster PPA builds

* Revert "core/trie: remove trie tracer (ethereum#26665)" (ethereum#26732)

This reverts commit 7c749c9.

* cmd/geth: clarify dumpconfig options (ethereum#26729)

Clarifies the documentation around dumpconfi

Signed-off-by: Sungwoo Kim <[email protected]>

* core, eth: merge snap-sync chain download progress logs (ethereum#26676)

* core: fix accessor mismatch for genesis state (ethereum#26747)

* core/rawdb: expose chain freezer constructor without internals (ethereum#26748)

* all: use unified emptyRootHash and emptyCodeHash (ethereum#26718)

The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot

* eth/filters: fix a breaking change and return rpctransaction (ethereum#26757)

* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <[email protected]>

* common/math: allow HexOrDecimal to accept unquoted decimals too (ethereum#26758)

* params: release Geth v1.11.2

* params: begin v.1.11.3 release cycle

* log: improve documentation (ethereum#26753)

Add usage examples

* core/rawdb, node: use standalone flock dependency (ethereum#26633)

* eth: use the last announced finalized block as the sync ancient limit (ethereum#26685)

* cmd/devp2p: faster crawling + less verbose dns updates (ethereum#26697)

This improves the speed of DHT crawling by using concurrent requests.
It also removes logging of individual DNS updates.

* eth/tracers: add native flatCallTracer (aka parity style tracer) (ethereum#26377)

Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <[email protected]>

* core: improve withdrawal index assignment in GenerateChain (ethereum#26756)

This fixes an issue where the withdrawal index was not calculated correctly
for multiple withdrawals in a single block.

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix range compaction (ethereum#26771)

* ethdb/pebble: fix range compaction

* ethdb/pebble: add comment

* ethdb/pebble: fix max memorytable size (ethereum#26776)

* ethclient: include withdrawals in ethclient block responses (ethereum#26778)

* include withdrawals in ethclient responses

* omit empty withdrawals array in json serialization

* all: change chain head markers from block to header (ethereum#26777)

* core/rawdb, ethdb/pebble: disable pebble on openbsd (ethereum#26801)

* core: fix a merge fault (ethereum#26802)

* README, go.mod, event, internal/version: bump min Go to 1.19 (ethereum#26803)

* travi: remove strange leftover Go version

* core, params: schedule Shanghai on goerli (ethereum#26795)

* core: params: schedule Shanghai on goerli

* core/forkid: fix comment

* eth: remove admin.peers[i].eth.head and difficulty (ethereum#26804)

* core/types: add EffectiveGasPrice in Receipt (ethereum#26713)

This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.

Co-authored-by: PulsarAI <[email protected]>

* core, eth/catalyst: fix race conditions in tests (ethereum#26790)

Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.

* metrics: improve accuracy of CPU gauges (ethereum#26793)

This PR changes metrics collection to actually measure the time interval between collections, rather
than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).

---------

Co-authored-by: Felix Lange <[email protected]>

* ethclient: fix panic when requesting missing blocks (ethereum#26817)

This fixes a regression introduced by ethereum#26723.
Fixes ethereum#26816.

* core, miner: revert block gas counter in case of invalid transaction (ethereum#26799)

This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes ethereum#26791

* internal/ethapi: add tests for transaction types JSON marshal/unmarshal (ethereum#26667)

Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/evm: correct `alloc` for `t8n` testdata (ethereum#26822)

Fixes a minor error in the testdata

* eth/tracers/native: set created address to nil in case of failure (ethereum#26779)

Fixes ethereum#26073

* accounts/usbwallet: mitigate ledger app chunking issue (ethereum#26773)

This PR mitigates an issue with Ledger's on-device RLP deserialization, see
LedgerHQ/app-ethereum#409

Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)

Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.

We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.

* beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (ethereum#26698)

This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <[email protected]>

* build: update to go 1.20.2 (ethereum#26824)

* params: go-ethereum v1.11.3 stable

* params: begin v1.11.4 release cycle

* core/rawdb: find smallest block stored in key-value store when chain gapped (ethereum#26719)

This change prints out more information about the problem, in the case where geth detects a gap between leveldb and ancients, so we can determine more exactly where the gap is (what the first missing is). Also prints out more metadata. 

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* signer/core: accept all solidity primitive types for EIP-712 signing  (ethereum#26770)

Accept all primitive types in Solidity for EIP-712 from intN, uintN, intN[], uintN[] for N as 0 to 256 in multiples of 8

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* params: remove EF azure bootnodes (ethereum#26828)

* core/vm: use golang native big.Int (ethereum#26834)

reverts ethereum#26021, to use the upstream bigint instead.

* core/vm: fix typo in comment (ethereum#26838)

fixes eip 220 ->  2200

* core/forkid: fix issue in validation test (ethereum#26544)

This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.

* cmd/evm: update readmes for the tests (ethereum#26841)

* core, core/types: plain Message struct (ethereum#25977)

Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4 (November 2016).

The core.Message interface was added in December 2014, in commit
db49417, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <[email protected]>

* travis: only build PPAs nightly, not on every push, too heavy (ethereum#26846)

* p2p: small comment typo (ethereum#26850)

Update server.go

* core: add Timestamp method in BlockGen (ethereum#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.

* core/txpool: implement additional DoS defenses (ethereum#26648)

This adds two new rules to the transaction pool:

- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.

---

Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* params: go-ethereum v1.11.4 stable

* params: begin v1.11.5 release cycle

* tests: define `MuirGlacier` fork (ethereum#26856)

add muir glacier to t8n

* code/vm: fix comment typo (ethereum#26865)

it should be constantinople rather than contantinople

* core: minor code refactor (ethereum#26852)

* core: refactor code

* core: drop it from this anonymous goroutine func

* core/txpool: use priceList.Put instead of heap.Push (ethereum#26863)

Minor refactor to use the 'intended' accessor

* eth: return error if 'safe' or 'finalized' tag used pre-merge (ethereum#26862)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* .travis.yml: reenable PPA build on tag push (ethereum#26873)

* core/state, trie: port changes from PBSS (ethereum#26763)

* p2p/discover: pass invalid discv5 packets to Unhandled channel (ethereum#26699)

This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.

* all: update links in documentation (ethereum#26882)


Co-authored-by: Stephen Flynn <[email protected]>

* Increase websocket frame size (from erigon rpc client) (ethereum#26883)

This increases the maximum allowed message size to 32MB.

Originally submitted at erigontech/erigon#2739

example block failure: https://etherscan.io/tx/0x1317d973a55cedf9b0f2df6ea48e8077dd176f5444a3423368a46d6e4db89982#internal

* cmd/devp2p, cmd/geth: add version in --help output (ethereum#26895)

Not sure why this was removed, it's pretty useful to see the version
also in --help.

* core: show db error-info in case of mismatched hash root (ethereum#26870)

When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.

* consensus: improve consensus engine definition (ethereum#26871)

Makes clear the distinction between Finalize and FinalizedAndAssemble:

- In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.

This function should be used in block processing(receive afrom network and apply it locally) but not block generation.

- In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
  state root computed, updating the header. 

 This function should be used in block generation only.

* eth/catalyst: increase update consensus timeout (ethereum#26840)

 Increases the time between consensus updates that we give the CL before we start warning the user.

* internal/ethapi: avoid int overflow in GetTransactionReceipt (ethereum#26911)

* trie, accounts/abi: add error-checks (ethereum#26914)

* rlp: support for uint256 (ethereum#26898)

This adds built-in support in package rlp for encoding, decoding and generating code dealing with uint256.Int.

---------

Co-authored-by: Felix Lange <[email protected]>

* eth: fix output file permissions in admin_exportChain (ethereum#26912)

* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <[email protected]>

* trie: reduce unit test time (ethereum#26918)

* core/txpool: use atomic int added in go1.19 (ethereum#26913)

Makes use of atomic.Uint64 instead of atomic by pointer

* params: schedule shanghai fork on mainnet (ethereum#26908)

Schedules the shanghai hardfork on timestamp 1681338455 as discussed on ACDE 157: ethereum/execution-specs#727

* core/txpool: allow future local transactions  (ethereum#26930)

Local transactions should not be subject to the "future shouldn't churn pending txs" rule

* params: go-ethereum v1.11.5 stable

* params: begin v1.11.6 release cycle

* build: allow building nightly archives via cron jobs (ethereum#26938)

* log: add special casing of uint256 into the logger (ethereum#26936)

* core/rawdb: use atomic int added in go1.19 (ethereum#26935)

* core/vm: expose jumptable constructors (ethereum#26880)

When interacting with geth as a library to e.g. produce state tests, it is desirable to obtain the consensus-correct jumptable definition for a given fork. This changes adds accessors so the instructionset can be obtained and characteristics about opcodes can be inspected.

* eth/catalyst: fix races (ethereum#26950)

* core/rawdb: update freezertable read meter (ethereum#26946)

The meter for "for measuring the effective amount of data read" within the freezertable was never updated. This change remedies that. 
---------

Signed-off-by: jsvisa <[email protected]>

* cmd/evm, tests: record preimages if dump is expected (ethereum#26955)

With ethereum#25287 we made it so that preimages were not recorded by default. This had the side effect that the evm command is no longer able to dump state since it does a preimage lookup to determine the address represented by a key.

This change enables the recording of preimages when the dump command is given.

* core/state: add account address to Trie slot accessors (ethereum#26934)

This changes the Trie interface to add the plain account address as a
parameter to all storage-related methods.

After the introduction of the TryAccount* functions, TryGet, TryUpdate and
TryDelete are now only meant to read an account's storage. In their current
form, they assume that an account storage is stored in a separate trie, and
that the hashing of the slot is independent of its account's address.

The proposed structure for a stateless storage breaks these two
assumptions: the hashing of a slot key requires the address and all slots
and accounts are stored in a single trie.

This PR therefore adds an address parameter to the interface. It is ignored
in the MPT version, so this change has no functional impact, however it
will reduce the diff size when merging verkle trees.

* metrics: add cpu counters (ethereum#26796)

This PR adds counter metrics for the CPU system and the Geth process.
Currently the only metrics available for these items are gauges. Gauges are
fine when the consumer scrapes metrics data at the same interval as Geth
produces new values (every 3 seconds), but it is likely that most consumers
will not scrape that often. Intervals of 10, 15, or maybe even 30 seconds
are probably more common.

So the problem is, how does the consumer estimate what the CPU was doing in
between scrapes. With a counter, it's easy ... you just subtract two
successive values and divide by the time to get a nice, accurate average.
But with a gauge, you can't do that. A gauge reading is an instantaneous
picture of what was happening at that moment, but it gives you no idea
about what was going on between scrapes. Taking an average of values is
meaningless.

* metrics/influxdb: use smaller dependency and reuse code between v1 and v2 reporters  (ethereum#26963)

This change switches to use the smaller influxdata/influxdb1-client package instead of depending on the whole infuxdb package. The new smaller client is very similar to the influxdb-v2 client, which made it possible to refactor the two reporters to reuse code a lot more.

* eth/gasprice: change feehistory input type from int to uint64 (ethereum#26922)

Change input param type from int to uint64

* go.mod: update golang.org/x/tools (ethereum#26960)

* rlp/rlpgen: print want/expect output string if mismatch (ethereum#26932)


Co-authored-by: Marius van der Wijden <[email protected]>

* ethclient: ensure returned subscription is nil on error (ethereum#26976)

* core/state, trie: remove Try prefix in Trie accessors (ethereum#26975)

This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <[email protected]>

* metrics/librato: ensure resp.body closed (ethereum#26969)

This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)

* core/vm: use atomic.Bool (ethereum#26951)

Make use of new atomic types
---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* core/bloombits: use atomic type (ethereum#26993)

* core/state: use atomic.Bool (ethereum#26992)

* graphql: fix data races (ethereum#26965)

Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.

* eth/tracers/native: prevent panic for LOG edge-cases (ethereum#26848)

This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <[email protected]>

* internal/debug: add log.logfmt flag to set logging to use logfmt (ethereum#26970)

* docs: update outdated DeriveSha docs comment (ethereum#26968)

* remove @gballet as a GraphQL codeowner (ethereum#27012)

* core: use atomic type (ethereum#27011)

* graphql: revert storage access regression (ethereum#27007)

* cmd/geth: Add `--log.format` cli param (ethereum#27001)

Removes the new --log.logfmt directive and hides --log.json, replacing both with log.format=(json|logfmt|terminal). The hidden log.json option is still respected if log.format is not specified for backwards compatibility.

Co-authored-by: Martin Holst Swende <[email protected]>

* ethdb/pebble: use atomic type (ethereum#27014)

* common: fix json marshaller MixedcaseAddress (ethereum#26998)

Fix the json marshaller of MixedcaseAddress

* eth/catalyst: improve consensus heartbeat (ethereum#26896)

improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“[email protected]”>

* miner: use atomic type (ethereum#27013)

Use the new typed atomics in the miner package

* accounts/abi/bind: handle UnpackLog with zero topics (ethereum#26920)

Adds error handling for the case that UnpackLog or UnpackLogIntoMap is called with a log that has zero topics.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* cmd/evm: use correct parent number for t8n base fee calculation (ethereum#27032)

Currently the t8n tool uses the same block number for the current block and its parent while calculating the base fee. This causes incorrect base fee calculation for the london fork block. This commit sets the parent block number to be one less than the current block number

* go.mod : update snappy (ethereum#27027)

* common: delete MakeName (ethereum#27023)

common,p2p: remove unused function MakeName

* cmd/geth: enable log rotation (ethereum#26843)

This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd, miner, signer: avoid panic if keystore is not available (ethereum#27039)

* cmd, miner, singer: avoid panic if keystore is not available

* cmd/geth: print warning instead of panic

* test/fuzzers: fuzz rlp handling of big.Int and uint256.Int (ethereum#26917)

test/fuzzers: fuzz rlp handling of big.Lnt and uint256.Int

* core/txpool: move some validation to outside of mutex (ethereum#27006)

Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check. 

This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.

* eth/downloader: use atomic types (ethereum#27030)

* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: clarify comment (ethereum#27045)

* consensus, core/typer: add 4844 excessDataGas to header, tie it to Cancun (ethereum#27046)

* consensus/misc, params: add EIP-4844 blobfee conversions (ethereum#27041)

* consensus/misc, params: add EIP-4844 blobfee conversions

* consensus/misc: pull in fakeExponential test cases

* consensus/misc: reuse bigints

* consensus/misc: nit renames, additional larger testcase

---------

Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: report correct gasLimit in call tracers (ethereum#27029)

This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <[email protected]>

* all: remove debug-field from vm config (ethereum#27048)

This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* metrics: make gauge_float64 and counter_float64 lock free (ethereum#27025)

Makes the float-gauges lock-free

name                      old time/op  new time/op  delta
CounterFloat64Parallel-8  1.45µs ±10%  0.85µs ± 6%  -41.65%  (p=0.008 n=5+5)

---------

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: use atomic type (ethereum#27031)

Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* build: upgrade -dlgo version to Go 1.20.3

* core/txpool: disallow future churn by remote txs (ethereum#26907)

Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'. 

This change fixes that, by doing a more in-depth inspection of the queue.

* core, miner: drop transactions from the same sender when error occurs (ethereum#27038)

This PR unifies the error handling in miner. 

Whenever an error occur while applying a transaction, the transaction should be regarded as invalid and all following transactions from the same sender not executable because of the nonce restriction. The only exception is the `nonceTooLow` error which is handled separately.

* params: new sepolia bootnodes (ethereum#27099)

New sepolia bootnodes managed by EF devops

* cmd/devp2p: fix erroneous log output in crawler (ethereum#27089)

cmd/devp2p: fix log of ignored recent nodes counter

* signer/core: rename testdata files (ethereum#27063)

Sets a meaningful name on test-files

* core: fix comment to reflect function name (ethereum#27070)

* params: remove `EIP150Hash` from chainconfig (ethereum#27087)

The EIP150Hash was an idea where, after the fork, we hardcoded the forked hash as an extra defensive mechanism. It wasn't really used, since forks weren't contentious and for all the various testnets and private networks it's been a hassle to have around. 

This change removes that config field. 

---------

Signed-off-by: jsvisa <[email protected]>

* p2p: access embedded fields of Server directly (ethereum#27078)

* consensus/ethash: use atomic type (ethereum#27068)

* cmd/devp2p: make crawler-route53-updater less verbose (ethereum#27116)

Follow-up to ethereum#26697, makes the crawler less verbose on route53-based scenarios.

It also changes the loglevel from debug to info on Updates, which are typically the root, and can be interesting to see.

* cmd/geth: rename --vmodule to --log.vmodule (ethereum#27071)

renames `--vmodule` to `--log.vmodule`, and prints a warning if the old form is used.

* core/vm: order opcodes properly (ethereum#27113)

* metrics: use atomic type (ethereum#27121)

* all: refactor trie API (ethereum#26995)

In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.

* params: go-ethereum v1.11.6 stable

* fix merge conflicts

* add market gas price to simulate duplicate nonce behavior (#7)

---------

Signed-off-by: Sungwoo Kim <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Co-authored-by: Seungbae Yu <[email protected]>
Co-authored-by: Ikko Eltociear Ashimine <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Paul <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Zachinquarantine <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: meehow <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Shude Li <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: marioevz <[email protected]>
Co-authored-by: Nicola Cocchiaro <[email protected]>
Co-authored-by: Nicola Cocchiaro <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Pascal Marco Caversaccio <[email protected]>
Co-authored-by: Mio <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: lmittmann <[email protected]>
Co-authored-by: delihiros <[email protected]>
Co-authored-by: raulk <[email protected]>
Co-authored-by: Felföldi Zsolt <[email protected]>
Co-authored-by: zhiqiangxu <[email protected]>
Co-authored-by: halilylm <[email protected]>
Co-authored-by: Halil Yildirim <[email protected]>
Co-authored-by: jwasinger <[email protected]>
Co-authored-by: Chris Ziogas <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Patrick O'Grady <[email protected]>
Co-authored-by: Roman Krasiuk <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Sungwoo Kim <[email protected]>
Co-authored-by: Yier <[email protected]>
Co-authored-by: Catror <[email protected]>
Co-authored-by: Nate Armstrong <[email protected]>
Co-authored-by: Dan Cline <[email protected]>
Co-authored-by: Peter (bitfly) <[email protected]>
Co-authored-by: PulsarAI <[email protected]>
Co-authored-by: turboboost55 <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
Co-authored-by: James Prestwich <[email protected]>
Co-authored-by: Daniel Fernandes <[email protected]>
Co-authored-by: Rafael Matias <[email protected]>
Co-authored-by: xiyang <[email protected]>
Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: panicalways <[email protected]>
Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Jonathan Otto <[email protected]>
Co-authored-by: Delweng <[email protected]>
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: norwnd <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: David Murdoch <[email protected]>
Co-authored-by: openex <[email protected]>
Co-authored-by: “openex27” <“[email protected]”>
Co-authored-by: sudeep <[email protected]>
Co-authored-by: joohhnnn <[email protected]>
Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: Parithosh Jayanthi <[email protected]>
Co-authored-by: noel <[email protected]>
Co-authored-by: Taeguk Kwon <[email protected]>
Co-authored-by: Anusha <[email protected]>
Co-authored-by: Alex Beregszaszi <[email protected]>
Co-authored-by: susannapaxos <[email protected]>
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
reverts ethereum#26021, to use the upstream bigint instead.
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Jun 9, 2023
* Merge qa to master (ethereum#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (ethereum#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (ethereum#755)

* core: add : impossible reorg block dump (ethereum#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (ethereum#761)

* Revert "bump : go version from 1.19 to 1.20.1 (ethereum#761)"

This reverts commit 4561012.

* core/vm: use optimized bigint (ethereum#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (ethereum#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (ethereum#769)

* mardizzone/pos-1313: bump crypto dependency (ethereum#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (ethereum#771)

* Verify validator set against local contract on receiving an end-of-sprint block (ethereum#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (ethereum#778)

* Hotfixes and deps bump (ethereum#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (ethereum#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (ethereum#782)

* v0.3.6 fix (ethereum#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (ethereum#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (ethereum#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (ethereum#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Jun 9, 2023
* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (ethereum#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (ethereum#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (ethereum#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (ethereum#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (ethereum#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (ethereum#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5.

* Bump version to stable

* Revert "Merge pull request ethereum#435 from maticnetwork/POS-553"

This reverts commit 657d262, reversing
changes made to 88dbfa1.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (ethereum#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (ethereum#813)

* Merge qa to master (ethereum#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (ethereum#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (ethereum#755)

* core: add : impossible reorg block dump (ethereum#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (ethereum#761)

* Revert "bump : go version from 1.19 to 1.20.1 (ethereum#761)"

This reverts commit 4561012.

* core/vm: use optimized bigint (ethereum#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (ethereum#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (ethereum#769)

* mardizzone/pos-1313: bump crypto dependency (ethereum#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (ethereum#771)

* Verify validator set against local contract on receiving an end-of-sprint block (ethereum#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (ethereum#778)

* Hotfixes and deps bump (ethereum#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (ethereum#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (ethereum#782)

* v0.3.6 fix (ethereum#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (ethereum#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (ethereum#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (ethereum#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* core: remove duplicate tests

* miner: use get validators by hash in tests

---------

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Jun 9, 2023
* commit logs

* CI: test launch devnet without hardcoded sleep time (pos-534)

* CI: try using checked out bor path

* CI: fix missing ;

* CI: fix assignment operator

* CI: echo peers and block no.

* CI: cleanup

* minor chg: add new line

* dev: add: pos-944: snyk and govuln integration (ethereum#578)

* dev: add: pos-944 security ci and readme

* dev: add: pos-944 remove linters as this is included already in build ci

* dev: chg: pos-947 dependencies upgrade to solve snyk security issues

* dev: chg: update security-ci

* dev: chg: remove linter to allow replacements for security issues

* dev: add: pos-944 verify path when updating metrics from config

* dev: add: pos-944 fix linter

* dev: add: pos-944 add .snyk policy file / fix snyk code vulnerabilities

* dev: fix: pos-944 import common package / gitignore snyk dccache file

* dev: fix: pos-944 verify canonical path for crashers

* dev: fix: pos-944 linter

* dev: add: pos-976 add govuln check

* dev: add: pos-976 test upload with permissions

* dev: add: pos-976 remove duplicated upload

* dev: add: pos-976 report upload

* dev: add: pos-976 remove upload

* dev: fix: pos-944 fix govuln action

* dev: fix: pos-944 move govulncheck to security-ci

* dev: fix: pos-944 bump golvun action and golang versions

* dev: fix: pos-944 remove persmissions and fix conflicts

* dev: chg: restore err msg

* dev: chg: remove duplicated function

* dev: chg: sort import

* dev: chg: fix linter

* dev: add: use common VerifyCrasher function to avoid duplications / replace deprecated ioutils.ReadFile

* dev: fix: typo

* fix linters

* upgrade grpc version

* add ignore rule for net/http2

* Shivam/txpool tracing (ethereum#604)

* lock, unlock to rlock, runlock

* add : tracing Pending() and Locals()

* Log time spent in committing a tx during mining

* Remove data from logging

* Move log into case where a tx completes without error

* profile fillTransactions

* fix conflict

* bug fixes

* add logs

* txpool: add tracing in Pending()

* rearrange tracing

* add attributes

* fix

* fix

* log error in profiling

* update file mode and file path for profiling

* full profiling

* fix log

* fix log

* less wait

* fix

* fix

* logs

* worker: use block number for prof files

* initial

* txList add

* fix gas calculation

* fix

* green tests

* linters

* prettify

* allocate less

* no locks between pending and reorg

* no locks

* no locks on locals

* more tests

* linters

* less allocs

* comment

* optimize errors

* linters

* fix

* fix

* Linters

* linters

* linters

* simplify errors

* atomics for transactions

* fix

* optimize workers

* fix copy

* linters

* txpool tracing

* linters

* fix tracing

* duration in mcs

* locks

* metrics

* fix

* cache hit/miss

* less locks on evict

* remove once

* remove once

* switch off pprof

* fix data race

* fix data race

* add : sealed total/empty blocks metric gauge

* add : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack for all go-routines

* linters

* add data race test on txpool

* fix concurrency

* noleak

* increase batch size

* prettify

* tests

* baseFee mutex

* panic fix

* linters

* fix gas fee data race

* linters

* more transactions

* debug

* debug

* fix ticker

* fix test

* add cacheMu

* more tests

* fix test panic

* linters

* add statistics

* add statistics

* txitems data race

* fix tx list Has

* fix : lint

Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Reduce txArriveTimeout to 100ms

* init : remove exit on keystore err

* add : multiple keystore tolerance

* lint : fix linters

* chg : use standard logging

* chg : logging strings

* Added flags to run heimdall as a child process (ethereum#597)

* Added flags to run heimdall as a child process

* Fix: Lint

* Fix btcd package dependency for CI

* Update btcd package version

* Try removing ambigious importts

* dev: fix: lint fix for parallel tests

* remove delete for ambigious import

* Remove unwanted space

* go mod tidy

* try replace

* try replace

* use vendor

* rename vendor

* tidy

* vendor btcec

* clean up

* remove submodule

* remove submodule

* remove submodule

* remove submodule

* remove vendor & added replacer in test

* go mod tidy

* added replacer

* Update replacer

* Update replacer

* Merge branch 'develop' into run-heimdall-flags

* Skip TestGolangBindings

* Typo fix

* Remove unwanted changes

Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* dev: chg: update PR template to include nodes audience check (ethereum#641)

* dev: chg: update PR template to include nodes audience check

* dev: chg: better description

* dev: chg: add entry to changes too

* sonarqube integration (ethereum#658)

* dev: add: sonarqube integration into security-ci

* dev: add: exclude java files from sonarqube analysis

* Merge branch 'qa' and 'master' into develop (ethereum#663)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (ethereum#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (ethereum#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (ethereum#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (ethereum#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (ethereum#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (ethereum#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5.

* Bump version to stable

* Revert "Merge pull request ethereum#435 from maticnetwork/POS-553"

This reverts commit 657d262, reversing
changes made to 88dbfa1.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (ethereum#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>

* CI: use matic-cli master branch

* trigger ci

* internal/cli/server : fix : added triesInMemory in config (ethereum#677)

* update requirements in README (ethereum#681)

* consensus/bor : add : devFakeAuthor flag

* core,eth,internal/cli,internal/ethapi: add --rpc.allow-unprotected-txs flag to allow txs to get replayed (for shadow node)

* internal/cli: add `skiptrace` flag for profiling (ethereum#715)

* internal/cli: add skiptrace flag

* docs: update docs for skiptrace flag

* Added flag in Status to wait for backend, and fixed panic issue. (ethereum#708)

* checking if backend is available during status call, and added a flag to wait if backend is not available

* added test for status command (does not cover the whole code)

* Revert "Reduce txArriveTimeout to 100ms" (ethereum#707)

This reverts commit 243d231.

* consensus/bor : add : devFakeAuthor flag (ethereum#697)

* add check for empty lists in txpool (ethereum#704)

* add check

* linters

* dev: chg: POS-215 move sonarqube to own ci (ethereum#733)

* Added verbosity flag, supports log-level as well, but will remove that in future. (ethereum#722)

* changed log-level flag back to verbosity, and updated the conversion script

* supporting both verbosity and log-level, with a message to deprecat log-level

* converted verbosity to a int value

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

* Add : mutex pprof profile (ethereum#731)

* add : mutex pprof profile

* rm : remove trace from default pprof profiles

* chg : commit tx logs from info to debug (ethereum#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Add : commit details to bor version (ethereum#730)

* add : commit details to bor version

* fix : MAKEFILE

* undo : rm test-txpool-race

* rm : params/build_date

* rm : params/gitbranch and params/gitdate

* core,docs/cli,internal/cli/server: make docs

* builder,docs/cli,packaging: update toml files

* mardizzone/hotfix-snyk: remove vcs build when running snyk (ethereum#745)

* Feat : SetMaxPeers (ethereum#726)

* init : add admin.setMaxPeers and getMaxPeers

* lint : fix lint

* add : some comments

* Update wiki link (ethereum#762)

* Heimdall App implementation (ethereum#646)

* added support for miner.recommit flag (ethereum#743)

* interrupting commit experiment (ethereum#556)

* initial

* delete

* linters

* big benchmark

* benchmark big ints

* delay

* fix generate

* remove debug

* miner : chg : remove noempty check

* fix lints

* consensus/bor: handle unauthorized signer in consensus.Prepare (ethereum#651)

* fix : break loop fix

* lint : fix

* lint : more lint fix

* fix : skip TestEmptyWorkEthash and TestEmptyWorkClique

* add : metrics commitInterruptCounter

---------

Co-authored-by: Shivam Sharma <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* internal/cli: added missing flags (ethereum#744)

* minor comment update

* added support for rpc.evmtimeout flag

* added support for vmdebug (EnablePreimageRecording) flag

* added support for jsonrpc.auth.(jwtsecret, addr, port, vhosts) flags

* added support for miner.recommit flag

* added support for gpo.maxheaderhistory and gpo.maxblockhistory flag

* Revert "added support for miner.recommit flag"

This reverts commit fcb722e4bf5bdda23d4c91da40ab95c9023a80c3.

* added pprof related flags (expect --pprof.cpuprofile - Write CPU profile to the given file)

* added support for --dev.gaslimit flag

* added support for --fdlimit flag

* added support for --netrestrict flag

* added support for --nodekey and --nodekeyhex flag

* added support for --vmodule, --log.json, --log.backtrace, and --log.debug flags

* fixed related lint errors

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* more weird lints from develop

* small precautionary fix

* small bug ;) fix in NetRestrict

* weird lints

* change vmdebug = true to vmdebug = false

* internal/ethapi: set rpc gas cap as default gas limit when creating access list

* add : testcase for CommitInterruptExperiment (ethereum#792)

* add : TestCommitInterruptExperimentBor

* lint : fix lint

* chg : add waitgroup

* dev: chg: continue on error when uploading snyk results to GH (ethereum#795)

* consensus/bor: revert handle unauthorized signer in consensus.Prepare

* Revert "consensus/bor: handle unauthorized signer in consensus.Prepare (ethereum#651)"

This reverts commit 9ce8c7de75a1b5021bb6f2b8086e813c8244b22c.

* eth/downloader/whitelist: skip future chain validation (ethereum#796)

* eth/downloader/whitelist: skip future chain validation

* eth/downloader/whitelist: fix tests for future chain import

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

* Merge qa to develop (ethereum#814)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (ethereum#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (ethereum#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (ethereum#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (ethereum#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (ethereum#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (ethereum#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5.

* Bump version to stable

* Revert "Merge pull request ethereum#435 from maticnetwork/POS-553"

This reverts commit 657d262, reversing
changes made to 88dbfa1.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (ethereum#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (ethereum#813)

* Merge qa to master (ethereum#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (ethereum#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (ethereum#755)

* core: add : impossible reorg block dump (ethereum#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (ethereum#761)

* Revert "bump : go version from 1.19 to 1.20.1 (ethereum#761)"

This reverts commit 4561012.

* core/vm: use optimized bigint (ethereum#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (ethereum#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (ethereum#769)

* mardizzone/pos-1313: bump crypto dependency (ethereum#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (ethereum#771)

* Verify validator set against local contract on receiving an end-of-sprint block (ethereum#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (ethereum#778)

* Hotfixes and deps bump (ethereum#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (ethereum#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (ethereum#782)

* v0.3.6 fix (ethereum#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (ethereum#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (ethereum#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (ethereum#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (ethereum#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (ethereum#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (ethereum#691)

* changed version from 0.3.0 to 0.3.4-beta (ethereum#693)

* fix nil state-sync issue, increase grpc limit (ethereum#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix ethereum#686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (ethereum#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (ethereum#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (ethereum#692)" (ethereum#720)

This reverts commit 241843c.

* Arpit/add execution pool 2 (ethereum#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (ethereum#721)

* Event based pprof (ethereum#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (ethereum#738)

* Check if block is nil to prevent panic (ethereum#736)

* miner: use env for tracing instead of block object (ethereum#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (ethereum#739)

* Revert "Event based pprof" and update version (ethereum#742)

* Revert "Event based pprof (ethereum#732)"

This reverts commit 22fa403.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* core: remove duplicate tests

* miner: use get validators by hash in tests

---------

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: builder90210 <[email protected]>
Co-authored-by: Krishna Upadhyaya <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Didi <[email protected]>
Co-authored-by: ephess <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Alex <[email protected]>
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Jun 9, 2023
* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342a439d98cca21b03c63a0bc075769cf.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262defc9c94e9513b3d45230492d8b20eac7, reversing
changes made to 88dbfa1c13c15464d3c1a3085a9f12d0ffb9b218.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (#813)

* Merge qa to master (#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (#755)

* core: add : impossible reorg block dump (#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (#761)

* Revert "bump : go version from 1.19 to 1.20.1 (#761)"

This reverts commit 4561012af9a31d20c2715ce26e4b39ca93420b8b.

* core/vm: use optimized bigint (#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (#769)

* mardizzone/pos-1313: bump crypto dependency (#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (#771)

* Verify validator set against local contract on receiving an end-of-sprint block (#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (#778)

* Hotfixes and deps bump (#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (#782)

* v0.3.6 fix (#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* merge v0.3.9-alpha to qa (#824)

* commit logs

* CI: test launch devnet without hardcoded sleep time (pos-534)

* CI: try using checked out bor path

* CI: fix missing ;

* CI: fix assignment operator

* CI: echo peers and block no.

* CI: cleanup

* minor chg: add new line

* dev: add: pos-944: snyk and govuln integration (#578)

* dev: add: pos-944 security ci and readme

* dev: add: pos-944 remove linters as this is included already in build ci

* dev: chg: pos-947 dependencies upgrade to solve snyk security issues

* dev: chg: update security-ci

* dev: chg: remove linter to allow replacements for security issues

* dev: add: pos-944 verify path when updating metrics from config

* dev: add: pos-944 fix linter

* dev: add: pos-944 add .snyk policy file / fix snyk code vulnerabilities

* dev: fix: pos-944 import common package / gitignore snyk dccache file

* dev: fix: pos-944 verify canonical path for crashers

* dev: fix: pos-944 linter

* dev: add: pos-976 add govuln check

* dev: add: pos-976 test upload with permissions

* dev: add: pos-976 remove duplicated upload

* dev: add: pos-976 report upload

* dev: add: pos-976 remove upload

* dev: fix: pos-944 fix govuln action

* dev: fix: pos-944 move govulncheck to security-ci

* dev: fix: pos-944 bump golvun action and golang versions

* dev: fix: pos-944 remove persmissions and fix conflicts

* dev: chg: restore err msg

* dev: chg: remove duplicated function

* dev: chg: sort import

* dev: chg: fix linter

* dev: add: use common VerifyCrasher function to avoid duplications / replace deprecated ioutils.ReadFile

* dev: fix: typo

* fix linters

* upgrade grpc version

* add ignore rule for net/http2

* Shivam/txpool tracing (#604)

* lock, unlock to rlock, runlock

* add : tracing Pending() and Locals()

* Log time spent in committing a tx during mining

* Remove data from logging

* Move log into case where a tx completes without error

* profile fillTransactions

* fix conflict

* bug fixes

* add logs

* txpool: add tracing in Pending()

* rearrange tracing

* add attributes

* fix

* fix

* log error in profiling

* update file mode and file path for profiling

* full profiling

* fix log

* fix log

* less wait

* fix

* fix

* logs

* worker: use block number for prof files

* initial

* txList add

* fix gas calculation

* fix

* green tests

* linters

* prettify

* allocate less

* no locks between pending and reorg

* no locks

* no locks on locals

* more tests

* linters

* less allocs

* comment

* optimize errors

* linters

* fix

* fix

* Linters

* linters

* linters

* simplify errors

* atomics for transactions

* fix

* optimize workers

* fix copy

* linters

* txpool tracing

* linters

* fix tracing

* duration in mcs

* locks

* metrics

* fix

* cache hit/miss

* less locks on evict

* remove once

* remove once

* switch off pprof

* fix data race

* fix data race

* add : sealed total/empty blocks metric gauge

* add : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack for all go-routines

* linters

* add data race test on txpool

* fix concurrency

* noleak

* increase batch size

* prettify

* tests

* baseFee mutex

* panic fix

* linters

* fix gas fee data race

* linters

* more transactions

* debug

* debug

* fix ticker

* fix test

* add cacheMu

* more tests

* fix test panic

* linters

* add statistics

* add statistics

* txitems data race

* fix tx list Has

* fix : lint

Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Reduce txArriveTimeout to 100ms

* init : remove exit on keystore err

* add : multiple keystore tolerance

* lint : fix linters

* chg : use standard logging

* chg : logging strings

* Added flags to run heimdall as a child process (#597)

* Added flags to run heimdall as a child process

* Fix: Lint

* Fix btcd package dependency for CI

* Update btcd package version

* Try removing ambigious importts

* dev: fix: lint fix for parallel tests

* remove delete for ambigious import

* Remove unwanted space

* go mod tidy

* try replace

* try replace

* use vendor

* rename vendor

* tidy

* vendor btcec

* clean up

* remove submodule

* remove submodule

* remove submodule

* remove submodule

* remove vendor & added replacer in test

* go mod tidy

* added replacer

* Update replacer

* Update replacer

* Merge branch 'develop' into run-heimdall-flags

* Skip TestGolangBindings

* Typo fix

* Remove unwanted changes

Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* dev: chg: update PR template to include nodes audience check (#641)

* dev: chg: update PR template to include nodes audience check

* dev: chg: better description

* dev: chg: add entry to changes too

* sonarqube integration (#658)

* dev: add: sonarqube integration into security-ci

* dev: add: exclude java files from sonarqube analysis

* Merge branch 'qa' and 'master' into develop (#663)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342a439d98cca21b03c63a0bc075769cf.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262defc9c94e9513b3d45230492d8b20eac7, reversing
changes made to 88dbfa1c13c15464d3c1a3085a9f12d0ffb9b218.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>

* CI: use matic-cli master branch

* trigger ci

* internal/cli/server : fix : added triesInMemory in config (#677)

* update requirements in README (#681)

* consensus/bor : add : devFakeAuthor flag

* core,eth,internal/cli,internal/ethapi: add --rpc.allow-unprotected-txs flag to allow txs to get replayed (for shadow node)

* internal/cli: add `skiptrace` flag for profiling (#715)

* internal/cli: add skiptrace flag

* docs: update docs for skiptrace flag

* Added flag in Status to wait for backend, and fixed panic issue. (#708)

* checking if backend is available during status call, and added a flag to wait if backend is not available

* added test for status command (does not cover the whole code)

* Revert "Reduce txArriveTimeout to 100ms" (#707)

This reverts commit 243d231fe45bc02f33678bb4f69e941167d7f466.

* consensus/bor : add : devFakeAuthor flag (#697)

* add check for empty lists in txpool (#704)

* add check

* linters

* dev: chg: POS-215 move sonarqube to own ci (#733)

* Added verbosity flag, supports log-level as well, but will remove that in future. (#722)

* changed log-level flag back to verbosity, and updated the conversion script

* supporting both verbosity and log-level, with a message to deprecat log-level

* converted verbosity to a int value

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

* Add : mutex pprof profile (#731)

* add : mutex pprof profile

* rm : remove trace from default pprof profiles

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Add : commit details to bor version (#730)

* add : commit details to bor version

* fix : MAKEFILE

* undo : rm test-txpool-race

* rm : params/build_date

* rm : params/gitbranch and params/gitdate

* core,docs/cli,internal/cli/server: make docs

* builder,docs/cli,packaging: update toml files

* mardizzone/hotfix-snyk: remove vcs build when running snyk (#745)

* Feat : SetMaxPeers (#726)

* init : add admin.setMaxPeers and getMaxPeers

* lint : fix lint

* add : some comments

* Update wiki link (#762)

* Heimdall App implementation (#646)

* added support for miner.recommit flag (#743)

* interrupting commit experiment (#556)

* initial

* delete

* linters

* big benchmark

* benchmark big ints

* delay

* fix generate

* remove debug

* miner : chg : remove noempty check

* fix lints

* consensus/bor: handle unauthorized signer in consensus.Prepare (#651)

* fix : break loop fix

* lint : fix

* lint : more lint fix

* fix : skip TestEmptyWorkEthash and TestEmptyWorkClique

* add : metrics commitInterruptCounter

---------

Co-authored-by: Shivam Sharma <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* internal/cli: added missing flags (#744)

* minor comment update

* added support for rpc.evmtimeout flag

* added support for vmdebug (EnablePreimageRecording) flag

* added support for jsonrpc.auth.(jwtsecret, addr, port, vhosts) flags

* added support for miner.recommit flag

* added support for gpo.maxheaderhistory and gpo.maxblockhistory flag

* Revert "added support for miner.recommit flag"

This reverts commit fcb722e4bf5bdda23d4c91da40ab95c9023a80c3.

* added pprof related flags (expect --pprof.cpuprofile - Write CPU profile to the given file)

* added support for --dev.gaslimit flag

* added support for --fdlimit flag

* added support for --netrestrict flag

* added support for --nodekey and --nodekeyhex flag

* added support for --vmodule, --log.json, --log.backtrace, and --log.debug flags

* fixed related lint errors

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* more weird lints from develop

* small precautionary fix

* small bug ;) fix in NetRestrict

* weird lints

* change vmdebug = true to vmdebug = false

* internal/ethapi: set rpc gas cap as default gas limit when creating access list

* add : testcase for CommitInterruptExperiment (#792)

* add : TestCommitInterruptExperimentBor

* lint : fix lint

* chg : add waitgroup

* dev: chg: continue on error when uploading snyk results to GH (#795)

* consensus/bor: revert handle unauthorized signer in consensus.Prepare

* Revert "consensus/bor: handle unauthorized signer in consensus.Prepare (#651)"

This reverts commit 9ce8c7de75a1b5021bb6f2b8086e813c8244b22c.

* eth/downloader/whitelist: skip future chain validation (#796)

* eth/downloader/whitelist: skip future chain validation

* eth/downloader/whitelist: fix tests for future chain import

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

* Merge qa to develop (#814)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342a439d98cca21b03c63a0bc075769cf.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262defc9c94e9513b3d45230492d8b20eac7, reversing
changes made to 88dbfa1c13c15464d3c1a3085a9f12d0ffb9b218.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (#813)

* Merge qa to master (#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (#755)

* core: add : impossible reorg block dump (#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (#761)

* Revert "bump : go version from 1.19 to 1.20.1 (#761)"

This reverts commit 4561012af9a31d20c2715ce26e4b39ca93420b8b.

* core/vm: use optimized bigint (#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (#769)

* mardizzone/pos-1313: bump crypto dependency (#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (#771)

* Verify validator set against local contract on receiving an end-of-sprint block (#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (#778)

* Hotfixes and deps bump (#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (#782)

* v0.3.6 fix (#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* core: remove duplicate tests

* miner: use get validators by hash in tests

---------

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: builder90210 <[email protected]>
Co-authored-by: Krishna Upadhyaya <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Didi <[email protected]>
Co-authored-by: ephess <[email protected]>
Co-authored-by: Dmitry <467978…
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Jun 9, 2023
* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (#813)

* Merge qa to master (#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (#755)

* core: add : impossible reorg block dump (#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (#761)

* Revert "bump : go version from 1.19 to 1.20.1 (#761)"

This reverts commit 4561012af9a31d20c2715ce26e4b39ca93420b8b.

* core/vm: use optimized bigint (#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (#769)

* mardizzone/pos-1313: bump crypto dependency (#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (#771)

* Verify validator set against local contract on receiving an end-of-sprint block (#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (#778)

* Hotfixes and deps bump (#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (#782)

* v0.3.6 fix (#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* merge v0.3.9-alpha to qa (#824)

* commit logs

* CI: test launch devnet without hardcoded sleep time (pos-534)

* CI: try using checked out bor path

* CI: fix missing ;

* CI: fix assignment operator

* CI: echo peers and block no.

* CI: cleanup

* minor chg: add new line

* dev: add: pos-944: snyk and govuln integration (#578)

* dev: add: pos-944 security ci and readme

* dev: add: pos-944 remove linters as this is included already in build ci

* dev: chg: pos-947 dependencies upgrade to solve snyk security issues

* dev: chg: update security-ci

* dev: chg: remove linter to allow replacements for security issues

* dev: add: pos-944 verify path when updating metrics from config

* dev: add: pos-944 fix linter

* dev: add: pos-944 add .snyk policy file / fix snyk code vulnerabilities

* dev: fix: pos-944 import common package / gitignore snyk dccache file

* dev: fix: pos-944 verify canonical path for crashers

* dev: fix: pos-944 linter

* dev: add: pos-976 add govuln check

* dev: add: pos-976 test upload with permissions

* dev: add: pos-976 remove duplicated upload

* dev: add: pos-976 report upload

* dev: add: pos-976 remove upload

* dev: fix: pos-944 fix govuln action

* dev: fix: pos-944 move govulncheck to security-ci

* dev: fix: pos-944 bump golvun action and golang versions

* dev: fix: pos-944 remove persmissions and fix conflicts

* dev: chg: restore err msg

* dev: chg: remove duplicated function

* dev: chg: sort import

* dev: chg: fix linter

* dev: add: use common VerifyCrasher function to avoid duplications / replace deprecated ioutils.ReadFile

* dev: fix: typo

* fix linters

* upgrade grpc version

* add ignore rule for net/http2

* Shivam/txpool tracing (#604)

* lock, unlock to rlock, runlock

* add : tracing Pending() and Locals()

* Log time spent in committing a tx during mining

* Remove data from logging

* Move log into case where a tx completes without error

* profile fillTransactions

* fix conflict

* bug fixes

* add logs

* txpool: add tracing in Pending()

* rearrange tracing

* add attributes

* fix

* fix

* log error in profiling

* update file mode and file path for profiling

* full profiling

* fix log

* fix log

* less wait

* fix

* fix

* logs

* worker: use block number for prof files

* initial

* txList add

* fix gas calculation

* fix

* green tests

* linters

* prettify

* allocate less

* no locks between pending and reorg

* no locks

* no locks on locals

* more tests

* linters

* less allocs

* comment

* optimize errors

* linters

* fix

* fix

* Linters

* linters

* linters

* simplify errors

* atomics for transactions

* fix

* optimize workers

* fix copy

* linters

* txpool tracing

* linters

* fix tracing

* duration in mcs

* locks

* metrics

* fix

* cache hit/miss

* less locks on evict

* remove once

* remove once

* switch off pprof

* fix data race

* fix data race

* add : sealed total/empty blocks metric gauge

* add : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack

* fix : RPC debug_getTraceStack for all go-routines

* linters

* add data race test on txpool

* fix concurrency

* noleak

* increase batch size

* prettify

* tests

* baseFee mutex

* panic fix

* linters

* fix gas fee data race

* linters

* more transactions

* debug

* debug

* fix ticker

* fix test

* add cacheMu

* more tests

* fix test panic

* linters

* add statistics

* add statistics

* txitems data race

* fix tx list Has

* fix : lint

Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Reduce txArriveTimeout to 100ms

* init : remove exit on keystore err

* add : multiple keystore tolerance

* lint : fix linters

* chg : use standard logging

* chg : logging strings

* Added flags to run heimdall as a child process (#597)

* Added flags to run heimdall as a child process

* Fix: Lint

* Fix btcd package dependency for CI

* Update btcd package version

* Try removing ambigious importts

* dev: fix: lint fix for parallel tests

* remove delete for ambigious import

* Remove unwanted space

* go mod tidy

* try replace

* try replace

* use vendor

* rename vendor

* tidy

* vendor btcec

* clean up

* remove submodule

* remove submodule

* remove submodule

* remove submodule

* remove vendor & added replacer in test

* go mod tidy

* added replacer

* Update replacer

* Update replacer

* Merge branch 'develop' into run-heimdall-flags

* Skip TestGolangBindings

* Typo fix

* Remove unwanted changes

Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* dev: chg: update PR template to include nodes audience check (#641)

* dev: chg: update PR template to include nodes audience check

* dev: chg: better description

* dev: chg: add entry to changes too

* sonarqube integration (#658)

* dev: add: sonarqube integration into security-ci

* dev: add: exclude java files from sonarqube analysis

* Merge branch 'qa' and 'master' into develop (#663)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342a439d98cca21b03c63a0bc075769cf.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262defc9c94e9513b3d45230492d8b20eac7, reversing
changes made to 88dbfa1c13c15464d3c1a3085a9f12d0ffb9b218.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>

* CI: use matic-cli master branch

* trigger ci

* internal/cli/server : fix : added triesInMemory in config (#677)

* update requirements in README (#681)

* consensus/bor : add : devFakeAuthor flag

* core,eth,internal/cli,internal/ethapi: add --rpc.allow-unprotected-txs flag to allow txs to get replayed (for shadow node)

* internal/cli: add `skiptrace` flag for profiling (#715)

* internal/cli: add skiptrace flag

* docs: update docs for skiptrace flag

* Added flag in Status to wait for backend, and fixed panic issue. (#708)

* checking if backend is available during status call, and added a flag to wait if backend is not available

* added test for status command (does not cover the whole code)

* Revert "Reduce txArriveTimeout to 100ms" (#707)

This reverts commit 243d231fe45bc02f33678bb4f69e941167d7f466.

* consensus/bor : add : devFakeAuthor flag (#697)

* add check for empty lists in txpool (#704)

* add check

* linters

* dev: chg: POS-215 move sonarqube to own ci (#733)

* Added verbosity flag, supports log-level as well, but will remove that in future. (#722)

* changed log-level flag back to verbosity, and updated the conversion script

* supporting both verbosity and log-level, with a message to deprecat log-level

* converted verbosity to a int value

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

* Add : mutex pprof profile (#731)

* add : mutex pprof profile

* rm : remove trace from default pprof profiles

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Add : commit details to bor version (#730)

* add : commit details to bor version

* fix : MAKEFILE

* undo : rm test-txpool-race

* rm : params/build_date

* rm : params/gitbranch and params/gitdate

* core,docs/cli,internal/cli/server: make docs

* builder,docs/cli,packaging: update toml files

* mardizzone/hotfix-snyk: remove vcs build when running snyk (#745)

* Feat : SetMaxPeers (#726)

* init : add admin.setMaxPeers and getMaxPeers

* lint : fix lint

* add : some comments

* Update wiki link (#762)

* Heimdall App implementation (#646)

* added support for miner.recommit flag (#743)

* interrupting commit experiment (#556)

* initial

* delete

* linters

* big benchmark

* benchmark big ints

* delay

* fix generate

* remove debug

* miner : chg : remove noempty check

* fix lints

* consensus/bor: handle unauthorized signer in consensus.Prepare (#651)

* fix : break loop fix

* lint : fix

* lint : more lint fix

* fix : skip TestEmptyWorkEthash and TestEmptyWorkClique

* add : metrics commitInterruptCounter

---------

Co-authored-by: Shivam Sharma <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* internal/cli: added missing flags (#744)

* minor comment update

* added support for rpc.evmtimeout flag

* added support for vmdebug (EnablePreimageRecording) flag

* added support for jsonrpc.auth.(jwtsecret, addr, port, vhosts) flags

* added support for miner.recommit flag

* added support for gpo.maxheaderhistory and gpo.maxblockhistory flag

* Revert "added support for miner.recommit flag"

This reverts commit fcb722e4bf5bdda23d4c91da40ab95c9023a80c3.

* added pprof related flags (expect --pprof.cpuprofile - Write CPU profile to the given file)

* added support for --dev.gaslimit flag

* added support for --fdlimit flag

* added support for --netrestrict flag

* added support for --nodekey and --nodekeyhex flag

* added support for --vmodule, --log.json, --log.backtrace, and --log.debug flags

* fixed related lint errors

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* more weird lints from develop

* small precautionary fix

* small bug ;) fix in NetRestrict

* weird lints

* change vmdebug = true to vmdebug = false

* internal/ethapi: set rpc gas cap as default gas limit when creating access list

* add : testcase for CommitInterruptExperiment (#792)

* add : TestCommitInterruptExperimentBor

* lint : fix lint

* chg : add waitgroup

* dev: chg: continue on error when uploading snyk results to GH (#795)

* consensus/bor: revert handle unauthorized signer in consensus.Prepare

* Revert "consensus/bor: handle unauthorized signer in consensus.Prepare (#651)"

This reverts commit 9ce8c7de75a1b5021bb6f2b8086e813c8244b22c.

* eth/downloader/whitelist: skip future chain validation (#796)

* eth/downloader/whitelist: skip future chain validation

* eth/downloader/whitelist: fix tests for future chain import

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

* Merge qa to develop (#814)

* Adding in Mumbai/Mainnet precursor deb packaging for tests to use during upgrade(iterations to come)

* Added changes per discussion in PR, more changes may be necessary

* Adding prerelease true

* Disabling goreleaser

* Removing README swap file

* change bor_dir and add bor user for v0.3.0 release

* rollback bor user and use root

* metrics: handle equal to separated config flag (#596)

* metrics: handle  based config path

* internal/cli/server: add more context to logs

* use space separated flag and value in bor.service

* fixed static-nodes related buf (os independent) (#598)

* fixed static-nodes related buf (os independent)

* taking static-nodes as input if default not present

* Update default flags (#600)

* internal/cli/server: use geth's default for txpool.pricelimit and add comments

* builder/files: update config.toml for mainnet

* packaging/templates: update defaults for mainnet and mumbai

* internal/cli/server: skip overriding cache

* packaging/templates: update cache value for mainnet

* packaging/templates: update gcmode for archive mumbai node

* metrics: handle nil telemetry config (#601)

* resolve merge conflicts

* update go version in release.yml

* update goversion in makefile

* update Docker login for goreleaser-cross v1.19

* Cleanup for the packager to use git tag in the package profile naming. Added conditional check for directory structure, this is in prep for v0.3.1, as this will create a failure on upgrade path in package due to file exist

* added a toml configuration file with comments describing each flag (#607)

* added a toml configuration file with comments describing each flag

* internal/cli/server: update flag description

* docs/cli: update example config and description of flags

* docs: update new-cli docs

Co-authored-by: Manav Darji <[email protected]>

* Adding of 0.3.0 package changes, control file updates, postinst changes, and packager update

* added ancient datadir flag and toml field, need to decide on default value and update the conversion script

* updated toml files with ancient field

* Add support for new flags in new config.toml, which were present in old config.toml (#612)

* added HTTPTimeouts, and TrieTimeout flag in new tol, from old toml

* added RAW fields for these time.Duration flags

* updated the conversion script to support these extra 4 flags

* removed hcl and json config tests as we are only supporting toml config files

* updated toml files with cache.timeout field

* updated toml files with jsonrpc.timeouts field

* tests/bor: expect a call for latest checkpoint

* tests/bor: expect a call for latest checkpoint

* packaging/templates: update cache values for archive nodes

Co-authored-by: Manav Darji <[email protected]>

* remove unwanted code

* Fix docker publish authentication issue

In gorelease-cross 1.19+, dockerhub authentication will require docker
logion action followed by mounting docker config file. See
https://github.com/goreleaser/goreleaser-cross#github-actions.

* Revert "update Docker login for goreleaser-cross v1.19"

This reverts commit 4d19cf5342a439d98cca21b03c63a0bc075769cf.

* Bump version to stable

* Revert "Merge pull request #435 from maticnetwork/POS-553"

This reverts commit 657d262defc9c94e9513b3d45230492d8b20eac7, reversing
changes made to 88dbfa1c13c15464d3c1a3085a9f12d0ffb9b218.

* revert change for release for go1.19

* Add default values to CLI helper and docs

This commit adds default values to CLI helper and docs. When the default value of a string flag, slice string flag, or map string flag is empty, its helper message won't show any default value.

* Add a summary of new CLI in docs

* Updating packager as binutils changed version so that apt-get installs current versions

* Add state pruning to new CLI

* Minor wording fix in prune state description

* Bumping control file versions

* Mainnet Delhi fork

* Set version to stable

* change delhi hardfork block number

* handle future chain import and skip peer drop (#650)

* handle future chain import and skip peer drop

* add block import metric

* params: bump version to v0.3.3-stable

* Bump bor version in control files for v0.3.3 mainnet release

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* Merge master to qa (#813)

* Merge qa to master (#750)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* params, packaging/templates: update bor version

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* core, miner: add sub-spans for tracing (#753)

* core, miner: add sub-spans for tracing

* fix linters

* core: add logs for debugging

* core: add more logs to print tdd while reorg

* fix linters

* core: minor fix

* core: remove debug logs

* core: use different span for write block and set head

* core: use internal context for sending traces (#755)

* core: add : impossible reorg block dump (#754)

* add : impossible reorg block dump

* chg : 3 seperate files for impossoble reorg dump

* add : use exportBlocks method and RLP blocks before writing

* chg : small changes

* bump : go version from 1.19 to 1.20.1 (#761)

* Revert "bump : go version from 1.19 to 1.20.1 (#761)"

This reverts commit 4561012af9a31d20c2715ce26e4b39ca93420b8b.

* core/vm: use optimized bigint (#26021)

* Add holiman/big

* Fix linter

* Bump version to v0.3.5

* fix lints from develop (few lints decided to appear from code that was untouched, weird)

* upgrade crypto lib version (#770)

* bump dep : github.com/Masterminds/goutils to v1.1.1 (#769)

* mardizzone/pos-1313: bump crypto dependency (#772)

* dev: chg: bumd net dependency

* dev: chg: bump crypto dependency

* dev: chg: bump crypto dependency

* bump dep : golang.org/x/net to v0.8.0 (#771)

* Verify validator set against local contract on receiving an end-of-sprint block (#768)

* Verify validator set against local contract on receiving an end-of-sprint block

* Fix tests

* Respect error returned by ParseValidators

* Keep going back until a parent block presents

* core/txpool: implement DoS defenses from geth (#778)

* Hotfixes and deps bump (#776)

* dev: chg: bump deps

* internal/cli/server, rpc: lower down http readtimeout to 10s

* dev: chg: get p2p adapter

* dev: chg: lower down jsonrpc readtimeout to 10s

* cherry-pick txpool optimisation changes

* add check for empty lists in txpool (#704)

* add check

* linters

* core, miner: add empty instrumentation name for tracing

---------

Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danilenko <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* packaging,params: bump to v0.3.6 (#782)

* v0.3.6 fix (#787)

* Fix get validator set in header verifier

* chg : commit tx logs from info to debug (#673)

* chg : commit tx logs from info to debug

* fix : minor changes

* chg : miner : commitTransactions-stats moved from info to debug

* lint : fix linters

* refactor logging

* miner : chg : UnauthorizedSignerError to debug

* lint : fix lint

* fix : log.Logger interface compatibility

---------

Co-authored-by: Evgeny Danienko <[email protected]>

* Remove unnecessary sorting of valset from header in verification

* dev: chg: version bump

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: marcello33 <[email protected]>

* core: improve locks in txpool (#807)

* added a write lock to the txs.filter method and a read lock to the txs.reheap method - both of which are called by Filter during reorg adjustments to txpool

* txpool reorg locks

* more locks

* locks

* linters

* params, packaging: update version for v0.3.8-beta release

* core: add logs in reheap

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Merge qa to master (#808)

* Added checks to RPC requests and introduced new flags to customise the parameters (#657)

* added a check to reject rpc requests with batch size > the one set using a newly added flag (rpcbatchlimit)

* added a check to reject rpc requests whose result size > the one set using a newly added flag (rpcreturndatalimit)

* updated the config files and docs

* chg : trieTimeout from 60 to 10 mins (#692)

* chg : trieTimeout from 60 to 10 mins

* chg : cache.timout to 10m from 1h in configs

* internal/cli/server : fix : added triesInMemory in config (#691)

* changed version from 0.3.0 to 0.3.4-beta (#693)

* fix nil state-sync issue, increase grpc limit (#695)

* Increase grpc message size limit in pprof

* consensus/bor/bor.go : stateSyncs init fixed [Fix #686]

* eth/filters: handle nil state-sync before notify

* eth/filters: update check

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>

* core, tests/bor: add more tests for state-sync validation (#710)

* core: add get state sync function for tests

* tests/bor: add validation for state sync events post consensus

* Arpit/temp bor sync (#701)

* Increase grpc message size limit in pprof

* ReadBorReceipts improvements

* use internal function

* fix tests

* fetch geth upstread for ReadBorReceiptRLP

* Only query bor receipt when the query index is equal to # tx in block body

This change reduces the frequency of calling ReadBorReceipt and
ReadBorTransaction, which are CPU and db intensive.

* Revert "fetch geth upstread for ReadBorReceiptRLP"

This reverts commit 2e838a6b1313d26674f3a8df4b044e35dcbf35a0.

* Restore ReadBorReceiptRLP

* fix bor receipts

* remove unused

* fix lints

---------

Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>

* Revert "chg : trieTimeout from 60 to 10 mins (#692)" (#720)

This reverts commit 241843c7e7bb18e64d2e157fd6fbbd665f6ce9d9.

* Arpit/add execution pool 2 (#719)

* initial

* linters

* linters

* remove timeout

* update pool

* change pool size function

* check nil

* check nil

* fix tests

* Use execution pool from server in all handlers

* simplify things

* test fix

* add support for cli, config

* add to cli and config

* merge base branch

* debug statements

* fix bug

* atomic pointer timeout

* add apis

* update workerpool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* fix tests

* mutex

* refactor flag and value names

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* debug statements

* fix bug

* update workerpool

* atomic pointer timeout

* add apis

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* fix issues

* change params

* fix issues

* fix ipc issue

* remove execution pool from IPC

* revert

* merge base branch

* Merge branch 'add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* mutex

* fix tests

* Merge branch 'arpit/add-execution-pool' of github.com:maticnetwork/bor into arpit/add-execution-pool

* Change default size of execution pool to 40

* refactor flag and value names

* fix merge conflicts

* ordering fix

* refactor flag and value names

* update default ep size to 40

* fix bor start issues

* revert file changes

* fix linters

* fix go.mod

* change sec to ms

* change default value for ep timeout

* fix node api calls

* comment setter for ep timeout

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>

* version change (#721)

* Event based pprof (#732)

* feature

* Save pprof to /tmp

---------

Co-authored-by: Jerry <[email protected]>

* Cherry-pick changes from develop (#738)

* Check if block is nil to prevent panic (#736)

* miner: use env for tracing instead of block object (#728)

---------

Co-authored-by: Dmitry <[email protected]>

* add max code init size check in txpool (#739)

* Revert "Event based pprof" and update version (#742)

* Revert "Event based pprof (#732)"

This reverts commit 22fa4033e8fabb51c44e8d2a8c6bb695a6e9285e.

* params: update version to 0.3.4-beta3

* packaging/templates: update bor version

* internal/ethapi :: Fix : newRPCTransactionFromBlockIndex

* fix: remove assignment for bor receipt

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>

* Setting up bor to use hosted 18.04 runner as ubuntu provided 18.04 runner is end of life

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>

* core: remove duplicate tests

* miner: use get validators by hash in tests

---------

Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: marcello33 <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>

---------

Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: builder90210 <[email protected]>
Co-authored-by: Krishna Upadhyaya <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Didi <[email protected]>
Co-authored-by: ephess <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Alex <[email protected]>

* dev: chg: version bump for v0.3.9-beta (#825)

* eth/fetcher: if peers never respond, drop them (#837) (#844)

* dev: chg: bump version to beta-2 for v0.3.9 (#845)

* rm : disable interruptCommit on txsCh select case (#848)

* dev: chg: version bump (#849)

* fix : go-routine leak in commitInterrupt channel (#851)

* fix : go-routine leak in commitInterrupt channel

* fix : fix lint

* rm : remove t.Parallel() from TestGenerateBlockAndImport tests

* fix : minor optimisations in test

* fix : BenchmarkBorMining

* dev: chg: beta version bump (#853)

* dev: chg: bump version to stable

* dev: chg: contracts branch

* dev: fix: linter

* dev: chg: update templum/govulncheck-action to fix execution

---------

Co-authored-by: SHIVAM SHARMA <[email protected]>
Co-authored-by: Pratik Patil <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Daniil <[email protected]>
Co-authored-by: Arpit Temani <[email protected]>
Co-authored-by: Evgeny Danienko <[email protected]>
Co-authored-by: Dmitry <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: builder90210 <[email protected]>
Co-authored-by: Krishna Upadhyaya <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Will Button <[email protected]>
Co-authored-by: Daniel Jones <[email protected]>
Co-authored-by: Didi <[email protected]>
Co-authored-by: ephess <[email protected]>
maoueh pushed a commit to streamingfast/go-ethereum that referenced this pull request Sep 10, 2023
* ethdb/pebble: fix nil callbacks (ethereum#26650)

* eth/downloader: fix timeout resurrection panic (ethereum#26652)

* common/prque, eth/downloader: fix timeout resurrection panic

* common/prque: revert -1 hack for les, temporaryly!

* core/state, trie: remove unused error-return from trie Commit operation (ethereum#26641)

* go.mod: update pebble to latest master (ethereum#26654)

* core/vm: set tracer-observable `value` of a delegatecall to match parent `value` (ethereum#26632)

This is a breaking change in the tracing hooks API as well as semantics of the callTracer:

- CaptureEnter hook provided a nil value argument in case of DELEGATECALL. However to stay consistent with how delegate calls behave in EVM this hook is changed to pass in the value of the parent call.
- callTracer will return parent call's value for DELEGATECALL frames.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* ethdb: add benchmark test suite (ethereum#26659)

* params: schedule shanghai fork on sepolia (ethereum#26662)

* params: schedule shanghai fork on sepolia

* params: u64 -> newUint64

* eth/filters: avoid block body retrieval when no matching logs (ethereum#25199)

Logs stored on disk have minimal information. Contextual information such as block
number, index of log in block, index of transaction in block are filled in upon request.
We can fill in all these fields only having the block header and list of receipts.
But determining the transaction hash of a log requires the block body.

The goal of this PR is postponing this retrieval until we are sure we the transaction hash.
It happens often that the header bloom filter signals there might be matches in a block,
but after actually checking them reveals the logs do not match. We want to avoid fetching
the body in this case.

Note that this changes the semantics of Backend.GetLogs. Downstream callers of
GetLogs now assume log context fields have not been derived, and need to call
DeriveFields on the logs if necessary.

* eth/tracers: more fork overrides in traceBlockToFile (ethereum#26655)

This change allows all post-Berlin forks to be specified as overrides for futureForkBlock in the config parameter for traceBlockToFile.

* tests/fuzzers: supply gnark multiexp config, fixes ethereum#26669 (ethereum#26670)

This change fixes a fuzzer which broke when we updated the gnark dependency earlier.

* cmd/devp2p: reduce output of node crawler (ethereum#26674)

Our discovery crawler spits out a huge amount of logs, most of which is pretty non-interesting. This change moves the very verbose output to Debug, and adds a 8-second status log message giving the general idea about what's going on.

* params: update mainnet + rinkeby CHT (ethereum#26677)

This change updates the CHT entries for mainnet and rinkeby

* eth/filters: replace atomic pointer with value (ethereum#26689)

* eth/filters: replace atomic.Pointer

* fix

* improve

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* p2p/dnsdisc: fix tests with Go 1.20 (ethereum#26690)

* eth/catalyst: return error if withdrawals are nil post-shanghai (ethereum#26691)

Spec: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#request

* ethdb/pebble: Fix `MemTableStopWritesThreshold` (ethereum#26692)

MemTableStopWritesThreshold was set to the max size of all memtables before blocking writing but should be set to the max number of memtables. This is documented [here](https://github.com/cockroachdb/pebble/blob/master/options.go#L738-L742).

* eth/downloader: handle missing withdrawals if empty list is expected (ethereum#26675)

This PR relaxes the block body ingress handling a bit: if block body withdrawals are missing (but expected to be empty), the body withdrawals are set to 'empty list' before being passed to upper layers. 

This fixes an issue where a block passed from EthereumJS to geth was deemed invalid.

* params: go-ethereum v1.11.0 stable

* params: begin v1.11.1 release cycle

* travis, build: update Go to 1.20.1 (ethereum#26653)

travis, build: update Go to 1.20

* core: check genesis state presence by disk read (ethereum#26703)

* core, eth/downloader: make body validation more strict (ethereum#26704)

* eth/downloader: fix empty-body case in queue fetchresult (ethereum#26707)

* eth/downloader: fix typo (ethereum#26716)

* all: remove deprecated uses of math.rand (ethereum#26710)

This PR is a (superior) alternative to ethereum#26708, it handles deprecation, primarily two specific cases. 

`rand.Seed` is typically used in two ways
- `rand.Seed(time.Now().UnixNano())` -- we seed it, just to be sure to get some random, and not always get the same thing on every run. This is not needed, with global seeding, so those are just removed. 
- `rand.Seed(1)` this is typically done to ensure we have a stable test. If we rely on this, we need to fix up the tests to use a deterministic prng-source. A few occurrences like this has been replaced with a proper custom source. 

`rand.Read` has been replaced by `crypto/rand`.`Read` in this PR.

* params: go-ethereum v1.11.1 stable

* params: begin v1.11.2 release cycle

* eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (ethereum#26696)

This change will break one hive test, but pass another and it will be the better way going forward

* ci: disable coverage reporting in appveyor and travis

* eth/catalyst: request too large error (ethereum#26722)

The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <[email protected]>

* core/trie: remove trie tracer (ethereum#26665)

This PR contains a small portion of the full pbss PR, namely

    Remove the tracer from trie (and comitter), and instead using an accessList.
    Related changes to the Nodeset.


---------

Co-authored-by: Gary Rong <[email protected]>

* rpc: fix unmarshaling of null result in CallContext (ethereum#26723)

The change fixes unmarshaling of JSON null results into json.RawMessage.

---------

Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>

* build: ship bootstrapper Go along with builder for PPA (ethereum#26731)

* build: fix setting env var, temp early exit

* build: fix gobootstrap path for the PPA

* build: add some PPA debug logs, sigh

* internal/build: revert raising the chunk size for PPA

* build: yet another weird PPA fix

* build: fix (finaly?) the PPA env vars for Go bootstrapping

* build: fix Go 1.19.0 bootstrapper issues on 386 PPA

* build: enable Lunar Lobster PPA builds

* Revert "core/trie: remove trie tracer (ethereum#26665)" (ethereum#26732)

This reverts commit 7c749c9.

* cmd/geth: clarify dumpconfig options (ethereum#26729)

Clarifies the documentation around dumpconfi

Signed-off-by: Sungwoo Kim <[email protected]>

* core, eth: merge snap-sync chain download progress logs (ethereum#26676)

* core: fix accessor mismatch for genesis state (ethereum#26747)

* core/rawdb: expose chain freezer constructor without internals (ethereum#26748)

* all: use unified emptyRootHash and emptyCodeHash (ethereum#26718)

The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot

* eth/filters: fix a breaking change and return rpctransaction (ethereum#26757)

* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <[email protected]>

* common/math: allow HexOrDecimal to accept unquoted decimals too (ethereum#26758)

* params: release Geth v1.11.2

* params: begin v.1.11.3 release cycle

* log: improve documentation (ethereum#26753)

Add usage examples

* core/rawdb, node: use standalone flock dependency (ethereum#26633)

* eth: use the last announced finalized block as the sync ancient limit (ethereum#26685)

* cmd/devp2p: faster crawling + less verbose dns updates (ethereum#26697)

This improves the speed of DHT crawling by using concurrent requests.
It also removes logging of individual DNS updates.

* eth/tracers: add native flatCallTracer (aka parity style tracer) (ethereum#26377)

Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <[email protected]>

* core: improve withdrawal index assignment in GenerateChain (ethereum#26756)

This fixes an issue where the withdrawal index was not calculated correctly
for multiple withdrawals in a single block.

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix range compaction (ethereum#26771)

* ethdb/pebble: fix range compaction

* ethdb/pebble: add comment

* ethdb/pebble: fix max memorytable size (ethereum#26776)

* ethclient: include withdrawals in ethclient block responses (ethereum#26778)

* include withdrawals in ethclient responses

* omit empty withdrawals array in json serialization

* all: change chain head markers from block to header (ethereum#26777)

* core/rawdb, ethdb/pebble: disable pebble on openbsd (ethereum#26801)

* core: fix a merge fault (ethereum#26802)

* README, go.mod, event, internal/version: bump min Go to 1.19 (ethereum#26803)

* travi: remove strange leftover Go version

* core, params: schedule Shanghai on goerli (ethereum#26795)

* core: params: schedule Shanghai on goerli

* core/forkid: fix comment

* eth: remove admin.peers[i].eth.head and difficulty (ethereum#26804)

* core/types: add EffectiveGasPrice in Receipt (ethereum#26713)

This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.

Co-authored-by: PulsarAI <[email protected]>

* core, eth/catalyst: fix race conditions in tests (ethereum#26790)

Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.

* metrics: improve accuracy of CPU gauges (ethereum#26793)

This PR changes metrics collection to actually measure the time interval between collections, rather
than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).

---------

Co-authored-by: Felix Lange <[email protected]>

* ethclient: fix panic when requesting missing blocks (ethereum#26817)

This fixes a regression introduced by ethereum#26723.
Fixes ethereum#26816.

* core, miner: revert block gas counter in case of invalid transaction (ethereum#26799)

This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes ethereum#26791

* internal/ethapi: add tests for transaction types JSON marshal/unmarshal (ethereum#26667)

Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/evm: correct `alloc` for `t8n` testdata (ethereum#26822)

Fixes a minor error in the testdata

* eth/tracers/native: set created address to nil in case of failure (ethereum#26779)

Fixes ethereum#26073

* accounts/usbwallet: mitigate ledger app chunking issue (ethereum#26773)

This PR mitigates an issue with Ledger's on-device RLP deserialization, see
LedgerHQ/app-ethereum#409

Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)

Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.

We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.

* beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (ethereum#26698)

This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <[email protected]>

* build: update to go 1.20.2 (ethereum#26824)

* params: go-ethereum v1.11.3 stable

* params: begin v1.11.4 release cycle

* core/rawdb: find smallest block stored in key-value store when chain gapped (ethereum#26719)

This change prints out more information about the problem, in the case where geth detects a gap between leveldb and ancients, so we can determine more exactly where the gap is (what the first missing is). Also prints out more metadata. 

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* signer/core: accept all solidity primitive types for EIP-712 signing  (ethereum#26770)

Accept all primitive types in Solidity for EIP-712 from intN, uintN, intN[], uintN[] for N as 0 to 256 in multiples of 8

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* params: remove EF azure bootnodes (ethereum#26828)

* core/vm: use golang native big.Int (ethereum#26834)

reverts ethereum#26021, to use the upstream bigint instead.

* core/vm: fix typo in comment (ethereum#26838)

fixes eip 220 ->  2200

* core/forkid: fix issue in validation test (ethereum#26544)

This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.

* cmd/evm: update readmes for the tests (ethereum#26841)

* core, core/types: plain Message struct (ethereum#25977)

Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4 (November 2016).

The core.Message interface was added in December 2014, in commit
db49417, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <[email protected]>

* travis: only build PPAs nightly, not on every push, too heavy (ethereum#26846)

* p2p: small comment typo (ethereum#26850)

Update server.go

* core: add Timestamp method in BlockGen (ethereum#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.

* core/txpool: implement additional DoS defenses (ethereum#26648)

This adds two new rules to the transaction pool:

- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.

---

Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* params: go-ethereum v1.11.4 stable

* params: begin v1.11.5 release cycle

* tests: define `MuirGlacier` fork (ethereum#26856)

add muir glacier to t8n

* code/vm: fix comment typo (ethereum#26865)

it should be constantinople rather than contantinople

* core: minor code refactor (ethereum#26852)

* core: refactor code

* core: drop it from this anonymous goroutine func

* core/txpool: use priceList.Put instead of heap.Push (ethereum#26863)

Minor refactor to use the 'intended' accessor

* eth: return error if 'safe' or 'finalized' tag used pre-merge (ethereum#26862)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* .travis.yml: reenable PPA build on tag push (ethereum#26873)

* core/state, trie: port changes from PBSS (ethereum#26763)

* p2p/discover: pass invalid discv5 packets to Unhandled channel (ethereum#26699)

This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.

* all: update links in documentation (ethereum#26882)


Co-authored-by: Stephen Flynn <[email protected]>

* Increase websocket frame size (from erigon rpc client) (ethereum#26883)

This increases the maximum allowed message size to 32MB.

Originally submitted at erigontech/erigon#2739

example block failure: https://etherscan.io/tx/0x1317d973a55cedf9b0f2df6ea48e8077dd176f5444a3423368a46d6e4db89982#internal

* cmd/devp2p, cmd/geth: add version in --help output (ethereum#26895)

Not sure why this was removed, it's pretty useful to see the version
also in --help.

* core: show db error-info in case of mismatched hash root (ethereum#26870)

When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.

* consensus: improve consensus engine definition (ethereum#26871)

Makes clear the distinction between Finalize and FinalizedAndAssemble:

- In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.

This function should be used in block processing(receive afrom network and apply it locally) but not block generation.

- In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
  state root computed, updating the header. 

 This function should be used in block generation only.

* eth/catalyst: increase update consensus timeout (ethereum#26840)

 Increases the time between consensus updates that we give the CL before we start warning the user.

* internal/ethapi: avoid int overflow in GetTransactionReceipt (ethereum#26911)

* trie, accounts/abi: add error-checks (ethereum#26914)

* rlp: support for uint256 (ethereum#26898)

This adds built-in support in package rlp for encoding, decoding and generating code dealing with uint256.Int.

---------

Co-authored-by: Felix Lange <[email protected]>

* eth: fix output file permissions in admin_exportChain (ethereum#26912)

* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <[email protected]>

* trie: reduce unit test time (ethereum#26918)

* core/txpool: use atomic int added in go1.19 (ethereum#26913)

Makes use of atomic.Uint64 instead of atomic by pointer

* params: schedule shanghai fork on mainnet (ethereum#26908)

Schedules the shanghai hardfork on timestamp 1681338455 as discussed on ACDE 157: ethereum/execution-specs#727

* core/txpool: allow future local transactions  (ethereum#26930)

Local transactions should not be subject to the "future shouldn't churn pending txs" rule

* params: go-ethereum v1.11.5 stable

* params: begin v1.11.6 release cycle

* build: allow building nightly archives via cron jobs (ethereum#26938)

* log: add special casing of uint256 into the logger (ethereum#26936)

* core/rawdb: use atomic int added in go1.19 (ethereum#26935)

* core/vm: expose jumptable constructors (ethereum#26880)

When interacting with geth as a library to e.g. produce state tests, it is desirable to obtain the consensus-correct jumptable definition for a given fork. This changes adds accessors so the instructionset can be obtained and characteristics about opcodes can be inspected.

* eth/catalyst: fix races (ethereum#26950)

* core/rawdb: update freezertable read meter (ethereum#26946)

The meter for "for measuring the effective amount of data read" within the freezertable was never updated. This change remedies that. 
---------

Signed-off-by: jsvisa <[email protected]>

* cmd/evm, tests: record preimages if dump is expected (ethereum#26955)

With ethereum#25287 we made it so that preimages were not recorded by default. This had the side effect that the evm command is no longer able to dump state since it does a preimage lookup to determine the address represented by a key.

This change enables the recording of preimages when the dump command is given.

* core/state: add account address to Trie slot accessors (ethereum#26934)

This changes the Trie interface to add the plain account address as a
parameter to all storage-related methods.

After the introduction of the TryAccount* functions, TryGet, TryUpdate and
TryDelete are now only meant to read an account's storage. In their current
form, they assume that an account storage is stored in a separate trie, and
that the hashing of the slot is independent of its account's address.

The proposed structure for a stateless storage breaks these two
assumptions: the hashing of a slot key requires the address and all slots
and accounts are stored in a single trie.

This PR therefore adds an address parameter to the interface. It is ignored
in the MPT version, so this change has no functional impact, however it
will reduce the diff size when merging verkle trees.

* metrics: add cpu counters (ethereum#26796)

This PR adds counter metrics for the CPU system and the Geth process.
Currently the only metrics available for these items are gauges. Gauges are
fine when the consumer scrapes metrics data at the same interval as Geth
produces new values (every 3 seconds), but it is likely that most consumers
will not scrape that often. Intervals of 10, 15, or maybe even 30 seconds
are probably more common.

So the problem is, how does the consumer estimate what the CPU was doing in
between scrapes. With a counter, it's easy ... you just subtract two
successive values and divide by the time to get a nice, accurate average.
But with a gauge, you can't do that. A gauge reading is an instantaneous
picture of what was happening at that moment, but it gives you no idea
about what was going on between scrapes. Taking an average of values is
meaningless.

* metrics/influxdb: use smaller dependency and reuse code between v1 and v2 reporters  (ethereum#26963)

This change switches to use the smaller influxdata/influxdb1-client package instead of depending on the whole infuxdb package. The new smaller client is very similar to the influxdb-v2 client, which made it possible to refactor the two reporters to reuse code a lot more.

* eth/gasprice: change feehistory input type from int to uint64 (ethereum#26922)

Change input param type from int to uint64

* go.mod: update golang.org/x/tools (ethereum#26960)

* rlp/rlpgen: print want/expect output string if mismatch (ethereum#26932)


Co-authored-by: Marius van der Wijden <[email protected]>

* ethclient: ensure returned subscription is nil on error (ethereum#26976)

* core/state, trie: remove Try prefix in Trie accessors (ethereum#26975)

This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <[email protected]>

* metrics/librato: ensure resp.body closed (ethereum#26969)

This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)

* core/vm: use atomic.Bool (ethereum#26951)

Make use of new atomic types
---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* core/bloombits: use atomic type (ethereum#26993)

* core/state: use atomic.Bool (ethereum#26992)

* graphql: fix data races (ethereum#26965)

Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.

* eth/tracers/native: prevent panic for LOG edge-cases (ethereum#26848)

This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <[email protected]>

* internal/debug: add log.logfmt flag to set logging to use logfmt (ethereum#26970)

* docs: update outdated DeriveSha docs comment (ethereum#26968)

* remove @gballet as a GraphQL codeowner (ethereum#27012)

* core: use atomic type (ethereum#27011)

* graphql: revert storage access regression (ethereum#27007)

* cmd/geth: Add `--log.format` cli param (ethereum#27001)

Removes the new --log.logfmt directive and hides --log.json, replacing both with log.format=(json|logfmt|terminal). The hidden log.json option is still respected if log.format is not specified for backwards compatibility.

Co-authored-by: Martin Holst Swende <[email protected]>

* ethdb/pebble: use atomic type (ethereum#27014)

* common: fix json marshaller MixedcaseAddress (ethereum#26998)

Fix the json marshaller of MixedcaseAddress

* eth/catalyst: improve consensus heartbeat (ethereum#26896)

improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“[email protected]”>

* miner: use atomic type (ethereum#27013)

Use the new typed atomics in the miner package

* accounts/abi/bind: handle UnpackLog with zero topics (ethereum#26920)

Adds error handling for the case that UnpackLog or UnpackLogIntoMap is called with a log that has zero topics.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* cmd/evm: use correct parent number for t8n base fee calculation (ethereum#27032)

Currently the t8n tool uses the same block number for the current block and its parent while calculating the base fee. This causes incorrect base fee calculation for the london fork block. This commit sets the parent block number to be one less than the current block number

* go.mod : update snappy (ethereum#27027)

* common: delete MakeName (ethereum#27023)

common,p2p: remove unused function MakeName

* cmd/geth: enable log rotation (ethereum#26843)

This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd, miner, signer: avoid panic if keystore is not available (ethereum#27039)

* cmd, miner, singer: avoid panic if keystore is not available

* cmd/geth: print warning instead of panic

* test/fuzzers: fuzz rlp handling of big.Int and uint256.Int (ethereum#26917)

test/fuzzers: fuzz rlp handling of big.Lnt and uint256.Int

* core/txpool: move some validation to outside of mutex (ethereum#27006)

Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check. 

This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.

* eth/downloader: use atomic types (ethereum#27030)

* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: clarify comment (ethereum#27045)

* consensus, core/typer: add 4844 excessDataGas to header, tie it to Cancun (ethereum#27046)

* consensus/misc, params: add EIP-4844 blobfee conversions (ethereum#27041)

* consensus/misc, params: add EIP-4844 blobfee conversions

* consensus/misc: pull in fakeExponential test cases

* consensus/misc: reuse bigints

* consensus/misc: nit renames, additional larger testcase

---------

Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: report correct gasLimit in call tracers (ethereum#27029)

This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <[email protected]>

* all: remove debug-field from vm config (ethereum#27048)

This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* metrics: make gauge_float64 and counter_float64 lock free (ethereum#27025)

Makes the float-gauges lock-free

name                      old time/op  new time/op  delta
CounterFloat64Parallel-8  1.45µs ±10%  0.85µs ± 6%  -41.65%  (p=0.008 n=5+5)

---------

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: use atomic type (ethereum#27031)

Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* build: upgrade -dlgo version to Go 1.20.3

* core/txpool: disallow future churn by remote txs (ethereum#26907)

Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'. 

This change fixes that, by doing a more in-depth inspection of the queue.

* core, miner: drop transactions from the same sender when error occurs (ethereum#27038)

This PR unifies the error handling in miner. 

Whenever an error occur while applying a transaction, the transaction should be regarded as invalid and all following transactions from the same sender not executable because of the nonce restriction. The only exception is the `nonceTooLow` error which is handled separately.

* params: new sepolia bootnodes (ethereum#27099)

New sepolia bootnodes managed by EF devops

* cmd/devp2p: fix erroneous log output in crawler (ethereum#27089)

cmd/devp2p: fix log of ignored recent nodes counter

* signer/core: rename testdata files (ethereum#27063)

Sets a meaningful name on test-files

* core: fix comment to reflect function name (ethereum#27070)

* params: remove `EIP150Hash` from chainconfig (ethereum#27087)

The EIP150Hash was an idea where, after the fork, we hardcoded the forked hash as an extra defensive mechanism. It wasn't really used, since forks weren't contentious and for all the various testnets and private networks it's been a hassle to have around. 

This change removes that config field. 

---------

Signed-off-by: jsvisa <[email protected]>

* p2p: access embedded fields of Server directly (ethereum#27078)

* consensus/ethash: use atomic type (ethereum#27068)

* cmd/devp2p: make crawler-route53-updater less verbose (ethereum#27116)

Follow-up to ethereum#26697, makes the crawler less verbose on route53-based scenarios.

It also changes the loglevel from debug to info on Updates, which are typically the root, and can be interesting to see.

* cmd/geth: rename --vmodule to --log.vmodule (ethereum#27071)

renames `--vmodule` to `--log.vmodule`, and prints a warning if the old form is used.

* core/vm: order opcodes properly (ethereum#27113)

* metrics: use atomic type (ethereum#27121)

* all: refactor trie API (ethereum#26995)

In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.

* params: go-ethereum v1.11.6 stable

* dev: chg: regression changes for bor after merge

* dev: chg: more regression changes for bor after merge

* dev: chg: txpool_test regression changes after merge

* dev: chg: gomock re-generate mocks for backend interface

* dev: chg: regression changes after develop is merged into upstream-merge

* dev: chg: further fixes merging develop into upstream-merge

* dev: chg: apply changes to NewParallelBlockChain

* dev: chg: solve some TODOs

* dev: fix: CreateConsensusEngine for new ethereum objects

* dev: fix: NewParallelBlockChain using Genesis

* dev: fix: build ci.go

* dev: fix: thelper and tparallel lint

* dev: fix: http related and nilnil lint errors

* dev: fix: ineffassign lint errors

* dev: chg: comment position fix

* dev: fix: govet lint errors

* dev: fix: error related lint issues

* dev: fix: bodyclose lint issues

* dev: fix: some wsl lint issues

* dev: fix: more wsl lint issues

* dev: fix: errorcheck lint issues

* dev: fix: solve more lint issues

* dev: fix: more wsl lint issues

* dev: fix: more errcheck lint issues

* dev: fix: most of wsl lint issues

* dev: fix: all remaining  lint issues

* dev: fix: t.Parallel called multiple times

* dev: fix: tests failing due to t.Parallel

* fix : runtime testcases

* fix : testcase : config, addTxWithChain, burnAmount

* fix : ethhash bor burn contract

* fix : genspec config

* fix : freezer, TestStateProcessorErrors

* core,eth,miner: fix initial test cases (ethereum#922)

* fix : TestTransactionIndices, testBeaconSync

* fix : TestBeaconSync66

* core,eth: fix TestDeduplication, TestSyncAccountPerformance, TestTraceTransaction

* fix : TestTxIndexer

* rm : multiple coinbase balance

* fix : testCommitInterruptExperimentBor

* adding balance send to burntcontract back

* Fix header encoding test

* core,eth/tracers: fix TestPrestateWithDiffModeTracer

* consensus/bor,eth/filters,miner,params,tests: fix mocks

* fix : TestGraphQLConcurrentResolvers

* fix : TestBuildPayload

* common,core,miner: fix goleaks,duplicate init and inconsistent mutex (un)locks

* fix : lint

* fix : lint

* fix : test-integration

* fix : test-integration

* core: restore AddFeeTransferLog post miner tipping

* fix : TestGraphQLConcurrentResolvers

* fix : deadlocks

* rm: t.parallel from testQueueTimeLimiting tests

* Merge branch 'develop' into mardizzone/upstream-merge

* fix : lint

* fix : test-integration

* fix : TxDependency

* add rpc.enabledeprecatedpersonal flag

---------

Signed-off-by: Sungwoo Kim <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Co-authored-by: Péter Szilágyi <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Chris Ziogas <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Marius van der Wijden <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Patrick O'Grady <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: Roman Krasiuk <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Sungwoo Kim <[email protected]>
Co-authored-by: Yier <[email protected]>
Co-authored-by: Catror <[email protected]>
Co-authored-by: Nate Armstrong <[email protected]>
Co-authored-by: Dan Cline <[email protected]>
Co-authored-by: Peter (bitfly) <[email protected]>
Co-authored-by: PulsarAI <[email protected]>
Co-authored-by: turboboost55 <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Guruprasad Kamath <[email protected]>
Co-authored-by: James Prestwich <[email protected]>
Co-authored-by: Daniel Fernandes <[email protected]>
Co-authored-by: Rafael Matias <[email protected]>
Co-authored-by: xiyang <[email protected]>
Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: panicalways <[email protected]>
Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: s7v7nislands <[email protected]>
Co-authored-by: lightclient <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Stephen Flynn <[email protected]>
Co-authored-by: Jonathan Otto <[email protected]>
Co-authored-by: Delweng <[email protected]>
Co-authored-by: Guillaume Ballet <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: ucwong <[email protected]>
Co-authored-by: norwnd <[email protected]>
Co-authored-by: jwasinger <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: David Murdoch <[email protected]>
Co-authored-by: openex <[email protected]>
Co-authored-by: “openex27” <“[email protected]”>
Co-authored-by: sudeep <[email protected]>
Co-authored-by: joohhnnn <[email protected]>
Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Marius Kjærstad <[email protected]>
Co-authored-by: Parithosh Jayanthi <[email protected]>
Co-authored-by: noel <[email protected]>
Co-authored-by: Taeguk Kwon <[email protected]>
Co-authored-by: Anusha <[email protected]>
Co-authored-by: Alex Beregszaszi <[email protected]>
Co-authored-by: Shivam Sharma <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Raneet Debnath <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Manav Darji <[email protected]>
maoueh added a commit to streamingfast/go-ethereum that referenced this pull request Sep 20, 2023
* build: yet another weird PPA fix

* build: fix (finaly?) the PPA env vars for Go bootstrapping

* build: fix Go 1.19.0 bootstrapper issues on 386 PPA

* build: enable Lunar Lobster PPA builds

* Revert "core/trie: remove trie tracer (#26665)" (#26732)

This reverts commit 7c749c947a9d5181f5f2c1b3fdb5ea6b0e401e8e.

* cmd/geth: clarify dumpconfig options (#26729)

Clarifies the documentation around dumpconfi

Signed-off-by: Sungwoo Kim <[email protected]>

* core, eth: merge snap-sync chain download progress logs (#26676)

* core: fix accessor mismatch for genesis state (#26747)

* core/rawdb: expose chain freezer constructor without internals (#26748)

* all: use unified emptyRootHash and emptyCodeHash (#26718)

The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot

* eth/filters: fix a breaking change and return rpctransaction (#26757)

* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <[email protected]>

* common/math: allow HexOrDecimal to accept unquoted decimals too (#26758)

* params: release Geth v1.11.2

* params: begin v.1.11.3 release cycle

* log: improve documentation (#26753)

Add usage examples

* core/rawdb, node: use standalone flock dependency (#26633)

* eth: use the last announced finalized block as the sync ancient limit (#26685)

* cmd/devp2p: faster crawling + less verbose dns updates (#26697)

This improves the speed of DHT crawling by using concurrent requests.
It also removes logging of individual DNS updates.

* eth/tracers: add native flatCallTracer (aka parity style tracer) (#26377)

Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <[email protected]>

* core: improve withdrawal index assignment in GenerateChain (#26756)

This fixes an issue where the withdrawal index was not calculated correctly
for multiple withdrawals in a single block.

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix range compaction (#26771)

* ethdb/pebble: fix range compaction

* ethdb/pebble: add comment

* ethdb/pebble: fix max memorytable size (#26776)

* ethclient: include withdrawals in ethclient block responses (#26778)

* include withdrawals in ethclient responses

* omit empty withdrawals array in json serialization

* all: change chain head markers from block to header (#26777)

* core/rawdb, ethdb/pebble: disable pebble on openbsd (#26801)

* core: fix a merge fault (#26802)

* README, go.mod, event, internal/version: bump min Go to 1.19 (#26803)

* travi: remove strange leftover Go version

* core, params: schedule Shanghai on goerli (#26795)

* core: params: schedule Shanghai on goerli

* core/forkid: fix comment

* eth: remove admin.peers[i].eth.head and difficulty (#26804)

* core/types: add EffectiveGasPrice in Receipt (#26713)

This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.

Co-authored-by: PulsarAI <[email protected]>

* core, eth/catalyst: fix race conditions in tests (#26790)

Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.

* metrics: improve accuracy of CPU gauges (#26793)

This PR changes metrics collection to actually measure the time interval between collections, rather
than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).

---------

Co-authored-by: Felix Lange <[email protected]>

* ethclient: fix panic when requesting missing blocks (#26817)

This fixes a regression introduced by #26723.
Fixes #26816.

* core, miner: revert block gas counter in case of invalid transaction (#26799)

This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes #26791

* internal/ethapi: add tests for transaction types JSON marshal/unmarshal (#26667)

Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/evm: correct `alloc` for `t8n` testdata (#26822)

Fixes a minor error in the testdata

* eth/tracers/native: set created address to nil in case of failure (#26779)

Fixes #26073

* accounts/usbwallet: mitigate ledger app chunking issue (#26773)

This PR mitigates an issue with Ledger's on-device RLP deserialization, see
https://github.com/LedgerHQ/app-ethereum/issues/409

Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)

Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.

We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.

* beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (#26698)

This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <[email protected]>

* build: update to go 1.20.2 (#26824)

* params: go-ethereum v1.11.3 stable

* params: begin v1.11.4 release cycle

* core/rawdb: find smallest block stored in key-value store when chain gapped (#26719)

This change prints out more information about the problem, in the case where geth detects a gap between leveldb and ancients, so we can determine more exactly where the gap is (what the first missing is). Also prints out more metadata. 

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* signer/core: accept all solidity primitive types for EIP-712 signing  (#26770)

Accept all primitive types in Solidity for EIP-712 from intN, uintN, intN[], uintN[] for N as 0 to 256 in multiples of 8

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* params: remove EF azure bootnodes (#26828)

* core/vm: use golang native big.Int (#26834)

reverts #26021, to use the upstream bigint instead.

* core/vm: fix typo in comment (#26838)

fixes eip 220 ->  2200

* core/forkid: fix issue in validation test (#26544)

This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.

* cmd/evm: update readmes for the tests (#26841)

* core, core/types: plain Message struct (#25977)

Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4db7 (November 2016).

The core.Message interface was added in December 2014, in commit
db494170dc, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <[email protected]>

* travis: only build PPAs nightly, not on every push, too heavy (#26846)

* p2p: small comment typo (#26850)

Update server.go

* core: add Timestamp method in BlockGen (#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.

* core/txpool: implement additional DoS defenses (#26648)

This adds two new rules to the transaction pool:

- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.

---

Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* params: go-ethereum v1.11.4 stable

* params: begin v1.11.5 release cycle

* tests: define `MuirGlacier` fork (#26856)

add muir glacier to t8n

* code/vm: fix comment typo (#26865)

it should be constantinople rather than contantinople

* core: minor code refactor (#26852)

* core: refactor code

* core: drop it from this anonymous goroutine func

* core/txpool: use priceList.Put instead of heap.Push (#26863)

Minor refactor to use the 'intended' accessor

* eth: return error if 'safe' or 'finalized' tag used pre-merge (#26862)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* .travis.yml: reenable PPA build on tag push (#26873)

* core/state, trie: port changes from PBSS (#26763)

* p2p/discover: pass invalid discv5 packets to Unhandled channel (#26699)

This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.

* all: update links in documentation (#26882)


Co-authored-by: Stephen Flynn <[email protected]>

* Increase websocket frame size (from erigon rpc client) (#26883)

This increases the maximum allowed message size to 32MB.

Originally submitted at https://github.com/ledgerwatch/erigon/pull/2739

example block failure: https://etherscan.io/tx/0x1317d973a55cedf9b0f2df6ea48e8077dd176f5444a3423368a46d6e4db89982#internal

* cmd/devp2p, cmd/geth: add version in --help output (#26895)

Not sure why this was removed, it's pretty useful to see the version
also in --help.

* core: show db error-info in case of mismatched hash root (#26870)

When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.

* consensus: improve consensus engine definition (#26871)

Makes clear the distinction between Finalize and FinalizedAndAssemble:

- In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.

This function should be used in block processing(receive afrom network and apply it locally) but not block generation.

- In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
  state root computed, updating the header. 

 This function should be used in block generation only.

* eth/catalyst: increase update consensus timeout (#26840)

 Increases the time between consensus updates that we give the CL before we start warning the user.

* internal/ethapi: avoid int overflow in GetTransactionReceipt (#26911)

* trie, accounts/abi: add error-checks (#26914)

* rlp: support for uint256 (#26898)

This adds built-in support in package rlp for encoding, decoding and generating code dealing with uint256.Int.

---------

Co-authored-by: Felix Lange <[email protected]>

* eth: fix output file permissions in admin_exportChain (#26912)

* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <[email protected]>

* trie: reduce unit test time (#26918)

* core/txpool: use atomic int added in go1.19 (#26913)

Makes use of atomic.Uint64 instead of atomic by pointer

* params: schedule shanghai fork on mainnet (#26908)

Schedules the shanghai hardfork on timestamp 1681338455 as discussed on ACDE 157: https://github.com/ethereum/execution-specs/pull/727

* core/txpool: allow future local transactions  (#26930)

Local transactions should not be subject to the "future shouldn't churn pending txs" rule

* params: go-ethereum v1.11.5 stable

* params: begin v1.11.6 release cycle

* build: allow building nightly archives via cron jobs (#26938)

* log: add special casing of uint256 into the logger (#26936)

* core/rawdb: use atomic int added in go1.19 (#26935)

* core/vm: expose jumptable constructors (#26880)

When interacting with geth as a library to e.g. produce state tests, it is desirable to obtain the consensus-correct jumptable definition for a given fork. This changes adds accessors so the instructionset can be obtained and characteristics about opcodes can be inspected.

* eth/catalyst: fix races (#26950)

* core/rawdb: update freezertable read meter (#26946)

The meter for "for measuring the effective amount of data read" within the freezertable was never updated. This change remedies that. 
---------

Signed-off-by: jsvisa <[email protected]>

* cmd/evm, tests: record preimages if dump is expected (#26955)

With #25287 we made it so that preimages were not recorded by default. This had the side effect that the evm command is no longer able to dump state since it does a preimage lookup to determine the address represented by a key.

This change enables the recording of preimages when the dump command is given.

* core/state: add account address to Trie slot accessors (#26934)

This changes the Trie interface to add the plain account address as a
parameter to all storage-related methods.

After the introduction of the TryAccount* functions, TryGet, TryUpdate and
TryDelete are now only meant to read an account's storage. In their current
form, they assume that an account storage is stored in a separate trie, and
that the hashing of the slot is independent of its account's address.

The proposed structure for a stateless storage breaks these two
assumptions: the hashing of a slot key requires the address and all slots
and accounts are stored in a single trie.

This PR therefore adds an address parameter to the interface. It is ignored
in the MPT version, so this change has no functional impact, however it
will reduce the diff size when merging verkle trees.

* metrics: add cpu counters (#26796)

This PR adds counter metrics for the CPU system and the Geth process.
Currently the only metrics available for these items are gauges. Gauges are
fine when the consumer scrapes metrics data at the same interval as Geth
produces new values (every 3 seconds), but it is likely that most consumers
will not scrape that often. Intervals of 10, 15, or maybe even 30 seconds
are probably more common.

So the problem is, how does the consumer estimate what the CPU was doing in
between scrapes. With a counter, it's easy ... you just subtract two
successive values and divide by the time to get a nice, accurate average.
But with a gauge, you can't do that. A gauge reading is an instantaneous
picture of what was happening at that moment, but it gives you no idea
about what was going on between scrapes. Taking an average of values is
meaningless.

* metrics/influxdb: use smaller dependency and reuse code between v1 and v2 reporters  (#26963)

This change switches to use the smaller influxdata/influxdb1-client package instead of depending on the whole infuxdb package. The new smaller client is very similar to the influxdb-v2 client, which made it possible to refactor the two reporters to reuse code a lot more.

* eth/gasprice: change feehistory input type from int to uint64 (#26922)

Change input param type from int to uint64

* go.mod: update golang.org/x/tools (#26960)

* rlp/rlpgen: print want/expect output string if mismatch (#26932)


Co-authored-by: Marius van der Wijden <[email protected]>

* ethclient: ensure returned subscription is nil on error (#26976)

* core/state, trie: remove Try prefix in Trie accessors (#26975)

This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <[email protected]>

* metrics/librato: ensure resp.body closed (#26969)

This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)

* core/vm: use atomic.Bool (#26951)

Make use of new atomic types
---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* core/bloombits: use atomic type (#26993)

* core/state: use atomic.Bool (#26992)

* graphql: fix data races (#26965)

Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.

* eth/tracers/native: prevent panic for LOG edge-cases (#26848)

This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <[email protected]>

* internal/debug: add log.logfmt flag to set logging to use logfmt (#26970)

* docs: update outdated DeriveSha docs comment (#26968)

* remove @gballet as a GraphQL codeowner (#27012)

* core: use atomic type (#27011)

* graphql: revert storage access regression (#27007)

* cmd/geth: Add `--log.format` cli param (#27001)

Removes the new --log.logfmt directive and hides --log.json, replacing both with log.format=(json|logfmt|terminal). The hidden log.json option is still respected if log.format is not specified for backwards compatibility.

Co-authored-by: Martin Holst Swende <[email protected]>

* ethdb/pebble: use atomic type (#27014)

* common: fix json marshaller MixedcaseAddress (#26998)

Fix the json marshaller of MixedcaseAddress

* eth/catalyst: improve consensus heartbeat (#26896)

improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“[email protected]”>

* miner: use atomic type (#27013)

Use the new typed atomics in the miner package

* accounts/abi/bind: handle UnpackLog with zero topics (#26920)

Adds error handling for the case that UnpackLog or UnpackLogIntoMap is called with a log that has zero topics.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* cmd/evm: use correct parent number for t8n base fee calculation (#27032)

Currently the t8n tool uses the same block number for the current block and its parent while calculating the base fee. This causes incorrect base fee calculation for the london fork block. This commit sets the parent block number to be one less than the current block number

* go.mod : update snappy (#27027)

* common: delete MakeName (#27023)

common,p2p: remove unused function MakeName

* cmd/geth: enable log rotation (#26843)

This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd, miner, signer: avoid panic if keystore is not available (#27039)

* cmd, miner, singer: avoid panic if keystore is not available

* cmd/geth: print warning instead of panic

* test/fuzzers: fuzz rlp handling of big.Int and uint256.Int (#26917)

test/fuzzers: fuzz rlp handling of big.Lnt and uint256.Int

* core/txpool: move some validation to outside of mutex (#27006)

Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check. 

This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.

* eth/downloader: use atomic types (#27030)

* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: clarify comment (#27045)

* consensus, core/typer: add 4844 excessDataGas to header, tie it to Cancun (#27046)

* consensus/misc, params: add EIP-4844 blobfee conversions (#27041)

* consensus/misc, params: add EIP-4844 blobfee conversions

* consensus/misc: pull in fakeExponential test cases

* consensus/misc: reuse bigints

* consensus/misc: nit renames, additional larger testcase

---------

Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: report correct gasLimit in call tracers (#27029)

This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <[email protected]>

* all: remove debug-field from vm config (#27048)

This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* metrics: make gauge_float64 and counter_float64 lock free (#27025)

Makes the float-gauges lock-free

name                      old time/op  new time/op  delta
CounterFloat64Parallel-8  1.45µs ±10%  0.85µs ± 6%  -41.65%  (p=0.008 n=5+5)

---------

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: use atomic type (#27031)

Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* build: upgrade -dlgo version to Go 1.20.3

* core/txpool: disallow future churn by remote txs (#26907)

Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'. 

This change fixes that, by doing a more in-depth inspection of the queue.

* core, miner: drop transactions from the same sender when error occurs (#27038)

This PR unifies the error handling in miner. 

Whenever an error occur while applying a transaction, the transaction should be regarded as invalid and all following transactions from the same sender not executable because of the nonce restriction. The only exception is the `nonceTooLow` error which is handled separately.

* params: new sepolia bootnodes (#27099)

New sepolia bootnodes managed by EF devops

* cmd/devp2p: fix erroneous log output in crawler (#27089)

cmd/devp2p: fix log of ignored recent nodes counter

* signer/core: rename testdata files (#27063)

Sets a meaningful name on test-files

* core: fix comment to reflect function name (#27070)

* params: remove `EIP150Hash` from chainconfig (#27087)

The EIP150Hash was an idea where, after the fork, we hardcoded the forked hash as an extra defensive mechanism. It wasn't really used, since forks weren't contentious and for all the various testnets and private networks it's been a hassle to have around. 

This change removes that config field. 

---------

Signed-off-by: jsvisa <[email protected]>

* p2p: access embedded fields of Server directly (#27078)

* consensus/ethash: use atomic type (#27068)

* cmd/devp2p: make crawler-route53-updater less verbose (#27116)

Follow-up to #26697, makes the crawler less verbose on route53-based scenarios.

It also changes the loglevel from debug to info on Updates, which are typically the root, and can be interesting to see.

* cmd/geth: rename --vmodule to --log.vmodule (#27071)

renames `--vmodule` to `--log.vmodule`, and prints a warning if the old form is used.

* core/vm: order opcodes properly (#27113)

* metrics: use atomic type (#27121)

* all: refactor trie API (#26995)

In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.

* params: go-ethereum v1.11.6 stable

* dev: chg: regression changes for bor after merge

* dev: chg: more regression changes for bor after merge

* Use `big.Int#Set` instead of `big.Int#SetBytes` when possible (#896)

There is no reason to make the bytes transformation and back to big int to assign a big int to another one.

The `Set` method should be used instead.

* dev: chg: txpool_test regression changes after merge

* dev: chg: gomock re-generate mocks for backend interface

* dev: chg: regression changes after develop is merged into upstream-merge

* dev: chg: further fixes merging develop into upstream-merge

* dev: chg: apply changes to NewParallelBlockChain

* dev: chg: solve some TODOs

* dev: fix: CreateConsensusEngine for new ethereum objects

* dev: fix: NewParallelBlockChain using Genesis

* dev: fix: build ci.go

* dev: fix: thelper and tparallel lint

* dev: fix: http related and nilnil lint errors

* dev: fix: ineffassign lint errors

* dev: chg: comment position fix

* dev: fix: govet lint errors

* dev: fix: error related lint issues

* dev: fix: bodyclose lint issues

* dev: fix: some wsl lint issues

* dev: fix: more wsl lint issues

* dev: fix: errorcheck lint issues

* dev: fix: solve more lint issues

* dev: fix: more wsl lint issues

* dev: fix: more errcheck lint issues

* dev: fix: most of wsl lint issues

* dev: fix: all remaining  lint issues

* fixed MVHashMap being enabled even when paralellUniverse is set to 0 (#900)

* dev: fix: t.Parallel called multiple times

* dev: fix: tests failing due to t.Parallel

* fix : runtime testcases

* fix : testcase : config, addTxWithChain, burnAmount

* fix : ethhash bor burn contract

* fix : genspec config

* dev: chg: pos-1465: remove snyk and sonarqube (#908)

* fix : freezer, TestStateProcessorErrors

* core,eth,miner: fix initial test cases (#922)

* fix : TestTransactionIndices, testBeaconSync

* fix : TestBeaconSync66

* core,eth: fix TestDeduplication, TestSyncAccountPerformance, TestTraceTransaction

* fix : TestTxIndexer

* rm : multiple coinbase balance

* fix : testCommitInterruptExperimentBor

* adding balance send to burntcontract back

* Fix header encoding test

* Fix worker tracing `nil` pointer exception (#899)

The `baseFee` can be `nil` in certain situations, the tracing must not use `baseFee` unless it was checked otherwise if such case happen, Go is going to panic.

* core,eth/tracers: fix TestPrestateWithDiffModeTracer

* fixed go files

* consensus/bor,eth/filters,miner,params,tests: fix mocks

* fix : TestGraphQLConcurrentResolvers

* fix : TestBuildPayload

* common,core,miner: fix goleaks,duplicate init and inconsistent mutex (un)locks

* fix : lint

* fix : lint

* Move NumSpeculativeProcs from module variable to function parameter (#931)

This will prevent data races when more than one parallel execution are running at the same time.

* fix : test-integration

* fix : test-integration

* Calculate tx dependency only when mining is enabled (#935)

* core: restore AddFeeTransferLog post miner tipping

* fix : TestGraphQLConcurrentResolvers

* mardizzone/POS-1605: go and deps upgrade (#929)

* dev: chg: pos-1605: fix govulns by bumping golang version and replacing mongodb version

* dev: chg: pos-1605: update some dependencies to solve dependabot vulns

* dev: chg: update linter for compatibility with upgraded go version

* dev: chg: update go version in golangci lintere

* dev: chg: update go version in ci workflow, docker and travis

* dev: chg: change govulncheck version to a stable fixed one

* dev: chg: fix govulncheck version

* dev: chg: remove vulncheck version

* dev: chg: adapt tests based on go-ethereum for go version upgrade

* dev: chg: use explicit go version for templum action

* dev: chg: fix lint

* dev: chg: fix lint

* dev: chg: 1.20.x explicitly in packager

* dev: chg: ignore some additional leak to be fixed

* dev: chg: ignore some additional leak to be fixed

* dev: chg: fix lint

* rpc: add execution pool metrics (#919)

* rpc: add execution pool metrics

* rpc: stop execution pool and report metrics using ticker

* fix lint

* update go.mod, update metric report interval

* handle empty workerpool case to fix tests

* fix lint

* refactor ep metrics collection based on each service

* remove log

* rpc: convert processed metric to histogram

* lint

* Moved TxDependency Metadata to ExtraData in Block Header (#930)

* moved TxDependency Metadata to ExtraData in Block Header

* updated unit tests

* lints

* small bug fix

* small improvement

* minor bug fix

* addressed comments

* bug fix, only using the BlockExtraData structure after the Parallel Universe HF

* addressed comments

* fixed an error

* bug fix

* encoding nil ValidatorBytes and TxDependency in prepare if the current block is not the last block of the sprint

* bug fix

* fix : deadlocks

* rm: t.parallel from testQueueTimeLimiting tests

* Merge branch 'develop' into mardizzone/upstream-merge

* fix : lint

* fix : test-integration

* fix : TxDependency

* Update discord link in README.md (#938)

* add rpc.enabledeprecatedpersonal flag

* Upstream merge from go-ethereum/v1.11.6 (#901)

* ethdb/pebble: fix nil callbacks (#26650)

* eth/downloader: fix timeout resurrection panic (#26652)

* common/prque, eth/downloader: fix timeout resurrection panic

* common/prque: revert -1 hack for les, temporaryly!

* core/state, trie: remove unused error-return from trie Commit operation (#26641)

* go.mod: update pebble to latest master (#26654)

* core/vm: set tracer-observable `value` of a delegatecall to match parent `value` (#26632)

This is a breaking change in the tracing hooks API as well as semantics of the callTracer:

- CaptureEnter hook provided a nil value argument in case of DELEGATECALL. However to stay consistent with how delegate calls behave in EVM this hook is changed to pass in the value of the parent call.
- callTracer will return parent call's value for DELEGATECALL frames.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* ethdb: add benchmark test suite (#26659)

* params: schedule shanghai fork on sepolia (#26662)

* params: schedule shanghai fork on sepolia

* params: u64 -> newUint64

* eth/filters: avoid block body retrieval when no matching logs (#25199)

Logs stored on disk have minimal information. Contextual information such as block
number, index of log in block, index of transaction in block are filled in upon request.
We can fill in all these fields only having the block header and list of receipts.
But determining the transaction hash of a log requires the block body.

The goal of this PR is postponing this retrieval until we are sure we the transaction hash.
It happens often that the header bloom filter signals there might be matches in a block,
but after actually checking them reveals the logs do not match. We want to avoid fetching
the body in this case.

Note that this changes the semantics of Backend.GetLogs. Downstream callers of
GetLogs now assume log context fields have not been derived, and need to call
DeriveFields on the logs if necessary.

* eth/tracers: more fork overrides in traceBlockToFile (#26655)

This change allows all post-Berlin forks to be specified as overrides for futureForkBlock in the config parameter for traceBlockToFile.

* tests/fuzzers: supply gnark multiexp config, fixes #26669 (#26670)

This change fixes a fuzzer which broke when we updated the gnark dependency earlier.

* cmd/devp2p: reduce output of node crawler (#26674)

Our discovery crawler spits out a huge amount of logs, most of which is pretty non-interesting. This change moves the very verbose output to Debug, and adds a 8-second status log message giving the general idea about what's going on.

* params: update mainnet + rinkeby CHT (#26677)

This change updates the CHT entries for mainnet and rinkeby

* eth/filters: replace atomic pointer with value (#26689)

* eth/filters: replace atomic.Pointer

* fix

* improve

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* p2p/dnsdisc: fix tests with Go 1.20 (#26690)

* eth/catalyst: return error if withdrawals are nil post-shanghai (#26691)

Spec: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#request

* ethdb/pebble: Fix `MemTableStopWritesThreshold` (#26692)

MemTableStopWritesThreshold was set to the max size of all memtables before blocking writing but should be set to the max number of memtables. This is documented [here](https://github.com/cockroachdb/pebble/blob/master/options.go#L738-L742).

* eth/downloader: handle missing withdrawals if empty list is expected (#26675)

This PR relaxes the block body ingress handling a bit: if block body withdrawals are missing (but expected to be empty), the body withdrawals are set to 'empty list' before being passed to upper layers. 

This fixes an issue where a block passed from EthereumJS to geth was deemed invalid.

* params: go-ethereum v1.11.0 stable

* params: begin v1.11.1 release cycle

* travis, build: update Go to 1.20.1 (#26653)

travis, build: update Go to 1.20

* core: check genesis state presence by disk read (#26703)

* core, eth/downloader: make body validation more strict (#26704)

* eth/downloader: fix empty-body case in queue fetchresult (#26707)

* eth/downloader: fix typo (#26716)

* all: remove deprecated uses of math.rand (#26710)

This PR is a (superior) alternative to https://github.com/ethereum/go-ethereum/pull/26708, it handles deprecation, primarily two specific cases. 

`rand.Seed` is typically used in two ways
- `rand.Seed(time.Now().UnixNano())` -- we seed it, just to be sure to get some random, and not always get the same thing on every run. This is not needed, with global seeding, so those are just removed. 
- `rand.Seed(1)` this is typically done to ensure we have a stable test. If we rely on this, we need to fix up the tests to use a deterministic prng-source. A few occurrences like this has been replaced with a proper custom source. 

`rand.Read` has been replaced by `crypto/rand`.`Read` in this PR.

* params: go-ethereum v1.11.1 stable

* params: begin v1.11.2 release cycle

* eth/catalyst: send INVALID instead of INVALID_BLOCK_HASH (#26696)

This change will break one hive test, but pass another and it will be the better way going forward

* ci: disable coverage reporting in appveyor and travis

* eth/catalyst: request too large error (#26722)

The method `GetPayloadBodiesByRangeV1` now returns "-38004: Too large request" error if the requested range is too large, according to spec

Co-authored-by: Martin Holst Swende <[email protected]>

* core/trie: remove trie tracer (#26665)

This PR contains a small portion of the full pbss PR, namely

    Remove the tracer from trie (and comitter), and instead using an accessList.
    Related changes to the Nodeset.


---------

Co-authored-by: Gary Rong <[email protected]>

* rpc: fix unmarshaling of null result in CallContext (#26723)

The change fixes unmarshaling of JSON null results into json.RawMessage.

---------

Co-authored-by: Jason Yuan <[email protected]>
Co-authored-by: Jason Yuan <[email protected]>

* build: ship bootstrapper Go along with builder for PPA (#26731)

* build: fix setting env var, temp early exit

* build: fix gobootstrap path for the PPA

* build: add some PPA debug logs, sigh

* internal/build: revert raising the chunk size for PPA

* build: yet another weird PPA fix

* build: fix (finaly?) the PPA env vars for Go bootstrapping

* build: fix Go 1.19.0 bootstrapper issues on 386 PPA

* build: enable Lunar Lobster PPA builds

* Revert "core/trie: remove trie tracer (#26665)" (#26732)

This reverts commit 7c749c947a9d5181f5f2c1b3fdb5ea6b0e401e8e.

* cmd/geth: clarify dumpconfig options (#26729)

Clarifies the documentation around dumpconfi

Signed-off-by: Sungwoo Kim <[email protected]>

* core, eth: merge snap-sync chain download progress logs (#26676)

* core: fix accessor mismatch for genesis state (#26747)

* core/rawdb: expose chain freezer constructor without internals (#26748)

* all: use unified emptyRootHash and emptyCodeHash (#26718)

The EmptyRootHash and EmptyCodeHash are defined everywhere in the codebase, this PR replaces all of them with unified one defined in core/types package, and also defines constants for TxRoot, WithdrawalsRoot and UncleRoot

* eth/filters: fix a breaking change and return rpctransaction (#26757)

* eth/filters: fix a breaking change and return rpctransaction

* eth/filters: fix test cases

---------

Co-authored-by: Catror <[email protected]>

* common/math: allow HexOrDecimal to accept unquoted decimals too (#26758)

* params: release Geth v1.11.2

* params: begin v.1.11.3 release cycle

* log: improve documentation (#26753)

Add usage examples

* core/rawdb, node: use standalone flock dependency (#26633)

* eth: use the last announced finalized block as the sync ancient limit (#26685)

* cmd/devp2p: faster crawling + less verbose dns updates (#26697)

This improves the speed of DHT crawling by using concurrent requests.
It also removes logging of individual DNS updates.

* eth/tracers: add native flatCallTracer (aka parity style tracer) (#26377)

Adds support for a native call tracer with the Parity format, which outputs call frames
in a flat array. This tracer accepts the following options:

- `convertParityErrors: true` will convert error messages to match those of Parity
- `includePrecompiles: true` will report all calls to precompiles. The default
  matches Parity's behavior where CALL and STATICCALLs to precompiles are excluded

Incompatibilities with Parity include:

- Parity removes the result object in case of failure. This behavior is maintained
  with the exception of reverts. Revert output usually contains useful information,
  i.e. Solidity revert reason.
- The `gasUsed` field accounts for intrinsic gas (e.g. 21000 for simple transfers)
  and refunds unlike Parity
- Block rewards are not reported

Co-authored-by: Sina Mahmoodi <[email protected]>

* core: improve withdrawal index assignment in GenerateChain (#26756)

This fixes an issue where the withdrawal index was not calculated correctly
for multiple withdrawals in a single block.

Co-authored-by: Gary Rong <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* ethdb/pebble: fix range compaction (#26771)

* ethdb/pebble: fix range compaction

* ethdb/pebble: add comment

* ethdb/pebble: fix max memorytable size (#26776)

* ethclient: include withdrawals in ethclient block responses (#26778)

* include withdrawals in ethclient responses

* omit empty withdrawals array in json serialization

* all: change chain head markers from block to header (#26777)

* core/rawdb, ethdb/pebble: disable pebble on openbsd (#26801)

* core: fix a merge fault (#26802)

* README, go.mod, event, internal/version: bump min Go to 1.19 (#26803)

* travi: remove strange leftover Go version

* core, params: schedule Shanghai on goerli (#26795)

* core: params: schedule Shanghai on goerli

* core/forkid: fix comment

* eth: remove admin.peers[i].eth.head and difficulty (#26804)

* core/types: add EffectiveGasPrice in Receipt (#26713)

This change adds a struct field EffectiveGasPrice in types.Receipt. The field is present
in RPC responses, but not in the Go struct, and thus can't easily be accessed via ethclient.

Co-authored-by: PulsarAI <[email protected]>

* core, eth/catalyst: fix race conditions in tests (#26790)

Fixes a race in TestNewPayloadOnInvalidTerminalBlock where setting the TTD raced with
the miner. Solution: set the TTD on the blockchain config not the genesis config.

Also fixes a race in CopyHeader which resulted in race reports all over the place.

* metrics: improve accuracy of CPU gauges (#26793)

This PR changes metrics collection to actually measure the time interval between collections, rather
than assume 3 seconds. I did some ad hoc profiling, and on slower hardware (eg, my Raspberry Pi 4)
I routinely saw intervals between 3.3 - 3.5 seconds, with some being as high as 4.5 seconds. This
will generally cause the CPU gauge readings to be too high, and in some cases can cause impossibly
large values for the CPU load metrics (eg. greater than 400 for a 4 core CPU).

---------

Co-authored-by: Felix Lange <[email protected]>

* ethclient: fix panic when requesting missing blocks (#26817)

This fixes a regression introduced by #26723.
Fixes #26816.

* core, miner: revert block gas counter in case of invalid transaction (#26799)

This change fixes a flaw where, in certain scenarios, the block sealer did not accurately reset the remaining gas after failing to include an invalid transaction. Fixes #26791

* internal/ethapi: add tests for transaction types JSON marshal/unmarshal (#26667)

Checks that Transaction.MarshalJSON and newRPCTransaction JSON output can be parsed by Transaction.UnmarshalJSON

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd/evm: correct `alloc` for `t8n` testdata (#26822)

Fixes a minor error in the testdata

* eth/tracers/native: set created address to nil in case of failure (#26779)

Fixes #26073

* accounts/usbwallet: mitigate ledger app chunking issue (#26773)

This PR mitigates an issue with Ledger's on-device RLP deserialization, see
https://github.com/LedgerHQ/app-ethereum/issues/409

Ledger's RLP deserialization code does not validate the length of the RLP list received,
and it may prematurely enter the signing flow when a APDU chunk boundary falls immediately
before the EIP-155 chain_id when deserializing a transaction. Since the chain_id is
uninitialized, it is 0 during this signing flow. This may cause the user to accidentally
sign the transaction with chain_id = 0. That signature would be returned from the device 1
packet earlier than expected by the communication loop. The device blocks the
second-to-last packet waiting for the signer flow, and then errors on the successive
packet (which contains the chain_id, zeroed r, and zeroed s)

Since the signature's early arrival causes successive errors during the communication
process, geth does not parse the improper signature produced by the device, and therefore
no improperly-signed transaction can be created. User funds are not at risk.

We mitigate by selecting the highest chunk size that leaves at least 4 bytes in the
final chunk.

* beacon/engine: don't omit empty withdrawals in ExecutionPayloadBodies (#26698)

This ensures the "withdrawals" field will always be present in responses
to getPayloadBodiesByRangeV1 and getPayloadBodiesByHashV1.

---------

Co-authored-by: Felix Lange <[email protected]>

* build: update to go 1.20.2 (#26824)

* params: go-ethereum v1.11.3 stable

* params: begin v1.11.4 release cycle

* core/rawdb: find smallest block stored in key-value store when chain gapped (#26719)

This change prints out more information about the problem, in the case where geth detects a gap between leveldb and ancients, so we can determine more exactly where the gap is (what the first missing is). Also prints out more metadata. 

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* signer/core: accept all solidity primitive types for EIP-712 signing  (#26770)

Accept all primitive types in Solidity for EIP-712 from intN, uintN, intN[], uintN[] for N as 0 to 256 in multiples of 8

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* params: remove EF azure bootnodes (#26828)

* core/vm: use golang native big.Int (#26834)

reverts #26021, to use the upstream bigint instead.

* core/vm: fix typo in comment (#26838)

fixes eip 220 ->  2200

* core/forkid: fix issue in validation test (#26544)

This changes the test to match the comment description. Using timestampedConfig in this test case is incorrect, the comment says 'local is at Gray Glacier' and isn't aware of more forks.

* cmd/evm: update readmes for the tests (#26841)

* core, core/types: plain Message struct (#25977)

Here, the core.Message interface turns into a plain struct and
types.Message gets removed.

This is a breaking change to packages core and core/types. While we do
not promise API stability for package core, we do for core/types. An
exception can be made for types.Message, since it doesn't have any
purpose apart from invoking the state transition in package core.
types.Message was also marked deprecated by the same commit it
got added in, 4dca5d4db7 (November 2016).

The core.Message interface was added in December 2014, in commit
db494170dc, for the purpose of 'testing' state transitions. It's the
same change that made transaction struct fields private. Before that,
the state transition used *types.Transaction directly.

Over time, multiple implementations of the interface accrued across
different packages, since constructing a Message is required whenever
one wants to invoke the state transition. These implementations all
looked very similar, a struct with private fields exposing the fields
as accessor methods.

By changing Message into a struct with public fields we can remove all
these useless interface implementations. It will also hopefully
simplify future changes to the type with less updates to apply across
all of go-ethereum when a field is added to Message.

---------

Co-authored-by: Felix Lange <[email protected]>

* travis: only build PPAs nightly, not on every push, too heavy (#26846)

* p2p: small comment typo (#26850)

Update server.go

* core: add Timestamp method in BlockGen (#26844)

Since forks are now scheduled by block time, it can be necessary
to check the timestamp of a block while generating transactions.

* core/txpool: implement additional DoS defenses (#26648)

This adds two new rules to the transaction pool:

- A future transaction can not evict a pending transaction.
- A transaction can not overspend available funds of a sender.

---

Co-authored-by: dwn1998 <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* params: go-ethereum v1.11.4 stable

* params: begin v1.11.5 release cycle

* tests: define `MuirGlacier` fork (#26856)

add muir glacier to t8n

* code/vm: fix comment typo (#26865)

it should be constantinople rather than contantinople

* core: minor code refactor (#26852)

* core: refactor code

* core: drop it from this anonymous goroutine func

* core/txpool: use priceList.Put instead of heap.Push (#26863)

Minor refactor to use the 'intended' accessor

* eth: return error if 'safe' or 'finalized' tag used pre-merge (#26862)


Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Felix Lange <[email protected]>

* .travis.yml: reenable PPA build on tag push (#26873)

* core/state, trie: port changes from PBSS (#26763)

* p2p/discover: pass invalid discv5 packets to Unhandled channel (#26699)

This makes it possible to run another protocol alongside discv5, by reading 
unhandled packets from the channel.

* all: update links in documentation (#26882)


Co-authored-by: Stephen Flynn <[email protected]>

* Increase websocket frame size (from erigon rpc client) (#26883)

This increases the maximum allowed message size to 32MB.

Originally submitted at https://github.com/ledgerwatch/erigon/pull/2739

example block failure: https://etherscan.io/tx/0x1317d973a55cedf9b0f2df6ea48e8077dd176f5444a3423368a46d6e4db89982#internal

* cmd/devp2p, cmd/geth: add version in --help output (#26895)

Not sure why this was removed, it's pretty useful to see the version
also in --help.

* core: show db error-info in case of mismatched hash root (#26870)

When a database failure occurs, bubble it up a into statedb, and report it in suitable places, such as during a 'bad block' report.

* consensus: improve consensus engine definition (#26871)

Makes clear the distinction between Finalize and FinalizedAndAssemble:

- In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.

This function should be used in block processing(receive afrom network and apply it locally) but not block generation.

- In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
  state root computed, updating the header. 

 This function should be used in block generation only.

* eth/catalyst: increase update consensus timeout (#26840)

 Increases the time between consensus updates that we give the CL before we start warning the user.

* internal/ethapi: avoid int overflow in GetTransactionReceipt (#26911)

* trie, accounts/abi: add error-checks (#26914)

* rlp: support for uint256 (#26898)

This adds built-in support in package rlp for encoding, decoding and generating code dealing with uint256.Int.

---------

Co-authored-by: Felix Lange <[email protected]>

* eth: fix output file permissions in admin_exportChain (#26912)

* api: Use 0700 file permissions for ExportChain

* change perm to 0644

* Update api.go

---------

Co-authored-by: Felix Lange <[email protected]>

* trie: reduce unit test time (#26918)

* core/txpool: use atomic int added in go1.19 (#26913)

Makes use of atomic.Uint64 instead of atomic by pointer

* params: schedule shanghai fork on mainnet (#26908)

Schedules the shanghai hardfork on timestamp 1681338455 as discussed on ACDE 157: https://github.com/ethereum/execution-specs/pull/727

* core/txpool: allow future local transactions  (#26930)

Local transactions should not be subject to the "future shouldn't churn pending txs" rule

* params: go-ethereum v1.11.5 stable

* params: begin v1.11.6 release cycle

* build: allow building nightly archives via cron jobs (#26938)

* log: add special casing of uint256 into the logger (#26936)

* core/rawdb: use atomic int added in go1.19 (#26935)

* core/vm: expose jumptable constructors (#26880)

When interacting with geth as a library to e.g. produce state tests, it is desirable to obtain the consensus-correct jumptable definition for a given fork. This changes adds accessors so the instructionset can be obtained and characteristics about opcodes can be inspected.

* eth/catalyst: fix races (#26950)

* core/rawdb: update freezertable read meter (#26946)

The meter for "for measuring the effective amount of data read" within the freezertable was never updated. This change remedies that. 
---------

Signed-off-by: jsvisa <[email protected]>

* cmd/evm, tests: record preimages if dump is expected (#26955)

With #25287 we made it so that preimages were not recorded by default. This had the side effect that the evm command is no longer able to dump state since it does a preimage lookup to determine the address represented by a key.

This change enables the recording of preimages when the dump command is given.

* core/state: add account address to Trie slot accessors (#26934)

This changes the Trie interface to add the plain account address as a
parameter to all storage-related methods.

After the introduction of the TryAccount* functions, TryGet, TryUpdate and
TryDelete are now only meant to read an account's storage. In their current
form, they assume that an account storage is stored in a separate trie, and
that the hashing of the slot is independent of its account's address.

The proposed structure for a stateless storage breaks these two
assumptions: the hashing of a slot key requires the address and all slots
and accounts are stored in a single trie.

This PR therefore adds an address parameter to the interface. It is ignored
in the MPT version, so this change has no functional impact, however it
will reduce the diff size when merging verkle trees.

* metrics: add cpu counters (#26796)

This PR adds counter metrics for the CPU system and the Geth process.
Currently the only metrics available for these items are gauges. Gauges are
fine when the consumer scrapes metrics data at the same interval as Geth
produces new values (every 3 seconds), but it is likely that most consumers
will not scrape that often. Intervals of 10, 15, or maybe even 30 seconds
are probably more common.

So the problem is, how does the consumer estimate what the CPU was doing in
between scrapes. With a counter, it's easy ... you just subtract two
successive values and divide by the time to get a nice, accurate average.
But with a gauge, you can't do that. A gauge reading is an instantaneous
picture of what was happening at that moment, but it gives you no idea
about what was going on between scrapes. Taking an average of values is
meaningless.

* metrics/influxdb: use smaller dependency and reuse code between v1 and v2 reporters  (#26963)

This change switches to use the smaller influxdata/influxdb1-client package instead of depending on the whole infuxdb package. The new smaller client is very similar to the influxdb-v2 client, which made it possible to refactor the two reporters to reuse code a lot more.

* eth/gasprice: change feehistory input type from int to uint64 (#26922)

Change input param type from int to uint64

* go.mod: update golang.org/x/tools (#26960)

* rlp/rlpgen: print want/expect output string if mismatch (#26932)


Co-authored-by: Marius van der Wijden <[email protected]>

* ethclient: ensure returned subscription is nil on error (#26976)

* core/state, trie: remove Try prefix in Trie accessors (#26975)

This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <[email protected]>

* metrics/librato: ensure resp.body closed (#26969)

This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)

* core/vm: use atomic.Bool (#26951)

Make use of new atomic types
---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* core/bloombits: use atomic type (#26993)

* core/state: use atomic.Bool (#26992)

* graphql: fix data races (#26965)

Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.

* eth/tracers/native: prevent panic for LOG edge-cases (#26848)

This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <[email protected]>

* internal/debug: add log.logfmt flag to set logging to use logfmt (#26970)

* docs: update outdated DeriveSha docs comment (#26968)

* remove @gballet as a GraphQL codeowner (#27012)

* core: use atomic type (#27011)

* graphql: revert storage access regression (#27007)

* cmd/geth: Add `--log.format` cli param (#27001)

Removes the new --log.logfmt directive and hides --log.json, replacing both with log.format=(json|logfmt|terminal). The hidden log.json option is still respected if log.format is not specified for backwards compatibility.

Co-authored-by: Martin Holst Swende <[email protected]>

* ethdb/pebble: use atomic type (#27014)

* common: fix json marshaller MixedcaseAddress (#26998)

Fix the json marshaller of MixedcaseAddress

* eth/catalyst: improve consensus heartbeat (#26896)

improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“[email protected]”>

* miner: use atomic type (#27013)

Use the new typed atomics in the miner package

* accounts/abi/bind: handle UnpackLog with zero topics (#26920)

Adds error handling for the case that UnpackLog or UnpackLogIntoMap is called with a log that has zero topics.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>

* cmd/evm: use correct parent number for t8n base fee calculation (#27032)

Currently the t8n tool uses the same block number for the current block and its parent while calculating the base fee. This causes incorrect base fee calculation for the london fork block. This commit sets the parent block number to be one less than the current block number

* go.mod : update snappy (#27027)

* common: delete MakeName (#27023)

common,p2p: remove unused function MakeName

* cmd/geth: enable log rotation (#26843)

This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* cmd, miner, signer: avoid panic if keystore is not available (#27039)

* cmd, miner, singer: avoid panic if keystore is not available

* cmd/geth: print warning instead of panic

* test/fuzzers: fuzz rlp handling of big.Int and uint256.Int (#26917)

test/fuzzers: fuzz rlp handling of big.Lnt and uint256.Int

* core/txpool: move some validation to outside of mutex (#27006)

Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check. 

This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.

* eth/downloader: use atomic types (#27030)

* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <[email protected]>

---------

Co-authored-by: Martin Holst Swende <[email protected]>

* core/vm: clarify comment (#27045)

* consensus, core/typer: add 4844 excessDataGas to header, tie it to Cancun (#27046)

* consensus/misc, params: add EIP-4844 blobfee conversions (#27041)

* consensus/misc, params: add EIP-4844 blobfee conversions

* consensus/misc: pull in fakeExponential test cases

* consensus/misc: reuse bigints

* consensus/misc: nit renames, additional larger testcase

---------

Co-authored-by: Roberto Bayardo <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: report correct gasLimit in call tracers (#27029)

This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <[email protected]>

* all: remove debug-field from vm config (#27048)

This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* metrics: make gauge_float64 and counter_float64 lock free (#27025)

Makes the float-gauges lock-free

name                      old time/op  new time/op  delta
CounterFloat64Parallel-8  1.45µs ±10%  0.85µs ± 6%  -41.65%  (p=0.008 n=5+5)

---------

Co-authored-by: Exca-DK <[email protected]>
Co-authored-by: Martin Holst Swende <[email protected]>

* eth/tracers: use atomic type (#27031)

Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <[email protected]>
Co-authored-by: Sina Mahmoodi <[email protected]>

* build: upgrade -dlgo version to Go 1.20.3

* core/txpool: disallow future churn by remote txs (#26907)

Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'. 

This change fixes that, by doing a more in-depth inspection of the queue.

* core, miner: drop transactions from the same sender when error occurs (#27038)

This PR unifies the error handling in miner. 

Whenever an error occur while applying a transaction, the transaction should be regarded as invalid and all following transactions from the same sender not executable because of the nonce restriction. The only exception is the `nonceTooLow` error which is handled separately.

* params: new sepolia bootnodes (#27099)

New sepolia bootnodes managed by EF devops

* cmd/devp2p: fix erroneous log output in crawler (#27089)

cmd/devp2p: fix log of ignored recent nodes counter

* signer/core: rename testdata files (#27063)

Sets a meaningful na…
mmsqe pushed a commit to mmsqe/go-ethereum that referenced this pull request Dec 7, 2023
reverts ethereum#26021, to use the upstream bigint instead.
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 26, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Sep 27, 2024
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Oct 17, 2024
wanwiset25 pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants