You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each transaction message would contain block_id, and the list of actions executed in that transaction (including inline ones).
Each action should include the state DB operations executed by that action.
When a fork happens and there's a rollback of blocks, it should send one message per transaction that is being undone, each transaction containing the actions that it executed, each action with the reversed state DB operations.
Implementation ideas:
Using pre_apply_action and applied_transaction events to track the amount of operations each action performed, along with the transaction ID.
We need a new event in pop_block for handling block undos and sending the reversed transaction messages.
Inside the plugin there will be a data structure storing all the blocks from the last irreversible block to the head block. Each of those blocks will contain the block's transactions, and each transaction will contain its actions, and each action will contain the DB operations.
When a block is popped, we search this data structure for the stored block and send reverse transaction messages with their actions and reversed operations.
Functionality:
transactionmessages.block_id, and the list of actions executed in that transaction (including inline ones).Implementation ideas:
pre_apply_actionandapplied_transactionevents to track the amount of operations each action performed, along with the transaction ID.pop_blockfor handling block undos and sending the reversed transaction messages.