Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

return proper error on callBundle incorrect gasPrice #141

Open
wants to merge 882 commits into
base: main
Choose a base branch
from

Conversation

TymKh
Copy link
Collaborator

@TymKh TymKh commented Jan 30, 2024

📝 Summary

📚 References


lightclient and others added 30 commits October 4, 2023 15:27
…ad can easily fail for payloads not constructed via analogous fcu
This change refactors stacktrie to separate the stacktrie itself from the
internal representation of nodes: a stacktrie is not a recursive structure
of stacktries, rather, a framework for representing and operating upon a set of nodes.

---------

Co-authored-by: Gary Rong <[email protected]>
fixes various typos in core
* eth/ethconfig: fix typo on comment

* params/config: fix typo on comment

* eth/ethconfig: fix typo on comment
This is a minor refactor in preparation of changes to range verifier. This PR contains no intentional functional changes but moves (and renames) the light.NodeSet
* fix a typo

* trie: additional fixes to docstrings

---------

Co-authored-by: Martin Holst Swende <[email protected]>
…ocol (#28261)

* eth: enforce announcement metadatas and drop peers violating the protocol

* eth/fetcher: relax eth/68 validation a bit for flakey clients

* tests/fuzzers/txfetcher: pull in suggestion from Marius

* eth/fetcher: add tests for peer dropping

* eth/fetcher: linter linter linter linter linter
This change
  - Removes the owner-notion from a stacktrie; the owner is only ever needed for comitting to the database, but the commit-function, the `writeFn` is provided by the caller, so the caller can just set the owner into the `writeFn` instead of having it passed through the stacktrie.
  - Removes the `encoding.BinaryMarshaler`/`encoding.BinaryUnmarshaler` interface from stacktrie. We're not using it, and it is doubtful whether anyone downstream is either.
* eth/fetcher: throttle tx fetches to 128KB responses

* eth/fetcher: unindent a clause per review request
* cmd, core: resolve scheme from a read-write database

* cmd, core, eth: move the scheme check in the ethereum constructor

* cmd/geth: dump should in ro mode

* cmd: reverts
…306)

This change addresses an issue in snap sync, specifically when the entire sync process can be halted due to an encountered empty storage range.

Currently, on the snap sync client side, the response to an empty (partial) storage range is discarded as a non-delivery. However, this response can be a valid response, when the particular range requested does not contain any slots.

For instance, consider a large contract where the entire key space is divided into 16 chunks, and there are no available slots in the last chunk [0xf] -> [end]. When the node receives a request for this particular range, the response includes:

    The proof with origin [0xf]
    A nil storage slot set

If we simply discard this response, the finalization of the last range will be skipped, halting the entire sync process indefinitely. The test case TestSyncWithUnevenStorage can reproduce the scenario described above.

In addition, this change also defines the common variables MaxAddress and MaxHash.
vuittont60 and others added 14 commits January 8, 2024 20:31
This PR schedules the cancun fork for the goerli testnet as discussed on ACD.
Spec: ethereum/execution-specs#860

We schedule:
  goerli at 1705473120
When managing geth, it is sometimes desirable to do a partial wipe; deleting state but retaining freezer data. A partial wipe can be somewhat tricky to accomplish. 

This change implements the ability to perform partial wipe by making it possible to run geth removedb non-interactive, using command line options instead.
This is a rewrite of the 'simulated backend', an implementation of the ethclient interfaces
which is backed by a simulated blockchain. It was getting annoying to maintain the old
version of the simulated backend feature because there was a lot of code duplication with
the main client. 

The new version is built using parts that we already have: an in-memory geth node instance
running in developer mode provides the chain, while the Go API is provided by ethclient.
A backwards-compatibility wrapper is provided, but the simulated backend has also moved to
a more sensible import path: github.com/ethereum/go-ethereum/ethclient/simulated

---------

Co-authored-by: Felix Lange <[email protected]>
Co-authored-by: Gary Rong <[email protected]>
@@ -2385,7 +2385,7 @@ func (s *BundleAPI) CallBundle(ctx context.Context, args CallBundleArgs) (map[st
}
uint256GasPrice, ok := uint256.FromBig(gasPrice)
if !ok {
return nil, fmt.Errorf("err: %w; txhash %s", err, tx.Hash())
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like someone can depend on this particular message struct.

Is it possible to not change it?

Copy link
Contributor

Choose a reason for hiding this comment

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

what if:

return nil, fmt.Errorf("err: incorrect gasPrice; txhash %s", tx.Hash())

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, as I undestood this is the code path that was added for deneb so no need to make this compatible

@TymKh
Copy link
Collaborator Author

TymKh commented Feb 7, 2024

problem was actually deeper than this, I pushed another fix

@TymKh TymKh force-pushed the fix-error-handling branch from c7deb75 to 2889978 Compare February 7, 2024 16:28
Base automatically changed from deneb to main March 12, 2024 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.