Commit Graph

61 Commits

Author SHA1 Message Date
Ravin Perera
7a4e91b0dd Integrated hpfs in-proc sessions. (#134) 2020-10-23 10:04:45 +05:30
Ravin Perera
cb4d0c4f59 Ledger maintenance refactor. (#130)
* Added ledger namespace.
* Thread-safe lcl access and update.
* Refactored history sync and serving into a thread.
* Restructured ledger cache item.
2020-10-08 22:25:47 +05:30
ravinsp
1245da52b2 Fixed configuration logic issues. 2020-09-26 23:12:55 +05:30
Ravin Perera
4d920a9219 Fixed child process signal behaviours. (#128)
* Restored signal handlers upon fork().
* Improved error handling of hpfs process kill scenario.
* Set pgid for forked processes for graceful sending of SIGINT.
2020-09-26 21:39:26 +05:30
priyadharsun
91122474a1 Replaced Boost log with Plog. (#124) 2020-09-23 06:06:42 +05:30
Savinda Senevirathne
37629471c5 Refactored consensus to run on a separate thread. (#123) 2020-09-18 15:53:15 +05:30
Ravin Perera
93f57efbe3 Added release build support. (#119)
* Cleaned up and updated cmake to have release build support.
* Added segfault handler.
* Added latest hpfs release build.
* Fixed coding issues revealed by release build.
2020-09-16 17:51:54 +05:30
Ravin Perera
d2f45daf4c Implemented multi-threaded inbound network message processing. (#115)
Used per-session thread to offload messages from network and a single thread for processing collected messages.
2020-09-10 15:40:08 +05:30
Ravin Perera
a54a5f43da Consensus proposal expiration time calculation fix. (#106)
* Logging improvements.
* Fixed time calculation issue in expiring proposals.
2020-08-07 13:03:02 +05:30
Ravin Perera
817ccd6a88 Implemented contract read requests. (#98) 2020-06-19 21:52:03 +05:30
Ravin Perera
04e230c82e Improvements in state request/response handling. (#97) 2020-06-18 15:07:33 +05:30
Ravin Perera
b89dbe0a2c Rearchitected state sync with hpfs. (#96) 2020-06-10 20:51:45 +05:30
ravinsp
9ee09bebb7 Renamed proc namespace. 2020-06-05 22:08:38 +05:30
Ravin Perera
10374352c6 hpfs integration. (#94) 2020-06-04 13:51:53 +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
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
Ravidu Lashan
1972085b33 Changed boost error handling (#74) 2019-12-19 19:50:18 +05:30
Ravin Perera
7255dae84c Code cleanup and naming consistency improvement. (#73) 2019-12-19 19:22:17 +05:30
ravinsp
d6751c3e52 Added better error handling for socket errors. 2019-12-16 14:49:33 +05:30
ravinsp
fc108523ca Added stack trace logging for exceptions. 2019-12-15 23:28:49 +05:30
Asanka Indrajith
7a7aa6d5b3 Consensus enhancements and eliminating deadlocks after state inclusion. (#69) 2019-12-13 09:38:50 -05:00
Ravidu Lashan
1238e96423 State synchronization logic (#67)
* Added flat buffer state message request

* Added state vote

* Added state to ledger history and did necessary changes

* Completed receiveing state request

* State read/write helpers.

* Added new fbs schema

* Added more state_store helper methods.

* Started processing response

* Fixed compile errors

* Added get file length.

* Handled state content response

* Statefs code cleanup and fixes.

* Completed response handling

* Completed changes in handling state response

* State sync integration fixes.

* Fuse mount waiting logic.

* Fixed state syncing issues

* state sync fixes

* fixes

* State sync fixes.

* Fixed fs entries retrieval issues.

* changed desync logic

* Added directory helper functions.

* Handled return statemetns from statefs

* Fixed state folder deletion.

* handled errors from statefs

* Working for small files

* Got state sync working.

* Removed cout.

* Fixed catering for stae issue

* Fixed block hash map flatbuf issue.

* Added expected hash

* Added helpers for expected hash comparison.

* Improved state req/resp awaiting logic.

* Fixes.

* Fixes.

* Block request ordering fix.

* Removed couts

* Closed non-closed file descriptors

* Minor fixes.

* Cluster create script changes.

* Fixed reset time off issue.
2019-12-13 10:20:41 +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
Asanka Indrajith
bebdace519 Achieving reliable consensus. (#60)
* Remove considering stage when voting and considering lcl.

* Stage sync , lcl sync  and candidate set changes.

* Implemented ledger close time resolution and fixed ledger retrieval issues.

* Code cleanup and added more comments on reliability changes.

* Added further comments and  clenup.
2019-11-25 07:40:22 -05:00
Asanka Indrajith
95683035b9 LCL history request and response. (#59)
Detect and request missing lcl history from another random node.
Sending lcl history response to a asked node.
Getting lcl history response and applying it.
Delete lcl that exceeds max ledger sequence.
2019-11-19 07:50:33 -05:00
ravinsp
403f2e1b21 Implemented passive operating mode. 2019-11-11 12:25:21 +05:30
ravinsp
32ef41bfdf Integrated ptrace tracking for state files. 2019-11-09 07:38:26 +05:30
Ravin
8d31075b7b Code improvements. 2019-11-07 17:21:21 +05:30
Ravin Perera
cb364cc420 Compilation time improvements. (#52)
* Precompiled header for all common library headers (with cmake 3.16rc3).
* Divided cmake build into shared libraries.
* Added gold linker support.
* Separated websockets lambda expressions to an independent file.
2019-11-02 14:46:21 +05:30
Asanka Indrajith
b598025346 Loading and saving ledger and lcl consensus. (#51)
* Ledger saving, loading, consensus with ledger sequence number.
* std terminate exception handler.
2019-11-01 15:21:25 +05:30
Ravin Perera
a51ec4a030 Restructured user message handling. 2019-10-31 14:23:01 +05:30
Asanka Indrajith
d6acee4e09 Basic consensus implementation (#45)
Consensus for user connections, user inputs, contract outputs and time.
2019-10-26 11:46:32 -04:00
Ravin Perera
b4237f1285 Added npl channel to contract process. 2019-10-21 19:25:45 +05:30
Asanka Indrajith
7ed1466ad9 p2p connection, message handling, validation and serialization (#38)
Implement basic peer to peer connection establishment and maintenance.
Message serialization and parsing using FlatBuffer(Including defining message schema).
Validating incoming proposal messages.
2019-10-21 08:32:25 -04:00
Ravin Perera
f77dae2f28 Added file log. 2019-10-21 14:01:16 +05:30
Ravin Perera
2d5d8960c0 Boost log integration. (#37) 2019-10-20 21:45:59 +05:30
Ravin Perera
fb236d44be Implemented hp-sc comm channel. (#32) 2019-10-17 16:06:35 +05:30
Ravin Perera
7c068ecb85 Enabled -fno-exceptions 2019-10-17 11:16:37 +05:30
Ravin Perera
8a22748c8d Implemented sending contract output back to the user. 2019-10-16 19:23:19 +05:30
Ravin Perera
8b003aeaa2 Switched to binary pubkeys from base64 for internal user data (#29)
* String copy optmisations.
* User pubkey binary.
2019-10-16 06:45:49 +05:30
Ravin Perera
db99d94902 vmsplice and other optmizations for user pipes I/O (#28) 2019-10-15 23:26:22 +05:30
Ravin Perera
ebf13209e1 Code consistency improvements (#21)
Fully-qualified namespace accessors
Updated function out param order
reinterpret_cast
2019-10-11 20:08:53 +05:30
Ravin Perera
f64cdc6ad0 Implemented user connection challenge handshake (#20)
Implemented user connection challenge handshake.
Optimized user challenge message processing.
2019-10-11 17:29:45 +05:30
Ravidu Lashan
11489de7a1 Fixed issue in node client closing the connection (#16)
* Fixed timeout issue of client

* Fixed issue in node client

* Removed unused files
2019-10-10 13:08:46 +05:30
Ravin Perera
d8581f7ce9 General code optmisations and cleanup. (#15)
Updated `version_compare` based on this issue: #13 
Got rid of `replace_string_contents` helper func.
Replaced #define macros with static consts.
Moved comments from headers to source files.
2019-10-10 12:57:46 +05:30
Ravin Perera
374424f98f Code comments and consistency improvements. (#12) 2019-10-09 22:26:08 +05:30
Ravidu Lashan
ab06c272d3 Websocket initial implementation (#9)
* Added listener and session classes.

* Added client session class.

* Fixed minor code issues.

* Initial server implementation p2p connection

* Added a seperate thread to run the two servers

* Implemented basic web socket architecture

* Implemented basic peer to peer socket network

* Added a sample message

* Initial socket architecture completed

* Improved code readability

* Improved comments
2019-10-09 14:31:20 +05:30
Ravin Perera
22a140c543 Added npl fields to the contract input. (#7)
* Added npl fields to the contract input.
* Made parameter passing optimisations.
2019-10-07 10:59:34 +05:30