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

validator: support mev #1

Open
wants to merge 444 commits into
base: bnb-chain/develop
Choose a base branch
from
Open

validator: support mev #1

wants to merge 444 commits into from

Conversation

irrun
Copy link
Owner

@irrun irrun commented Dec 5, 2023

Description

add a description of your changes here...

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

karalabe and others added 30 commits October 13, 2023 15:19
During snap-sync, we request ranges of values: either a range of accounts or a range of storage values. For any large trie, e.g. the main account trie or a large storage trie, we cannot fetch everything at once.

Short version; we split it up and request in multiple stages. To do so, we use an origin field, to say "Give me all storage key/values where key > 0x20000000000000000". When the server fulfils this, the server provides the first key after origin, let's say 0x2e030000000000000 -- never providing the exact origin. However, the client-side needs to be able to verify that the 0x2e03.. indeed is the first one after 0x2000.., and therefore the attached proof concerns the origin, not the first key.

So, short-short version: the left-hand side of the proof relates to the origin, and is free-standing from the first leaf.

On the other hand, (pun intended), the right-hand side, there's no such 'gap' between "along what path does the proof walk" and the last provided leaf. The proof must prove the last element (unless there are no elements).

Therefore, we can simplify the semantics for trie.VerifyRangeProof by removing an argument. This doesn't make much difference in practice, but makes it so that we can remove some tests. The reason I am raising this is that the upcoming stacktrie-based verifier does not support such fancy features as standalone right-hand borders.
* cmd, core, ethdb: enable Pebble on 32 bits and OpenBSD too

* ethdb/pebble: use Pebble's internal constant calculation
Updates execution-spec-tests to 1.0.5: https://github.com/ethereum/execution-spec-tests/releases/tag/v1.0.5, switching to develop which contains Cancun tests (which are also enabled in this change).
This change fixes #28355, where eth_getProof failed to return the correct codehash under certain conditions. This PR changes the logic to unconditionally look up the codehash, and also adds some more tests.
This changes fixes a bug in the fetcher, where the timeout for how long to remember underpriced transaction was erroneously compared, and the timeout never hit.
---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
This change enhances the stacktrie constructor by introducing an option struct. It also simplifies the `Hash` and `Commit` operations, getting rid of the special handling round root node.
…son (#28348)


Co-authored-by: lightclient <lightclient@protonmail.com>
…ific block hash (#28084)

* api/bind: Add CallOpts.BlockHash to allow calling contracts at a specific block hash.

* ethclient: Add BalanceAtHash, NonceAtHash and StorageAtHash functions
This change modifies the fuzzers to use the native golang fuzzing framework instead of go-fuzz
…(#28381)

This change to fixes a compilation-flaw on master, by putting architecture-specific functions behind corresponding build tags.
This change fixes a memory leak, when running either state-tests or blockchain-tests, we allocate a `1MB` fastcache during snapshot generation. `fastcache` is a bit special, and requires a `Reset()` (it has it's own memory allocator). 

The `1MB` was hidden [here](https://github.com/ethereum/go-ethereum/blob/master/tests/state_test_util.go#L333) and [here](https://github.com/ethereum/go-ethereum/blob/master/tests/block_test_util.go#L146) respectively.
Changes the trusted_setup to the one created during the kzg-ceremony. The trusted setup file can be found in the consensus specs: https://github.com/ethereum/consensus-specs/blob/dev/presets/mainnet/trusted_setups/trusted_setup_4096.json
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
…ds (#28359)

A goroutine is used to manage the lifetime of subscriptions managed by
resubscriptions. When the subscription ends with no error, the resub
goroutine ends as well. However, the resub goroutine needs to live
long enough to read from the unsub channel. Otheriwse, an Unsubscribe
call deadlocks when writing to the unsub channel.

This is fixed by adding a buffer to the unsub channel.
Fixes a bug where the ethstats omits to report full block contents. This bug was a side-effect of ethereum/go-ethereum#26777,  where `CurrentBlock` was changed to return a header instead of a block, leading to a failed type assertion.
…198)

This PR adds more error message for debugging purpose.
* core/rawdb: fsync the index and data file after each freezer write

* core/rawdb: fsync the data file in freezer after write
@irrun irrun changed the base branch from v1.3.4 to bnb-chain/develop February 19, 2024 02:05

b.hash.Store(h)
return h
return common.Hash{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If goes to this line, thing goes wrong then. Is it possible that RawBid is a field of Bid but with lower case, so that we are not afraid that line 80 will happen?

Copy link
Owner Author

Choose a reason for hiding this comment

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

fixed

MatusKysel and others added 4 commits February 20, 2024 09:30
* remove i386 linux tests

* test: fix building of tests

* return empty logs instead of nil in receipts

* keep InitialBaseFee same with geth, so not break a ton of cases

* fix eth dir

* fix subdir of core

* fix subdir of eth

* fix cmd/geth dir

* fix ethtest by adding UpgradeStatusMsg when handshake

* fix ethclient_test.go

* fix ethclient/simulated

* fix internal

* fix graphql

* fix consensus

* fix accounts

* fix log

* fix p2p

* fix metrics

* fix tests dir

* fix golangci-lint

---------

Co-authored-by: Matus Kysel <matus.kysel@bnbchain.org>
zzzckck and others added 7 commits February 27, 2024 14:19
* rerun go generate

* fix log in worker

* enable blobpool

* add SubscribeReannoTxsEvent for blobpool

* eth: fix potential hang in waitXXXExtension

* fix networkID when new eth handler

* remove unexpected +

* disable SyncTargetFlag

* add commented code in enableSyncedFeatures

* fix typo
* add GenesisHeader to ChainHeaderReader

* fix check cancun header for parlia

* misc
….0_v1.13.11

Cancun code merge [v1.13.0, v1.13.11]
* core/types: define Bid and related error message
* internal/eth_api: add MevAPI to receive bids from builder
* eth/api_admin: add API to support start and stop mev dynamically
* miner: add bidSimulator to maintain bid simulation and fetch best bid from
* consensus: add func to query the next inturn validator
@irrun irrun force-pushed the raina/BEP-322 branch 2 times, most recently from 7423fb8 to ec87f9c Compare March 7, 2024 12:35
irrun pushed a commit that referenced this pull request Jul 11, 2024
chore: lower report issue log level
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.