dojo icon indicating copy to clipboard operation
dojo copied to clipboard

[torii-core] `pending_block_tx_cursor` logic doesn't work as expected

Open itzlambda opened this issue 1 year ago • 2 comments
trafficstars

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

itzlambda avatar Aug 04 '24 08:08 itzlambda

@lambda-0x Can you assign this issue to me

GoSTEAN avatar Aug 13 '24 14:08 GoSTEAN

@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.

itzlambda avatar Aug 14 '24 13:08 itzlambda

We now check if a txn has a world event before setting it as the cursor

Larkooo avatar Aug 23 '24 04:08 Larkooo