Skip to content

backend: trust local state on LWS server switch#9

Draft
plowsof wants to merge 1 commit into
vtnerd:mainfrom
plowsof:resume-sync-trust-local
Draft

backend: trust local state on LWS server switch#9
plowsof wants to merge 1 commit into
vtnerd:mainfrom
plowsof:resume-sync-trust-local

Conversation

@plowsof

@plowsof plowsof commented Jun 26, 2026

Copy link
Copy Markdown

switching LWS servers preserves the tx history and balance and only scans blocks the wallet hasn't seen

switching LWS servers preserves the tx history and balance and only scans blocks the wallet hasn't seen
@plowsof plowsof force-pushed the resume-sync-trust-local branch from 2c76867 to 2562e76 Compare June 26, 2026 20:56
@plowsof

plowsof commented Jun 27, 2026

Copy link
Copy Markdown
Author

feedback from sgp vtnerd ofrnxmr blocks this reg re-orgs:
KISS:

  • resume sync from last seen block -= 100

Proper:

  • the wallet side compares recent block hashes

@vtnerd vtnerd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work well with reorgs (as commented on in Matrix). You can arbitrarily set the height lower, but if the reorg goes past that point, the same issue occurs. The only way to fix this is to change the protocol to include a hash, to ensure that wallet is always on the correct chain. I'm not sure it's worth the change, despite this being a reasonable usability change.

EDIT: Sorry I missed your follow-up before posting this. I'm not sure we want to change the protocol for this, but perhaps it can be added without too much hassle.

@plowsof plowsof marked this pull request as draft June 27, 2026 19:44
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.

2 participants