- 22 Jun, 2023 1 commit
-
-
Exca-DK authored
In all other UDPv4 methods, the deadline is checked first. It seems weird to me that ping is an exception. Deadline comparison is also less resource intensive. Co-authored-by:
Exca-DK <Exca-DK@users.noreply.github.com>
-
- 21 Jun, 2023 2 commits
-
-
James Prestwich authored
This changes the eth_getProof method implementation to re-encode the requested storage keys, canonicalizing them in the response. For backwards-compatibility reasons, go-ethereum accepts non-canonical hex keys. Accepting them is fine, but we should not mirror invalid inputs into the output. Closes #27306 --------- Co-authored-by:
Martin Holst Swende <martin@swende.se> Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Martin Holst Swende authored
This is likely the culprit behind several data corruption issues, e.g. where data has been written to the freezer, but the deletion from pebble does not go through due to process crash.
-
- 20 Jun, 2023 5 commits
-
-
rjl493456442 authored
The state availability is checked during the creation of a state reader. - In hash-based database, if the specified root node does not exist on disk disk, then the state reader won't be created and an error will be returned. - In path-based database, if the specified state layer is not available, then the state reader won't be created and an error will be returned. This change also contains a stricter semantics regarding the `Commit` operation: once it has been performed, the trie is no longer usable, and certain operations will return an error.
-
jwasinger authored
EstimateGas repeatedly executes a transaction, performing a binary search with multiple gas prices to determine proper pricing. Each call retrieves a new copy of the state (https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L1017) . Because the pending/latest state can change during the execution of EstimateGas, this can potentially cause strange behavior (as noted here: https://github.com/ethereum/go-ethereum/pull/27502#issue-1761957009). This PR modifies EstimateGas to retrieve the state once and use a copy of it for every call invocation it does.
-
Felix Lange authored
his function was added in Go 1.20, but our compatibility target is Go 1.19.
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Delweng authored
-
- 19 Jun, 2023 18 commits
-
-
Dan Laine authored
Also adds Hash.Less method for sorting purposes. --------- Co-authored-by:
Felix Lange <fjl@twurst.com>
-
hero5512 authored
Variables discarded, included can be defined closer to their usage. Co-authored-by:
Martin Holst Swende <martin@swende.se>
-
rjl493456442 authored
This removes the feature where top nodes of the proof can be elided. It was intended to be used by the LES server, to save bandwidth when the client had already fetched parts of the state and only needed some extra nodes to complete the proof. Alas, it never got implemented in the client.
-
Marius van der Wijden authored
* go.mod: update kzg libraries to use big-endian * go.sum: ran go mod tidy * core/testdata/precompiles: fix blob verification test * core/testdata/precompiles: fix blob verification test
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Dan Laine authored
Also adds Address.Less for sorting use in other packages. --------- Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Sanghee Choi authored
-
John Chase authored
-
Dan Laine authored
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Koichi Shiraishi authored
Package rpc uses cgo to find the maximum UNIX domain socket path length. If exceeded, a warning is printed. This is the only use of cgo in this package. It seems excessive to depend on cgo just for this warning, so we now hard-code the usual limit for Linux instead. --------- Co-authored-by:
Felix Lange <fjl@twurst.com>
-
Martin Holst Swende authored
Fixes #27301, a crash that could occur during txpool reorg handling.
-
hero5512 authored
floatingRatio is a constant and always non-zero. So there is no need to check for == 0.
-
John Chase authored
-
Dan Laine authored
-
Dan Laine authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
- 18 Jun, 2023 2 commits
- 16 Jun, 2023 2 commits
-
-
Péter Szilágyi authored
* all: move main transaction pool into a subpool * go.mod: remove superfluous updates * core/txpool: review fixes, handle txs rejected by all subpools * core/txpool: typos
-
John Chase authored
fix typos Co-authored-by:
john <yejiarui@123.com>
-
- 15 Jun, 2023 3 commits
-
-
cui fliter authored
fix some typos Signed-off-by:
cui fliter <imcusg@gmail.com>
-
Martin Holst Swende authored
Co-authored-by:
Felix Lange <fjl@twurst.com>
-
aaronbuchwald authored
The logs in this function are pulled straight from disk in rawdb.ReadRawReceipts and also modified in receipts.DeriveFields, so removing the copy should be fine.
-
- 14 Jun, 2023 3 commits
-
-
Sina Mahmoodi authored
We had to do this workaround because it wasn't possible to export typed arrays from JS to []byte. This was added in dop251/goja@2352993, so we can use the better way now.
-
Sanghee Choi authored
node: Delete the unused error from return parameters of Node.Attach() func
-
zhiqiangxu authored
This adds two ways to check for subscription support. First, one can now check whether the transport method (HTTP/WS/etc.) is capable of subscriptions using the new Client.SupportsSubscriptions method. Second, the error returned by Subscribe can now reliably be tested using this pattern: sub, err := client.Subscribe(...) if errors.Is(err, rpc.ErrNotificationsUnsupported) { // no subscription support } --------- Co-authored-by:
Felix Lange <fjl@twurst.com>
-
- 13 Jun, 2023 4 commits
-
-
Freeman Jiang authored
Co-authored-by:
lightclient <14004106+lightclient@users.noreply.github.com>
-
mmsqe authored
This PR adds server-side limits for JSON-RPC batch requests. Before this change, batches were limited only by processing time. The server would pick calls from the batch and answer them until the response timeout occurred, then stop processing the remaining batch items. Here, we are adding two additional limits which can be configured: - the 'item limit': batches can have at most N items - the 'response size limit': batches can contain at most X response bytes These limits are optional in package rpc. In Geth, we set a default limit of 1000 items and 25MB response size. When a batch goes over the limit, an error response is returned to the client. However, doing this correctly isn't always possible. In JSON-RPC, only method calls with a valid `id` can be responded to. Since batches may also contain non-call messages or notifications, the best effort thing we can do to report an error with the batch itself is reporting the limit violation as an error for the first method call in the batch. If a batch is too large, but contains only notifications and responses, the error will be reported with a null `id`. The RPC client was also changed so it can deal with errors resulting from too large batches. An older client connected to the server code in this PR could get stuck until the request timeout occurred when the batch is too large. **Upgrading to a version of the RPC client containing this change is strongly recommended to avoid timeout issues.** For some weird reason, when writing the original client implementation, @fjl worked off of the assumption that responses could be distributed across batches arbitrarily. So for a batch request containing requests `[A B C]`, the server could respond with `[A B C]` but also with `[A B] [C]` or even `[A] [B] [C]` and it wouldn't make a difference to the client. So in the implementation of BatchCallContext, the client waited for all requests in the batch individually. If the server didn't respond to some of the requests in the batch, the client would eventually just time out (if a context was used). With the addition of batch limits into the server, we anticipate that people will hit this kind of error way more often. To handle this properly, the client now waits for a single response batch and expects it to contain all responses to the requests. --------- Co-authored-by:
Felix Lange <fjl@twurst.com> Co-authored-by:
Martin Holst Swende <martin@swende.se>
-
hero5512 authored
rm error when marshal block to rpc type allen
-
jwasinger authored
-