gossip icon indicating copy to clipboard operation
gossip copied to clipboard

When setting up from scratch. EPK setup pubkey but private key was forgot

Open mikedilger opened this issue 1 year ago • 6 comments
trafficstars

mikedilger avatar Jul 18 '24 01:07 mikedilger

I had to readd it under Account Keys

mikedilger avatar Jul 18 '24 01:07 mikedilger

What is EPK? I just set up a fresh gossip from my nsec a week or so ago, it worked fine.

bu5hm4nn avatar Jul 18 '24 12:07 bu5hm4nn

This did this to me again recently. But it worked and stuck the 3rd time. I think if I quit before the database settles down somehow it doesn't save?

EPK is encrypted private key.

mikedilger avatar Jul 18 '24 23:07 mikedilger

I can't reproduce it now. Hard to fix what I can't reproduce.

mikedilger avatar Jul 19 '24 01:07 mikedilger

Are we missing a commit to DB somewhere?

bu5hm4nn avatar Jul 20 '24 09:07 bu5hm4nn

Generally transactions are open for very short periods. If we missed a commit, the transaction would be dropped and discarded and the client would behave as if we weren't logged in. But it was behaving as if I was logged in.

Only on restarting gossip did the problem arise where there was only a public key and no epk to unlock.

So more likely we missed Storage::write_encrypted_private_key() or GossipIdentity::set_encrypted_private_key

mikedilger avatar Jul 22 '24 23:07 mikedilger

I finally figured this one out. If you adjust and save settings during the first run, it was writing a blank public key. The EPK was actually being saved, but without the PK logic thought you had nothing. Fixed in 1fddd5dd61c6456b845c70bda5fe0e996ade80e8

mikedilger avatar Feb 22 '25 22:02 mikedilger