Filecoin ChainGetMessage "blockstore: block not found"

Hi! i’m trying to get messages from blocks like that

body: { "jsonrpc": "2.0", "method": "Filecoin.ChainGetMessage", "params": [{"/":"bafy2bzaceddgc622j4k4rusrblwhxu6ryhjcwiq546vifqspwterjhbswutw6"}], "id":0 }

but i always receive in response
{“jsonrpc”:“2.0”,“id”:0,“error”:{“code”:1,“message”:“blockstore: block not found”}}

I saw a question of a year ago with the same issue and i would like to know if i’m missing something or if such requests are not yet supported.

Thanks in advance

Hi @Sniker and welcome to the Infura community!

Could you double check the hash you are proving in the request?It doesn’t seem to be valid.

1 Like

Thanks for the reply!
I was probably passing parameters incorrectly, i changed the approach and now i’m receiving this response:

{“jsonrpc”:“2.0”,“id”:1,“error”:{“code”:1,“message”:“unmarshaling t.Message: cbor input should be of type array”}}

Do you know what problem could be?

@Sniker could you provide a full request body as well as the endpoint you are trying to make a request to? I will try to reproduce it on my end.

1 Like

I was passing the wrong parameter. I was entering the value of the “Messages” field obtained by ChainGetBlock.

Now I’m using ChainGetParentMessages to get messages from a tipset. Works for relatively new tipset, but for older ones it returns the error :

“error”:{“code”:1,“message”:“failed to load state tree bafy2bzacecj6erzkudud7ps7jc426wxwshfb4psmw6mzrvwhgd6abmi6bpb2k: failed to load hamt node: blockstore: block not found”}

Could it be that I can’t trace back to tipset beyond a certain date?

same issue!
‘jsonrpc’: ‘2.0’, ‘id’: 1, ‘error’: {‘code’: 1, ‘message’: 'unexpected error during execution: getting block messages for tipset: failed to load state tree at tipset [bafy2bzaceadsjefkmoa3px6yy3domggupoxjfzqymwjptat5gjeejqqdnfl6e]

this tipset search by is success

@D_aixk, to be able to debug this I would need a full request body from you as well as the endpoint you are making this request to, would you be able to provide it?

@Sniker I was not able to locate the following bafy2bzacecj6erzkudud7ps7jc426wxwshfb4psmw6mzrvwhgd6abmi6bpb2k on Filfox - Filecoin explorer :frowning:

Would you be able to double-check the hash and also provide a full request body as well as the endpoint you are making this request to?

1 Like

I probably copy/pasted a wrong CID in my previous answer.
I was able to get parent messages from tipset 1557208 to 1554114

Endpoint : url: ‘

body: { "jsonrpc": "2.0", "method": "Filecoin.ChainGetParentMessages", "id": 0, "params": [${block}] }

In ${block} i pass a parent’s CID adding {"/":“CID”}

If I try to request parentmessages of a tipset’s block of height 1554113 like bafy2bzaceahpq2t263xlkh3xjmvcrlbqlhgp5kxogghpun4sdsi3bnfjdgx32 i get an error like the one i posted before