rpc create message fail when value exceed 1000 Fil #4721
-
Describe the bug when i use the rpc to create message, if the value exceed 1000000000000000000000(1000 Fil),the message always fail,but if the value is 100000000000000000000(100 Fil),the message will succeed. To Reproduce Steps to reproduce the behavior:
Screenshots the code: const message = await wallet.createMessage({
To: 't1wapnh3hxbl3c2cay3mefbv5p4oaljwa7wpd3rny',
From: 't1lmifqygqvutwt65xdxmlyhwafdcb7i22nfeojja',
Value: new Decimal('1000000000000000000000'),
}); local error: UnhandledPromiseRejectionWarning: Error: Internal Server Error node error: 2020-11-04T09:42:50.639+0800 ERROR rpc [email protected]/server.go:87 RPC Error: unmarshaling params for 'Filecoin.GasEstimateMessageGas' (param: **types.Message): failed to parse big string: '"1e+21"' 2020-11-04T09:42:50.639+0800 WARN rpc [email protected]/server.go:93 rpc error: unmarshaling params for 'Filecoin.GasEstimateMessageGas' (param: **types.Message): failed to parse big string: '"1e+21"' **Version (run Daemon: 1.1.0+git.bfdb74bf+api0.17.0 Local: lotus version 1.1.0+git.bfdb74bf go version go1.14.7 linux/amd64 Additional context Add any other context about the problem here. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
hrm, below works for me so id say the issue is not in lotus rpc layer [email protected]:~/filecoin/lotus curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $(cat ~/.lotus/token)" --data '{"jsonrpc":"2.0","method":"Filecoin.MpoolPushMessage","params":[{"To":"t14pu4ogatxvok5727bd7ikp52mnnpxxxqicwyx7i","From":"t3w5afgpwisxkryfb676h7xyku57uupigdh3zdoxj3kyep53hmo5njykfatqx5rga75ra5oucbyczr7lbjaezq","Value":"1000000000000000000001","Method":0,"Params":null,"GasLimit":20000000,"GasFeeCap":"0","GasPremium":"0","Nonce":0}, {"MaxFee": "0"}],"id":0}' 'http://127.0.0.1:1234/rpc/v0'
{"jsonrpc":"2.0","result":{"Message":{"Version":0,"To":"t14pu4ogatxvok5727bd7ikp52mnnpxxxqicwyx7i","From":"t3w5afgpwisxkryfb676h7xyku57uupigdh3zdoxj3kyep53hmo5njykfatqx5rga75ra5oucbyczr7lbjaezq","Nonce":3,"Value":"1000000000000000000001","GasLimit":20000000,"GasFeeCap":"100689","GasPremium":"99635","Method":0,"Params":null,"CID":{"/":"bafy2bzacebmm2mpn65tzjp7waryokc245l2mgwj5ikdv2f27bm6nw7vy76zhu"}},"Signature":{"Type":2,"Data":"poiHiHQb0FAdxEyHd8Nhw9cqA/ifVsvlBAxtaheXcWDlStHnDx/3ITxMzHM6i/pgAkXZbztSPSY9j/ck4TSzcXz5HffRVwssNaUhdNKETNtaaAJ4m3X5BAJ8kotbbrM7"},"CID":{"/":"bafy2bzacebmm2mpn65tzjp7waryokc245l2mgwj5ikdv2f27bm6nw7vy76zhu"}},"id":0} |
Beta Was this translation helpful? Give feedback.
-
so does Filecoin.GasEstimateMessageGas [email protected]:~/filecoin/lotus curl -X POST -H 'Content-Type: application/json' -H "Authorization: Bearer $(cat ~/.lotus/token)" --data '{"jsonrpc":"2.0","method":"Filecoin.GasEstimateMessageGas","params":[{"To":"t14pu4ogatxvok5727bd7ikp52mnnpxxxqicwyx7i","From":"t3w5afgpwisxkryfb676h7xyku57uupigdh3zdoxj3kyep53hmo5njykfatqx5rga75ra5oucbyczr7lbjaezq","Value":"1000000000000000000001","Method":0,"Params":null,"GasLimit":20000000,"GasFeeCap":"0","GasPremium":"0","Nonce":0}, {"MaxFee": "0"},null],"id":0}' 'http://127.0.0.1:1234/rpc/v0' |
Beta Was this translation helpful? Give feedback.
-
so id suggest you recheck your wallet library implementation, which one are you using? Converting this to discussion so that you can get some help from our ecosystem! |
Beta Was this translation helpful? Give feedback.
so id suggest you recheck your wallet library implementation, which one are you using?
Converting this to discussion so that you can get some help from our ecosystem!