zhaojun-sh / dcrm4 Goto Github PK
View Code? Open in Web Editor NEWCrosschain with BTC, ETH, ERC20, XRP, EOS...
Home Page: https://dcrm.network
License: GNU Lesser General Public License v3.0
Crosschain with BTC, ETH, ERC20, XRP, EOS...
Home Page: https://dcrm.network
License: GNU Lesser General Public License v3.0
编译版本:
83582b1
问题现象:
/usr/bin/install -c -m 644 ./gmp.info ./gmp.info-1 ./gmp.info-2 '/usr/share/info'
install: /usr/share/info/gmp.info: Operation not permitted
解决方法:
编译gmp库的时候 ./configure —prefix=/usr/local , Mac OS 不能直接安装在/usr下
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"1000000000"
lilo.dcrmLockout("0x1f8587ad54788E3a568c1c18Fc41F32790DDFE89","1000000000","ETH")
"0x90371ebe7b8e6e72fc9d9db4adfd8e69e4515497c15342492fa3d485157ffc2a"
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"-10000000000000000"
需求:
DCRM节点从POA授权节点列表中产生,普通节点无法参与DCRM节点二层网络。
编译版本:
83582b1
问题现象:
报错提示没有makeinfo命令
解决方法:
yum install texinfo
同时还有其他类似缺少依赖报错,需要安装yum install bison flex
Error info:
======== addPeer() ========
ERROR[11-21|18:11:29.930]
########## BAD BLOCK #########
Chain config: {ChainID: 40400 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}
Number: 137698
Hash: 0x0fae0271b024a522a756d73fa5a5658e79c1a6f386cfb2eb57a98d14f39a33b0
Error: Dcrm Validate fail.
##############################
WARN [11-21|18:11:29.930] Synchronisation failed, dropping peer peer=1520992e0053bbb9 err="retrieved hash chain is invalid"
Run the gfsn and the console output info as:
Welcome to the Gfsn JavaScript console!
instance: gfsn/v0.4.0-unstable-996c6c37/linux-amd64/go1.9.4
modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 fsn:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
问题现象:新节点加入后,同步到一定块高度后,无法继续同步块
> eth.blockNumber
56197
> INFO [11-06|14:18:55.588] Imported new chain segment blocks=572 txs=34946 mgas=745.748 elapsed=8.000s mgasps=93.210 number=56340 hash=ef8973…113ca9 age=4d14h5m cache=150.29kB
> eth.blockNumber
56702
> eth.blockNumber
57348
> INFO [11-06|14:18:58.289] Imported new chain segment blocks=1476 txs=42338 mgas=903.493 elapsed=2.701s mgasps=334.473 number=57816 hash=2f48f9…ebdc0b age=3d14h44m cache=7.90kB
===================caihaijun,dcrmTransaction.Run=================
=========caihaijun,xxxxx,str is DCRMREQADDR:0x3a1b3b81ed061581558a81f11d63e03129347437:ETH=======
> eth.blockNumber
58459
> eth.blockNumber
58459
> eth.blockNumber
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"0"
lilo.dcrmLockin("10000000000000000","ETH","0x44adbc8a46beb9211305b0df0e4d8a58ee82e789d748f2475940cfa2d50bd9dd")
"0x2d405e3daba5b44c7506a39ab625242f720dda3753363089cafed052a49f35e8"
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"10000000000000000"
lilo.dcrmLockin("10000000000000000","ETH","0x44adbc8a46beb9211305b0df0e4d8a58ee82e789d748f2475940cfa2d50bd9dd")
"0x4419e5cae1d44955fc27b2850c85f574523b6958dfb03d5afff3855931a935e4"
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"20000000000000000"
说明:eth测试网执行一次转入0.1eth至dcrm地址,可以使用该转账hash和转账金额,多次lockin入测试网络,且每次lockin后查询金额,金额增加与每次lockin金额一致
测试版本:a6c83fd
error info:
> lilo.dcrmReqAddr(eth.coinbase,"eth")
================DcrmReqAddr================
SendReqToGroup,rpc_req_dcrmaddr
ReqAddrSendMsgToDcrm.Run,send data is d9bf3ae794d258f91fcd59ddd9f25978b50a0db8b86f0f5e1e4323d093f62487dc97adc042ef2a9b07adb971bec216828f065052614809c6c025e248506c497c-0x77135050ee639b9dc3bb2900b24c2ef197d8a3ca172885832bad036f35e5275c-{"nonce":"0x0","gasPrice":"0x3b9aca00","gas":"0x15f90","to":"0x00000000000000000000000000000000000000dc","value":"0x0","input":"0x4443524d524551414444523a3078313338356265623535316561373833333831326433353035396132343232366439643038333539383a657468","v":"0x13bc4","r":"0x640e957d8ad2b4f07473b03cf200854cf67bc7588c848fb55c12758dcb54b4de","s":"0x1c06ec8d01261058c6894b0f66a99d328e1d06296dcac542bbdea3dc7024a01e","hash":"0x77135050ee639b9dc3bb2900b24c2ef197d8a3ca172885832bad036f35e5275c"}-0x1385beb551ea7833812d35059a24226d9d083598-xxx-eth-3caihaijundcrmrpc_req_dcrmaddr
ReqAddrSendMsgToDcrm.Run,receive the result,result is d9bf3ae794d258f91fcd59ddd9f25978b50a0db8b86f0f5e1e4323d093f62487dc97adc042ef2a9b07adb971bec216828f065052614809c6c025e248506c497c-3-failcaihaijundcrmrpc_req_dcrmaddr_res.
ReqAddrSendMsgToDcrm.Run,rpc_req_dcrmaddr_res
ReqAddrSendMsgToDcrm.Run,it is self.
ReqAddrSendMsgToDcrm.Run,req addr fail
ReqAddrSendMsgToDcrm.Run finish.
SendReqToGroup,ret is
DcrmReqAddr,req addr fail.
Error: req addr fail.
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
another normal node receive error info at the same time:
INFO [11-26|11:41:16.682] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=370.265µs mgasps=0.000 number=154723 hash=970bdf…bb667e cache=0.00B
============caihaijun,lilodcrmaddrres,txhash is 0xf3708b7193756ffc0c34e0b9741dcc641ab3cd20d8951416f6095e4da717516e=========
Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=abac740a21b2ed9d97d1773b78ca02f8283a4a4c785ab45ffbfb54816efe808c895ecdad2b4d2bfea81aad6dc246458158626f198b2cc2eb72539082f5841cc2)Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=9d4efa0bb6be583afb6a7adcde3cc327ee453fe5dcbba77805f17ea317c083339fce490acfc4730f3cb6f2e7437005e8683aa60d85acab1b7d65dc81024919cd)Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=abac740a21b2ed9d97d1773b78ca02f8283a4a4c785ab45ffbfb54816efe808c895ecdad2b4d2bfea81aad6dc246458158626f198b2cc2eb72539082f5841cc2)Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=9d4efa0bb6be583afb6a7adcde3cc327ee453fe5dcbba77805f17ea317c083339fce490acfc4730f3cb6f2e7437005e8683aa60d85acab1b7d65dc81024919cd)Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=9d4efa0bb6be583afb6a7adcde3cc327ee453fe5dcbba77805f17ea317c083339fce490acfc4730f3cb6f2e7437005e8683aa60d85acab1b7d65dc81024919cd)Emitter.loopSendMsg p2p.SendItems err%!(EXTRA *errors.errorString=shutting down, string=peer id, discover.NodeID=abac740a21b2ed9d97d1773b78ca02f8283a4a4c785ab45ffbfb54816efe808c895ecdad2b4d2bfea81aad6dc246458158626f198b2cc2eb72539082f5841cc2)========caihaijun,ValidateDcrm,pass.
============caihaijun,lilodcrmaddrres,txhash is 0xf3708b7193756ffc0c34e0b9741dcc641ab3cd20d8951416f6095e4da717516e=========
INFO [11-26|11:41:31.189] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=369.009µs mgasps=0.000 number=154724 hash=87a46a…56ab74 cache=0.00B
节点掉线或重启等情况,会导致启动节点重新创建dcrm group并发送指令,节点程序收到指令后重复初始化导致程序异常或退出。
解决方法:
把gmp等依赖库的代码从代码库中剥离。原有gmp库中增加的接口需要二次封装。
操作对象:lilo.dcrmLockin
操作步骤:1、eth.sendTransaction({from:"0x3a1b3b81ed061581558a81f11d63e03129347437",to:"0xea4a5b5eca2c70f06c5b604b9819d62b2aee58fb",value:web3.toWei(1,"ether")})
2、lilo.dcrmLockin("1000000000000000000","ETH",["0x7b64471ef968d9c23bd5de17102f9503ac31aafe1624f4c500ac0d53e5fa2beb"])
现象:组内节点全部退出运行。
组内节点显示:
===============caihaijun,validate_txhash===========
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xac1498]
goroutine 20107 [running]:
github.com/fusion/go-fusion/crypto/dcrm.validate_txhash(0xc4456ad680, 0x19c, 0xc4456ad824, 0x1ff, 0xc427da3940, 0x1, 0x1, 0xc4479ff320)
/home/dcrm/home/dcrm/dcrm/build/_workspace/src/github.com/fusion/go-fusion/crypto/dcrm/fusion_dcrm.go:1971 +0x1238
github.com/fusion/go-fusion/crypto/dcrm.(*RecvMsg).Run(0xc443f56f40, 0x1, 0xc4479ff320, 0x0)
/home/dcrm/home/dcrm/dcrm/build/_workspace/src/github.com/fusion/go-fusion/crypto/dcrm/fusion_dcrm.go:395 +0x133b
github.com/fusion/go-fusion/crypto/dcrm.RpcReqWorker.Start.func1(0xc42efb62c0)
/home/dcrm/home/dcrm/dcrm/build/_workspace/src/github.com/fusion/go-fusion/crypto/dcrm/fusion_dcrm.go:1388 +0x60
created by github.com/fusion/go-fusion/crypto/dcrm.RpcReqWorker.Start
/home/dcrm/home/dcrm/dcrm/build/_workspace/src/github.com/fusion/go-fusion/crypto/dcrm/fusion_dcrm.go:1380 +0x7f
> lilo.dcrmLockout("0x47FA3a1c3ea85A024b593028B976288E82196F89","10000000000","ETH")
Error: lock out fail.
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at <anonymous>:1:1
> eth.getBalance(eth.coinbase)
3000000000000000000
> lilo.dcrmGetBalance(eth.coinbase,"ETH")
"20000000000000000"
说明:dcrm账户资金和主币资金充足的情况下,lockout失败
测试版本:a6c83fd
Use the bitcoin RPC API gettransaction
to get transaction info with txid.
return error info:
"message": "Invalid or non-wallet transaction id"
ref:
getrawtransaction
编译版本:
commit 996c6c3
Date: Tue Oct 16 18:07:01 2018 +0800
Update default bootnode(testnet). Update version *-unstable.
运行命令:
./build/bin/gfsn --syncmode 'full' console
> admin.peers
[{
caps: ["eth/62", "eth/63"],
id: "638f4ab165b4b7b13ab02bd82d8b804eeaac501f92bb858b25f93f72a66bf221e1bd7e4f5b124951eb6c1a73ef63a588133b412b89170ab7992d7b0aa6058c2f",
name: "Geth/v0.2.4-akroma-6e13ff6d/linux-amd64/go1.10.1",
network: {
inbound: false,
localAddress: "173.230.155.46:42922",
remoteAddress: "81.2.246.89:30303",
static: false,
trusted: false
},
protocols: {
eth: "handshake"
}
}]
> admin.peers
[]
> admin.peers
[{
caps: ["eth/62", "eth/63"],
id: "a2ccb3ee3e8327994e7b6c35dbd0357505b7d887993ee3b47c77ee6e7d0c0b05b02a164afe78ccdf887ddb895383429ece0b752ce891d8679bd1e1d34be0a262",
name: "GoChain/v2.1.36/linux-amd64/go1.10.3",
network: {
inbound: false,
localAddress: "173.230.155.46:59232",
remoteAddress: "35.204.146.204:30303",
static: false,
trusted: false
},
protocols: {
eth: "handshake"
}
}]
问题现象:
尝试连接到了外部的节点上,没有从bootnode上获取正确节点并且同步区块。
解决方法:
手动添加节点后可以同步区块。
admin.addPeer("enode://f10d3c8c8bfc5d76c0c8785b6c180035661657e59ab83037a0c0d110d515a0dca94a7af68acf864b115c7d631c96a0ae12196409ca3646ba0491a457d9d15e75@54.169.254.177:12345")
LILO web3 API
1.生成dcrm地址 dcrmLiLoReqAddress(dcrmReqAddr)
lilo.dcrmLiLoReqAddress("0x3a1b3b81ed061581558a81f11d63e03129347437","0x041307617C209E15A4BB0B7946F8D89A7A0164CF44342AAE751D319367E7AF8FC7D08B9C42DF2B613AA00D31F43C3EEA8CC113545407DB4C0B0DE97A1D4D4D74BC","ETH")
参数说明
lilo.dcrmLiLoReqAddress(
"0x3a1b3b81ed061581558a81f11d63e03129347437", //FUSION账户地址
"0x041307617C209E15A4BB0B7946F8D89A7A0164CF44342AAE751D319367E7AF8FC7D08B9C42DF2B613AA00D31F43C3EEA8CC113545407DB4C0B0DE97A1D4D4D74BC", //FUSION账户对应公钥 (去掉此参数)
"ETH" //币种
)
// 修改:一个币种只生成一个DCRM地址,重复请求直接return重复操作出错信息
结果:0xa1bd6abd05d6b99419d42be7a2257aca4f7df63e18d4d1df37a99dc8aa99edd2 //交易hash
lilo.getLiLoDcrmAddr("0x3a1b3b81ed061581558a81f11d63e03129347437","0xa1bd6abd05d6b99419d42be7a2257aca4f7df63e18d4d1df37a99dc8aa99edd2")
参数说明
lilo.getLiLoDcrmAddr(
"0x3a1b3b81ed061581558a81f11d63e03129347437", // FUSION地址
“ETH” // 币种
)
结果:0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e //DCRM地址
eth测试网从帐号0x0520e8e5E08169c4dbc1580Dc9bF56638532773A 往0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e充值0.123456789 eth,交易hash为0x4ee0a307e798c2105867da9656801355dcc70352919c81d1edb63f5849b8bd95
3.请求lockin dcrmLockIn (dcrmLockin)
lilo.dcrmLockIn("0x3a1b3b81ed061581558a81f11d63e03129347437","0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e","123456789000000000","ETH",["0x4ee0a307e798c2105867da9656801355dcc70352919c81d1edb63f5849b8bd95"])
参数说明
lilo.dcrmLockIn(
"0x3a1b3b81ed061581558a81f11d63e03129347437", // FUSION账户地址(可以去掉)
"0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e", // 要lockin的DCRM地址 (可以去掉,根据币种获取)
"123456789000000000", // 充值金额
"ETH", //币种
["0x4ee0a307e798c2105867da9656801355dcc70352919c81d1edb63f5849b8bd95"] // 充值交易hash
)
结果:0x25708638c11ff6ef35d6885eecefe2e6adc4fbc3646374f825b6c7b4cb5889ef // 交易hash
4.查询余额 getDcrmAccountBalance(dcrmGetBalance)
帐号0x3a1b3b81ed061581558a81f11d63e03129347437下的币种为ETH的地址为0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e
lilo.getDcrmAccountBalance("0x3a1b3b81ed061581558a81f11d63e03129347437","0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e","ETH")
参数说明
lilo.getDcrmAccountBalance(
"0x3a1b3b81ed061581558a81f11d63e03129347437", //fusion 账户地址
”0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e", // DCRM地址(可以去除)
"ETH" // 币种
)
结果:123456789000000000 余额
5.链内转帐:dcrmTransaction(dcrmSendTransaction)
再新建一个dcrm地址
lilo.dcrmLiLoReqAddress("0x3a1b3b81ed061581558a81f11d63e03129347437","0x041307617C209E15A4BB0B7946F8D89A7A0164CF44342AAE751D319367E7AF8FC7D08B9C42DF2B613AA00D31F43C3EEA8CC113545407DB4C0B0DE97A1D4D4D74BC","ETH")
lilo.getLiLoDcrmAddr("0x3a1b3b81ed061581558a81f11d63e03129347437","0xc8cbb9a6cae0e711677a5bcd75d56528b17297343dacc9d1e9d30c30d1cda5cb")
得到新dcrm地址:0x96acE283D60384906DFa9bA70B39f206E8b964c4
接着调用
lilo.dcrmTransaction("0x3a1b3b81ed061581558a81f11d63e03129347437","0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e","0x3a1b3b81ed061581558a81f11d63e03129347437","0x96acE283D60384906DFa9bA70B39f206E8b964c4","1000000000","ETH")
参数说明
lilo.dcrmTransaction(
"0x3a1b3b81ed061581558a81f11d63e03129347437", // from的fusion地址(去除)
"0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e", // from的DCRM地址(去除)
"0x3a1b3b81ed061581558a81f11d63e03129347437", // to 的fusion地址
"0x96acE283D60384906DFa9bA70B39f206E8b964c4", // to的dcrm地址(去除)
"1000000000", // 转账金额
"ETH" //转账币种
)
6.请求lockout dcrmLockOut(dcrmLockout)
第一第二参数按我这里的值就可以。第三个参数是提现到哪里的地址,第四个参数是要提现的fusion帐号,第五个参数是提现的金额,第六个参数是币种,第七个参数是从哪个dcrm addr提现出去。
lilo.dcrmLockOut("0x569882AC04C3A8831758B26B1ED343BBF7424C86CC5F8385D11C3573A811753868EA55290CCDE1B544D699CEED4DCB1BDE911DAF49B7F9D4B9480A19463D5B1F","0xae59a8d5d0091873de2a0b1702fb67f0cd352e1583884e962d2bb537e597d333","0xd92c6581cb000367c10a1997070ccd870287f2da","0x3a1b3b81ed061581558a81f11d63e03129347437","1000000000","ETH","0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e")
参数说明
lilo.dcrmLockOut(
"0x569882AC04C3A8831758B26B1ED343BBF7424C86CC5F8385D11C3573A811753868EA55290CCDE1B544D699CEED4DCB1BDE911DAF49B7F9D4B9480A19463D5B1F", // 用户的sig签名 (可以去掉)
"0xae59a8d5d0091873de2a0b1702fb67f0cd352e1583884e962d2bb537e597d333", // 待签名的txhash(可以去掉)
"0xd92c6581cb000367c10a1997070ccd870287f2da", // lockout to提现地址
"0x3a1b3b81ed061581558a81f11d63e03129347437", // fusion账户 (可以去掉)
“1000000000", // 提现金额
"ETH", //币种
"0x3E3c4B0c469D58Fad2E77Fb590B2286982004F3e" // dcrm地址 (可以去掉)
)
结果:0x02fc4a7bed53f56d07fd0d67fdcb5d59ef96ee7fd886b4bfe2ef85aa88d2ed49 //交易hash
Folk the eth-netstats to test dcrm network.
lilo.dcrmLockin("0x00a8fbfb02a366856fecf0578537a2e575fb7c76c702806dabf96200e3751202","10000000000000000","ETH")
"0xdadc22e5d120c76cc799b3d8b524a46bcfb05635a7f422956c3b9ee08beecfb5"
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"0"
lilo.dcrmLockin("0x00a8fbfb02a366856fecf0578537a2e575fb7c76c702806dabf96200e3751202","30000000000000000","ETH")
Error: replacement transaction underpriced
at web3.js:3143:20
at web3.js:6347:15
at web3.js:5081:36
at :1:1
说明:第一次lockin的金额错误(有且只有),第二次lockin的金额正确
问题现象:
输入:go install -v ./cmd/gfsn
显示:cmd\gfsn\accountcmd.go:23:2: cannot find package "github.com/fusion/go-fusion/accounts" in any of:
C:\Dev\Go_Spaces\src\github.com\dcrm4-master\vendor\github.com\fusion\go-fusion\accounts (vendor tree)
C:\Go\src\github.com\fusion\go-fusion\accounts (from $GOROOT)
C:\Dev\Go_Spaces\src\github.com\fusion\go-fusion\accounts (from $GOPATH)
……
操作步骤:
1、查询账户余额
lilo.dcrmGetBalance(eth.coinbase,"ETH")
"100000000000000000"
2、进行lockout操作
lilo.dcrmLockout("0x47FA3a1c3ea85A024b593028B976288E82196F89","100000000000000000","ETH")
现象:
返回hash值,在eth测试网中能查询到此笔转账
Make every node can lockin and lockout, not only the node in dcrm group.
具体现象:组内节点有部分节点响应命令,剩下节点不响应,导致卡死
构建btc的lockout交易
问题现象:
运行节点程序后,长时间连不上bootnode,无法同步区块。
console中运行admin.peers会有短暂的输出,这些enode并不是内部网络中,而是未知外网的:
> admin.peers
[]
> admin.peers
[{
caps: ["eth/62", "eth/63"],
id: "572dea4c3223cca60b9a5ae55c6b4b1d341a226d2a69056a8d14ffc1f21d20fb9666d269414c04458873848382ddd46d40e2febcdf771778673b2d26a97a96e4",
name: "Geth/v1.8.9-unstable-f6bc65fc/linux-amd64/go1.10.1",
network: {
inbound: false,
localAddress: "172.26.9.252:34430",
remoteAddress: "206.189.158.190:30303",
static: false,
trusted: false
},
protocols: {
eth: "handshake"
}
}]
> admin.peers
[]
bootnode日志输出:
TRACE[10-17|00:15:42.081] << PONG/v4 addr=54.169.254.177:12345 err=nil
TRACE[10-17|00:15:51.463] >> PING/v4 addr=202.101.20.194:62160 err=nil
TRACE[10-17|00:15:51.495] Revalidated node b=13 id=e11764d4ced64555
TRACE[10-17|00:15:51.495] << PONG/v4 addr=202.101.20.194:62160 err=nil
DEBUG[10-17|00:15:51.504] Found seed node in database id=26f5d52e1e8c07de addr=54.169.254.177:12345 age=9.504521318s
INFO [10-17|00:15:51.504] grouplist.count= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] replace == add
DEBUG[10-17|00:15:51.504] group add( LOG15_ERROR= LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] dcrm g.peers: LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] dcrm g.peers: LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] dcrm g.peers: LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] dcrm g.peers: LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
DEBUG[10-17|00:15:51.504] Found seed node in database id=5ff2168d948e07bf addr=13.81.29.241:12345 age=28m43.504633104s
INFO [10-17|00:15:51.504] grouplist.count= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] replace == add
DEBUG[10-17|00:15:51.504] Found seed node in database id=e11764d4ced64555 addr=202.101.20.194:62160 age=504.66771ms
INFO [10-17|00:15:51.504] grouplist.count= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
INFO [10-17|00:15:51.504] replace == add
DEBUG[10-17|00:15:51.504] Found seed node in database id=e3749c3e44f2f2d6 addr=54.254.202.218:12345 age=36.504691803s
INFO [10-17|00:15:51.504] grouplist.count= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
从Found seed node in database日志开始有外部未知节点出现。
问题现象:
手动添加邻居节点,同步区块后出现坏块22995,停止同步。
INFO [10-16|11:48:12.985] Imported new chain segment blocks=192 txs=0 mgas=0.000 elapsed=112.890ms mgasps=0.000 number=22848 hash=94c4ab…fbead9 age=1h2m37s cache=0.00B
INFO [10-16|11:48:13.146] Imported new chain segment blocks=146 txs=0 mgas=0.000 elapsed=94.773ms mgasps=0.000 number=22994 hash=5fb5de…37264d age=26m8s cache=0.00B
ERROR[10-16|11:48:13.221]
########## BAD BLOCK #########
Chain config: {ChainID: 1 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}
Number: 22995
Hash: 0x28c3106da92bae1987f0c8a17f47e9431c85de28d9e2361e409741ca70dbee2e
Error: invalid chain id for signer
##############################
WARN [10-16|11:48:13.222] Synchronisation failed, dropping peer peer=f10d3c8c8bfc5d76 err="retrieved hash chain is invalid"
ERROR[10-16|11:48:21.123]
########## BAD BLOCK #########
问题分析:
22995区块时,发送了一笔交易,可能导致此问题。
资金池设计
问题现象:
instance: gfsn/v0.4.0-stable-83582b14/linux-amd64/go1.9.4
modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 fsn:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0
> INFO [10-16|06:59:40.710] Block synchronisation started
ERROR[10-16|06:59:41.982]
########## BAD BLOCK #########
Chain config: {ChainID: 1 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}
Number: 1
Hash: 0x1d10e62abaddf7e4aeba1cce7fb0f1c9eeae14f5b2296988a121824d6d09327b
Error: invalid merkle root (remote: e5142d554aa409fecca3a38170c7d290ef7b78fd87fa77f1cbf95b9c63000ca7 local: ab4a6e8811b8e0775a50132ead6cb058819c92e603b4e0420b7f270619877027)
##############################
WARN [10-16|06:59:41.982] Synchronisation failed, dropping peer peer=308aeaf96aa31428 err="retrieved hash chain is invalid"
ERROR[10-16|06:59:51.949]
问题现象:exit无法退出,ctrl+C无法正常退出
> eth.blockNumber
58459
> eth.blockNumber
58459
> exit
INFO [11-06|14:21:29.756] HTTP endpoint closed url=http://0.0.0.0:40415
INFO [11-06|14:21:29.756] IPC endpoint closed endpoint=/Users/zhaojun/go/src/github.com/dcrm4/node4/gfsn.ipc
^CINFO [11-06|14:21:33.284] Got interrupt, shutting down...
^CWARN [11-06|14:21:35.651] Already shutting down, interrupt more to panic. times=9
^CWARN [11-06|14:21:36.348] Already shutting down, interrupt more to panic. times=8
^CWARN [11-06|14:21:36.651] Already shutting down, interrupt more to panic. times=7
^CWARN [11-06|14:21:36.931] Already shutting down, interrupt more to panic. times=6
^CWARN [11-06|14:21:37.211] Already shutting down, interrupt more to panic. times=5
^CWARN [11-06|14:21:37.850] Already shutting down, interrupt more to panic. times=4
^CWARN [11-06|14:21:38.735] Already shutting down, interrupt more to panic. times=3
^CWARN [11-06|14:21:39.039] Already shutting down, interrupt more to panic. times=2
^CWARN [11-06|14:21:39.443] Already shutting down, interrupt more to panic. times=1
^Cpanic: boom
goroutine 125 [running]:
github.com/fusion/go-fusion/internal/debug.LoudPanic(0x4a582c0, 0x4e71590)
/Users/zhaojun/go/src/github.com/dcrm4/build/_workspace/src/github.com/fusion/go-fusion/internal/debug/loudpanic.go:26 +0x4e
github.com/fusion/go-fusion/cmd/utils.StartNode.func1(0xc4203f6280)
/Users/zhaojun/go/src/github.com/dcrm4/build/_workspace/src/github.com/fusion/go-fusion/cmd/utils/cmd.go:84 +0x233
created by github.com/fusion/go-fusion/cmd/utils.StartNode
/Users/zhaojun/go/src/github.com/dcrm4/build/_workspace/src/github.com/fusion/go-fusion/cmd/utils/cmd.go:70 +0xad
gfsn codebase: fe45d27
Run as normal node at first time, when sync the 38 block which contents the dcrmConfirmAddr transaction, gfsn
print error info and stop sync.
Error info:
DEBUG[11-29|22:51:35.867] ==========ValidateState download block header.Root=52f1ac…ba91ce ="================="
DEBUG[11-29|22:51:35.867] ===============statedb.IntermediateRoot deleteEmptyObjects=true ="================"
DEBUG[11-29|22:51:35.867] ===============statedb.IntermediateRoot get trie hash=0x9e6201404a02a9bcb274b8de71f9d9ad01f0170d1cee6c5eb6d0d1a5ba010d9e ="================"
ERROR[11-29|22:51:35.867]
########## BAD BLOCK #########
Chain config: {ChainID: 40400 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: <nil> Engine: clique}
Number: 38
Hash: 0xf3ab6a2f861c255f5f418c512fbdf233baaa4cdd0652b58a3503757b3b4aaa2a
&{[] 1 0 [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [] [177 84 30 232 104 134 208 62 177 30 162 114 73 197 79 127 134 14 156 220 100 16 194 209 112 84 254 247 253 210 25 239] [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 0}
Error: invalid merkle root (remote: 52f1acfb9286bc08720503e6c591172456938c35505aea7c7b4a0337b8ba91ce local: 9e6201404a02a9bcb274b8de71f9d9ad01f0170d1cee6c5eb6d0d1a5ba010d9e)
##############################
DEBUG[11-29|22:51:35.867] Downloaded item processing failed number=38 hash=f3ab6a…4aaa2a err="invalid merkle root (remote: 52f1acfb9286bc08720503e6c591172456938c35505aea7c7b4a0337b8ba91ce local: 9e6201404a02a9bcb274b8de71f9d9ad01f0170d1cee6c5eb6d0d1a5ba010d9e)"
DEBUG[11-29|22:51:35.867] Synchronisation terminated elapsed=244.293447ms
WARN [11-29|22:51:35.867] Synchronisation failed, dropping peer peer=caa438b329968a30 err="retrieved hash chain is invalid"
操作步骤:
1、组内节点1进行挖矿(miner.start()),查询coinbase账户余额
2、进行转账
eth.sendTransaction({from:"0x3a1b3b81ed061581558a81f11d63e03129347437",to:"0x748d266b56179f81baaee5511a54a05fad8790e2",value:web3.toWei(0.01,"ether")})
3、查询余额和此笔交易
现象:此笔交易成功,但coinbase账户余额持续递减,转账到未知账号(0x7097f41f1c1847d52407c629d0e0ae0fdd24fd58),且转账到一定值, pending值持续增加,导致其他交易无法进行
Now, dcrm node store dcrm address and other info in the ram, if gfsn panic or system reboot, the dcrm address generated by this group will be invalid.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.