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

[DRAFT] [WIP] Cancun 1.12.2 #114

Draft
wants to merge 441 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
441 commits
Select commit Hold shift + click to select a range
c375936
rlp: fix typos (#27484)
joohhnnn Jun 16, 2023
d40a255
all: move main transaction pool into a subpool (#27463)
karalabe Jun 16, 2023
36ca59f
build: use slices package for sorting (#27486)
Jun 18, 2023
46ec972
core/txpool/legacypool: reheap the tx list if london fork not enabled…
lochjin Jun 18, 2023
289c6c3
p2p: use slices package for sorting (#27494)
Jun 19, 2023
5d75123
ethdb/dbtest: use slices package for sorting (#27491)
Jun 19, 2023
168d0cc
internal/jsre/deps: fix typos in web3.js (#27500)
joohhnnn Jun 19, 2023
a71b9b9
core/txpool/legacypool: remove redundant check for floatingRatio == 0…
hero5512 Jun 19, 2023
e4660a1
core/txpool/legacypool: handle missing head in reset (#27479)
holiman Jun 19, 2023
f0b5af7
rpc: avoid use of cgo by hard-coding maxPathSize (#27447)
zchee Jun 19, 2023
311b742
accounts/keystore: use slices package for sorting (#27485)
Jun 19, 2023
4544dc5
cmd/devp2p: use slices package for sorting (#27487)
Jun 19, 2023
cd3b8c3
cmd/evm: fix typos in documentation (#27501)
joohhnnn Jun 19, 2023
760fd0c
consensus/clique: fix typo in comment (#27503)
pengin7384 Jun 19, 2023
4367ab4
metrics: use slices package for sorting (#27493)
Jun 19, 2023
a848212
consensus/clique: use slices package for sorting (#27488)
Jun 19, 2023
87e510d
internal/ethapi, les: use slices package for sorting (#27492)
Jun 19, 2023
50ecb16
tests, trie: use slices package for sorting (#27496)
Jun 19, 2023
091c25d
go.mod: update kzg libraries to use big-endian (#27510)
MariusVanDerWijden Jun 19, 2023
ceca457
trie: remove parameter 'fromLevel' in Prove (#27512)
rjl493456442 Jun 19, 2023
9a167c4
core/txpool/legacypool: narrow down the scope of the variable (#27471)
hero5512 Jun 19, 2023
b1ef0bf
eth: use slices package for sorting (#27490)
Jun 19, 2023
84b05d4
internal/build: ignore some files in FindMainPackages (#27521)
jsvisa Jun 20, 2023
154b016
core: use slices package for sorting (#27489)
Jun 20, 2023
1affc1c
core/txpool: remove use of errors.Join function (#27523)
fjl Jun 20, 2023
8c288b5
internal/ethapi: use same state for each invocation within EstimateGa…
jwasinger Jun 20, 2023
6d2aeb4
cmd, core/state, eth, tests, trie: improve state reader (#27428)
rjl493456442 Jun 20, 2023
713fc8b
ethdb/pebble: fsync for batch writes (#27522)
holiman Jun 21, 2023
fd5d2ef
internal/ethapi: quantity-encode storage keys in eth_getProof respons…
prestwich Jun 21, 2023
5520cd9
p2p/discover: swap verification order in discv4 ping handler (#27532)
Exca-DK Jun 22, 2023
699243f
core/state, light, trie: add UpdateContractCode to the Trie interface…
gballet Jun 22, 2023
942ba4d
crypto/secp256k1: define NDEBUG only if not defined (#27550)
fbac Jun 23, 2023
2754b19
common/math: fix typo in comment (#27561)
pengin7384 Jun 25, 2023
8044177
eth/protocols: put protocols in order (#27543)
jsvisa Jun 27, 2023
b4bc9b0
cmd/geth: error message should not be capitalised (#27549)
puhtaytow Jun 27, 2023
4b90c44
ethdb/pebble: use sync mode for pebble writes (#27615)
rjl493456442 Jun 27, 2023
d7ea278
core/vm: move TSTORE,TLOAD to correct opcode nums (#27613)
MariusVanDerWijden Jun 27, 2023
9005912
common/lru: add test case for BasicLRU.Peek (#27559)
pengin7384 Jun 27, 2023
d73eb87
core: log message if DeriveFields returns error (#27530)
aaronbuchwald Jun 27, 2023
c7b099b
trie, core/state: revert error removal in (*state.Trie).Commit (#27544)
gballet Jun 27, 2023
eed7983
core/txpool/legacypool: fix typo (#27620)
hero5512 Jun 27, 2023
f5d3d48
eth: send big transactions by announce/retrieve only (#27618)
MariusVanDerWijden Jun 28, 2023
85b8d1c
params, trie: add verkle fork management + upgrade go-verkle (#27464)
gballet Jun 28, 2023
8bbb16b
core/state, light, les: make signature of ContractCode hash-independe…
gballet Jun 28, 2023
6ca3ef9
node: fix listening on IPv6 address (#27628) (#27635)
oiooj Jul 2, 2023
59f7b28
cmd, core, eth, graphql, trie: no persisted clean trie cache file (#2…
rjl493456442 Jul 4, 2023
863f6da
ethdb/leveldb: update leveldb metrics collection (#27643)
Exca-DK Jul 5, 2023
83d7f42
core: stop chain when tests are finished (#27660)
darioush Jul 6, 2023
e5f7af5
Implement geth-embedded builder API
Ruteri Apr 28, 2022
39d3291
Adjust transactions root computation (#3)
Ruteri Jun 2, 2022
222af77
Adjust logsBloom encoding (#4)
Ruteri Jun 2, 2022
fe9a362
Adjust base fee encoding (#5)
Ruteri Jun 3, 2022
40eb563
Allow resending of the same validator registration (#7)
Ruteri Jun 7, 2022
a9e650a
Adjust value encoding (#9)
Ruteri Jun 10, 2022
ae04316
Show builder pubkey on index page (#10)
Ruteri Jun 10, 2022
b231e2d
Add remote relay connection for getting validator data (#11)
Ruteri Jul 21, 2022
783a3cd
Run builder even if cannot connect to remote relay (#12)
Ruteri Jul 25, 2022
b1ad5e7
Add GasUsed and GasLimit to bid trace (#13)
Ruteri Jul 29, 2022
0de2c8c
Upgrade github.com/btcsuite/btcd (#14)
Ruteri Aug 1, 2022
29d68e9
Fix lint issues (#15)
Ruteri Aug 1, 2022
226df6d
Update README.md (#16)
thINKoor Aug 2, 2022
909d105
Add block build trigger from beacon node api (#17)
avalonche Aug 11, 2022
f7379e1
Addjust profit calculation and use the blocks channel directly
Ruteri Aug 11, 2022
9ef7ab8
Add more explicit builder flags and other QoL improvements (#20)
Ruteri Aug 16, 2022
e75a9a7
Resubmit block build job periodically (#22)
Ruteri Aug 25, 2022
a9ab98f
Implement proposer payment via transaction (#23)
bhakiyakalimuthu Aug 11, 2022
74bffcd
Base block profit on the proposer payment instead of balance differen…
Ruteri Aug 31, 2022
e371e7d
Flashbots change up to v0.3
jparyani Oct 27, 2021
a935bec
Flashbots changes v0.3 to v0.4
bogatyy Oct 27, 2021
ab0e0f3
signer/core: show helptext when clef rejects signing (#27538)
joohhnnn Jul 6, 2023
9db6f04
Flashbots changes v0.4 to v0.5
Ruteri Feb 21, 2022
13959f3
Private Transaction API Sample (v1.10.13)
xcarlo Nov 29, 2021
560ca51
Remove private transactions that are confirmed in blocks
Jan 28, 2022
921249f
Run private transactions e2e tests in ci
Ruteri Feb 24, 2022
9ef2ebc
Discard reverting megabundle blocks and head change interrupted block…
Ruteri Mar 30, 2022
249c5c1
Seal the best block available
Ruteri Jul 29, 2022
19c3ab2
Implement block validation API
Ruteri Aug 17, 2022
2f8e93f
Add timeout to e2e
Ruteri Aug 11, 2022
4596563
Upgrade dependencies
Ruteri Aug 30, 2022
7f7f62a
Only submit blocks that improve profit (#19)
Ruteri Aug 31, 2022
077db7f
Remove megabundles as they are no longer needed (#20)
Ruteri Aug 31, 2022
8edd514
Implement pushing blocks data to the DB (#18)
Ruteri Aug 31, 2022
89b5d87
add miner blocklist (#21)
dvush Sep 1, 2022
404e7b6
fix statedb copy (#22)
dvush Sep 2, 2022
3f188f7
Rate limit blocks submitted to the relay and DB (#25)
Ruteri Sep 7, 2022
2b66d3c
fix proposer payout bug with payout tx (#27)
dvush Sep 13, 2022
6bedbf6
add other state access to touch tracer (#26)
dvush Sep 13, 2022
54a276c
init bundle fetcher (#24)
bhakiyakalimuthu Sep 13, 2022
d054b5b
increase payment tx gas limit
dvush Sep 15, 2022
c476acf
do not fetch bundle if empty block num during the starup (#29)
bhakiyakalimuthu Sep 19, 2022
584e807
Update gas limit in api check (#30)
Ruteri Sep 20, 2022
8173557
set proposer payment to 26k (#31)
dvush Sep 21, 2022
9571573
Adjust block number for bundle fetching (#32)
Ruteri Sep 21, 2022
b4f4bd1
new greedy builder
dvush Sep 8, 2022
f0b275b
sim bundles in parallel (new merger) (#33)
dvush Sep 23, 2022
c2d988c
Merge new merger algo and mev-geth
Ruteri Sep 23, 2022
c093cf3
Enable portable blst
Ruteri Sep 23, 2022
031990c
Build on multiple tips (#35)
dvush Sep 28, 2022
7faf54f
better logs (#36)
dvush Sep 28, 2022
6bb10f5
squash more annoying logs (#37)
dvush Sep 28, 2022
af818b8
Logs pt 3 (#38)
dvush Sep 28, 2022
0c567ab
New payment tx (#40)
dvush Oct 5, 2022
ab35c21
Improvements from greedy improve algo (#41)
Ruteri Oct 7, 2022
6fa73d2
Do not commit failing payment txs (#43)
Ruteri Oct 11, 2022
61e65cf
More bundle visibility (#42)
Ruteri Oct 17, 2022
f0445c3
Cleanup and include old mev geth prs (#45)
Ruteri Oct 25, 2022
236329f
Increase submission rate to 2 blocks per second (#47)
Ruteri Oct 25, 2022
f795515
Add disable bundle fetcher flag (#48)
Ruteri Nov 3, 2022
072036c
update readme (#49)
dvush Nov 18, 2022
e44079f
Update README.md
metachris Nov 18, 2022
311b9a2
Merge changes from validation (#4)
Ruteri Nov 22, 2022
b25c04b
Use snapshots for blocklist revert (#5)
dvush Nov 22, 2022
22bea95
added contributing.md (#8)
metachris Nov 23, 2022
d32aaa8
cleanup cla (#9)
metachris Nov 23, 2022
d00af81
Add builder config toml support (#2)
refcell Nov 28, 2022
0def572
Add submitting and requesting registrations from multiple relays
Ruteri Oct 18, 2022
e93910a
Refactor relay aggregator registrations and tests, add better logging
avalonche Nov 29, 2022
547b223
Fix duplicate relay registrations in cache (#15)
avalonche Dec 5, 2022
16e9004
Improve performance of token compilation (#12)
estensen Dec 6, 2022
10b5a60
Update outdated parts of README (#22)
avalonche Dec 8, 2022
9a5b5a4
Fix getting validators map for local relay (#20)
avalonche Dec 20, 2022
62a8e25
Refactor block validation test to be less flaky (#10) (#31)
Ruteri Dec 21, 2022
df4ae61
use tx sig cache in algo_common.go (#33)
dvush Dec 23, 2022
8858ce6
Work on local devnet (#30)
dvush Dec 23, 2022
11fe757
stop prefetcher in applyToBaseEnv() (#35)
dvush Dec 28, 2022
ba4ecb4
Add miner tests with basic smart contracts
Ruteri Dec 6, 2022
a012039
Add small test contracts, refactor test setup
lmittmann Dec 12, 2022
04b5fc9
Add metrics for builder (#24)
avalonche Dec 28, 2022
4314b66
Bundle cancellations (#36)
Ruteri Jan 16, 2023
043bc35
capella upgrade
avalonche Mar 13, 2023
5646467
Reduce redunant payload creation (#44)
avalonche Mar 9, 2023
7e6c90c
Prevent uint256 overflow during conversion (#45)
avalonche Mar 13, 2023
75c53d9
Nil pointer exception on payload hash (#47)
avalonche Mar 13, 2023
698dccb
miner: safely close payload when resolving best of many payloads
Ruteri Mar 14, 2023
9aa3df2
1.11.4 release
avalonche Mar 17, 2023
0795cc1
Remove example blacklist (#56)
metachris Mar 30, 2023
d130f84
fix: make sendBundle return instantly to reuse connections (#55)
fnerdman Apr 4, 2023
1b183d2
fix: dumpconfig failing to unmarshal nil BuilderTxSigningKey (#42)
fnerdman Apr 5, 2023
39995c8
Add SSE subscription to builder (#53)
avalonche Apr 10, 2023
064ba77
cache tx.from when validating payload (#61)
dvush Apr 11, 2023
7f15a32
builder: allow only building on top of first payload attributes event…
Ruteri Apr 12, 2023
d5569c1
Linting for builder (#63)
avalonche Apr 12, 2023
b60ac12
Fix race in tests (#65)
avalonche Apr 20, 2023
1508dc5
Upgrade go builder client to 0.3.0 (#68)
avalonche May 10, 2023
0fc502b
Ssz encoded request (#69)
avalonche May 11, 2023
20869e4
[build-295] Improve Builder submission rate (#70)
Wazzymandias May 26, 2023
8771475
mev share (#74)
dvush Jun 7, 2023
f4cbb84
Update go-boost-utils and type upgrades (#72)
avalonche Jun 12, 2023
afd4838
use access list tracing in builder (#77)
dvush Jun 19, 2023
b8e4460
Add builder submission offset flag and update default submission offs…
Wazzymandias Jun 27, 2023
c6f54f5
Add support for additional block building algorithm (#76)
Wazzymandias Jun 30, 2023
ea78280
cmd/geth: implement dev mode for post-merge (#27327)
jwasinger Jul 6, 2023
cbf2579
p2p, p2p/discover: add dial metrics (#27621)
lightclient Jul 6, 2023
c866dfd
core: remove outdated tests (#27662)
holiman Jul 6, 2023
c2db667
miner: remove unused commented code (#27664)
jwasinger Jul 7, 2023
af8b138
core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663)
holiman Jul 10, 2023
abc6abe
[trivial] Parameterize greedy-buckets price cutoff percent & update b…
Wazzymandias Jul 6, 2023
a97d32c
rebase conflicts
avalonche Jul 6, 2023
c4349de
remove uneeded flags
avalonche Jul 6, 2023
5c9cbc2
core/vm: implement EIP-5656, mcopy instruction (#26181)
charles-cooper Jul 11, 2023
e1fd3d6
eth: better active protocol handler tracking (#27665)
lightclient Jul 11, 2023
aecf3f9
internal/blocktest: add package for shared test code (#27270)
jsvisa Jul 11, 2023
4b06e4f
core/state: value diff tracking in StateDB (#27349)
rjl493456442 Jul 11, 2023
645b0db
cmd/utils, p2p: clean up discovery setup (#27518)
lightclient Jul 11, 2023
7a565fa
console: add cleanup to avoid leaks in newTester (#27695)
Mskxn Jul 11, 2023
cecd221
go.mod: upgrade github.com/karalabe/usb to fix build warning (#27698)
fjl Jul 11, 2023
0b1f97e
core/rawdb: support freezer batch read with no size limit (#27687)
rjl493456442 Jul 12, 2023
a426999
p2p/discover: filter bootnodes by netrestrict (#27701)
fjl Jul 12, 2023
80b7bfe
accounts, cmd/evm: fix docstrings (#27703)
cuishuang Jul 12, 2023
040a4a5
build: upgrade -dlgo version to Go 1.20.6 (#27708)
sandakersmann Jul 12, 2023
714f759
eth, miner: rm redundant type declare (#27713)
jsvisa Jul 13, 2023
4f0d8f0
graphql: fix race in withdrawals test (#27706)
s1na Jul 13, 2023
10a136a
internal: early exit if tx for getTxReceipt not found (#27712)
jsvisa Jul 13, 2023
5d03504
internal/ethapi: add more testcase for GetTransactionReceipt (#27527)
jsvisa Jul 13, 2023
1e069cf
eth/tracers: add ReturnData in the tracer's response (#27704)
jsvisa Jul 13, 2023
517ac88
eth/tracers/native: panic on memory read in prestateTracer (#27691)
ryanschneider Jul 13, 2023
e1fe6bc
go.sum: go mod tidy (#27717)
ucwong Jul 13, 2023
c40ab6a
core/blockchain: fast to snap in comments (#27722)
ucwong Jul 14, 2023
60ecf48
cmd/bootnode, p2p: support for alternate mapped ports (#26359)
dbadoy Jul 14, 2023
13c0305
metrics: NilTimer should still run the function to be timed (#27723)
omerfirmak Jul 14, 2023
47b9f1b
cmd/geth: use automaxprocs to apply cpu quota correctly (#27506)
jsvisa Jul 14, 2023
34d5072
metrics: NilResettingTimer.Time should execute the timed function (#2…
omerfirmak Jul 14, 2023
00408f7
accounts/abi/bind/backends: fix goroutine leak in unit test (#27705)
yuriechan Jul 15, 2023
d233b6b
core: replace instances of 'suicide' with 'selfdestruct' to improve …
jwasinger Jul 15, 2023
99e000c
core/vm: use types.EmptyCodeHash (#27729)
ucwong Jul 15, 2023
b058cf4
core, tests: EIP-4844 transaction processing logic (#27721)
holiman Jul 15, 2023
988d84a
core/state, core/vm: implement EIP 6780 (#27189)
jwasinger Jul 17, 2023
d4d88f9
les: remove obsolete code related to PoW header syncing (#27737)
zsfelfoldi Jul 17, 2023
e86ad52
beacon/engine, eth/catalyst: EIP-4844 updates for the engine API (#27…
fjl Jul 18, 2023
7f756dc
cmd/evm/testdata: fix typos in docs (#27742)
pgrimaud Jul 18, 2023
a46f417
ethclient/gethclient: gofmt -s (#27762)
MariusVanDerWijden Jul 24, 2023
88f3d61
all: expose block number information to statedb (#27753)
rjl493456442 Jul 24, 2023
7a1fba1
cmd/geth: atomic types used (#27756)
ucwong Jul 24, 2023
a196f3e
cmd/devp2p: atomic types used (#27755)
ucwong Jul 24, 2023
2274a03
crypto/kzg4844: do lazy init in all ckzg funcs (#27679)
jtraglia Jul 24, 2023
37b952a
core/types: deepcopy ExcessDataGas, DataGasUsed (#27767)
darioush Jul 27, 2023
1662228
core/txpool/blobpool: 4844 blob transaction pool (#26940)
karalabe Jul 27, 2023
393d4db
core/types: add 4844 data gas fields in Receipt (#27743)
fjl Jul 27, 2023
0f4b21f
core/txpool/blobpool: fix a merge conflict from a package rename (#27…
karalabe Jul 27, 2023
57268f7
all: rename dataGas to blobGas (#27789)
karalabe Jul 27, 2023
d955653
core/types: put header fields in correct order (#27791)
MariusVanDerWijden Jul 27, 2023
8f2ae29
core/types: fix receipt blob fields marshaling (#27793)
marioevz Jul 28, 2023
95cc7bf
cmd/geth: import package catalyst once (#27803)
islishude Jul 31, 2023
5a4eba6
eth: conver if-else-if chain to tagged switch (#27816)
islishude Jul 31, 2023
43a1a48
core: remove pointless check for excessBlobGas nilness (#27797)
jsvisa Jul 31, 2023
817553c
core, trie: track state change set with account address (#27815)
rjl493456442 Jul 31, 2023
4e97756
cmd/bootnode: defer udp connection close (#27787)
ZigBalthazar Jul 31, 2023
3ca92f7
all: replace data gas to blob gas in comments (#27825)
jsvisa Aug 1, 2023
852be57
tests: make tests pass on windows/386 (#27821)
holiman Aug 1, 2023
2fd77a6
core/txpool/blobpool: remove error log when finalized block is nil (#…
rjl493456442 Aug 1, 2023
7c95ebd
consensus/misc: move eip1559 into a package (#27828)
jsvisa Aug 1, 2023
f404a2d
cmd/evm: set ExcessBlobGas from env (#27796)
jsvisa Aug 1, 2023
9d744f0
cmd/bootnode: fix timer leak (#27754)
ucwong Aug 1, 2023
7de748d
all: implement path-based state scheme (#25963)
rjl493456442 Aug 1, 2023
ff97b4c
cmd/geth: disable automaxprocs log (#27814)
jsvisa Aug 1, 2023
d04bde0
p2p: use atomic types (#27764)
ucwong Aug 1, 2023
8224bb9
build: upgrade -dlgo version to Go 1.20.7 (#27835)
sandakersmann Aug 2, 2023
d6bc1d1
merge with main
avalonche Aug 3, 2023
6e934f4
eth/protocols/snap: fix batch writer when resuming an aborted sync (#…
karalabe Aug 3, 2023
df54435
core/types: fix immutability guarantees in Block (#27844)
fjl Aug 4, 2023
57cdbae
all: remove trailing whitespace (#27741)
darioush Aug 4, 2023
bb148dd
core/types: support yParity field in JSON transactions (#27744)
fjl Aug 4, 2023
5c30541
log: use atomic types (#27763)
ucwong Aug 4, 2023
60070fe
internal/ethapi, graphql: correct comments about gas price logic (#27…
chrischarlesharrison Aug 4, 2023
8574767
internal: use atomic type (#27858)
ucwong Aug 7, 2023
d14c07d
accounts: use atomic type (#27857)
ucwong Aug 7, 2023
eeebb07
internal/ethapi: add state override to estimateGas (#27845)
amintalebi Aug 7, 2023
6d2bcb9
p2p/simulations/examples: use atomic.Int64 (#27861)
ucwong Aug 7, 2023
0d772b9
graphql: avoid greedy allocation (#27873)
holiman Aug 8, 2023
e13fa32
core/vm: update 4844 - point evaluation precompile address (#27874)
holiman Aug 8, 2023
7ec60d5
p2p: move ping handling into pingLoop goroutine (#27887)
fjl Aug 9, 2023
10d9f93
graphql: add yParity field for transactions (#27882)
jsvisa Aug 9, 2023
6797902
core/state: move UpdateContractCode before the trie hash is computed …
gballet Aug 9, 2023
9c216bd
params: release go-ethereum v1.12.1
fjl Aug 10, 2023
d9a8b0f
params: begin v1.12.2 release cycle
fjl Aug 10, 2023
f299aa8
Merge remote-tracking branch 'origin/main' into cancun-1.12.0
avalonche Aug 11, 2023
a0491a0
deps: update supranational/blst to 0.3.11 (#27890)
dependabot[bot] Aug 10, 2023
55863ce
core/txpool/blobpool: fix metrics name for prometheus export (#27901)
imulmat4 Aug 11, 2023
770db14
ethdb/leveldb: support more than 7 levels in metrics (#27904)
jsvisa Aug 11, 2023
811a674
all: update golang/x/ext and fix slice sorting fallout (#27909)
karalabe Aug 11, 2023
f298ec4
go.mod, build: upgrade c-kzg-4844 (#27907)
fjl Aug 11, 2023
a867039
internal/build: apply -ubuntu to env (#27910)
fjl Aug 12, 2023
bed8460
params: release go-ethereum v1.12.2
fjl Aug 12, 2023
ee5a80c
merge geth 1.12.0
avalonche Aug 24, 2023
658904f
merge latest main
avalonche Aug 24, 2023
11c541e
Merge tag 'v1.12.2' into cancun-1.12.2
avalonche Aug 25, 2023
0a94792
Merge remote-tracking branch 'origin/main' into cancun-1.12.2
Wazzymandias Sep 8, 2023
8d7c11a
Fix docker vulnerability, Fix unit tests
Wazzymandias Sep 9, 2023
eed21e3
Fix linter error
Wazzymandias Sep 9, 2023
8475544
Update go mod
Wazzymandias Sep 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove megabundles as they are no longer needed (#20)
  • Loading branch information
Ruteri authored and avalonche committed Jul 6, 2023
commit 077db7f89858ec13bf180e5c5483f86ef38743ca
11 changes: 2 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: flashbots/mev-geth-demo
ref: no-megabundles
path: e2e

- run: cd e2e && yarn install
Expand All @@ -71,17 +72,9 @@ jobs:
cd e2e
GETH=`pwd`/../build/bin/geth ./run.sh &
# Second node, not mining
P2P_PORT=30302 DATADIR=datadir2 HTTP_PORT=8546 MINER_ARGS='--nodiscover' GETH=`pwd`/../build/bin/geth ./run.sh &
P2P_PORT=30302 DATADIR=datadir2 HTTP_PORT=8546 AUTH_PORT=8552 MINER_ARGS='--nodiscover' GETH=`pwd`/../build/bin/geth ./run.sh &
sleep 15
DATADIR1=datadir DATADIR2=datadir2 GETH=`pwd`/../build/bin/geth ./peer_nodes.sh
sleep 15
yarn run demo-private-tx
pkill -9 geth || true
- name: Run megabundle-only node checking for reverts
run: |
cd e2e
# Disable bundle workers
MINER_ARGS='--miner.etherbase=0xd912aecb07e9f4e1ea8e6b4779e7fb6aa1c3e4d8 --miner.trustedrelays=0xfb11e78C4DaFec86237c2862441817701fdf197F --mine --miner.threads=2 --miner.maxmergedbundles=0' GETH=`pwd`/../build/bin/geth ./run.sh &
sleep 15
yarn run e2e-reverting-megabundle
pkill -9 geth || true
53 changes: 0 additions & 53 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,59 +641,6 @@ func (pool *TxPool) AddMevBundle(txs types.Transactions, blockNumber *big.Int, m
return nil
}

// AddMegaBundle adds a megabundle to the pool. Assumes the relay signature has been verified already.
func (pool *TxPool) AddMegabundle(relayAddr common.Address, txs types.Transactions, blockNumber *big.Int, minTimestamp, maxTimestamp uint64, revertingTxHashes []common.Hash) error {
pool.mu.Lock()
defer pool.mu.Unlock()

fromTrustedRelay := false
for _, trustedAddr := range pool.config.TrustedRelays {
if relayAddr == trustedAddr {
fromTrustedRelay = true
}
}
if !fromTrustedRelay {
return errors.New("megabundle from non-trusted address")
}

megabundle := types.MevBundle{
Txs: txs,
BlockNumber: blockNumber,
MinTimestamp: minTimestamp,
MaxTimestamp: maxTimestamp,
RevertingTxHashes: revertingTxHashes,
}

pool.megabundles[relayAddr] = megabundle

for _, hook := range pool.NewMegabundleHooks {
go hook(relayAddr, &megabundle)
}

return nil
}

// GetMegabundle returns the latest megabundle submitted by a given relay.
func (pool *TxPool) GetMegabundle(relayAddr common.Address, blockNumber *big.Int, blockTimestamp uint64) (types.MevBundle, error) {
pool.mu.Lock()
defer pool.mu.Unlock()

megabundle, ok := pool.megabundles[relayAddr]
if !ok {
return types.MevBundle{}, errors.New("No megabundle found")
}
if megabundle.BlockNumber.Cmp(blockNumber) != 0 {
return types.MevBundle{}, errors.New("Megabundle does not fit blockNumber constraints")
}
if megabundle.MinTimestamp != 0 && megabundle.MinTimestamp > blockTimestamp {
return types.MevBundle{}, errors.New("Megabundle does not fit minTimestamp constraints")
}
if megabundle.MaxTimestamp != 0 && megabundle.MaxTimestamp < blockTimestamp {
return types.MevBundle{}, errors.New("Megabundle does not fit maxTimestamp constraints")
}
return megabundle, nil
}

// Locals retrieves the accounts currently considered local by the pool.
func (pool *TxPool) Locals() []common.Address {
pool.mu.Lock()
Expand Down
4 changes: 0 additions & 4 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,6 @@ func (b *EthAPIBackend) SendBundle(ctx context.Context, txs types.Transactions,
return b.eth.txPool.AddMevBundle(txs, big.NewInt(blockNumber.Int64()), minTimestamp, maxTimestamp, revertingTxHashes)
}

func (b *EthAPIBackend) SendMegabundle(ctx context.Context, txs types.Transactions, blockNumber rpc.BlockNumber, minTimestamp uint64, maxTimestamp uint64, revertingTxHashes []common.Hash, relayAddr common.Address) error {
return b.eth.txPool.AddMegabundle(relayAddr, txs, big.NewInt(blockNumber.Int64()), minTimestamp, maxTimestamp, revertingTxHashes)
}

func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) {
pending := b.eth.txPool.Pending(false)
var txs types.Transactions
Expand Down
74 changes: 0 additions & 74 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2150,25 +2150,6 @@ type SendBundleArgs struct {
RevertingTxHashes []common.Hash `json:"revertingTxHashes"`
}

// SendMegabundleArgs represents the arguments for a SendMegabundle call.
type SendMegabundleArgs struct {
Txs []hexutil.Bytes `json:"txs"`
BlockNumber uint64 `json:"blockNumber"`
MinTimestamp *uint64 `json:"minTimestamp"`
MaxTimestamp *uint64 `json:"maxTimestamp"`
RevertingTxHashes []common.Hash `json:"revertingTxHashes"`
RelaySignature hexutil.Bytes `json:"relaySignature"`
}

// UnsignedMegabundle is used for serialization and subsequent digital signing.
type UnsignedMegabundle struct {
Txs []hexutil.Bytes
BlockNumber uint64
MinTimestamp uint64
MaxTimestamp uint64
RevertingTxHashes []common.Hash
}

// SendBundle will add the signed transaction to the transaction pool.
// The sender is responsible for signing the transaction and using the correct nonce and ensuring validity
func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args SendBundleArgs) error {
Expand Down Expand Up @@ -2199,61 +2180,6 @@ func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args SendBundleArgs
return s.b.SendBundle(ctx, txs, args.BlockNumber, minTimestamp, maxTimestamp, args.RevertingTxHashes)
}

// Recovers the Ethereum address of the trusted relay that signed the megabundle.
func RecoverRelayAddress(args SendMegabundleArgs) (common.Address, error) {
megabundle := UnsignedMegabundle{Txs: args.Txs, BlockNumber: args.BlockNumber, RevertingTxHashes: args.RevertingTxHashes}
if args.MinTimestamp != nil {
megabundle.MinTimestamp = *args.MinTimestamp
} else {
megabundle.MinTimestamp = 0
}
if args.MaxTimestamp != nil {
megabundle.MaxTimestamp = *args.MaxTimestamp
} else {
megabundle.MaxTimestamp = 0
}
rlpEncoding, _ := rlp.EncodeToBytes(megabundle)
signature := args.RelaySignature
signature[64] -= 27 // account for Ethereum V
recoveredPubkey, err := crypto.SigToPub(accounts.TextHash(rlpEncoding), args.RelaySignature)
if err != nil {
return common.Address{}, err
}
return crypto.PubkeyToAddress(*recoveredPubkey), nil
}

// SendMegabundle will add the signed megabundle to one of the workers for evaluation.
func (s *PrivateTxBundleAPI) SendMegabundle(ctx context.Context, args SendMegabundleArgs) error {
log.Info("Received a Megabundle request", "signature", args.RelaySignature)
var txs types.Transactions
if len(args.Txs) == 0 {
return errors.New("megabundle missing txs")
}
if args.BlockNumber == 0 {
return errors.New("megabundle missing blockNumber")
}
for _, encodedTx := range args.Txs {
tx := new(types.Transaction)
if err := tx.UnmarshalBinary(encodedTx); err != nil {
return err
}
txs = append(txs, tx)
}
var minTimestamp, maxTimestamp uint64
if args.MinTimestamp != nil {
minTimestamp = *args.MinTimestamp
}
if args.MaxTimestamp != nil {
maxTimestamp = *args.MaxTimestamp
}
relayAddr, err := RecoverRelayAddress(args)
log.Info("Megabundle", "relayAddr", relayAddr, "err", err)
if err != nil {
return err
}
return s.b.SendMegabundle(ctx, txs, rpc.BlockNumber(args.BlockNumber), minTimestamp, maxTimestamp, args.RevertingTxHashes, relayAddr)
}

// BundleAPI offers an API for accepting bundled transactions
type BundleAPI struct {
b Backend
Expand Down
1 change: 0 additions & 1 deletion internal/ethapi/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ type Backend interface {
// Transaction pool API
SendTx(ctx context.Context, signedTx *types.Transaction, private bool) error
SendBundle(ctx context.Context, txs types.Transactions, blockNumber rpc.BlockNumber, minTimestamp uint64, maxTimestamp uint64, revertingTxHashes []common.Hash) error
SendMegabundle(ctx context.Context, txs types.Transactions, blockNumber rpc.BlockNumber, minTimestamp uint64, maxTimestamp uint64, revertingTxHashes []common.Hash, relayAddr common.Address) error
GetTransaction(ctx context.Context, txHash common.Hash) (*types.Transaction, common.Hash, uint64, uint64, error)
GetPoolTransactions() (types.Transactions, error)
GetPoolTransaction(txHash common.Hash) *types.Transaction
Expand Down
5 changes: 0 additions & 5 deletions internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,6 @@ web3._extend({
params: 4,
inputFormatter: [web3._extend.formatters.inputCallFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter, null, null],
}),
new web3._extend.Method({
name: 'sendMegabundle',
call: 'eth_sendMegabundle',
params: 1
}),
],
properties: [
new web3._extend.Property({
Expand Down
43 changes: 8 additions & 35 deletions miner/multi_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (w *multiWorker) GetSealingBlockAsync(parent common.Hash, timestamp uint64,
for _, worker := range append(w.workers, w.regularWorker) {
resCh, errCh, err := worker.getSealingBlock(parent, timestamp, coinbase, gasLimit, random, noTxs, noExtra)
if err != nil {
log.Error("could not start async block construction", "isFlashbotsWorker", worker.flashbots.isFlashbots, "isMegabundleWorker", worker.flashbots.isMegabundleWorker, "#bundles", worker.flashbots.maxMergedBundles)
log.Error("could not start async block construction", "isFlashbotsWorker", worker.flashbots.isFlashbots, "#bundles", worker.flashbots.maxMergedBundles)
continue
}
resChans = append(resChans, resChPair{resCh, errCh})
Expand Down Expand Up @@ -153,38 +153,12 @@ func newMultiWorker(config *Config, chainConfig *params.ChainConfig, engine cons
for i := 1; i <= config.MaxMergedBundles; i++ {
workers = append(workers,
newWorker(config, chainConfig, engine, eth, mux, isLocalBlock, init, &flashbotsData{
isFlashbots: true,
isMegabundleWorker: false,
queue: queue,
maxMergedBundles: i,
isFlashbots: true,
queue: queue,
maxMergedBundles: i,
}))
}

relayWorkerMap := make(map[common.Address]*worker)

for i := 0; i < len(config.TrustedRelays); i++ {
relayWorker := newWorker(config, chainConfig, engine, eth, mux, isLocalBlock, init, &flashbotsData{
isFlashbots: true,
isMegabundleWorker: true,
queue: queue,
relayAddr: config.TrustedRelays[i],
})
workers = append(workers, relayWorker)
relayWorkerMap[config.TrustedRelays[i]] = relayWorker
}

eth.TxPool().NewMegabundleHooks = append(eth.TxPool().NewMegabundleHooks, func(relayAddr common.Address, megabundle *types.MevBundle) {
worker, found := relayWorkerMap[relayAddr]
if !found {
return
}

select {
case worker.newMegabundleCh <- megabundle:
default:
}
})

log.Info("creating multi worker", "config.MaxMergedBundles", config.MaxMergedBundles, "config.TrustedRelays", config.TrustedRelays, "worker", len(workers))
return &multiWorker{
regularWorker: regularWorker,
Expand All @@ -193,9 +167,8 @@ func newMultiWorker(config *Config, chainConfig *params.ChainConfig, engine cons
}

type flashbotsData struct {
isFlashbots bool
isMegabundleWorker bool
queue chan *task
maxMergedBundles int
relayAddr common.Address
isFlashbots bool
queue chan *task
maxMergedBundles int
relayAddr common.Address
}
53 changes: 6 additions & 47 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,9 @@ type task struct {
block *types.Block
createdAt time.Time

profit *big.Int
isFlashbots bool
worker int
isMegabundle bool
profit *big.Int
isFlashbots bool
worker int
}

const (
Expand Down Expand Up @@ -233,7 +232,6 @@ type worker struct {
exitCh chan struct{}
resubmitIntervalCh chan time.Duration
resubmitAdjustCh chan *intervalAdjust
newMegabundleCh chan *types.MevBundle

wg sync.WaitGroup

Expand Down Expand Up @@ -583,11 +581,6 @@ func (w *worker) newWorkLoop(recommit time.Duration) {
timestamp = time.Now().Unix()
commit(false, commitInterruptNewHead)

case <-w.newMegabundleCh:
if w.isRunning() {
commit(true, commitInterruptNone)
}

case <-timer.C:
// If sealing is running resubmit a new work cycle periodically to pull in
// higher priced transactions. Disable this overhead for pending blocks.
Expand Down Expand Up @@ -796,7 +789,7 @@ func (w *worker) taskLoop() {
// Interrupt previous sealing operation
interrupt()
stopCh, prev = make(chan struct{}), sealHash
log.Info("Proposed miner block", "blockNumber", task.block.Number(), "profit", ethIntToFloat(prevProfit), "isFlashbots", task.isFlashbots, "sealhash", sealHash, "parentHash", prevParentHash, "worker", task.worker, "isMegabundle", task.isMegabundle)
log.Info("Proposed miner block", "blockNumber", task.block.Number(), "profit", ethIntToFloat(prevProfit), "isFlashbots", task.isFlashbots, "sealhash", sealHash, "parentHash", prevParentHash, "worker", task.worker)
if w.skipSealHook != nil && w.skipSealHook(task) {
continue
}
Expand Down Expand Up @@ -1293,7 +1286,7 @@ func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment, val
return err
}
}
if w.flashbots.isFlashbots && !w.flashbots.isMegabundleWorker {
if w.flashbots.isFlashbots {
bundles, err := w.eth.TxPool().MevBundles(env.header.Number, env.header.Time)
if err != nil {
log.Error("Failed to fetch pending transactions", "err", err)
Expand All @@ -1314,40 +1307,6 @@ func (w *worker) fillTransactions(interrupt *atomic.Int32, env *environment, val
}
env.profit.Add(env.profit, bundle.ethSentToCoinbase)
}
if w.flashbots.isMegabundleWorker {
megabundle, err := w.eth.TxPool().GetMegabundle(w.flashbots.relayAddr, env.header.Number, env.header.Time)
log.Info("Starting to process a Megabundle", "relay", w.flashbots.relayAddr, "megabundle", megabundle, "error", err)
if err != nil {
return err // no valid megabundle for this relay, nothing to do
}

// Flashbots bundle merging duplicates work by simulating TXes and then committing them once more.
// Megabundles API focuses on speed and runs everything in one cycle.
coinbaseBalanceBefore := env.state.GetBalance(env.coinbase)
if err := w.commitBundle(env, megabundle.Txs, interrupt); err != nil {
log.Info("Could not commit a Megabundle", "relay", w.flashbots.relayAddr, "megabundle", megabundle, "err", err)
return err
}
var txStatuses = map[common.Hash]bool{}
for _, receipt := range env.receipts {
txStatuses[receipt.TxHash] = receipt.Status == types.ReceiptStatusSuccessful
}
for _, tx := range megabundle.Txs {
status, ok := txStatuses[tx.Hash()]
if !ok {
log.Error("No TX receipt after megabundle simulation", "TxHash", tx.Hash())
return errors.New("no tx receipt after megabundle simulation")
}
if !status && !containsHash(megabundle.RevertingTxHashes, tx.Hash()) {
log.Info("Ignoring megabundle because of failing TX", "relay", w.flashbots.relayAddr, "TxHash", tx.Hash())
return errors.New("megabundle contains failing tx")
}
}
coinbaseBalanceAfter := env.state.GetBalance(env.coinbase)
coinbaseDelta := big.NewInt(0).Sub(coinbaseBalanceAfter, coinbaseBalanceBefore)
env.profit = coinbaseDelta
log.Info("Megabundle processed", "relay", w.flashbots.relayAddr, "totalProfit", ethIntToFloat(env.profit))
}

if len(localTxs) > 0 {
txs := types.NewTransactionsByPriceAndNonce(env.signer, localTxs, env.header.BaseFee)
Expand Down Expand Up @@ -1508,7 +1467,7 @@ func (w *worker) commit(env *environment, interval func(), update bool, start ti
// If we're post merge, just ignore
if !w.isTTDReached(block.Header()) {
select {
case w.taskCh <- &task{receipts: env.receipts, state: env.state, block: block, createdAt: time.Now(), profit: env.profit, isFlashbots: w.flashbots.isFlashbots, worker: w.flashbots.maxMergedBundles, isMegabundle: w.flashbots.isMegabundleWorker}:
case w.taskCh <- &task{receipts: env.receipts, state: env.state, block: block, createdAt: time.Now(), profit: env.profit, isFlashbots: w.flashbots.isFlashbots, worker: w.flashbots.maxMergedBundles}:
w.unconfirmed.Shift(block.NumberU64() - 1)

fees := totalFees(block, env.receipts)
Expand Down