XDAG节点版本更新(0.6.5升级到0.7.0)
1、拉取最新的xdagj源码
mkdir /root/xdagj-0.7.0 && cd /root/xdagj-0.7.0
git clone https://github.com/XDagger/xdagj.git
cd xdagj
mvn clean package -Dmaven.test.skip=true
2、创建新的数据目录并解压程序包
mkdir /data/docker-compose/xdagj-7.0/bin -p
cd /data/docker-compose/xdagj-7.0/bin
unzip /root/xdagj-0.7.0/xdagj/dist/xdagj-linux.zip
3、下载最新快照并解压到相对应路径下
快照下载地址
cd /data/docker-compose/xdagj-7.0/bin
wget https://storage.xdagpool.com/snapshot-2993553-197d6290000.tar.gz
mkdir mainnet/rocksdb/xdagdb/
tar -xf snapshot-2993553-197d6290000.tar.gz -C mainnet/rocksdb/xdagdb/
4、恢复原节点wallet地址及备份数据表重新创建表
cp /data/docker-compose/xdagj/bin/mainnet/wallet/ mainnet/ -rf
同样要注意数据库配置文件druid.properties是否有变更
driverClassName=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://localhost:3306/xdagj?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&&serverTimezone=UTC
username=xdagj
password=xdagj
minIdle=5
initialSize=5
maxActive=10
maxWait=100
testOnBorrow=true
testOnReturn=true
testWhileIdle=true
validationQuery=select 1
validationQueryTimeout=1
timeBetweenEvictionRunsMillis=480000
ConnectionErrorRetryAttempts=3
NotFullTimeoutRetryCount=3
#removeAbandonedTimeoutMillis=480000
#removeAbandoned=true
numTestsPerEvictionRun=3
minEvictableIdleTimeMillis=480000
maxEvictableIdleTimeMillis=600000
SELECT * FROM t_transaction_history AS t_transaction_history_0.6.5;
drop t_transaction_history;
CREATE TABLE `t_transaction_history` (
`fid` int(11) NOT NULL AUTO_INCREMENT,
`faddress` varchar(64) NOT NULL,
`faddresstype` tinyint(4) NOT NULL,
`fhash` varchar(64) NOT NULL,
`famount` decimal(20,9) unsigned zerofill NOT NULL,
`ftype` tinyint(4) NOT NULL,
`fremark` varchar(64) DEFAULT NULL,
`ftime` datetime(3) NOT NULL,
PRIMARY KEY (`fid`),
UNIQUE KEY `id_UNIQUE` (`fid`),
KEY `faddress_index` (`faddress`)
) ENGINE=InnoDB AUTO_INCREMENT=37942867 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
5、配置文件内容
6、启动节点
screen -R xdag
sh xdag.sh --enablesnapshot true 2993553 197d6290000
输入我们之前设置的密码
节点验证
telnet 127.0.0.1 6001
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Enter Admin password>*********
xdag> mainblocks
---------------------------------------------------------------------------------------------------------
height address time state mined by
---------------------------------------------------------------------------------------------------------
02996000 4hjXf50yv1dgzLam4PpURPlE/U8mLBQ+ 2024-03-18 16:49:03.999 Main HTTPS://XDAG.ORG SOLO
02995999 y3Ka+ONIcvKrE90ZCBbGMMdnMXyeFqpU 2024-03-18 16:47:59.999 Main HTTPS://XDAG.ORG EQUAL
02995998 IrRN4rfi2xwxay/dLGkfNZB4TP8EfUsp 2024-03-18 16:46:55.999 Main HTTPS://XDAG.ORG SOLO
02995997 EqiSosGy9/kcESYh3fZoFXQmNHdgfDMU 2024-03-18 16:45:51.999 Main HTTPS://XDAG.ORG EQUAL
02995996 DCLDwI2+foeA8wLmjZ67WC2o31Q6P+OM 2024-03-18 16:44:47.999 Main HTTPS://XDAG.ORG SOLO
02995995 P7t18YtHC5s5AeoH0aa+s7+IoBQSu3qP 2024-03-18 16:43:43.999 Main HTTPS://XDAG.ORG EQUAL
02995994 B4k3XOmJZU4tpugPka+qsefzQeyX6UlZ 2024-03-18 16:42:39.999 Main HTTPS://XDAG.ORG SOLO
02995993 cEALTJd2zM6YHWZFlRelLeMK25tTp1sG 2024-03-18 16:41:35.999 Main XdagJ
02995992 HESmcf7paw6vN2eCvQHSYaQBjuD1qpKI 2024-03-18 16:40:31.999 Main HTTPS://XDAG.ORG EQUAL
02995991 u3QWzKT1z14qHF43RsZLig9uhL4VOy0o 2024-03-18 16:39:27.999 Main HTTPS://XDAG.ORG EQUAL
02995990 sAB3uKvOV587pbSprfb/NGOwC15LPIyD 2024-03-18 16:38:23.999 Main HTTPS://XDAG.ORG EQUAL
02995989 mSkIaYN8vFZvNJHEj2PqqkZVQGunrpyK 2024-03-18 16:37:19.999 Main HTTPS://XDAG.ORG EQUAL
02995988 Rj/Y8Qq+AOiG0zfBO2iDVum3E8My0RrD 2024-03-18 16:36:15.999 Main HTTPS://XDAG.ORG SOLO
02995987 HEiKNgxNfTDiXsD01QB6s5TSf+/loSER 2024-03-18 16:35:11.999 Main XdagJ
02995986 TtxyA1MHj4g7govoC8XDikj4/0dtIYx5 2024-03-18 16:34:07.999 Main XdagJ
02995985 AWfQ4QMzO8i/WG+qdIPS3gZrtxgnx/+4 2024-03-18 16:33:03.999 Main XdagJ
02995984 IkWAivpE+bpyxBr9/vKeXfSPt/2kmpwd 2024-03-18 16:31:59.999 Main HTTPS://XDAG.ORG SOLO
02995983 kmIt/uO2/rQmh56eV3xwIpPXRkNfUfpR 2024-03-18 16:30:55.999 Main HTTPS://XDAG.ORG EQUAL
02995982 d4s4H4YyaecjQv11afE3dCN97ceRz+Gg 2024-03-18 16:29:51.999 Main HTTPS://XDAG.ORG EQUAL
02995981 lztKQOlrwYXwOLUeBfM07EHJLe6ci8B5 2024-03-18 16:28:47.999 Main HTTPS://XDAG.ORG EQUAL
xdag> state
Synchronized with the main network. Normal operation.