Commit Graph

3590 Commits

Author SHA1 Message Date
Alex Sharov
726ef081ce
option to disable runtime.ReadMemStats (#4200) 2022-05-19 11:48:07 +07:00
Alex Sharov
64508a7d4e
Snap: call AddHeadersFromSnapshot only at initialCycle (#4198) 2022-05-19 10:38:53 +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
Alex Sharov
78f1d01a82
Update readme.md (#4192) 2022-05-18 13:50:28 +07:00
Alex Sharov
80d1d8a114
Trackers: split file lines cross-platform way #4191 2022-05-18 10:28:14 +07:00
Alex Sharov
4e7807251a
Ensure snapshotDir not created by accident (#4164)
* save

* save

* save
2022-05-17 09:40:45 +07:00
ledgerwatch
a2a494a3d1
Fix eth_feeHistory (#4168)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-16 21:42:23 +01:00
battlmonstr
d845eb2a69
sentry: refactor eth handshake checks (#4163) 2022-05-16 20:28:03 +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
ledgerwatch
25208964e5
Export chainspecs into json files (#4148)
* Export chainspecs into json files

* Add sepolia

* Add more chains

* Extract rest of the chains

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-15 17:37:42 +01:00
ledgerwatch
7125593cf5
Fix nil deference in ProcessHeadersPOS (#4155)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2022-05-15 17:09:27 +01:00
ledgerwatch
0e457ba9d7
Restore skip analysis (#4146)
* Restore skip analysis optimisation

* Make checkChangeSets work with snapshots

* Add syncmode to checkChangeSets

* Add block number for BSC

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-14 20:17:23 +01:00
ledgerwatch
e02c77bf5a
Further simplify header download, req/resp metrics (#4121)
* Further simplify header download, req/resp metrics

* Not break the loop

* Move anchors correctly

* Log anchor state

* Print minNum

* Print hash

* Always add links

* Remove obsolete test

* cleanup

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alex Sharp <alexsharp@alexs-macbook-pro.home>
2022-05-13 11:18:30 +01:00
Alex Sharov
4e0f3c8c4c
Sentry: batch events (#4140) 2022-05-13 11:00:44 +07:00
Alex Sharov
1b82acd7ff
it's ok to not have snapshots dir (#4135)
* save

* save

* save
2022-05-12 15:14:16 +07:00
Alex Sharov
691ceb1c3d
save (#4126) 2022-05-12 10:31:45 +07:00
Alex Sharov
79e12edb52
Torrent: mmap store (#4123)
* save

* save
2022-05-12 10:20:30 +07:00
Alex Sharov
45adf8fba9
Torrent: don't drop db on "torrent_hashes --rebuild" #4118 Open 2022-05-11 14:38:37 +07:00
Alex Sharov
0fd12743e7
torrent: suspend more useless logs #4116 2022-05-11 09:40:20 +07:00
Alex Sharov
4d98ce697b
Open torrent: supress some useless logs (#4115) 2022-05-11 07:16:51 +07:00
Andrew Ashikhmin
15ddd32e75
Engine API: remove unauth port (#4111)
* Engine API: remove unauth port

* Remove reduntant auth from variable names
2022-05-10 13:04:52 +02:00
Alex Sharov
763563ec77
RPCDaemon: open snapshots on startup (because now snapshots dir is atomic), even if no Erigon available (#4110)
* save

* save

* save

* save

* save

* save
2022-05-10 09:54:44 +01:00
ledgerwatch
8001cf2ad6
Simplify header downloader (#4104)
* Simplify header downloader

* Remove VerifyQueue

* Fix

* More fixes

* Fix

* Break out of the loop

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-10 08:06:16 +01:00
Alex Sharov
2c26583f6f
Rename sentry.ControlServerImpl to sentry.MultyClient and sentry.SentryServerImpl to sentry.GrpcServer #444 2022-05-10 12:17:44 +07:00
Alex Sharov
3e4fb5dd49
up linter version (#4108)
* save

* save

* save
2022-05-10 10:14:09 +07:00
Alex Sharov
4ba1f03efe
Snapshots: atomic dir, step 3 (#4103) 2022-05-10 09:29:44 +07:00
Andrew Ashikhmin
05c4a57760
Amend description of override.mergeForkBlock flag (#4106) 2022-05-09 14:55:04 +02:00
Alex Sharov
e9dcc2e472
Torrent: increase network-request size to 2Mb (#4100) 2022-05-08 09:25:15 +07:00
Alex Sharov
62fddbe480
torrent not found fix (#4101) 2022-05-08 09:22:07 +07:00
Alex Sharov
ad74e8a716
switch toml lib to release version (#4095)
* save

* save
2022-05-07 15:02:34 +07:00
Alex Sharov
32d8ab34d9
atomic snapshot dir, step 2 (#4093)
* atomic snapshot dir

* atomic snapshot dir
2022-05-07 14:53:21 +07:00
ledgerwatch
ba987cf262
Remove preverified hashes (#4088)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-06 15:15:01 +01:00
Alex Sharov
f480865a26
Downloader atomic snapshot dir, step 1 (#4085)
* save

* save

* save
2022-05-06 09:59:23 +07:00
battlmonstr
0fc99b7c55
rpcdaemon: optimize tests (#4082)
* reuse the generated test blockchain across tests
* copy ChainPack to ensure test isolation

This improves the speed from 10s to 4s.

The package tests timeout can be reduced to 5s:

    go test ./cmd/rpcdaemon/commands -count 1 --timeout 5s
2022-05-06 08:54:26 +07:00
ledgerwatch
14557a2348
[erigon2] Support for binary tree commitments (#4077)
* binary tree

* Binary commitment tree

* [erigon2] Bin tree support

* Point to latest erigon-lib

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-05-05 13:54:29 +01:00
Alex Sharov
152998721a
Torrent: increase network request size (#4067)
* save

* save
2022-05-04 18:18:35 +07:00
Giulio rebuffo
6927ffc54b
penalize naughty peers on PoS (#4060)
* penalize naughty peers

* lint
2022-05-04 10:39:34 +02:00
Alex Sharov
f590bf682f
RPCDaemon - open snapshots only when they are ready (and indices ready). 2022-05-04 12:55:58 +07:00
Alex Sharov
beafe7db65
Test that torrent port is open for TCP and UDP (#4062) 2022-05-04 10:58:58 +07:00
Alex Sharov
533970d31c
trace read parent header from snapshot and lru #4042 2022-05-01 10:35:30 +07:00
Alex Sharov
93ab7f5d82
save (#4032) 2022-04-30 11:43:07 +07:00
Alex Sharov
a13c5ba904
Fix non-starting download (#4031)
* save

* save

* save

* save
2022-04-30 11:42:36 +07:00
Giulio rebuffo
af5bdceb14
added ovveride merge fork block (#4027) 2022-04-29 18:27:17 +02:00
Alex Sharov
77560b6732
More careful handle of sequences in stage_headers --reset (#4023)
* save

* save

* save

* save
2022-04-29 14:37:02 +07:00
ledgerwatch
285c782b1b
More efficient header verification of headers for Parlia when snapshots are used (#3998)
* Update stageloop.go

* Print

* Consider snapshot headers as parlia checkpoints

* Not fail after not loading snapshot

* Lazy snapshots

* Print number of validators

* More printing

* Use epoch instead of checkpoint interval

* Reduce logging

* Fix compilation

* Remove trace jump dest

* Fix lint

* Not store snapshots every epoch

* Separate snapshot for verification and finalisation

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-04-29 07:10:31 +01:00
Andrew Ashikhmin
f9858ff9f2
Add override.terminaltotaldifficulty flag (#4018)
* cmd/utils: initialize f.Value before setting variable

* override.terminaltotaldifficulty flag

* Add OverrideTerminalTotalDifficulty to default_flags
2022-04-28 19:01:51 +02:00
battlmonstr
4b3eb0ffac
Observer: fix panic on clean start (#4002) (#4017)
Problem: (nil, nil) from CountPingErrors was not handled.
This happens if the node is not in the db (a bootstrap node),
and was never crawled before.
2022-04-28 12:46:33 +02:00
Alex Sharov
76c36c2c09
typed sender (#4016)
* save

* save
2022-04-28 15:35:14 +07:00
Alex Sharov
352869fc3a
rename field "type" (#4015)
* save

* save

* save
2022-04-28 15:02:06 +07:00
ledgerwatch
bd3b734027
[integration tool] Clean BorReceipt when reset state (#4013)
* Update reset_state.go

* Update reset_state.go
2022-04-28 14:59:04 +07:00