Commit Graph

158 Commits

Author SHA1 Message Date
sairajzero
67c31d79a9 Multiple asset support
2 types of property:
1. Cash - main/central currency used for trading
2. Asset - (FLO/tokens) Can be brought or sold in the exchange market .

- Allow multiple tokens to act as asset in addition to FLO.
- Changes required for the above in deposits, withdraws, placing orders
- some code optimization in market.js
- Updated SQL schema
2022-02-02 04:17:47 +05:30
sairajzero
512dc3bcbc Automatically reload user page upon incorrect server
- Upon receiving responseError INCORRECT_SERVER_ERROR, reload the client page.
(Triggered mainly when master is changed).
- Fixed some minor syntax bugs
2022-01-26 21:46:19 +05:30
sairajzero
827bdcd793 Use sinkID for deposits
- Send Sink ID to users on get-account request
- In user page, store sink ID and use it for deposit FLO/Rupee
2022-01-26 16:08:30 +05:30
sairajzero
bf302c3ebc bug fix: backup/sync
- Fixed minor bugs in backup/sync process
- Fixed: Master doesn't sync when it comes back online
- Decreased backup interval time to 1 min.
2022-01-26 02:20:34 +05:30
sairajzero
2c35c545e8 Bug fixes (client side)
Fixed Client page bugs:
- Fixed minor bugs in client side pages
- client page to use floGlobals.js
- moved KBucket.js to public (as its need by client page too).
Fixed Server Bugs:
- Added Access-Control-Allow-Origin to response headers
- Fixed: trustedIDs not loaded
- Fixed minor bugs (syntax errors)
2022-01-25 01:28:22 +05:30
sairajzero
8c1aad3d28 Bug fixes
- Added lastTx table to SQL schema
- setup file 'reset-password' now accepts any private key (node keys)
- Fixed minor SQL syntax
2022-01-23 04:51:15 +05:30
sairajzero
11b99c3e76 Process for exception cases
Case: No other node active when self node is init
- Start the exchange system.
Case: When node becomes master when prev node goes down
- Add self share to collectShare
- collect shares from other node to re-construct sink private key
- Fixed some minor bugs
2022-01-23 04:49:15 +05:30
sairajzero
52a1b3077d multi-node support
- Run multiple nodes in the same directory with diff config files
- pass the env variable 'I' (optional) to run a diff node instance with config file config<I>.json (also uses keys<I>.json)
- Updated setup files
- Fixed bugs in SQL schema
2022-01-23 03:24:27 +05:30
sairajzero
9760710c18 Check session expiry on each request 2022-01-20 05:35:48 +05:30
sairajzero
348cc989c9 Custom session for distributed servers
- Adding custom session login for the distributed server system.
- Added Sessions table to backup
2022-01-18 05:11:34 +05:30
sairajzero
abb82b0b34 Minor Fixes
- Adding tables to SQL schema
- Moved Kbucket usage from main.js to backup/head.js
- node Kbucket, ordered NodeList are calculated in backup/head.js
2022-01-14 04:52:41 +05:30
sairajzero
c32833e625 Adding application name in floGlobals 2022-01-14 04:15:21 +05:30
sairajzero
0ba0f10245 Renaming files 2022-01-14 04:11:25 +05:30
sairajzero
626c9ec214 Backup transfer/retrieval process 2022-01-14 04:08:44 +05:30
sairajzero
9fd1ae49c2 move tokenAPI to tokenAPI.js 2022-01-14 04:07:51 +05:30
sairajzero
db9ff02488 Update main.js
- fetch data (nodeList, TagList, trustedIDs) from blockchain
- Act as slave or master when needed
2021-12-30 06:53:04 +05:30
sairajzero
0b70f099b0 Update App Server
- Use App server port for Websocket Server.
- pause/resume serving and market when node acts as slave/master respectively.
2021-12-30 06:49:48 +05:30
sairajzero
c4732f5831 Restoration 2021-12-30 06:33:10 +05:30
sairajzero
4b9a5e656b Create KBucket.js 2021-12-30 06:30:06 +05:30
sairajzero
f1e9658007 Audit Transaction
Store the following values upon successful transaction
- Timestamp
- Quanity, unit value, total cost
- Old/New Balance of Rupee and FLO for both seller and buyer
2021-12-06 22:13:37 +05:30
sairajzero
946087481a Move transaction process to coupling.js 2021-12-06 20:55:35 +05:30
sairajzero
1b6488bdd1 Adding foreign key attributes to SQL schema
- All floID based columns (floID, seller, buyer) are now foreign keys with reference to User.floID
- tag in Tags table is now referred to tag in TagList
- Indicate the error when adding user tags via API
2021-12-05 00:40:49 +05:30
sairajzero
9feef5bfe9 Minor fixes
- Fixed bug: sell order placement not working.
- log the current_rate
- indicate when max price-up/down has reached.
2021-12-05 00:37:45 +05:30
sairajzero
d3b27348ee Bug fix
- Fixed various bugs in the last update
- Added 'use strict'; to multiple files to prevent undeclared variables
2021-12-03 20:09:40 +05:30
sairajzero
4a898e6bff Initial price
- load init price from DB if possible, else fetch from API
- store the price history in DB every 1 hr
- get the 24hr-past-rate from DB
- update the last tx timestamp upon successful transaction
- added priceHistory table to SQL schema and backup
2021-12-03 01:45:59 +05:30
sairajzero
278fc8bcbd Price updation
- Update current_price when no seller or buyer available.
- Inc price only when sell-orders from rated sellers are available.
- User must buy a minimum FLO before placing a sell order unless they are a 'Miner'.
2021-12-02 05:26:01 +05:30
sairajzero
a7c96e9ce2 Priority case: FLO brought from outside
FLO brought from outside the source will be processed after those brought from source-market.
2021-11-25 05:10:39 +05:30
sairajzero
5ac3316008 Allow trusted IDs to add/rm user tags via API 2021-11-18 15:58:40 +05:30
sairajzero
b5cde90e89 Bug fix 2021-11-05 21:43:26 +05:30
sairajzero
d435157bd2 Different group/tag priority for sell and buy 2021-11-02 03:39:07 +05:30
sairajzero
c14f10eade Use Group priority to get best buy/sell order 2021-10-30 21:35:18 +05:30
sairajzero
0e34dcb5e3 Update group.js
- Adding functions to get best buy-order.
- Renamed some fns of get-sell-order for easier identification.
2021-10-30 20:13:48 +05:30
sairajzero
097b64b82f Update group.js
- Adding getBestPairs
- best pair of orders (buy, sell) can be fetched using the new functions
2021-10-30 03:39:10 +05:30
sairajzero
bb0d49614b Create group.js 2021-10-30 00:24:38 +05:30
sairajzero
f7584629b9 Bug fixes
- Fixed: error caused during inputRupee
- Passing timezone UTC in DB connection for uniformity between main server and backups.
- Changed single-line comments to multi-line comments in schema.sql
- Addng truncateAll.sql: can be used to clear the database (data only).
2021-10-21 21:08:12 +05:30
sairajzero
57eb249ed6 Bug fix 2021-10-15 22:54:56 +05:30
sairajzero
a7bab7ed6e Backup DB feature 2021-10-15 22:54:15 +05:30
sairajzero
96b9d3b6e9 Setup files
- Adding setup files to configure, set password.
- Private key will now be stored in encrypted shares. Password will be required for running the server.
- Automated creation of MySQL schema.
- Making floGlobals common for both server and client.
- Fixed a minor bug in database.js
2021-09-29 04:14:02 +05:30
sairajzero
8a014405f4 display current rate
Display FLO-INR rate in client page
2021-09-25 22:16:06 +05:30
sairajzero
9ec17b4d55 Debugging 2021-09-25 00:29:48 +05:30
sairajzero
7362d0d4b7 Fixed various bugs in server scripts 2021-09-24 03:35:04 +05:30
sairajzero
8c31de3ccc Config update
- private key and flo addr for the admin
- Adding token URL
2021-09-24 03:34:01 +05:30
sairajzero
bfc6a1091a Changing XMLHttpRequest to fetch 2021-09-24 03:31:33 +05:30
sairajzero
60f1a2742d Update floCrypto.js 2021-09-24 03:31:03 +05:30
sairajzero
5164d51146 Bug fix: some variables not declared 2021-09-24 03:30:51 +05:30
sairajzero
c238e57132 Bug fix
- Fixed signature text construct bug (time -> timestamp)
2021-09-20 20:50:48 +05:30
sairajzero
c8e27f7315 updating floBlockchainAPI to latest (v2.1.1) 2021-09-20 20:48:01 +05:30
sairajzero
20fd7aaeb1 Deposit and withdraw request processing
- Processing of Deposit/Withdraw request for FLO/Rupee.
- renamed database's TxQuery to transaction
2021-09-16 03:17:33 +05:30
sairajzero
84b914bc9b Proxy key signatures for requests
- Uses the proxy public key sent by the users upon login to verify signatures on requests.
* This allows the users to not store their actual private key in the browser. Only the proxy private-key will be needed to be stored in the browser in addition to respective session data.
- Stores the request data and respective signatures upon successful processing.
2021-09-16 03:14:28 +05:30
sairajzero
9443ac5d51 Adding Order cancellation request 2021-09-02 21:24:11 +05:30
sairajzero
a7a2c22622 Update database.js
- Bug Fixed: Added commit to end a transaction
2021-09-02 04:58:33 +05:30
sairajzero
3eb9499713 Update market.js
- Added get rates function
- Added interval for match buy n sell function
- Added checks for buy and sell order placement
- Fixed minor bugs
2021-09-02 04:57:55 +05:30
sairajzero
0cc525b28e Update request.js
- Check if floID is registered before logging in. Also use the pubKey from DB. Therefore pubKey is not required to be sent in request during login.
- Respond correctly when floID is already registered when trying to re-register.
2021-09-01 21:33:27 +05:30
sairajzero
a137237010 Create start.js and main.js 2021-08-30 22:04:19 +05:30
sairajzero
9c344bc8e5 Create app module 2021-08-30 22:03:55 +05:30
sairajzero
0161108e87 Create database.js 2021-08-30 22:02:11 +05:30
sairajzero
80b9d36287 adding args and set_globals 2021-08-30 22:01:42 +05:30
sairajzero
c05e260b51 Adding std_op 2021-08-30 22:00:31 +05:30