Commit Graph

733 Commits

Author SHA1 Message Date
Victor Shyba
158fb2b606
Optimize memory buffer, simplify set32, use sha256-simd (#7060)
Hi,

I'm syncing Gnosis on a Celeron N5100 to get familiar with the codebase.
In the process I managed to optimize some things from profiling.
Since I'm not yet on the project Discord, I decided to open this PR as a
suggestion. This pass all tests here and gave me a nice boost for that
platform, although I didn't have time to benchmark it yet.

* reuse VM Memory objects with sync.Pool. It starts with 4k as `evmone`
[code
suggested](0897edb001/lib/evmone/execution_state.hpp (L49))
as a good value.
* set32 simplification: mostly cosmetic
* sha256-simd: Celeron has SHA instructions. We should probably do the
same for torrent later, but this already helped as it is very CPU bound
on such a low end processor. Maybe that helps ARM as well.
2023-03-14 07:17:04 +00:00
hexoscott
efd541028c
read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
Alex Sharov
288fe5dcfb
dnsdisc: backport geth latest version and fixes for go1.20 (#6925) 2023-02-22 08:29:34 +00:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
alex.sharov
abff625dcb fix test 2023-01-11 12:04:22 +07:00
awskii
a124bcf6ac
added --p2p.allowed-port flag (#6263)
Regarding https://github.com/ledgerwatch/erigon/issues/6260

added flag `--p2p.allowed-ports=<porta>,<portb>` to restrict which ports
to use for sentries for different protocol versions.

Default for this flag is `30303, 30304` (first port is inherited from
`--port` flag defaults.
If `--port` is changed and it's new value is not presented in allowed
port list, provided port will be allowed as well as list provided via
`--p2p.allowed-ports`

Port picking is straightforward, we create sentry gRPC server for
protocol over first allowed port that is not already taken.
If there are no allowed ports left, erigon exits with hint.
2022-12-12 13:25:47 +00:00
Max Revitt
39487c1752
tweak(p2p): trace log level for error from t.matchWithCall (#6214)
Potentially helps with: #6123
2022-12-06 09:29:41 +07:00
Håvard Anda Estensen
1398703bc5
Use hex package to convert bytes to string (#6205) 2022-12-05 09:06:16 +07:00
Håvard Anda Estensen
31ec791d5a
Avoiding leaking the popped item (#6193)
Set the deleted item to its zero val so it can be garbage collected.
2022-12-04 11:17:02 +07:00
Alex Sharov
8afeee56c8
Downloader extract, step2 (#6076) 2022-11-20 10:41:30 +07:00
Andrew Ashikhmin
14c0643476
Enable both eth/66 and eth/67 by default (#6048) 2022-11-15 10:41:56 +01:00
Max Revitt
74308f2500
fix(test): eliminate race conditions (#6019) 2022-11-11 15:22:09 +00:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Andrew Ashikhmin
7286a0fef7
Create in-memory MDBX inside dirs.Tmp (#5702)
Previously "in-memory" MDBX instances for fork validation and mining
were created inside `os.TempDir()`. We should create them inside
Erigon's datadir so that the file permissions and the disk are the same
as for the main database.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/676.
2022-10-11 16:49:38 +01:00
Håvard Anda Estensen
7c15ed59e4
Enable prealloc linter (#5177)
* Enable prealloc linter

* Set inital slice len to 0
2022-08-26 10:04:36 +07:00
Håvard Anda Estensen
3b1d4d9c1b
Enable gocritic linter (#5173)
* Enable gocritic linter

* Remove dead linters

* Make gosec shut up
2022-08-25 09:08:56 +07:00
Andrew Ashikhmin
992ae01a7e
WithTablessCfg -> WithTableCfg (#5163) 2022-08-24 11:29:07 +02:00
Håvard Anda Estensen
8283c68335
Replace strings.Replace with strings.ReplaceAll (#5128) 2022-08-21 21:21:09 +07:00
Håvard Anda Estensen
ea6b92b132
Enable gosec linter (#5083)
* Ignore pseudo random generators

* Enable gosec linter
2022-08-17 12:18:19 +07:00
Alex Sharov
fc8f3fabc3
mdbx: expose_growth_step (#5030)
* save

* save

* save

* save

* save
2022-08-12 23:04:47 +07:00
Alex Sharov
351cd49c21
go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
Leonard Chinonso
6061690f61
Fixed lint errors for unused linter (#4902) 2022-08-02 22:01:53 +07:00
Andrew Ashikhmin
eec5fa4d41
Add support for eth/67 (#4564)
* Add eth/67

* Listen to eth/66 on a separate port

* Fix compilation error

* Fix cfg66.ListenAddr

* Update erigon ports in README

* Expose port 30304 in docker

* P2pProtocolVersionFlag instead of second sentry

* Remove "66 by default" from usage

* Small comment
2022-07-08 11:14:16 +02:00
Andrew Ashikhmin
dc5d3ffaac
Revert "Switch from eth/66 to eth/67 (#4549)" (#4562)
This reverts commit 16e57aa8a2.
2022-06-28 13:42:35 +02:00
Andrew Ashikhmin
16e57aa8a2
Switch from eth/66 to eth/67 (#4549)
* Switch from eth/66 to eth/67

* Fix a compilation error

* Update erigon-lib

* Refresh erigon-lib
2022-06-28 10:12:48 +02:00
ledgerwatch
64067a2b77
Debugging Engine API (#4488)
* defer tx rollback

* Add http.trace flag

* Fixed http.trace flag

* Fix lint

* Fix lint

* Delete unused tests

* Fix lint

* Fix lint

* Fix lint

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-19 13:40:28 +01:00
Alex Sharov
66248c4bfb
Torrent: verify all files (#4270) 2022-05-26 12:27:44 +07:00
battlmonstr
25b14edbf6
p2p: STUN external IP detection (#4195)
--nat stun is an automatic external IP detection alternative to manual --nat extip option.
It can be used both at home or on production servers without any extra setup.
It is fast (up to 5 ms) and more reliable than alternatives (as the request goes to the public internet).

This auto-detection is useful to run multiple instances of a service in cloud environments
where the node IPs are not known in advance.
2022-05-18 16:50:50 +01:00
Håvard Anda Estensen
0a75065e7a
Use go:build lines and remove obsolete +build lines (#4175) 2022-05-17 14:46:53 +07:00
battlmonstr
2fd2826b85
p2p: fix flaky TestUDPv5_callTimeoutReset (#4166)
The test fails sometimes on macOS CI with:
v5_udp_test.go:477: unexpected error: "RPC timeout"

Fixing by increasing the timeout from 120ms to 700ms,
and move the test to the integration suite, because it takes up to 1s now.
2022-05-16 20:24:54 +07:00
Alex Sharov
e1dec529d4
Generic sort of slices (no allocs, inlinable) (#4161)
* save

* save

* save

* save

* save
2022-05-16 08:24:12 +01:00
battlmonstr
7754f53385
p2p (#4119): treat slow integration tests (#4136)
* TestTable_ReadRandomNodesGetAll: refactor to integration and examples
* TestTable_bumpNoDuplicates: refactor to integration and examples
* TestUDPv4_smallNetConvergence: speed up from 1.7s to 0.3s by applying the test config
* TestUPNP_DDWRT: move to integration tests
* TestFairMix: split in 2, do more iterations in integration tests
* TestDialSched: speed up from 1s to 0.2s by removing the unexpected dial check,
  (keep the check during the integration tests)
2022-05-13 10:18:55 +07:00
battlmonstr
91076141b1
p2p (#4119): treat slow discover v5 tests (#4122)
* configure a 50 ms timeout for tests (like v4 tests)
* use in-memory DB (like v4 tests)
* TestUDPv5_callTimeoutReset: improve speed from 1.2s to 0.2s
* TestUDPv5_callTimeoutReset: reduce the likelihood of "RPC timeout"
* move lookup tests to the "integration" suite
* log details of unmatched packets and sends to non-existing nodes
* fix flaky TestUDPv5_findnodeHandling:

    Table.nextRevalidateTime was random (from 0 to 10s).
    Sometimes it triggered doRevalidate immediately, and it produced an unexpected ping.
    Configure a high interval to not revalidate during the tests.

Time improved from 1.7s to 0.2s.

Test with:

    go test ./p2p/discover -run TestUDPv5 -count 1
2022-05-12 10:24:51 +07:00
Alex Sharov
3e4fb5dd49
up linter version (#4108)
* save

* save

* save
2022-05-10 10:14:09 +07:00
battlmonstr
396bef4ab5
p2p: move v4_lookup_test to integration tests (#4107)
The test is flaky when the reply timeout is too low.
Increasing the timeout makes it slow.

Move the test to the integration suite.
Having a higher timeout is fine there.
2022-05-10 08:49:17 +07:00
Alex Sharov
f54628b7ba
remove metrics package, step 1 (#4094) 2022-05-07 14:52:04 +07:00
ledgerwatch
64684034d6
p2p: define DiscReason as uint8 (#4090)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-06 16:19:53 +01:00
battlmonstr
a5683fe5f4
p2p: TestUDPv4_LookupIterator failures workaround (#4079)
--- FAIL: TestUDPv4_LookupIterator (1.36s)
155
    v4_lookup_test.go:168: handlePacket error: "unsolicited reply"
156
2022-05-05 13:27:31 +07:00
battlmonstr
a1d0ff3281
p2p: TestUDPv4_Lookup - unsolicited reply error (#4056)
The UDP test must be closed after the serveTestnet exits.
If it happens before, the serveTestnet encounters this error.
(it tries to emulate a packet receival after closing the transport)

FindNode triggers a Ping in ensureBond.
This causes an extra Sleep for "ping back".
Don't wait for this in tests.

Close v5 tests.

The requests may also timeout if a lot of them queue up in the udpTest.pipe,
and serveTestnet is slow to process them.
Increase replyTimeout a bit to prevent that.
2022-05-03 22:07:50 +01:00
battlmonstr
2e4947bbfb
p2p: improve test TestTable_findnodeByID (#4047)
* refactor test
* add a fast fixed examples test for the main suite
* split slow test for the integration suite
2022-05-03 08:32:54 +01:00
battlmonstr
bc2e9e7b72
p2p: crawler-friendly handshake (#3982)
* exchange RLPx Hello even when maxpeers limit is reached
* bump MaxPendingPeers to increase the default handshake queue
  (and the likelyhood of Hello exchange)
2022-04-28 23:21:22 +01:00
battlmonstr
17fb707f80
p2p: fix flaky TestUDPv5_lookupE2E (#4020)
The test was flaky, because of the "endpoint prediction".
The test starts 5 nodes one by one.
Node 0 is used as a bootstrap node for nodes 1-4.
When it is about to add, say, node 3, nodes 0 and 1 might already have had a chance to communicate,
and updateEndpoints() deletes the node 0 UDP port, because fallbackUDP port was not configured.

In this case node 3 would get a bootstrap node 0 without a port and lead to an error:

    v5_udp_test.go:110: bad bootstrap node "enr:...": missing UDP port

The problem was reproducible by this command:

    go test ./p2p/discover -run TestUDPv5_lookupE2E -count 500
2022-04-29 01:19:47 +07:00
battlmonstr
c6649f584b
p2p: refactor MaxPendingPeers handling (#3981)
* use semaphore instead of a chan struct{}
* move MaxPendingPeers default value to DefaultConfig.P2P
* log Error if Accept fails
* replace quit channel with context
2022-04-28 09:21:52 +07:00
battlmonstr
7558730a54
p2p: speed-up TestUDPv4_LookupIterator (#4000)
The test was slow, because it was trying to find
predefined nodeIDs (lookupTestnet) by generating random keys
and trying to find their neighbours
until it hits all nodes of the lookupTestnet.
In addition each FindNode response was waited for 0.5 sec (respTimeout).
This could take up to 30 sec and fail the test suite.

A fake random key generator is now used during the test.
It issues the expected keys, and the lookup converges quickly.
The reply timeout is reduced for the test.
Now it normally takes less than.1 sec.
2022-04-28 09:18:42 +07:00
battlmonstr
13d66198bc
p2p/discover/v4wire: use optional RLP field for EIP-868 seq (#3963)
This changes the definitions of Ping and Pong, adding an optional field
for the sequence number. This field was previously encoded/decoded using
the "tail" struct tag, but using "optional" is much nicer.

see https://github.com/ethereum/go-ethereum/pull/22842

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-04-26 15:37:00 +01:00
Håvard Anda Estensen
6844e74ad2
Replace ioutil with io and os (#3946) 2022-04-23 15:43:00 +01:00
battlmonstr
92db317e06
Observer - P2P network crawler (#3928)
Observer crawls the Ethereum network and collects information about the nodes.
2022-04-22 12:02:12 +01:00
ledgerwatch
f56d4c5881
Switch peerId from 256 to 512 bit (as in stable) (#3862)
* Switch peerId from 256 to 512 bit (as in stable)

* go mod tidy

* Fix some tests

* Fixed

* Fixes

* Fix tests

* Update to erigon-lib main

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-04-10 08:01:25 +01:00
Alex Sharov
4fc88fee59
docker on alpine 3.15 (#3844)
* save

* save
2022-04-08 15:53:40 +07:00
battlmonstr
930d662f21
Refactor crypto.FromECDSAPub to MarshalPubkey/Std (#3797)
Most places that used this method were cutting off the 1st byte.
Refactor this idea to a common place.

* better naming: MarshalPubkey matches existing UnmarshalPubkey
* "Std" suffix for the ANSI standard encoding without cut off
* docs
2022-03-31 11:06:20 +07:00
battlmonstr
564fc68996
Fix NodeKeyConfig.save() (#3720)
The logic was not saving the key file.
2022-03-16 16:58:56 +00:00
battlmonstr
5715a3f69b
Discovery: speed up lookup tests (#3677) 2022-03-11 12:04:42 +07:00
battlmonstr
04f07a0f08
Discovery: split node records to a sepatate DB table (#3581) (#3667)
Problem:
QuerySeeds will poke 150 random entries in the whole node DB and ignore hitting "field" entries.
In a bootstrap scenario it might hit hundreds of :lastping :lastpong entries,
and very few true "node record" entries.
After running for 15 minutes I've got totalEntryCount=1508 nodeRecordCount=114 entries.
There's a 1/16 chance of hitting a "node record" entry.
It means finding just about 10 nodes of 114 total on average from 150 attempts.

Solution:
Split "node record" entries to a separate table such that QuerySeeds doesn't do idle cycle hits.
2022-03-10 14:57:25 +01:00
battlmonstr
ca97325448
Discovery: throttle node DB commits (#3581) (#3656)
UpdateFindFails/UpdateLastPingReceived/UpdateLastPongReceived events
are causing bursty DB commits (100 per minute).

This optimization throttles the disk writes to happen at most once in a few seconds,
because this info doesn't need to be persisted immediately.

This helps on HDD drives.
2022-03-10 14:02:40 +01:00
battlmonstr
42d128e24b
Revert node DB cache (#3581) (#3674)
Revert "Prevent frequent commits to the node DB in sentries (#2505)".
This reverts commit 65a9a265c2.
2022-03-10 13:39:54 +01:00
battlmonstr
0242b5a4e2
Discovery: refactor public key to node ID conversions. (#3634)
Encode and hash logic was duplicated in multiple places.
* Move encoding to p2p/discover/v4wire
* Move hashing to p2p/enode/idscheme

* Change newRandomLookup to create a proper random key on a curve.
2022-03-03 21:58:31 +07:00
Alex Sharov
8ca388a7d3
less qcheck iterations (#3622) 2022-02-25 13:47:48 +07:00
battlmonstr
f5a0c9d834
p2p: Disable port mapping task with --nat extip (#3612)
If --nat extip:1.2.3.4 option is specified, the port mapping logic
(AddMapping/DeleteMapping) does nothing.
This optimization avoids running a goroutine for doing nothing.
2022-02-24 15:09:56 +00:00
battlmonstr
6fceb72a74
Refactor node private key setup. (#3593)
Extract private key setup from the global config setup to make it reusable.
Return errors instead of panicing.

* NodeKey() method is removed - it is unused.
2022-02-23 15:05:27 +00:00
battlmonstr
082194d538
Discovery: add Context to Listen. (#3577)
Add explicit Context to ListenV4 and ListenV5.
This makes it possible to stop listening by an external signal.
2022-02-22 18:18:43 +00:00
battlmonstr
4337871f7f
Rename log/logger to follow conventions. (#3579)
* use "log" for struct fields
* use "logger" for function parameters and local vars

This is a compromise between:
1) using logger := log.New() to avoid aliasing (log := log.New())
2) and keeping it short when logging e.g.: srv.log.Info(...)
2022-02-22 18:17:15 +00:00
Alex Sharov
01380316a5
close nodes db on server start error (#3424) 2022-02-04 13:04:37 +07:00
Dmitry Savonin
a49d409457
Full BSC support with validator mode (#3233)
* migrated consensus and chain config files for bsc support

* migrated more files from bsc

* fixed consensus crashing

* updated erigon lib for parlia snapshot prefix

* added staticpeers for bsc

* [+] added system contracts
[*] fixed bug with loading snapshot
[+] enabled gas bailout
[+] added fix to prevent syncing more than 1000 headers (for testing only)
[*] fixed bug with crashing sender recover sometimes

* migrated system contract calls

* [*] fixed bug with returning mutable balance object
[+] migrated lightclient contracts from bsc
[*] fixed parlia consensus config param

* [*] fixed tendermint deps

* [+] added some logs

* [+] enabled bsc forks
[*] fixed syscalls from coinbase
[*] more logging

* Fix call sys contract gas calculation

* [*] fixed executing system transactions

* [*] enabled receipt hash, gas and bloom filter checks

* [-] removed some logging scripts
[*] set header checkpoint to 10 million blocks (for testing forks)

* [*] fixed bug with commiting dirty inter block state state after system transaction execution
[-] removed some extra logs and comments

* [+] added chapel and rialto testnet support

* [*] fixed chapel allocs

* [-] removed 6 mil block limit for headers sync

* Fix hardforks on chapel and other testnets

* [*] fixed header sync issue after merge

* [*] tiny code cleanup

* [-] removed some comments

* [*] increased mdbx map size to 4 TB

* [*] increased max chaindata size to 6 tb

* [*] bring more compatibility with origin erigon and some code cleanup

* [+] added support of validator mode for BSC chain

* [*] enable private key load for bsc, rialto and chapel chains

* [*] fixed running BSC validator node

* Fix the branch list

* [*] tiny fixes for linter

* [*] formatted imports for core and parlia packages

* [*] fixed import rules in other files

* Revert "[*] formatted imports for core and parlia packages"

This reverts commit c764b58b34fedc2b14d69458583ba0dad114f227.

* [*] changed import rules in more packages

* [*] fixed type mismatch in hack command

* [*] fixed crash on new epoch, enabled bootstrap flags

* [*] fixed linter errors

* [*] fixed missing err check for syscalls

* [*] now BSC implementation is fully compatible with erigon original sources

* Revert "Add chain config and CLI changes for Binance Smart Chain support (#3131)"

This reverts commit 3d048b7f1a.

* Revert "Add Parlia consensus engine for Binance Smart Chain support (#3086)"

This reverts commit ee99f17fbe.

* [*] fixed several issues after merge

* [*] fixed integration compilation

* Revert "Fix the branch list"

This reverts commit 8150ca57e5f2707a84a9f6a1c5b809b7cc84547b.

* [-] removed receipt repair migration

* [*] fixed parlia fork numbers output

* [*] bring more devel compatibility, fixed bsc address list for access list calculation

* [*] fixed bug with commiting state transition for bad blocks in BSC

* [*] fixed bsc changes apply for integration command and updated config print for parlia

* [*] fixed bug with applying bsc forks for chapel and rialto testnet chains
[*] let's use finalize and assemble for mining to  let consensus know for what it's finalizing block

* Fix compilation errors in hack.go

* Fix lint

* reset changes in erigon-snapshots to devel

* Remove unrelated changes

* Fix embed

* Remove more unrelated changes

* Remove more unrelated changes

* Restore clique and aura miner config

* Refactor interfaces not to use slice pointers

* Refactor parlia functions to return tx and receipt instead of dealing with slices

* Fix for header panic

* Fix lint, restore system contract addresses

* Remove more unrelated changes, unify GatherForks

Co-authored-by: Dmitry Ivanov <convexman18@gmail.com>
Co-authored-by: j75689 <j75689@gmail.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-01-14 19:06:35 +00:00
Alex Sharov
178fd1931d
Genesis sync from existing snapshots (#3087) 2021-12-05 09:03:08 +07:00
TBC Dev
36fabdb69c
Change eth.Peer.ID() type from string to enode.ID (#3063)
* Change eth.Peer.ID() type from string to enode.ID

* Misc enode.ID.String() usage
2021-11-30 22:55:51 +00:00
ledgerwatch
14f81db038
Not try to create temporary file with enode (#3035)
* Update server.go

* Update server.go
2021-11-25 18:36:15 +00:00
TBC Dev
e1c44cd19b
Change sentry peer_id from H512 pubkey to H256 keccak256(pubkey) (#3013)
* Rename protoHandshake.ID to protoHandshake.Pubkey

* Fix enode.ID comment descriptions

* Change sentry peer_id from H512 pubkey to H256 keccak256(pubkey)

* Simplify PeerInfo helpers
2021-11-22 05:39:31 +00:00
Dmitry Savelev
77a31a8b36
Fix Sentry server initialization (#3008) 2021-11-21 19:36:26 +00:00
Alex Sharov
5b634a790e
Canonical tx ids (#2986)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2021-11-18 14:07:55 +00:00
Alex Sharov
3d3a1d30cc
Remove Docker from deps (#2930) 2021-11-08 21:11:57 +07:00
Alex Sharov
70461e4e68
Recsplit: add first byte of hash to txn payload (#2902) 2021-11-02 14:35:09 +07:00
alex.sharov
d296617b2e up enode db limit 2021-10-27 08:19:25 +07:00
Alex Sharov
da00e949c4
RemoteRPC: coherentCache for kv.Code; LocalRPC: enable small blocksLRU (#2815) 2021-10-12 12:04:04 +07:00
alex.sharov
161f59bb7d less warnings 2021-10-07 14:50:50 +07:00
Alexandr Borodulin
6336f9ab1d
Ignore MaxPeers param for staticpeers (#2789)
Co-authored-by: Aleksandr Borodulin <a.borodulin@axioma.lv>
2021-10-07 08:33:13 +07:00
Andrea Lanfranchi
3bc3be4b5f
Clean up DEBUG category logs (#2776)
- move many DEBUG logs into TRACE category
2021-10-05 08:14:04 +07:00
Andrea Lanfranchi
c913f35c2e
Inner errors (#2774) 2021-10-04 22:16:52 +07:00
Alex Sharov
400c71b7ce
Pool: txID-based cache (#2697) 2021-09-17 10:31:20 +07:00
Alex Sharov
8b22477fd5
Enode quit race (#2673) 2021-09-13 13:07:34 +07:00
Alex Sharov
a4c14c5f4c
increase nodedb limit (#2579) 2021-08-25 09:06:58 +07:00
Alex Sharov
e7574a6d14
RPC: batch - preserve order, streaming to in-mem buf (#2541)
* preserve order in batch

* fix batch order

* base fee in header json

* less logs in tests

* less logs in tests

* save

* save
2021-08-19 09:26:06 +07:00
Alex Sharov
d5b9abab7d
reduce log level in tests (#2546)
* hack

* hack

* hack

* less debug logs in tests

* less debug logs in tests
2021-08-18 14:25:03 +07:00
ledgerwatch
39e066a121
Fix deadlock in nodedb (#2524)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-08-13 11:16:09 +01:00
ledgerwatch
65a9a265c2
Prevent frequent commits to the node DB in sentries (#2505)
* Prevent frequent commits to the node DB in sentries

* Commit when btree goes over limit

* iterator for SeedQuery

* Fixing test

* Fix tests

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-08-09 09:52:42 +01:00
Alex Sharov
e17e7b6656
enable http body close linter (#2479) 2021-08-02 14:52:54 +07:00
Alex Sharov
286572e99f
Remove some unused code related to metrics (#2469) 2021-07-29 22:37:48 +07:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib (#2467) 2021-07-29 18:53:13 +07:00
Alex Sharov
69dc2776dc
MIT licensed metrics lib (#2462) 2021-07-29 17:27:46 +07:00
Alex Sharov
5069558752
Apache licensed logger (#2460) 2021-07-29 17:23:23 +07:00
Alex Sharov
21cb7befa4
finish remove bucket suffix (#2458) 2021-07-28 10:43:51 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package (#2455) 2021-07-28 09:47:38 +07:00
Alex Sharov
054581f507
staged syncs automatically add error prefix about stage number and name (#2445) 2021-07-26 13:19:01 +07:00
Alex Sharov
a79b3cd6eb
unify stage params (#2384) 2021-07-17 09:09:56 +07:00
alex.sharov
bc65759c84 clien id in rpc 2021-07-15 16:11:39 +07:00
Alex Sharov
188dfb14b8
txPool: propagate on peer connect (#2335) 2021-07-11 14:01:16 +07:00
Alex Sharov
858fb3f503
mainnet london block and port some go-ethereum fixes related to baseFee (#2323) 2021-07-09 16:54:06 +07:00
Alex Sharov
afd8674c4b
Peer log (#2294)
* Revert "Revert "better handshake""

This reverts commit 4141c54c95.

* better peers logs

* better peers logs
2021-07-04 08:51:08 +01:00
alex.sharov
4141c54c95 Revert "better handshake"
This reverts commit 1db9d2ca95.
2021-07-04 10:55:34 +07:00
alex.sharov
1db9d2ca95 better handshake 2021-07-04 10:55:15 +07:00