Commit Graph

1218 Commits

Author SHA1 Message Date
Alex Sharov
c9972dbc8f
e3: no wal support (#768) 2022-12-07 12:15:09 +07:00
Alex Sharov
2dcec83222
mdbx: add BeginRwAsync method (#767) 2022-12-07 11:19:08 +07:00
alex.sharov
bf912d4eaa save 2022-12-07 10:31:14 +07:00
alex.sharov
3cd34cc900 Revert "save"
This reverts commit 00bb99d66d.
2022-12-06 12:29:12 +07:00
alex.sharov
00bb99d66d save 2022-12-06 12:28:53 +07:00
Max Revitt
183856e788
Withdrawals - Database (#758)
Adds withdrawals bucket to db.
2022-12-05 17:44:07 +00:00
Giulio rebuffo
c5f3972276
added getStatus (#762) 2022-12-05 03:55:18 +01:00
Alex Sharov
81be3e5d74
e3: buildFiles: return error when can (#763) 2022-12-04 16:19:49 +07:00
Håvard Anda Estensen
5a1726b107
Avoid leaking the popped item (#760)
Set the deleted item to its zero val so it can be garbage collected.
2022-12-04 16:19:09 +07:00
Håvard Anda Estensen
9d5f02ce76
Use hex package to convert bytes to string (#761)
From my
[benchmarks](https://github.com/estensen/benchmarks/blob/master/encoding/encoding.go)
it's a lot faster. Especially for few bytes.

```

cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_1_byte-12         	12689306	        89.64 ns/op	      26 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_1_byte-12  	80529291	        14.74 ns/op	       2 B/op	       1 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_5_bytes-12        	10836607	       108.2 ns/op	      40 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_5_bytes-12 	42891154	        28.82 ns/op	      16 B/op	       1 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_10_bytes-12       	 9706875	       119.8 ns/op	      48 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_10_bytes-12         	31689613	        33.88 ns/op	      24 B/op	       1 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_50_bytes-12                	 5202006	       210.4 ns/op	     136 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_50_bytes-12         	10616301	       109.5 ns/op	     224 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_fmt.Sprintf_for_100_bytes-12               	 5614594	       210.9 ns/op	     136 B/op	       2 allocs/op
BenchmarkByteToHex/encode_bytes_to_hex_string_with_hex.EncodeToString_for_100_bytes-12        	10426776	       108.6 ns/op	     224 B/op	       2 allocs/op
```
2022-12-04 16:17:37 +07:00
Alex Sharov
bee082f614
log experiment enabling (#759) 2022-12-03 12:56:12 +07:00
Alex Sharov
8a6090bcb7
e3: optimize incremental hashstate (#756) 2022-12-03 12:22:38 +07:00
hexoscott
6ec0a1ba7c
txpool to consider available gas in Best call (#755) 2022-12-02 15:32:56 +00:00
Alex Sharov
0613545530
mdbx: reproducibility of benchmarks (#757) 2022-12-02 18:42:35 +07:00
Alex Sharov
14ceff26c3
tests speedup (#751) 2022-12-01 14:45:03 +07:00
Andrew Ashikhmin
f32d6541e3
Add withdrawal operations to Engine API (#734)
See https://github.com/ethereum/execution-apis/pull/195

Prerequisite: https://github.com/ledgerwatch/interfaces/pull/134
2022-12-01 08:32:55 +01:00
Giulio rebuffo
fd11ffca3d
Added execution .proto (#749) 2022-11-30 11:20:21 +01:00
Alex Sharov
c63b54e470
e3: option to discard all history writes. useful to test execution performance. (#753) 2022-11-30 16:06:51 +07:00
Alex Sharov
7e661f184b
e3: option to discard all history writes. useful to test execution performance. (#752) 2022-11-30 15:33:43 +07:00
Alex Sharov
c793890fdd
grpc version up (#750) 2022-11-30 08:53:22 +07:00
Giulio rebuffo
2d86bff102
Sentinel interfaces (#748) 2022-11-29 00:01:03 +01:00
hexoscott
1e24a738bf
fix for windows tests (#747) 2022-11-28 16:17:27 +07:00
Giulio rebuffo
f776665b21
added BeaconBlocks table (#746) 2022-11-26 23:05:59 +01:00
Max Revitt
3833e2503b
hotfix(downloader): detect ipv6 only on linux #6117 (#745)
Prevent port scan warnings on Hetzner and potentially other hosting
providers by only detecting ipv6 for linux by reading from
/sys/module/ipv6/parameters/disable
2022-11-24 20:43:41 +07:00
Alex Sharov
661ef494cf
mdbx: remove deprecated cmp_suffix32 feature (#744) 2022-11-24 09:10:09 +07:00
Andrew Ashikhmin
f2e3c2eea3
sync.Mutex instead of RWMutex in kvcache (#743)
Follow-up to PR #730
2022-11-22 14:08:32 +01:00
awskii
229b08146b
[WIP] E4 commitment keys replace (#684)
basic implementation of replacing account and storage keys encoded in
commitment branches
2022-11-21 07:39:30 +00:00
Alex Sharov
0eb4f8388a
Downloader extract, step2 (#739) 2022-11-20 10:41:20 +07:00
Alex Sharov
fb0238b6e6
up some deps (#738) 2022-11-16 14:22:28 +03:00
Manav Darji
07fa94278f
txpool: honour nonce while sorting txs (#737)
In context of https://github.com/ledgerwatch/erigon/issues/5694, this PR
fixes the tx ordering logic in the txpool. Also, a relevant change in
erigon is made here: https://github.com/ledgerwatch/erigon/pull/6051.

When the mining module used to query the best transactions, the response
of transactions weren't sorted according to nonce (for same sender
address). This caused the execution to fail (except 1). The txpool
orders the transactions using this underlying `better()` and `worse()`
functions. The `better()` function didn't have a nonce check for the
pending pool, while the `worse()` function had. This PR adds a check
which would compare and put a transaction with lower nonce ahead.

Moreover, on further investigation, these checks were applied for all
types of transactions. It only makes sense compare the nonce for
transactions which has same sender account. Hence, this PR also adds an
additional check along with.
2022-11-16 10:57:17 +03:00
Giulio rebuffo
b0cda9f301
Added light client database tables (#736) 2022-11-15 19:59:55 +01:00
Andrew Ashikhmin
10e842853b
txpool: sync.Mutex instead of RWMutex (#735)
[simplelru](https://github.com/hashicorp/golang-lru/tree/master/simplelru)
is not thread safe. During the `Get` operation, the recentness of the
accessed item is updated, so it is not a pure read-operation. Therefore,
the mutex we need to protect the LRUs in txpool is a full mutex, not
`RLock`. See
https://github.com/ledgerwatch/erigon/issues/4679#issuecomment-1312064790
and https://github.com/ethereum/go-ethereum/pull/26164.

Also, RWMutex has a performance overhead compared with the vanilla one
(see, for example, https://github.com/golang/go/issues/38813).

Kudos to Martin Swende for pointing to the issue.
2022-11-14 11:59:02 +01:00
Andrew Ashikhmin
b810bb6ee0
Update interfaces (#733)
Pick up https://github.com/ledgerwatch/interfaces/pull/131
2022-11-11 16:36:22 +01:00
Alex Sharov
9e1963e40d
e3: wal ram configure (#732) 2022-11-11 11:28:18 +07:00
hexoscott
875b19b2b4
switch to standard lock to help cache perf (#730) 2022-11-08 16:20:47 +00:00
Alex Sharov
19804fd971
e3: tmpdir (#729) 2022-11-07 12:16:56 +07:00
Alex Sharov
bfd3996fa4
e3: parallel miss idx (#728) 2022-11-07 11:42:03 +07:00
hexoscott
4b0ff0ae5e
cache validation check (#700)
draft for now to get early feedback
2022-11-05 14:25:41 +00:00
Max Revitt
ad300d8d66
Send Message - Peer Count (#726)
Adds peer count to SendMessageByMinBlock to allow sending requests to
multiple peers.

Also takes in change to update SnapshotsReply to use only Files slice of
string.
2022-11-03 15:14:11 +00:00
Max Revitt
c6c01e0392
Makefile: fix for mac m1/2 (#725)
Arch name was producing 404 when downloading releases from github for
protoc due to incorrect arch name.
2022-11-03 14:53:06 +00:00
Alex Sharov
b2f53fc10f
e3: prune debug log (#724) 2022-11-03 11:15:14 +07:00
Alex Sharov
f9074c989f
e3: build files sequentially (#723) 2022-11-02 09:44:40 +07:00
Giulio rebuffo
f64d13b0ed
added beaconState bucket (#722) 2022-11-02 01:00:59 +01:00
ledgerwatch
38f29ff4c1
Add modification times to index and decompressor objects (#721)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-01 15:39:49 +00:00
ledgerwatch
f0140de612
[txpool] Avoid modifications under just read-lock (#720)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-01 13:52:50 +00:00
Alex Sharov
27a814e7a3
e3_seq_exec (#719) 2022-11-01 10:34:50 +07:00
Alex Sharov
689fc4effd
e3: background merge (#718) 2022-11-01 09:55:34 +07:00
Alex Sharov
fe5dd317e5
e3: eth_traceTransaction, eth_replayTransaction, eth_call, ... (#716) 2022-10-31 12:31:31 +07:00
Håvard Anda Estensen
2f2cffd86b
Remove deprectated linter structcheck (#715)
`WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0)
due to: The owner seems to have abandoned the linter. Replaced by
unused.`
2022-10-31 11:40:04 +07:00
Alex Sharov
d72f8346e1
e3: more merge logs (#714) 2022-10-29 21:11:28 +07:00