loomchain icon indicating copy to clipboard operation
loomchain copied to clipboard

Investigate committing EVM state only once per block

Open pathornteng opened this issue 5 years ago • 1 comments

Currently, loomchain commits EVM state right after each EVM tx is processed. Committing EVM state is an expensive process and costing around 60% of tx processing time. loomchain should be able to use the same EVM state object for multiple EVM txs and only commit it once at block commit.

We also should take a look at this Go Ethereum state commit improvement https://github.com/ethereum/go-ethereum/commit/223b950944f494a5b4e0957fd9f92c48b09037ad#diff-19b2c4499088b23ccb40eedb26c42e68.

This issue can be started after this PR is merged https://github.com/loomnetwork/loomchain/pull/1532

pathornteng avatar Nov 04 '19 06:11 pathornteng

Update: this commit https://github.com/ethereum/go-ethereum/commit/223b950944f494a5b4e0957fd9f92c48b09037ad#diff-19b2c4499088b23ccb40eedb26c42e68 won't improve our chain as EVM state is committed only once per block. It also requires a feature flag to activate. So leave it for now.

pathornteng avatar Nov 12 '19 09:11 pathornteng