feat(evm): Store EVM Bytecode, Blocks, Receipts outside the IAVL Tree
Should help performance, EVM bytecode is stored on chain by hash, so this is safe from a non determinism perspective.
https://docs.cosmos.network/main/architecture/adr-049-state-sync-hooks
Will significantly reduce the size of the IAVL tree as contract bytecode can be rather larger. This should help with speeding up the IAVL traversal for things.
Example:
https://github.com/notional-labs/wasmd/blob/8335e95737494d186c937ae13354e3f0e2c89e5d/x/wasm/types/wasmer_engine.go#L137
We can do this for bytecode (codehash -> code) We can do this for blocks(blockhash -> blockheader) We can do this for transactioins(txhash -> txn data + receipt)
Should also allow us to up the 24kb bytecode limit without performance hit
TODO confirm that one can disable this, such that a full node doesn't have to store the snapshots if it doesn't want to, and can retroactively sync if needed.
@neverDefined can try this but JUST for bytecode if you want to try something spicy.
Historical blocks completed.
Bytecode still in process.