We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently block formation is accessing storage for each EVM transaction, each read and write is metered.
Which has huge implications for gas usage:
example with 100 EVM transactions ( individual vs batchrun )
https://testnet.flowscan.io/tx/2096a30d58d311416fd5e0fccf8ef8aa4439884fe0cdc10e1737033a2ff487a2 https://testnet.flowscan.io/tx/73ee4d199c071e3f913723fbb6c0795daa7d2c74cdfb79b224d6ae1649ea6a95 (credit @m-Peter)
cadence tx 1 ├─ EVM tx 1 ├── read block proposal & blockhashlist ├── execute transaction ├── write block proposal & blockhashlist ├─ EVM tx 2 ├── read block proposal & blockhashlist ├── execute transaction ├── write block proposal & blockhashlist cadence tx 2 ... (same as above ) evm heartbeat ├── read block proposal & blockhashlist ├── create block
I think it should be optimized as: (only one cadence transaction below )
cadence tx 1 ├─ read block proposal & blockhashlist ├─ EVM tx 1 ├── execute transaction ├── update block proposal & blockhashlist in memory ├─ EVM tx 2 ├── execute transaction ├── update block proposal & blockhashlist in memory ├─ write block proposal & blockhashlist
With minimal change, we can use PersistantSlabStorage and add a commit phase after TX is executed.
PersistantSlabStorage
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem Definition
Currently block formation is accessing storage for each EVM transaction, each read and write is metered.
Which has huge implications for gas usage:
example with 100 EVM transactions ( individual vs batchrun )
https://testnet.flowscan.io/tx/2096a30d58d311416fd5e0fccf8ef8aa4439884fe0cdc10e1737033a2ff487a2
https://testnet.flowscan.io/tx/73ee4d199c071e3f913723fbb6c0795daa7d2c74cdfb79b224d6ae1649ea6a95
(credit @m-Peter)
I think it should be optimized as: (only one cadence transaction below )
Proposed Solution
With minimal change, we can use
PersistantSlabStorage
and add a commit phase after TX is executed.The text was updated successfully, but these errors were encountered: