mbaxter
a04d94ca0f
[PAN-2811] Be more lenient with discovery message deserialization ( #1580 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
f2a2ffc008
Rename MetricCategory to PantheonMetricCategory ( #1574 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
8bf224707f
Expand readiness check to check peer count and sync state ( #1568 )
...
Query params can be used to adjust the number of peers required and number of blocks tolerance to be considered in sync.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
5ce6b5e85a
[PAN-2798] Reorganize p2p classes ( #1567 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
037a6e8527
[PAN-2783] Invert dependency between permissioning and p2p ( #1557 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
19a278fce1
Make permissions checks for ongoing connections more granular ( #1563 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
e89d2a72af
[PAN-2731] Extract connection management from P2PNetwork ( #1538 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
9ef6002a4a
Avoid auto-boxing for gauge metrics. ( #1526 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
458e3bfb00
Set disconnect flag immediately when disconnecting a peer ( #1521 )
...
Previously was only set after callbacks were invoked, allowing additional messages to be sent while parts of the supporting infrastructure for the peer was being torn down.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
2341ba1550
[PIE-1577] added node local metrics ( #1514 )
...
* added node local metrics
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
83102e097e
Add metrics to assist monitoring and alerting ( #1506 )
...
Adds metrics to expose:
* height of best known block
* synchronizer in sync flag
* max peers
* Timestamp of current chain head
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
945f979357
Treat RLPException when processing a message as an indication that the message is invalid and disconnect the client for breach of protocol. ( #1491 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
b86cedfa11
[PAN-2560] Add LocalNode class ( #1489 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
527167827a
[PAN-2730] Create MaintainedPeers class ( #1484 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
22ec27796d
[PAN-2614] Expand permissioning interface ( #1471 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
2a64902bd2
[PAN-2614] Add simple PeerPermissions interface ( #1446 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
be1fa19a16
Decode devp2p packets off the event thread ( #1439 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Danno Ferrin
16982ebad2
Equals cleanup ( #1434 )
...
* Don't copy collections if we don't need to. Change types higher up if needed.
* Don't use Guava's Object.equal, use Java's Objects.equals.
** add errorprone test to enforce the banning of Guava's Objects class.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
9bc8d8531b
Update EnodeURL to support enodes with listening disabled ( #1403 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
ff56a65af2
Fix p2p PeerInfo handling ( #1428 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
f54f2e10f4
[PAN-2624] Start listening for p2p connections after start() is invoked ( #1418 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Danno Ferrin
c028352642
PAN-2592: Rename methods that create and return streams away from getX() ( #1368 )
...
* Change all Stream<?> getX() and Stream<?> x() methods to Stream<?> streanX methods, such as `Stream<Peer> streamIdlePeers()`
* Update coding conventions to reflect this.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
8445135929
PAN-2449: Remove NodePermissioningLocalConfig external references ( #1406 )
...
* Removing local config controller reference
* Removing permissioning whitelist references in p2p
* Removing whitelist updated listener from DiscoveryController
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
07136bc1b5
Add explanatory comment about default port ( #1392 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
f861d67115
Handle case where peers advertise a listening port of 0 ( #1391 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
4606ba2661
Remove unnecessary field ( #1384 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
9627d84e79
[PAN-2605] Add getPeer method to PeerConnection ( #1383 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
f9641148df
[PAN-2585] Prefer EnodeURL over Endpoint ( #1378 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
43e4530752
[PAN-2595] Consolidate local enode representation ( #1376 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
d25a6026ec
[PAN-2588] Create P2PNetwork Builder ( #1343 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
61d5734062
[PAN-2560] Consolidate p2p node info methods ( #1288 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
8fc9ee7243
Simplify enode construction ( #1283 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
d3a19718a2
[PAN-2560] Cleanup PeerConnection interface ( #1282 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
7a892e9943
Create EnodeURL Builder ( #1275 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
c7947b8185
Keep enode nodeId stored as a BytesValue ( #1274 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
e870ade816
Normalize EnodeURLs ( #1264 )
...
Only specify discovery port explicitly when the discovery port differs
from the listening port.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Danno Ferrin
dcc459aba5
PAN-2404 - Make PeerDiscovertAgentTest less flakey. ( #1262 )
...
Because of deep issues sometimes we get duplicate Peers that differ
in small ways. Tweak the test to verify we get all of the peers
we are expecting and to be tolerant of quasi-duplicate peers.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
907bbb5299
[PAN-2433] Fix netty pipeline ( #1257 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
0af0a4300b
[PAN-2503] permission provider that allows bootnodes if you have no other connections ( #1206 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
88c170d715
[PAN-2356] Acceptance tests base for smart contract node permissioning ( #1186 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Danno Ferrin
74e2b5a632
Fix metrics breakages ( #1185 )
...
* Number of metrics labels need to match up with constructor
* Number of labels must be consistant, so I split it into two metrics
* Also, naming best practices say that sum() and avg() of a metric
should be meaningful, separating into two metrics fixes that.
* fix style issues (finals, intellij warnings)
* Change NoOpMetrics to check label count.
* Cascading changes to support this in many support classes. Mostly places
we presumed all NoOpMetrics were equals.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Trent Mohay
324222752a
StaticNodesParserTest to pass on Windows ( #1183 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
0fe3d7f7bb
[PAN-2473] bond with bootnodes ( #1160 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
c30d5c0894
[PAN-2403] Periodically connect to peers from table ( #1170 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
99f0c68e59
Avoid bonding to ourselves. ( #1166 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
fa672529a7
Capture metrics on Vertx event loop and worker thread queues. ( #1155 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
8d82f9510b
Add metrics around discovery process. ( #1152 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Trent Mohay
5b41b56d8e
Prevent connecting to self ( #1150 )
...
When receiving an AddPeer, or when loading the static-nodes.json file, pantheon
should not accept its own NodeID as a valid connection (however, this should not invalidate the static-nodes file).
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Adrian Sutton
01a91cfe2f
Add two extra Ropsten bootnodes ( #1147 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
31a304b852
[PAN-2449] Refactored jsonrpc to take the whitelist directly ( #1140 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago