按照请求官方接口的方式请求infura节点时会报错Bad Request,让我很疑惑,我想问题是出在参数之一的TipSetKey上,这个参数应该如何传?才能让接口顺利返回数据?
hi @1254030480, what is the exact request you’re running ? It seems to work for me:
curl -X POST -H “Content-Type: application/json”
–url https://project_id:project_secret@filecoin.infura.io
-d ‘{ “jsonrpc”: “2.0”, “method”: “Filecoin.StateMinerPower”, “params”: [“f0688165”, null], “id”: 3 }’
Thanks !
首先谢谢你的解答,目前令我产生疑惑的是,假设目前高度为一百万,miner当前最新算力为1PB,但是我并不想知道当前最新的算力,而是想知道八十万高度时miner的算力,我应该如何使用infura的接口获取到八十万高度时的算力?你的回复中这个TipSetKey只能是null吗?期待您的回复!!!
Hmm, I’m not aware of an api method that would return this from an older block height, maybe the filecoin community could help ?
Here’s the TipSetKey definition: https://github.com/filecoin-project/lotus/blob/master/chain/types/tipset_key.go