Skip to content

Conversation

@2xburnt
Copy link

@2xburnt 2xburnt commented Nov 4, 2025

This pull request introduces new exports and optimizations to the Wasm module's keeper to support efficient genesis imports and external integrations. The main changes focus on exposing internal methods for importing code, contracts, and sequence IDs, as well as improving contract history import performance during genesis.

Genesis exports for external tooling

  • Added new public methods to x/wasm/keeper/genesis_exports.go that wrap private keeper methods, allowing external packages to import Wasm code, contract instances, and sequence counters during genesis or state migrations.

Performance optimizations for genesis import

  • Introduced appendToContractHistoryForGenesis, a specialized method that efficiently writes contract history entries without checking for existing data, significantly speeding up genesis imports with many contracts.
  • Updated importContract to use the optimized appendToContractHistoryForGenesis instead of the standard history appending method, ensuring better performance when importing contracts during genesis. [1] [2]

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