Skip to content

Keep wallet scan metadata, caches and write acknowledgements consistent - #2516

Open
a-shannon wants to merge 13 commits into
ergoplatform:masterfrom
a-shannon:fix/wallet-scan-metadata
Open

a-shannon wants to merge 13 commits into
ergoplatform:masterfrom
a-shannon:fix/wallet-scan-metadata

Conversation

@a-shannon

@a-shannon a-shannon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Changing a tracked box's scan associations preserves its inclusion and spending metadata. Payment-association changes affect ERG and token balances only while the box is unspent. Registry writes propagate their actual result to callers, including the actor's AddBox response; preparing a write no longer exposes uncommitted metadata through the cache, and affected entries reload from persistence after either outcome. When a previously registered box is created and spent in the current block, current-block metadata takes precedence and superseded indexes are removed.

Head 2b529f7366f4c2cc146278d8f2266db95d289ef0 retains both registry corrections and all four owning files. Review #2514 first, then the pinned registry correction and maturity composition. The composition preserves the maturity-removal bag before folding old-output index cleanup and retains rejected-write/successful-retry contracts under both history-retention settings. GitHub's upstream-master diff remains cumulative until the prerequisites merge.

The maturity-parent refresh incorporates the real #2514 parent, including existing shared prerequisites: D, owned by #2535, establishes a settled seed and isolated mining; X, owned by #2549, wakes cached block sections after headers; and G, owned by #2511, supplies synchronization continuation/cache/download corrections. These retain their own review and integration dependencies; the registry files are unchanged by the refresh.

The final two-file diagnostic increment reuses exact K, owned by #2511 on #2535's shared H observer. It reports ForkResolution phases and bounded node observations while retaining the fixed target, independent per-node acceptance and fifteen-minute deadline. The shared increments can be reviewed once; the diagnostic addition changes no production code.

Historical registry validation passed all 68 WalletScanLogicSpec, WalletRegistrySpec and WalletRegistryWriteResultSpec cases, covering metadata, spent-payment balances, write failures/retries, cache/index agreement, actor acknowledgements and both history settings. The actual refreshed composition passed 133 tests: synchronization/header-body joins 49, WalletRegistrySpec 27, WalletRegistryWriteResultSpec 24 and shared observer/isolation cases 33. The subsequent K composition passed normal integration-test compilation and 37/37 observer/diagnostic cases. Unchanged source evidence is reused; these focused runs did not execute Docker. Independent composition review found no blockers.

At previous public head 459f6bbd5d80f31dd55a3eb240377339a6c3622f, CI passed seven of eight jobs and 20/22 IT cases, with DeepRollBack and ForkResolution timeouts. Their exclusive causes were not established. New-head native CI must test the combined behavior and collect the added diagnostics; no successful Docker result is claimed here. Follow #2533 for current results.

@a-shannon a-shannon changed the title Preserve tracked metadata and balances during scan changes Keep wallet scan metadata, caches and write acknowledgements consistent Sep 6, 2026
@a-shannon
a-shannon marked this pull request as ready for review September 6, 2026 22:31
@a-shannon
a-shannon force-pushed the fix/wallet-scan-metadata branch from 65a1f4e to 4f7b14f Compare September 8, 2026 10:07
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