Commit Graph

8 Commits

Author SHA1 Message Date
Mark Holt
8ea0096d56
moved metrics sub packages types to metrics (#8119)
This is a non functional change which consolidates the various packages
under metrics into the top level package now that the dead code is
removed.

It is a precursor to the removal of Victoria metrics after which all
erigon metrics code will be contained in this single package.
2023-09-03 08:09:27 +07:00
battlmonstr
340b9811b0
p2p: refactor peer errors to propagate with a DiscReason (#8089)
Improve p2p error handling to propagate errors
from the origin up the call chain the Server peer removal code
using a new PeerError type containing a DiscReason and a more detailed
description.

The origin can be tracked down using PeerErrorCode (code) and DiscReason
(reason)
which looks like this in the log:

> [TRACE] [08-28|16:33:40.205] Removing p2p peer peercount=0
url=enode://d399f4b...@1.2.3.4:30303 duration=6.901ms
err="PeerError(code=remote disconnect reason, reason=too many peers,
err=<nil>, message=Peer.run got a remote DiscReason)"
2023-08-31 16:45:23 +01:00
battlmonstr
bb2c2adbb6
p2p: fix RLPx disconnect message decoding (#8056)
The disconnect message could either be a plain integer, or a list with
one integer element. We were encoding it as a plain integer, but
decoding as a list. Change this to be able to decode any format.
2023-08-24 13:49:19 +02: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
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
Alex Sharov
0be3044b7e
rename (#1978)
* rename

* rename "make grpc"

* rename "abi bindings templates"

* rename "abi bindings templates"
2021-05-20 19:25:53 +01:00
Igor Mandrigin
70f6ec3b49 post-rebase fixes 2020-10-06 14:12:09 +02:00
rene
d57fb49ed3 p2p: move rlpx into separate package (#21464)
This change moves the RLPx protocol implementation into a separate package,
p2p/rlpx. The new package can be used to establish RLPx connections for
protocol testing purposes.

Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	p2p/rlpx/rlpx.go
#	p2p/rlpx/rlpx_test.go
#	p2p/server_test.go
2020-10-06 14:12:09 +02:00