Commit Graph

6 Commits

Author SHA1 Message Date
sairajzero
9686f29f8e Reshare ids when node list updated
- Reconstruct shares for all active ids when node list is updated via blockchain
2023-01-01 21:43:08 +05:30
sairajzero
3c0bb7bdd4 Update keys.js 2022-12-28 03:41:05 +05:30
sairajzero
b0ec2d6a85 Keys: invoke shuffle at interval 2022-11-17 03:38:46 +05:30
sairajzero
e4603078d2 Keys: Fixes and Improvements
- Added file lock using proper-lockfile module to prevent data corruption when multiple shares are queued to write at the same time
- Fixed: sinkShares Table num value throwing error when random number is negative. (Updated 'num' column to Unsigned)
- Changed INT_MIN, INT_MAX to UNSIGNED_INT_MIN, UNSIGNED_INT_MAX
- Added: support for multi-instance in keys module
- Fixed: index_dir and prime_file throwing error on startup
- Added: on init, create index directory if not exist
- Fixed: sink_chest. pick and active_pick returning undefined sometimes
- Fixed: various syntax bugs
2022-11-16 22:08:00 +05:30
sairajzero
c5b43291ab API(admin): generate, reshare and discard sinks
- generateSink: generates a sinkID for given group
- reshareSink: regenerate the shares for given id and distribute
- discardSink: discards the given sink id

Note: All these APIs are admin-only
2022-11-15 15:51:10 +05:30
sairajzero
6c0237b0b5 Upgrade Keys module
Keys module
- Private keys of node and sinks (shares) are managed by keys module
- sink_chest is moved here
- Seperate sinkIDs for each service

Sink Private key security improvements
- Shares are stored as index in SQL
- Indexes are mapped with sinkIDs in file system
- File is shuffled on interval
- Every file data is stored in encrypted format

Other changes
- changes required for the above
- RefundTransact is now dedicated to Convert service only (as every service has diff sinkID)
- moved periodicProcess to background.js
2022-11-15 03:20:33 +05:30