Skip to content

Conversation

girazoki
Copy link
Contributor

@girazoki girazoki commented Oct 1, 2025

This PR brings back the storage removed in #8473. The motivation on that PR was that the storage was not used, and it was true. However I think it should be used to have a more resilient structure against potential breaking changes in the future. The rationale is the following:

A) If any of the HashedDescription or xcm locations changes there is a quite complex migration to be performed without this PR. It would involve both migrating bridgehub storages and ethereum mappings in a coordinated manner.

B) With this new PR, there is no downside besides having to store a few more bytes in EthereumSystem. The exporter has exactly the same amount of reads (as we were already checking whether the asset existed in EthereumSystem). This PR maintains the HashedDescription implementation when the asset is registered, but from there on, it relies on EthereumSystem to do the conversion Location->TokenId. Now any of the above breaking changes does not imply a migration, as the hash would still match the old one.

I am making this PR as draft as I want to gather feedback. Obviously there are a few TODOs yet that I will implement if the feedback is positive

Checklist

  • Migration to re-populate NativeToForeign
  • Adapt tests
  • Adapt benchmarks (if needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant