Issue with Indexer ON and Node State Sync
Added index_tags = "tx.hash,tx.heght" and started the Node with State Sync Mode.
I was able to do this and get a response immediately after the node has started:
curl "app-09928fe6-30a7-497c-aa63-9304415659ad.cls-dec3c32b-4f06-462f-b827-dee931d39a72.anr.com/tx_search?query=\"tx.height=99547043\"&prove=true"
{
"jsonrpc": "2.0",
"id": "",
"result": {
"txs": [
{
"hash": "AAB1F297ADFFB8FD0AFB2FFC6B3FAEFF96AA22BF1914214CE2D36CAF7D65F396",
"height": "99547043",
"index": 0,
"tx_result": {
"data": "eyJvcmRlcl9pZCI6Ijg4RTc4NTM4QTRBQzFFQTRCQUVDQkQ0Njc2OUI1NzZCODBDNkRDMjktMTYxMTU1OCJ9",
"log": "Msg 0: ",
"events": [
{
"attributes": [
{
"key": "YWN0aW9u",
"value": "b3JkZXJOZXc="
}
]
}
]
},
"tx": "5AHwYl3uCmrObcBDChSI54U4pKwepLrsvUZ2m1drgMbcKRIwODhFNzg1MzhBNEFDMUVBNEJBRUNCRDQ2NzY5QjU3NkI4MEM2REMyOS0xNjExNTU4GgtBVkEtNjQ1X0JOQiACKAEwgu2BATiA2OudKEABEnIKJuta6YchAgW9R3oiYsZKybi4/DZJQAbUlISeN5X4AKCpM9Uuzzn8EkChHvAs7srE+UFlxNM3jFrrFQjEBdyKWbO/bRUNHm/KjhZky/Yxlx1jCwfDbAwJdJZIU/BLcH+Fxlck9INXpDCDGIKuEyClrmI=",
"proof": {
"RootHash": "8A95004A62B381E43EF54A5B1B470C8FE46D9B12165DAA0A494510E9936F23F4",
"Data": "5AHwYl3uCmrObcBDChSI54U4pKwepLrsvUZ2m1drgMbcKRIwODhFNzg1MzhBNEFDMUVBNEJBRUNCRDQ2NzY5QjU3NkI4MEM2REMyOS0xNjExNTU4GgtBVkEtNjQ1X0JOQiACKAEwgu2BATiA2OudKEABEnIKJuta6YchAgW9R3oiYsZKybi4/DZJQAbUlISeN5X4AKCpM9Uuzzn8EkChHvAs7srE+UFlxNM3jFrrFQjEBdyKWbO/bRUNHm/KjhZky/Yxlx1jCwfDbAwJdJZIU/BLcH+Fxlck9INXpDCDGIKuEyClrmI=",
"Proof": {
"total": "1",
"index": "0",
"leaf_hash": "ipUASmKzgeQ+9UpbG0cMj+RtmxIWXaoKSUUQ6ZNvI/Q=",
"aunts": []
}
}
}
],
"total_count": "1"
}
}
But after some time (3-4 hours) the same querry gave this result:
curl "app-09928fe6-30a7-497c-aa63-9304415659ad.cls-dec3c32b-4f06-462f-b827-dee931d39a72.anr.com/tx_search?query=\"tx.height=99547043\"&prove=true"
{
"jsonrpc": "2.0",
"id": "",
"result": {
"txs": [],
"total_count": "0"
}
}
The question is: Being on State Sync gives this behaviour? Like a buffer of Indexes, and after some time, those blocks gets deleted?
Hi, these are the recent breath block(that happend at 00:00 utc every day), 100573638, 100779706, 100986173. However that I query the block after 100986173. do have a block response. But empty response before 100986173. And I see the endpoint is from ankr, I don't know wether ankr restatesync every day?
Or are you from ankr team? Did not reproduce it in local, any more detail about how you deploy the node?
I suppose that: ankr is using a container to run a node, however at breath block(00:00 utc), because the node need generate a snapshot which cost a lot of memory, which exceed the memory limit, and the container been killed and all data lost.
@guagualvcha - thank you for your valuable input, we overcome this problem by enabling fast sync and using the snapshot from June for getting in sync. From what I read in your comments it seems that there are some problems on our side. Will keep you up to date if we encounter other problems with the new variant that we are exploring.
Thank you very much, Flavian