Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bonds: bond-locked funds can be lost when recovering from seed-phrase #3141

Open
norwnd opened this issue Jan 7, 2025 · 7 comments
Open

Comments

@norwnd
Copy link
Contributor

norwnd commented Jan 7, 2025

I've recently tried to recover my Bison walled from seed-phrase to another machine and noticed that one of the DCR bonds posted by old wallets doesn't seem to show up in the recovered wallet (and the other 2 bonds I've created did show up as "Unknown bond found" but it also took ~2h or so for some reason for these to show up),

the "missing" bond seems to be ~1.5 month old, so I'm guessing the new one to replace it was created (and this is the one server told us about classifying it as "unknown" but active) while this 1.5 month old bond is probably awaiting it's redeem and new wallet (recovered from seed) doesn't know anything about it because it's p2sh or something (while server also doesn't tell client about it) ?

So, are the bonded funds really lost in this case, or what's actually going on (btw, even for recovered bonds Refund tx shows as empty in logs - does that mean newly re-seeded wallet won't ever be able to redeem those even though it can use those while they are "alive") ?

To summarize, I guess the following 2 things seem to be working incorrectly:

  • why only some bonds (but not others) show up in Bison wallet newly recovered from seed-phrase
  • why it takes ~2h for any of these bonds to show up under bond-locked section of DCR SPV wallet balance (and possibly a full Bison wallet restart)
@decred decred deleted a comment Jan 10, 2025
@JoeGruffins
Copy link
Member

JoeGruffins commented Jan 14, 2025

related #2371

The server forgets old bonds, so any that expire while the wallet is not online and you lose the db are "lost" because we simply cannot find the output to spend.

We may be able to solve this now if mixing wasn't a thing, but the best answer is to make a v2 bond type that includes more info publicly that we can search on chain for.

Unsure about the two hours for the unknown bond to show up, maybe just waiting for confirms or something?

@dev-warrior777
Copy link
Contributor

Unsure about the two hours for the unknown bond to show up, maybe just waiting for confirms or something?

I did see some quite long block times maybe 8..9 days ago ..

@norwnd
Copy link
Contributor Author

norwnd commented Jan 15, 2025

Unsure about the two hours for the unknown bond to show up, maybe just waiting for confirms or something?

Maybe I phrased that poorly, but by "created" I meant "bonds were created in my old wallet and new wallet took ~2h to discover them after initializing from seed-phrase" (presumably with the help of server). And I believe that's ~2h on top of the time it took to sync new DCR SPV wallet.

Update:

And I believe that's ~2h on top of the time it took to sync new DCR SPV wallet.

Done another re-sync from scratch, restart is actually required looks like, and it took ~10-30 minutes after that restart (and corresponding notification about unknown active bond discovered) for wallet balance to finally "display Bonded funds under Locked"

@norwnd
Copy link
Contributor Author

norwnd commented Jan 16, 2025

The server forgets old bonds

I'm seeing that active bonds show up but not expired bonds (for newly recovered wallet from seed-phrase),

so is there a specific reason for a server to not "remember ALL bonds (active/expired/...) until it spots that a bond has been redeemed on-chain" ?

@JoeGruffins
Copy link
Member

It's simply not the server's responsibility imo. Client needs to keep it's own records, and if they lose them, that's on them. Tatanka certainly won't worry about this.

@buck54321
Copy link
Member

I had this thought a while back. Could be useful.

@norwnd
Copy link
Contributor Author

norwnd commented Jan 17, 2025

It's simply not the server's responsibility imo. Client needs to keep it's own records, and if they lose them, that's on them.

It's not that I believe Server should be "responsible" for this (although, why not) rather it's more of a work-around to make bonds viable even IMO, I guess this issue mirrors this concern which I think is still a concern ?

Besides, if Server already helps to discover active bond(s) how is that different for expired bonds ? Sure you need to keep more records in DB, but since every record "is backed by real funds" there is a limit on how many records (bonds) can exist at most for Server to keep track of.

Tatanka certainly won't worry about this.

Another opinion, what's the point of shipping a feature that doesn't work with the functionality we already have ?

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

No branches or pull requests

6 participants
@buck54321 @JoeGruffins @norwnd @dev-warrior777 and others