Commit Graph

75 Commits

Author SHA1 Message Date
Ravin Perera
c720a777ce Control message to update peers. (#351) 2021-11-02 14:13:21 +05:30
Ravin Perera
647759501f Refactored vote status reporting. (#349)
* Refactored global sync status tracking.
* Updated streamer for vote status.
* Docker image now uses 'latest' tag.
* Updated hp version.
2021-09-22 09:28:01 +05:30
Ravin Perera
6dc0776b56 Large cluster optimizations. (#348)
* Added sync log to streamer.
* Fixed ledger closing attempt while syncing.
* Added diagnostic contract.
* Reset to stage 0 on unreliable votes.
* Reduced peer msg age threshold.
* Added health tracking.
* Weakly-connected detection improvement.
* Increased version 0.5.1.
* Improved client lib server version check.
* Added health logging support to text client.
* Added weakly connected status in status response.
* Increased max peers limits when serializing.
* Local docker cluster manual ip.
* Updated vultr script vm region order.
* Sync status reporting improvement.
* Added milliseconds to logging.
2021-09-17 11:53:49 +05:30
Savinda Senevirathne
4a8726f12a Observer ledger closing issue fix. (#337) 2021-07-29 15:29:59 +05:30
Ravin Perera
4790c7951c Refactored docker images. (#331) 2021-07-14 16:27:17 +05:30
Ravin Perera
7ba84e8e7a Ledger close refactor. (#330) 2021-07-14 10:09:13 +05:30
Savinda Senevirathne
38ada6f93e Fork condition detection fix. (#328) 2021-06-28 17:03:58 +05:30
Ravin Perera
6a1fb3c5ad Added time based kill switch. (#325) 2021-06-22 11:08:15 +05:30
Ravin Perera
c1e1cd12a8 Input responses while syncing. (#323)
* Send pending input responses after syncing.
* Send input statuses on expired inputs.
* Sqlite no journal.
2021-06-12 15:14:21 +05:30
Ravin Perera
cc11ebd7b3 Event subscription infrastructure and ledger events. (#319)
- Introduced event subscription infrastructure for users.
- Added ability to subscribe to ledger events.
- Updated client lib for event subscription support.
2021-06-07 10:24:58 +05:30
Ravin Perera
33bd63ac64 Status tracking infrastructure. (#317)
* Added node's current status information tracker.
* Used the status tracker for responding to status messages.
* Used change-event notifications to broadcast UNL change event.
2021-06-04 15:08:10 +05:30
Ravin Perera
7cd56a1475 Consensus proposal pruning improvement. (#314)
Consensus proposal pruning improvement.
hpfs binary fd leak fix.
2021-05-29 12:53:49 +05:30
Ravin Perera
b172152cba Sync and consensus improvements. (#312)
* Refactored hpfs sync to support parallel target sync.
* Removed role change in consensus.
2021-05-25 21:43:08 +05:30
Chalith Desaman
2bb6be0ce5 Fixed full history hpfs log syncing issues (#311) 2021-05-19 19:06:47 +05:30
Ravin Perera
45492f7c7f Added stage slice config to control stage time allocation. (#310) 2021-05-19 16:59:01 +05:30
Ravin Perera
ef2bb22b67 hpfs sync target refactoring. (#302) 2021-05-04 16:33:19 +05:30
Ravin Perera
fded7b7917 Introduced priority queues for proposal processing. (#301)
* Introduced high priority queue for comm session message processing.
* Added high priority send for proposals.
2021-05-03 21:44:36 +05:30
Ravin Perera
4f82afe5b1 Pre-emptive hpfs sync responses. (#299)
Hpfs sync requester reports its own filesystem state to the responder. Responder uses that information to pre-emptively send additional filesystem data the requester may need.
2021-05-01 08:27:42 +05:30
Chalith Desaman
05e8077e5b Persisting hpfs log responses to the hpfs (#291)
Fixing the in memory raw shard hash update.
Passing the seq_no of index update to verify that the index records are consistent.
Restart rw session after completing last primary shard sync.
Fixed issue in fs read write by multiple threads.
Hpfs log sync modifications.
2021-04-16 20:06:20 +05:30
Ravin Perera
7a837ede7c Supported not storing raw data shards. (#289) 2021-04-13 11:11:37 +05:30
Ravin Perera
77279dc6ac Updated proposal time checks. (#288) 2021-04-13 11:06:58 +05:30
Ravin Perera
3941f5f6c6 Revamped ledger input/output storage and query execution. (#285)
- Ledger sqlite db improvements.
- Removed flatbuffers from ledger blob data storage.
- Added consensus private mode blob data filtration.
2021-04-11 11:45:14 +05:30
Ravin Perera
0a3183a3d6 Included output hash and ledger info in output return message. (#284) 2021-04-08 10:42:33 +05:30
Ravin Perera
d4646179c2 Returned input hash and ledger info for input submissions. (#283)
- Introduced input hash which can later be used to query the ledger.
- Returned input hash and ledger info at input submission.
- Updated js client lib to support input hash.
- Updated consensus proposal candidate expiration rules.
2021-04-07 21:22:29 +05:30
Ravin Perera
bba5266f5d Fixed consensus issues with large no. of users and inputs. (#280)
* Fixed issue in consensus contract output  sorting.

* Improved load test script.

* Removed flatbuffer verifier restrictions to support large no. of users and inputs.

* Improved consensus proposal cleanup.

* Restored the earlier proposal cleanup logic.

* Minor fixes.

* const fix.
2021-04-01 17:12:39 +05:30
Savinda Senevirathne
af48f3b01f Hpfs log file sync and fork detection. (#279)
Basic infrastructure for log file sync.
A fork is detected by comparing the hpfs log index file against the ledger.
Min and max ledger sequence hashes are sent to a full history node to request log history.
2021-04-01 13:08:29 +05:30
Ravin Perera
948113398c Ledger query infrastructure. (#275)
* Added json ledger query param parser.

* Added initial query response creation.

* Updated client lib.

* Implemented get ledger by seq no.

* Added ledger query execution wrappers.

* Included log record info.

* Fixed empty output hash issue.

* Added bson support.

* Added db file existance check.

* Added requesy/reply tracking for queries in client lib.

* Improved multi connection usage in client lib.

* Added genesis ledger query support.

* Updated naming convention of query result fields.

* Comments.

* Used sqlite bind() for query param.

* Used binary hashes in ledger sqlite db.

* Missing const.
2021-03-29 11:20:15 +05:30
Savinda Senevirathne
b6a69e5824 Refresh consensus context when a roundtime change happens. (#267) 2021-03-12 16:39:26 +05:30
Chalith Desaman
00a3da9a2b Request historical shards when max shard range is increased (#266)
* Remove and request historical shards at the startup

* Shard history requesting only at the first consensus round

* Removed test log

* Skip max shard seq no file in removing loop

* Updated the code comments

* Persisting condition changed

* Fixed code comment typos

* Fixed code comment typos

* Resolved PR comments

* Halt consensus until completing only the latest shard sync

* Added meaningful comments

* Resolved PR comments and updated hpfs binary

* Logic enhancement and cleanup

* Cleanup the code comment
2021-03-12 12:13:46 +05:30
Ravin Perera
137c199b07 P2P Flatbuffers schema refactor. (#255) 2021-02-23 13:15:03 +05:30
Ravin Perera
6b8d60a404 Separated lcl string usage to sequence no and hash. (#251) 2021-02-18 18:28:38 +05:30
Chalith Desaman
7059f68f11 Removed legacy lcl code and dependencies (#249) 2021-02-18 17:07:50 +05:30
Savinda Senevirathne
16c5b3fae2 Introducing ledger shards and new ledger syncing logic. (#247)
- The ledgers are stored in a sqlite database in ledger file system.
- Ledgers are organized in shards inside primary folder.
- Raw inputs are saved as shards inside blob folder. No input files are created if neither inputs nor outputs are available.
- Both last primary shard hash and last blob shard hashes are subjected to consensus and necessary sync operations are performed if out of sync.
- Hpfs sync support setting single sync targets from both ends of the list. (Targets set from front are prioritized).
- Contract and ledger syncs and serving are performed independently.
2021-02-18 11:24:05 +05:30
Ravin Perera
e394497698 Used uint32 for roundtime and timeout fields. (#248) 2021-02-17 12:21:51 +05:30
Ravin Perera
9f4499653a Dynamic roundtime detection. (#244)
When consensus is unreliable detect roundtime based on roundtime reported by peers.
2021-02-16 13:34:29 +05:30
Ravin Perera
033b5fa7bc User inputs round limit. (#240) 2021-02-14 20:19:53 +05:30
Ravin Perera
94eedcaf5b Added roundtime offset based on contract id. (#238) 2021-02-05 17:48:21 +05:30
Savinda Senevirathne
a4399544b9 Separate contract and ledger file system mounts. (#235)
- Creating two separate hpfs folders for contract and ledger file systems (contract_fs and ledger_fs).
- Added separate mounts for contract and ledger file systems.
- Added separate instances for contract serving and ledger serving.
- Added separate instances for contract syncing and ledger syncing.
- Modified cluster creating script to accompany folder name changes in contract folder.
2021-02-05 11:48:52 +05:30
Savinda Senevirathne
d08d2630f6 Refactoring hpfs, hpfs sync and hpfs serve code. (#231)
* Refactoring hpfs code to a class so it can support multiple mounts.
* Refactoring hpfs serve into a class to support mulitiple mount serving.
* Refactoring hpfs sync into class to support multiple instances.
* Code improvements in hpfs_sync.
* Taking a sync target list for hpfs syncing target set.
2021-02-02 13:17:21 +05:30
Ravin Perera
610b67cec0 Contract execute config flag. (#226)
* Added contract execute flag. Made bin_path optional.
* Updated docker cluster default config.
* Renamed contract config to hp config.
2021-01-22 14:33:07 +05:30
Savinda Senevirathne
146bb1d46c Apply patch file changes only after consensus verification. (#222) 2021-01-19 11:56:33 +05:30
Ravin Perera
11cb57e9ee Keep hp cfg and patch cfg consistent. (#216)
* Copy from hp cfg to patch cfg upon startup.
* Persist to hp cfg whenever patch cfg is updated.
2021-01-10 17:48:12 +05:30
Ravin Perera
e8e7921ac1 Single-process hpfs integration. (#212) 2021-01-06 21:53:39 +05:30
Savinda Senevirathne
bed8205ca8 Config patch change detection. (#211)
* Applying patch file changes to hpcore runtime after patch file change detection.
* Removing unl sync functionality.
* Removing subjecting unl changeset to consensus.
2021-01-06 20:02:14 +05:30
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
Ravin Perera
f97d7de530 Moved h32 hash type from hpfs to util. (#204) 2020-12-23 21:58:49 +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
1a954ad96e Implemented output signature checks. (#200) 2020-12-22 16:55:44 +05:30
Ravin Perera
bfbf41fb32 Fixed issue in ledger sync top ledger removal. (#193)
* History response ledger removal fix.
* Consensus code refactor.
2020-12-14 12:35:07 +05:30