Commit Graph

199 Commits

Author SHA1 Message Date
ledgerwatch
0104698033
Not kick static and trusted peers due to empty responses (#6325)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-15 12:25:35 +00:00
ledgerwatch
71fb4ccc8e
Workaround for gnosis chain POS downloader (#6315)
Workaround for https://github.com/ledgerwatch/erigon/issues/6308

Very inefficient, because it get 1 single header from the request of 192
headers, so moves quite slowly

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-15 11:13:28 +00:00
ledgerwatch
47692bb334
Prevent empty responses to skeleton requests (#6305)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-14 12:02:23 +00:00
ledgerwatch
f03d29293c
Kick useless peers instead of putting them on stand-by (#6296)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-13 22:21:10 +00:00
ledgerwatch
5616ec2529
Disable validator set check in historical due to BEP-131, restore Ske… (#6290)
…letons

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-12 20:46:20 +00: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
ledgerwatch
1c3c486d00
Avoid using peers returning empty responses, not sending skeleton requests (#6281)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-11 23:03:10 +00:00
ledgerwatch
4ab76849d8
Use old method of peer selection for non-POS networks (#6279)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2022-12-11 15:14:49 +00:00
ledgerwatch
cf237138d7
Kludge for BSC eth/67 errors (unknown message code 11) (#6248)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-12-08 08:01:55 +00: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
9bcd7fe6c3
e3: reduce state write lock (#6096) 2022-11-21 10:38:22 +07:00
Alex Sharov
92e6e56120
Fix test e3 (#6087) 2022-11-20 10:58:20 +07:00
Alex Sharov
8afeee56c8
Downloader extract, step2 (#6076) 2022-11-20 10:41:30 +07:00
Nathan (Blaise) Bruer
ca89620e56
SendMessageToRandomPeers() now is truely pseudo-random (#6050)
Fixes an issue where if the peer count didn't change much, we'd send the
message to the same peers nearly every time.

We now pick new random peers on every call to
SendMessageToRandomPeers().
2022-11-18 02:44:43 +03:00
Alex Sharov
66e1dc2dfd
better format p2p error (#6066) 2022-11-16 19:46:25 +03:00
Andrew Ashikhmin
14c0643476
Enable both eth/66 and eth/67 by default (#6048) 2022-11-15 10:41:56 +01:00
Andrew Ashikhmin
5b3f2b8c5f
Update interfaces (#6031)
Pick up
813d816908
& https://github.com/ledgerwatch/interfaces/pull/131.
2022-11-11 17:16:39 +01:00
ledgerwatch
7f12b809ec
Improvements to the downloader (#6012)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-10 10:33:10 +00:00
ledgerwatch
5b44f7d63b
Rework the peer finding (#5999)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-08 14:16:17 +00:00
ledgerwatch
61559477a6
fixes for POS header downloader (#5991)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-11-07 16:13:59 +00:00
Max Revitt
345e668832
feat(pos download): send header request to multiple peers (#5948) 2022-11-04 09:07:46 +00:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Alex Sharov
606ce5c99a
add logging cli flags to various cmd (#5816) 2022-10-21 12:36:17 +07:00
Max Revitt
07ffa36d44
File system logging (#5812)
- lives in internal/logging
- all log flags moved to internal/logging/flags
- allows continued use of root logger via log.Info etc.
- update logger to take change allowing string to lvl for 'trace'

Verbosity flag is overridden by log.console.verbosity. Logs will be
colocated if all run as one process, only split where progs are run as
separate processes, in a future update this will be addressed so for
example rpcdeamon will always log to it's own file
2022-10-20 19:25:06 +01:00
ledgerwatch
a170d730c0
Fixing issues related to sync delays (#5689)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-10-11 08:04:40 +01:00
ledgerwatch
7018c5e746
Ergonomic fixes for POS (#5574)
* Various POS fixes

* More quiet

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-29 22:17:16 +01:00
Alex Sharov
cb60382e6d
erigon3: rename "history.v2" to "history.v3" to avoid naming miss-match with "erigon3" (#5519) 2022-09-26 10:54:42 +07:00
Alex Sharov
caa23b9532
erigon22: simplify interhashes stage (#5315) 2022-09-08 14:02:50 +07:00
ledgerwatch
da90c9752e
Fix for goerli resync (#5269)
* Fix for goerli resync

* Fix

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-09-04 14:51:36 +01:00
Michelangelo Riccobene
590276d3e1
Print peer-id using hex encoding to avoid unprintable characters (#5248) 2022-09-01 15:04:49 +01:00
Max Revitt
4c4baf4bbf
tweak(sentry): downgrade inbound message handling err to debug (#5215) 2022-08-29 19:03:53 +07:00
Alex Sharov
d33096eaa7
erigon22: tests support (#5196) 2022-08-26 16:54:54 +07:00
Andrew Ashikhmin
62bb2c47f7
Disable PoW sync for networks that have already passed through the Merge (#5172)
* Disable PoW sync for networks that have already passed through the Merge

* Fix FirstPoSHeight
2022-08-26 09:16:39 +02: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
Håvard Anda Estensen
8460fd8e25
Remove deprecated functions (#5086) 2022-08-17 12:17:32 +07:00
Alex Sharov
778792e20e
Sentry doc (#5040)
* save

* save

* save
2022-08-13 21:37:51 +07:00
Giulio rebuffo
8ade569cc5
Save PoW blocks for processing received through P2P (#5015)
* save terminal blocks

* ops

* save less PoW blocks

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-12 21:54:20 +02:00
Max Revitt
7a87da9497
fix(sentry): add locks in sentry grpc (#4981) (#5025) 2022-08-12 21:18:43 +07:00
Giulio rebuffo
348be13508
fixed gossip post TTD (#5012)
* gossip all gossip

* gossip all gossip

* fixed tests

* fixed gossip post TTD

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-11 19:55:59 +02:00
Giulio rebuffo
b09de9e0d5
[P2P] gossip all gossip (#4995)
* gossip all gossip

* gossip all gossip

* fixed tests

Co-authored-by: giuliorebuffo <giuliorebuffo@system76-pc.localdomain>
2022-08-10 22:08:56 +02:00
Andrew Ashikhmin
ea6305339b
Revert "Log data if cannot decode BlockBodiesPacket66 (#4850)" (#4929)
This reverts commit 7ae99884af.
2022-08-04 12:01:36 +02:00
Alex Sharov
454cea4811
docs cli antipattern (#4859)
* save

* save
2022-07-29 09:48:24 +07:00
Andrew Ashikhmin
7ae99884af
Log data if cannot decode BlockBodiesPacket66 (#4850) 2022-07-28 17:26:34 +02:00
hexoscott
75151e0700
fix memory leak in HandleInboundMessage (#4848) 2022-07-28 12:19:34 +01:00
Artem Tsebrovskiy
a1777accd8
fixed passing of raw byte slices to tx processing (#4782) 2022-07-22 15:47:33 +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
Alex Sharov
359ae889b8
don't crush on p2p message handling panic (#4557)
* save

* save
2022-06-28 10:19:57 +06:00
ledgerwatch
b1572a15d5
No reorgs when fork choice head points to a canonical header (#4466)
* No reorgs when fork choice head points to a canonical header

* Return immediately

* Fix sentry

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2022-06-16 16:07:09 +01:00