Commit Graph

86 Commits

Author SHA1 Message Date
Savinda Senevirathne
c87ae6693d Patch config and hpfs sync refactor. (#208)
* Terminology changes from state to hpfs.
* Syncing hpfs parents in priority order.
* Changing how the hash is calculate in hpfs response validate check.
2021-01-06 10:50:58 +05:30
Chalith Desaman
a16eb39d1f User connections enable/disable config flag (#209) 2021-01-06 09:36:48 +05:30
Chalith Desaman
e8a3882176 Prevent running multiple hpcore instances from the same directory (#207) 2021-01-05 11:18:23 +05:30
Savinda Senevirathne
47c0dfd225 Adding support for contract config update via a patch file. (#206) 2020-12-28 15:35:17 +05:30
Savinda Senevirathne
63e3050046 Validating and displaying missing config fields in config read. (#205) 2020-12-24 11:40:02 +05:30
Ravin Perera
c25ebe66f4 Util helper func simplification. (#203) 2020-12-23 21:49:13 +05:30
Savinda Senevirathne
e835e18d18 New config file structure. (#201) 2020-12-23 18:52:58 +05:30
Ravin Perera
f2ed9040c0 User protocol upgrade and js client lib. (#191)
* Unified js client lib for browser and nodejs.
* Client lib multiple connections support.
* Implemented server challenge response.
* Contract guid and version validation.
* Server key validation.
* User json message encoding improvements.
2020-12-11 11:02:58 +05:30
Ravin Perera
fe9e276f8d Consensus deadlock fixes and reliability improvements. (#187)
* Consensus time vote improvements.
* Skipped self proposal in Observer mode.
* Added docker cluster script params.
* Added state/lcl sync abandon threshold.
* Added pubkey display for cluster script.
* Added proposal latency log.
* Added sync completion check to prevent deadlocks.
2020-12-08 15:17:27 +05:30
Savinda Senevirathne
7bf0475b6f Subject unl list to consensus. (#186)
* Unl hash in consensus proposals.
* Unl syncing and sync request serving.
* Adding unl hash to the ledger block.
2020-12-08 15:05:38 +05:30
Ravin Perera
da0eb08512 SIGTERM handler and minor startup improvements. (#185)
* SIGTERM handler and stderr usage.
* Create-contract state seed dir creation.
2020-12-06 10:38:35 +05:30
Savinda Senevirathne
a421f13d91 Introduce consensus/npl public/private flags to config. (#182)
Npl messages are forwarded and broadcasted only to trusted nodes if npl flag is set to private. If public, messages are broadcasted to all the connected peers.
Consensus proposals are forwarded and broadcasted only to trusted nodes if consensus flag is set to private. If public, proposals are broadcasted to all the connected peers.
2020-12-03 08:12:56 +05:30
Ravin Perera
596fd2b43c Added contract id verification. (#180)
* Added contract id config.
* Verify contract id with user/peer challenge.
* Updated cluster scripts.
* Updated node client lib for contract id verification.
2020-12-01 16:08:41 +05:30
Chalith Desaman
de71b97371 Stopped skipping self pub key from the config unl (#179) 2020-12-01 14:23:28 +05:30
Chalith Desaman
48cde30de6 Validating hpfs and hpws binary paths on startup (#178) 2020-12-01 10:43:00 +05:30
Chalith Desaman
2f5d95ae7a Save raw inputs alongside the ledger (#167)
* Saving raw inputs in the ledger.
* Store full history in separate folder.

* Moved full history fb structs to a seperate fbs file

* Removed raw_inputs from the proposal

* Fixed code comments

* Saving raw user input string

* Code refactoring

* Resolved PR comments
2020-11-30 15:42:20 +05:30
Ravin Perera
80392cc995 Persisted contract UNL updates in config file. (#171)
* Refactored config loading and saving.
* Aded unl update persistance.
2020-11-27 09:06:17 +05:30
Ravin Perera
d476f787a7 Introduced UNL update control message. (#169) 2020-11-26 22:26:12 +05:30
Chalith Desaman
459799760b Added element limits for queue and lists (#162) 2020-11-24 13:17:53 +05:30
Ravin Perera
d9517b6164 Reorganized util and hpws source files. (#161) 2020-11-23 23:18:42 +05:30
Savinda Senevirathne
bf710c6bde Idle connection timeout config for both peer and user connections. (#158) 2020-11-20 19:48:45 +05:30
priyadharsun
eb0012bc47 Change epoch milliseconds return type to uint64_t. (#155) 2020-11-19 12:54:33 +05:30
Chalith Desaman
f475dcb1fb Dynamic peer list implementation. (#152) 2020-11-18 12:58:58 +05:30
Ravin Perera
3ea0299964 Comm session re-architecture and self comm channel. (#145)
* Introduced self comm channel instead of loopback websocket.
* Introduced comm_session and comm_server inheritance hierarchy.
* Separated peer session and user session classes.
2020-11-08 22:14:08 +05:30
Ravin Perera
7a4e91b0dd Integrated hpfs in-proc sessions. (#134) 2020-10-23 10:04:45 +05:30
Savinda Senevirathne
4f6ff4fbef Peer message forwarding. (#133) 2020-10-19 10:44:31 +05:30
Ravin Perera
7183383ab7 Replace websocketd/websocat with hpws. (#131) 2020-10-15 17:02:06 +05:30
Chalith Desaman
5f40aebf08 NPL message refactor. (#132)
* Implemented feeding and broadcasting npl messages from the contract execution in real-time.
* Replaced npl pipe with domain sockets.
* Refactored npl read and write in nodejs echo contract
2020-10-14 15:18:00 +05:30
ravinsp
1245da52b2 Fixed configuration logic issues. 2020-09-26 23:12:55 +05:30
Ravin Perera
4df0918f8e Boost reference removal and dev setup script. (#127)
* Removed unneeded boost library links.
* Replaced boost string split with util function.
* Added dev setup script.
* Updated readme.
2020-09-26 18:20:07 +05:30
ravinsp
ef1a650f91 Added TLS on/off flag for user port. 2020-09-24 11:05:42 +05:30
Chalith Desaman
3e2b7dbcfa Replaced boost filesystem operations with linux system calls (#125)
* Replaced boost filesystem operations with linux syscalls
* Removed boost filesystem dependency from CMAKE
2020-09-23 12:49:06 +05:30
priyadharsun
91122474a1 Replaced Boost log with Plog. (#124) 2020-09-23 06:06:42 +05:30
Chalith Desaman
0de20dba28 Parallel read request processing with thread pool. (#118) 2020-09-18 09:29:34 +05:30
ravinsp
3c231727e5 Cleaned up unused includes. 2020-09-11 06:42:04 +05:30
Savinda Senevirathne
2fc93d4291 Migrating json parsing from rapidjson to jsoncons. (#112)
* Migrating JSON parsing from RapidJSNO library to jsoncons library

* updating readme file and removing RapidJSON headers
2020-08-31 14:05:42 +05:30
Ravin Perera
817ccd6a88 Implemented contract read requests. (#98) 2020-06-19 21:52:03 +05:30
Ravin Perera
10374352c6 hpfs integration. (#94) 2020-06-04 13:51:53 +05:30
Ravidu Lashan
ef8ec0f51d Added challenge issue and verification for peer connections (#93)
Implemented flatbuffer peer challenge issue and verification messages.
Replaced session flags with challenge status enum.
2020-04-20 05:55:42 +05:30
Ravin Perera
920be03ade Websocket re-architecture with websocketd and websocat (#89)
- Replaced beast with websocketd and websocat. #79 #83 #84
- Implemented inbound/outbound peer connection merging.
- Added graceful shutdown of hpcore with sigint. #87
2020-04-05 08:12:55 +05:30
Ravin Perera
4fefb7ca71 Refactored stage sync logic. (#86)
* Cleaned up stage time sync logic and avoided extra missed rounds.
* Moved stage sync time logic to beginning of consensus stage.
* Removed check_majority_stage.
* Re-organised lcl sync flow.
2020-02-10 14:27:37 +01:00
Ravin Perera
8cf869cf9e Observer mode fix (#78)
* Fixed observer mode consensus issues.
* Added startup_mode to fix mode change check.
2020-01-17 11:04:45 +05:30
Ravin Perera
b6497d0f82 Cmake cleanup (#77) 2019-12-21 07:05:20 +05:30
Ravin Perera
7255dae84c Code cleanup and naming consistency improvement. (#73) 2019-12-19 19:22:17 +05:30
Ravin Perera
b475e2796e Integrated default app bill verification for user inputs. (#72)
Initial appbill implementation from @codetsunami integrated to hpcore. #47
2019-12-19 17:26:04 +05:30
Asanka Indrajith
b506b34b4f Consensus reliability enhancements (#62)
* Implemented going observer mode, fixed genesis lcl retrieval issue and stage closing time.

* Fixed clearing all user output instead of consensed outputs

* Modified waiting time to improve performance.

* Fixed deadlock of waiting for insufficient peers because of recent changes.

* Removed initial waiting time for peer connections to start consensus.
2019-12-06 05:08:51 -05:00
Ravin Perera
0dde10c306 Contract state monitoring and rollback infrastructure. (#61) 2019-11-25 19:30:15 +05:30
ravinsp
684a6bb18f Removed ptrace and improved process args handling. 2019-11-23 07:25:22 +05:30
ravinsp
198fe16359 User message protocol fixes. 2019-11-11 15:49:01 +05:30
ravinsp
403f2e1b21 Implemented passive operating mode. 2019-11-11 12:25:21 +05:30