Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

There may be bad data points in CommitStateDB when exec evm transaction with multi msgs #667

@summerpro

Description

@summerpro

System info: [Include Ethermint commit, operating system name, and other relevant details]

  • branch development

Additional info: [Include gist of relevant config, logs, etc.]

  • The "storage" data from "CommitStateDB" are written to the "Store"(keeper) at the time of the "deliverTx"(handler) and are cleared at the "endBlock" stage.

  • The "code" data from "CommitStateDB" are written to the "Store"(keeper) and cleared at the "endBlock" stage.

  • If there are 2 msgs in a tx, in the deliverTx (handler) stage, where msg1 executes successfully and msg2 fails, then all store data(Keeper) will be rolled back. However, the storage data in commitStateDB and the code are still Reserved, if another tx2 is executed later in the deliverTx phase, the bad data points from tx1 will be used

  • The problem encountered is Similar to issue668issue669

solution:

  1. Multiple msgs are not allowed in one tx

  2. Update and clear all cache data of commitStateDB in the handler phase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions