Commit Graph

13 Commits

Author SHA1 Message Date
Ravin Perera
5cef95c9f6 Enabled and fixed compiler warnings. (#359) 2022-01-28 16:03:34 +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
2283d2bf89 Performed ledger input output writing inside a transaction. (#290) 2021-04-13 12:34:38 +05:30
Ravin Perera
7a837ede7c Supported not storing raw data shards. (#289) 2021-04-13 11:11:37 +05:30
Ravin Perera
370e03fe84 Switched user input nonce from string to uint64. (#286) 2021-04-11 14:51:57 +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
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
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
b45cdb999d Include hp version number on all required places. (#265)
* Adding HP version header to binary files and adding hp table to ledger.sqlite.

* Updating hp_version in user challenge message.

* Minor improvement.
2021-03-10 20:08:04 +05:30
Chalith Desaman
312713c296 Fixed disk io error - set fds to -1 when closing in hpws parent process (#254) 2021-02-23 12:23:55 +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
adheeb-adb
62c91ad90c sqlite wrapper for ledger database. (#228)
Added wrapper methods to create ledger table and insert records for sqlite database.
2021-01-29 18:06:31 +05:30