Commit Graph

240 Commits

Author SHA1 Message Date
Chalith Desaman
a87e8a0c7e Subject UNL changeset to consensus. (#183) 2020-12-07 13:06:58 +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
Ravin Perera
b2fd8ae4b5 Contract and client library improvements. (#184)
* Added tty check to contract libs.
* Javascript browser-native client.
* Removed hex encoding in user json outputs.
* Updated file contract for new contract library.
2020-12-05 09:08:24 +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
Savinda Senevirathne
f3055822ed Introduce pubkey/unl tracking to Peer sessions. (#181)
* Adding pubkey in binary to comm sessions and is_unl flag to peer sessions.
* Removing display_name overloads and populating pubkey in user session.
* Changing peer session lookup key from uniqueid to pubkey (binary).
2020-12-02 13:05:06 +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
12335d09c4 Skip ledger truncation when full history is enabled (#177)
* Skip ledger truncation when full history is enabled.
* Skip clearing ledger if full history is enabled.
2020-11-30 22:21:56 +05:30
Ravin Perera
dfe42f827b Refactored node contract lib control flow. (#176) 2020-11-30 17:39:07 +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
Savinda Senevirathne
e90e9bb5dd Limiting NPL message broadcasting and forwarding to trusted nodes. (#173)
* Limiting NPL message broadcasting and forwarding to trusted nodes.
* Error fix in read_iosocket.
2020-11-30 11:11:40 +05:30
Ravin Perera
efbd775fa1 Refactored C contract lib interface. (#175) 2020-11-30 10:03:06 +05:30
Ravin Perera
332e5a4750 User input json/bson format improvements. (#174)
* Removed hex encoding in json input container.
* Refactored client lib exports.
2020-11-28 21:24:35 +05:30
Ravin Perera
79b55258de Poll-based contract output reading. (#172) 2020-11-27 15:57:36 +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
4de1bb2393 Already submitted input detection. (#170)
* Added same nonce/sig for input comparison.
* Added status response withholding for already submitted inputs.
2020-11-26 23:27:40 +05:30
Ravin Perera
d476f787a7 Introduced UNL update control message. (#169) 2020-11-26 22:26:12 +05:30
Savinda Senevirathne
993eb11971 hpfs state hash checkpoint binary update. (#168) 2020-11-26 20:37:57 +05:30
Ravin Perera
bb223b1e3a JSON message parsing for contract control messages. (#166) 2020-11-26 09:31:39 +05:30
Ravin Perera
c41b37fd52 Request missing history when behind the ledger cap. (#165) 2020-11-25 16:11:46 +05:30
Ravin Perera
29425095e0 User nonce validation and expiration. (#164) 2020-11-25 07:10:07 +05:30
Ravin Perera
9339e09026 Updated hpfs binary with log file block alignment improvements. (#163) 2020-11-24 21:48:13 +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
Ravin Perera
86e2e1211c Introduced consensus round nonce and reintroduced stage 0. (#160)
* Reintroduced stage 0.
* Introduced round nonce for reduced lcl predictability.
2020-11-23 23:00:13 +05:30
Ravin Perera
9c1f62dbde Migrated user inputs from domain sockets to memfd. (#159) 2020-11-23 21:52:05 +05:30
Savinda Senevirathne
bf710c6bde Idle connection timeout config for both peer and user connections. (#158) 2020-11-20 19:48:45 +05:30
Savinda Senevirathne
fe24ef2388 Introduce peer requirement announcement. (#156) 2020-11-20 16:01:46 +05:30
Ravin Perera
beedfb2709 C contract library and NodeJS library improvements. (#157) 2020-11-20 10:48:57 +05:30
priyadharsun
eb0012bc47 Change epoch milliseconds return type to uint64_t. (#155) 2020-11-19 12:54:33 +05:30
Savinda Senevirathne
9160b2ee15 Improve corebill and graylisting. (#154) 2020-11-19 08:40:15 +05:30
Chalith Desaman
f475dcb1fb Dynamic peer list implementation. (#152) 2020-11-18 12:58:58 +05:30
Ravin Perera
1608e9fc49 Contract execution refactor. (#153) 2020-11-18 07:16:17 +05:30
Ravin Perera
0098c3ddab Revamped NodeJS library examples. (#151) 2020-11-16 17:08:47 +05:30
ravinsp
645f0023a0 Fixed consensus proposal time vote filter. 2020-11-14 17:20:09 +05:30
Savinda Senevirathne
8d5cb670ce Expire inactive sessions. (#150) 2020-11-13 15:28:40 +05:30
Savinda Senevirathne
2e2a11b908 Improved history ledger integrity checks. (#149)
* Code cleanup.

* Resolving review comments.

* Ledger history sync validation improvements and resolving review comments.

* Ledger terminology related changes.

* Ledger related terminology change updates.

* Resolving review comments.
2020-11-13 13:43:01 +05:30
Ravin Perera
e6b74f2c02 Added hpws binary with max msg size fix. (#148) 2020-11-11 10:55:02 +05:30
priyadharsun
8f00c5e7d4 Introduced contract control channel with 'terminate' message (#147) 2020-11-10 14:09:24 +05:30
Chalith Desaman
49e30961bd Node js contract library AsyncCallbackEmitter implementation (#146) 2020-11-09 14:21:43 +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
ba0cae019d Refactored consensus into 3 rounds. (#144)
* Refactored consensus into 3 stages and removed stage 0.
* Consensus threshold calculation improvements.
* Refactored candidate user input processing.
* Renamed proposal sent timestamp field.
* Introduced comm_session display name.
2020-11-07 15:01:01 +05:30
Savinda Senevirathne
51173e37f2 Support message separation for multiple inputs from same user. (#142) 2020-11-06 10:55:40 +05:30
Ravin Perera
202a6a2715 Ledger and state sync improvements. (#143)
* Increased stage time window.
* Introduced central state tracker.
* Used shared mutex for target state update.
* Refactored lcl and state sync checks in consensus.
* lcl/state sync loop wait time improvements.
2020-11-04 16:01:10 +05:30
Ravin Perera
254e92fc7c Updated hpws binary with fd and zombie cleanup fixes. (#141) 2020-11-04 06:29:35 +05:30
Savinda Senevirathne
7a4515865d Replaced contract I/O pipes with domain sockets. (#140) 2020-11-02 16:50:21 +05:30
Ravin Perera
37cc27c5ce Improved debug logging for state sync. (#139)
* Added random peer send pubkey extraction.
* Improved debug logs in state serve and state sync.
2020-10-27 16:03:34 +05:30
ravinsp
3481961aa8 Fixed incorrect hpfs process kill on read-request. 2020-10-27 15:52:26 +05:30
Ravin Perera
116a54e980 Fixed ledger read fd leak. Reordered subsystem init. (#138) 2020-10-26 08:11:55 +05:30