Closed KolbyML closed 3 months ago
Are there any areas or use cases that you've identified where using
address_hash
has a downside or where we'd end up needing the pre-image map?
One thing I will bring up is currently there is no mechanism to obtain a pre-image map from any of the Portal Networks. So I don't think this change adds a downside as the pre-images weren't obtainable in the first place.
If we were to provide pre-image mappings I think that should be its own Portal network, like the transaction index network
The Portal Address mapping network or something
Ok I have PR's for ethereum/trin
and ethereum/portal-spec-tests
so when we are ready 2 merge this PR things are in place to update Trin to match the spec
I have no objections to this change. When implementing the Fluffy state bridge I found the need to store the account preimages so that I could get the address for a given addressHash in order to build contract trie and contract code offers. With this change we can likely save space by avoid the requirement to store preimages. Looks good to me.
Issue
Currently you can't walk or download a whole state snapshot from the State Portal network. There is no way to get an address well walking the account trie. Which means it isn't possible to walk storage tries or get contracts as currently they require an address, which isn't a native concept in the execution layer.
address_hash
toaddress
mappings)How to fix this?
Instead of using the address for
storage_key
andcontract_key
use the address_hashOne of the main reasons for this is the address_hash is retrivalible from walking the account trie as the address_hash can be recovered from the path of the account.
Doing this allows us to
block + 1
of the snapshot.In short this makes the Portal State Network much more usable and more aligned with how Ethereum's state actually looks like from an Ethereum perspective