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
Lucas Saldanha
d3b9211b82
Moving NodeWhitelistController to permissioning package ( #855 )
...
* Moving NodeWhitelistController to permissioning package
* Refactoring unit tests
* Fix string.format
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
6551183a8d
[NC-2118] Method to reload permissions file ( #834 )
...
* Extracting EnodeURL logic to specific object
* Moving permissioning config builder to permissioning package
* Validating accounts in permissions file
* Implemented controller reload method
* Reload whitelist from file API method
* Spotless
* Refactoring account validation
* Errorprone
* Fixing tests after rebase
* Spotless
* PR review
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mark-terry
7622541714
[NC-1968] Permissioning whitelist persistence. ( #763 )
...
* [NC-1968] Initial commit.
* [NC-1968] Acceptance tests.
* [NC-1968] PR fixes.
* [NC-1968] Merge conflicts.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
mark-terry
52d6675f63
[FIX] Refactored permissioning components to be Optional. ( #747 )
...
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
4a32c72268
Error response handling for permissions APIs ( #736 )
...
* Generifying account/node result object
* Added null/empty check on whitelist ops
* Updating successful whitelist operation to return Success instead of true
* Updating error messages
* Moving Success string into JsonRpcSuccessful response
* Updating unit tests
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Sally MacFarlane
a5afe34e34
[NC-2119] permissioning config path CLI ( #729 )
...
* added CLI for permissioning config file path
* added test for --permissions-config-file without param value
* merged changes from NC-1968 and set the config path on the PermissioningConfiguration object when it's created
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
0557c3c50e
NC-1930: Handling duplicate nodes/accounts in permissioning api requests ( #707 )
...
* NC-1930: Handling duplicate nodes/accounts in permissioning api requests
* Fixing json rpc error messages
* Fixing acceptance test
* PR comments
* Renaming add/remove node result objects
* Spotless
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Lucas Saldanha
4025a06db0
Acc whitelist api ( #487 )
...
* Implemented list/add/remove accounts from whitelist
* Including account whitelist methods in the JSON-RPC API
* Fixing json rpc response for eth_sendrawTransaction with account not authorized
* Refactoring TransactionPool account whitelist logic
* Acceptance test for accounts whitelist
* Errorprone
* Fixed account nonce tracking in ATs
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago
Michael Connor
27c3ad5f78
Nc 1942 Add account whitelisting and refactor into permissioning package ( #460 )
...
* WS sync subscription delay added
* WS sync subscription delay added with unit testing
* WS sync subscription delay added with unit testing
* changed number to a constant in constructor
* Use default from websocket class instead of making new one
* Removed magic numbers
* Added Controller
* Refactor permissioning config and account whitelist into permissioning package
* Refactor permissioning config and account whitelist into permissioning package
* Refactor permissioning config and account whitelist into permissioning package
* Merge branch 'master' of https://github.com/PegaSysEng/pantheon into NC-1942
# Conflicts:
# consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/statemachine/IbftControllerTest.java
# docs/Getting-Started/ExplorerBlockDetails.png
# docs/Getting-Started/ExplorerSearch.png
# docs/Getting-Started/ExplorerSummary.png
# ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/PermissioningConfiguration.java
# ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/PermissioningConfigurationTest.java
# pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java
# pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java
* Merge branch 'master' of https://github.com/PegaSysEng/pantheon into NC-1942
# Conflicts:
# consensus/ibft/src/test/java/tech/pegasys/pantheon/consensus/ibft/statemachine/IbftControllerTest.java
# docs/Getting-Started/ExplorerBlockDetails.png
# docs/Getting-Started/ExplorerSearch.png
# docs/Getting-Started/ExplorerSummary.png
# ethereum/permissioning/src/main/java/tech/pegasys/pantheon/ethereum/permissioning/PermissioningConfiguration.java
# ethereum/permissioning/src/test/java/tech/pegasys/pantheon/ethereum/permissioning/PermissioningConfigurationTest.java
# pantheon/src/main/java/tech/pegasys/pantheon/cli/PantheonCommand.java
# pantheon/src/test/java/tech/pegasys/pantheon/cli/PantheonCommandTest.java
* Iron out merge conflict introduced bugs
* Iron out merge conflict introduced bugs
* Iron out merge conflict introduced bugs
* PR Change request actioned
* PR Change request actioned
* PR Change request actioned
* PR Change request actioned
* updated node whitelist acceptance test to conform to refactored permissioning package
* text change
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
6 years ago