froghub-io / filecoin-sealer-recover

Filecoin sector recover
https://www.froghub.io
Apache License 2.0
67 stars 81 forks source link

链上的 PreCommit 消息体获取不到,还有什么方法获取 Ticket 吗? #3

Closed gnasnik closed 2 years ago

gnasnik commented 2 years ago

记得链上的 PreCommit 消息超过一天就查询不到了,请问还有什么方法获取 ticket 吗?

FroghubMan commented 2 years ago

可能是你的状态树被裁减了,你要找个没有裁减的full node的token。

gnasnik commented 2 years ago

经过测试发现,Commit 消息上链之后, PreCommit 消息就获取不到了, 是否我查询的方式有问题? curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $(cat ~/.lotus/token)" --data '{ "jsonrpc": "2.0", "method": "Filecoin.StateSectorPreCommitInfo", "params": ["t01000",2,null], "id": 3}' http://$(cat ~/.lotus/api | awk -F\/ '{printf "%s:%s", $3, $5}')/rpc/v0 |jq

gnasnik commented 2 years ago

解决了,用 v0 版本的 api 就可以获取 PreCommit 消息体,还要再继续研究源码,感谢回复。