dojo
dojo copied to clipboard
[torii-core] `pending_block_tx_cursor` logic doesn't work as expected
Describe the bug
Currently we make an assumption that all the events that we process are world event and we are updating pending_block_tx for all the transaction, and using this value to restart indexing from a particular point in block.
which means in current state restarting torii with a local DB can result in bad state in some cases.
EDIT: actually it can affect torii instances which are under high load
To Reproduce Would need to send some events which are not from world just before stopping torii, and when you restart you will see rest of the events for that "pending" block are ignored
Expected behavior Torii shouldn't ignore any events we expect to be indexed
@lambda-0x Can you assign this issue to me
@GoSTEAN this issue is bit complicated so need alot of context of torii to fix, so i am planning to work on this. Feel free to take up any other good-first-issue.
We now check if a txn has a world event before setting it as the cursor