Skip to content

Development Plan #8

@andresberrios

Description

@andresberrios

Functionality:

  • Plugin should send mostly transaction messages.
  • 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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions