Lucas Saldanha
f5364ebb1b
Fix encoding for account permissioning check call ( #1549 )
...
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
Lucas Saldanha
576c12dd46
PAN-2445: Onchain account permissioning ( #1507 )
...
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
Sally MacFarlane
4bb1ee500a
[PIE-1578] added local transaction permissioning metrics ( #1515 )
...
* added local transaction permissioning metrics
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
Lucas Saldanha
a21f812cda
PAN-2603: Onchain account permissioning support ( #1475 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
d325989017
[PIE-1580] Metrics for smart contract permissioning actions ( #1492 )
...
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
mark-terry
a1ce2601eb
[PIE-1593] Fix for permissioned network with single bootnode ( #1479 )
...
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
Chris Mckay
5dffb2e721
[PAN-2612] Transaction smart contract permissioning controller ( #1433 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mark-terry
5d04b32530
[PAN-2601] Renamed AccountPermissioningProver to TransactionPermissioningProvider to better reflect the interface. ( #1432 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mark-terry
3cfa6ce40b
[PAN-2601] Refactorings and additions to add Account based Smart Contract permissioning ( #1430 )
...
* [PAN-2601] Renamed SmartContractPermissioningController -> NodeSmartContractPermissioningController incl. relevant fields etc.
* [PAN-2601] Added account smart contract fields to SmartContractPermissioningConfiguration.
* [PAN-2601] Added AccountPermissioningProvider.
* [PAN-2601] Removed superfluous 'node' from some class and field names.
* [PAN-2601] Spotless.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
87da26b08c
renamed AccountWhitelistController ( #1424 )
...
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
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
Sally MacFarlane
8a3862a565
[PAN-2573] include static nodes in permissioning logic ( #1339 )
...
* combine bootnodes and staticNodes and pass the combined collection when building permissioning config; renamed error code that specifically called out bootnodes
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Abdelhamid Bakhta
48c51ac78d
[PIE-1531] Allow whitespace in file paths loaded from resources directory ( #1329 )
...
* [PIE-1531] Allow whitespace in file paths loaded from resources directory.
* replace Resources.getResource call
* Update LocalPermissioningConfigurationValidatorTest.java
* Update RpcAuthFileValidatorTest.java
* fix paths
* Update SmartContractNodePermissioningAcceptanceTestBase.java
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
7d28dd37fb
PIE-1526: Normalize account permissioning addresses in whitelist ( #1320 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
d2d1d82df7
PIE-1526: Fix account permissioning check case matching ( #1314 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
e187429fed
Better errors for when permissioning contract is set up wrong ( #1296 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
2296f4547e
Update permissioning smart contract interface to match updated EEA proposal ( #1287 )
...
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
Chris Mckay
ea65ea04d3
Realligned smart contract interface to EEA client spec 477 ( #1209 )
...
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
Chris Mckay
a8bf287735
Self needs to persist to the whitelist ( #1176 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
ebcb011a43
Removed code that prevents self from being added to whitelist ( #1175 )
...
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
Chris Mckay
5107f63479
[PAN-2494] [PAN-2474] permissioning issues ( #1174 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
2853b740cd
Refactoring permissioning ATs ( #1148 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mbaxter
bb3d494415
[PAN-2363] Connect to peers without explicitly defined tcp ports ( #1144 )
...
Most peers discovered on the network only define a single UDP port and have no explicitly defined TCP port. At least some of these peers are listening on the TCP port matching the advertised UDP port so assume the ports are the same and attempt a connection.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
bc5d6eb45a
[PAN-2347] nodepermissioningcontroller used for devp2p connection filtering ( #1132 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
b2803c1abe
PAN-2434: Updated local config permissioning flags ( #1118 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
c2e6594453
[PAN-2362] permissioning cli smart contract ( #1116 )
...
* added smart contract CLI options for node permissioning
* throw ParameterException if contract address not specified
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
b80a3587a9
[PAN-2346] Update Peer Discovery to use NodePermissioningController ( #1105 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
0771d98a71
[PAN-2345] node permissioning controller ( #1075 )
...
* refactor NodeWhitelistController -> NodeLocalConfigPermissioningController
* added smart contract permissioning config
* only use SyncStatusProvider if Smart Contract Permissioning enabled
* check we are not adding self enode
* local permissioning controller isPermitted() should return true if either source OR destination is permitted
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
1145b8322d
[PAN-2343] smart contract permission controller ( #1083 )
...
* [PAN-2343] some stubs in progress
* [PAN-2343] getting close to what could be a working contract controller
* [PAN-2343] added the permissioning provider interface to the smart contract controller
* [PAN-2343] smart permissioning queryer works
* [PAN-2343] docs for the smart contract permissioning controller
* [PAN-2343] removed some bad debugging
* [PAN-2343] docs
* [PAN-2343] final
* [PAN-2343] charsets
* [PAN-2343] dependencies that are missing
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Chris Mckay
74320130b6
[PAN-2343] smart contract permission controller stub ( #1074 )
...
* [PAN-2343] stub for smart contract permission controller
* spotless
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
2fac2397b3
[PAN-2342] Update discovery logic to trust bootnodes only when out of sync ( #1039 )
...
* [PAN-2342] Created SyncStatusNodePermissioningProvider and NodePermissioningController
* Fix block height comparison logic
* Unit test for SyncStatusNodePermissioningProvider
* Add comment about permissioning while not in sync
* PR comments
* Fix missing final
* Fixing unit test
* Unsubscribing from Synchronizer SyncStatus updates after reaching sync
* Fix race condition
* Simplifying synchronization between callbacks
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
6d90cffccf
refactoring to introduce deleteOnExit() for temp files ( #920 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
3f95178e7b
[PAN-2117] Error when removing bootnodes from nodes whitelist ( #912 )
...
* [PAN-2117] Error when removing bootnodes from nodes whitelist
* Fixing AT
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
36447ba73e
enforce accounts must start with 0x ( #900 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
b1909f7ab6
[PAN-2309] CLI mixin help ( #895 )
...
* don't create a new CommandLine object in the case of exception - this caused the help to be missing the mixins added
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
406c7f32f6
[PAN-2239] Disconnect peer removed from node whitelist ( #877 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago