Collapse temporary MPT tree during NeoFS-based statesync process #1508

Open
opened 2025-12-28 17:16:41 +00:00 by sami · 1 comment
Owner

Originally created by @AliceInHunterland on GitHub (Apr 28, 2025).

Improve localTrie flushing and collapsing logic in AddContractStorageData.
Refs https://github.com/nspcc-dev/neo-go/pull/3844#discussion_r2060596159

Describe the solution you'd like

Add collapsing the trie.

Describe alternatives you've considered

Do not change

Additional context

This improvement is related to NeoFSStateSyncExtensions.

Originally created by @AliceInHunterland on GitHub (Apr 28, 2025). ## Is your feature request related to a problem? Please describe. <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when ... --> Improve `localTrie` flushing and collapsing logic in `AddContractStorageData`. Refs https://github.com/nspcc-dev/neo-go/pull/3844#discussion_r2060596159 ## Describe the solution you'd like <!-- A clear and concise description of what you want to happen. --> Add collapsing the trie. ## Describe alternatives you've considered <!-- A clear and concise description of any alternative solutions or features you've considered. --> Do not change ## Additional context <!-- Add any other context or screenshots about the feature request here. --> This improvement is related to `NeoFSStateSyncExtensions`.
Author
Owner

@AnnaShaleva commented on GitHub (Apr 28, 2025):

Improve localTrie flushing and collapsing logic in AddContractStorageData.

Flushing logic is OK, we perform flush/persist in the end of every batch of storage items. Collapsing logic is missing at all, it's the problem.

Do not change

Not an alternative, we can't keep the whole MPT in memory.

@AnnaShaleva commented on GitHub (Apr 28, 2025): > Improve localTrie flushing and collapsing logic in AddContractStorageData. Flushing logic is OK, we perform flush/persist in the end of every batch of storage items. Collapsing logic is missing at all, it's the problem. > Do not change Not an alternative, we can't keep the whole MPT in memory.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1508
No description provided.