v1.8 GA Release
- New global table support offloading MySQL database when multiple threads are executed simultaneously. All threads now share some common global calculations stored in a new 'global' table', like the total amount invested or total ROI, instead of recalculating every 10 seconds for each thread.
- Implemented Quantity Offset on UI. In rare circumstances, the database may become out-of-sync with the amount of crypto invested due to an Exchange or Connectivity error. This new field in the UI aims to represent the disparity between the system and the exchange quantities. (0 means no difference and all is good).
- More bugs were squashed
This release requires a database update if you are already running Cryptopump in production, or if you are deploying for the first time, simply use cryptopump.sql.
- Execute the following SQL statement to create the new global table:
CREATE TABLE `global` (
`ID` int NOT NULL AUTO_INCREMENT,
`Profit` float NOT NULL,
`ProfitPct` float NOT NULL,
`TransactTime` varchar(45) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci MAX_ROWS=1;
- Execute the following SQL statement to create global table stored procedures:
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `GetGlobal`()
BEGIN
SELECT
`global`.`Profit` AS `Profit`,
`global`.`ProfitPct` AS `ProfitPct`,
`global`.`TransactTime` AS `TransactTime`
FROM
`global`
WHERE
`global`.`ID` = 1
LIMIT 1;
END$$
DELIMITER ;
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `SaveGlobal`(in_Profit float, in_ProfitPct float, in_TransactTime bigint)
BEGIN
INSERT INTO global (Profit, ProfitPct, TransactTime)
VALUES (in_Profit, in_ProfitPct, in_TransactTime);
END$$
DELIMITER ;
DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `UpdateGlobal`(in_Profit float, in_ProfitPct float, in_TransactTime bigint)
BEGIN
SET SQL_SAFE_UPDATES = 0;
UPDATE global
SET
Profit = in_Profit,
ProfitPct = in_ProfitPct,
TransactTime = in_TransactTime
WHERE
ID = 1;
SET SQL_SAFE_UPDATES = 1;
END$$
DELIMITER ;