World State and Block Execution

Executing a Block

Using this approach, the tries to use DURING the execution of a block, lives in memory: only some nodes are retrieved from key-value storage: when the node is needed.

Some numbers from RSK Testnet
2021-05-07-23:31:12.253 TRACE [datasourcewithcache]  Activity: No. Gets: 968. No. Puts: 469. No. Gets from Store: 966
2021-05-07-23:31:32.838 TRACE [datasourcewithcache] Activity: No. Gets: 724. No. Puts: 384. No. Gets from Store: 426
2021-05-07-23:32:19.899 TRACE [datasourcewithcache] Activity: No. Gets: 1789. No. Puts: 858. No. Gets from Store: 1199
2021-05-07-23:32:45.941 TRACE [datasourcewithcache] Activity: No. Gets: 1418. No. Puts: 649. No. Gets from Store: 757
2021-05-07-23:33:11.732 TRACE [datasourcewithcache] Activity: No. Gets: 1629. No. Puts: 659. No
. Gets from Store: 740
2021-05-08-00:11:13.557 TRACE [datasourcewithcache]  Activity: No. Gets: 1438. No. Puts: 602. No. Gets from Store: 10
2021-05-08-00:11:15.201 TRACE [datasourcewithcache] Activity: No. Gets: 1800. No. Puts: 789. No. Gets from Store: 46
2021-05-08-00:11:15.881 TRACE [datasourcewithcache] Activity: No. Gets: 1393. No. Puts: 639. No. Gets from Store: 12
2021-05-08-00:11:17.476 TRACE [datasourcewithcache] Activity: No. Gets: 1385. No. Puts: 654. No. Gets from Store: 42
2021-05-08-00:11:18.626 TRACE [datasourcewithcache] Activity: No. Gets: 962. No. Puts: 462. No. Gets from Store: 28

Separation of Concern

(Image taken https://aspiringcraftsman.com/2008/01/03/art-of-separation-of-concerns/)

Dynamic World State

Some years ago, I wrote (in an Spanish post): “the disk is the modern tape”, pointing to have all in-memory to improve performance execution of modern systems. The use of all the above approach (in-memory trie, trie nodes in cache, separation of trie path-value from key-value), allows the emergence of a dynamic world state in memory ADAPTED to the current blocks under execution (the most used values are already in memory), an approach that have its impact, as the numbers from stress and performance test in testnet shown. I think it could even solve more of the problems described in Dodging a bullet: Ethereum State Problems.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store