19:01:16 <achow101> #startmeeting 
19:01:17 <core-meetingbot> Meeting started Fri Feb 24 19:01:16 2023 UTC.  The chair is achow101. Information about MeetBot at https://bitcoin.jonasschnelli.ch/ircmeetings.
19:01:17 <core-meetingbot> Available commands: action commands idea info link nick
19:01:22 <achow101> #bitcoin -core-dev Wallet Meeting: achow101 _aj_ amiti ariard aureleoules b10c BlueMatt brunoerg cfields darosior dergoegge dongcarl fanquake fjahr furszy gleb glozow hebasto instagibbs jamesob jarolrod jonatack josibake kallewoof kanzure kouloumos kvaciral laanwj LarryRuane lightlike luke-jr MacroFake Murch phantomcircuit pinheadmz promag provoostenator ryanofsky sdaftuar S3RK stickies-v sipa theStack vasild
19:01:28 <S3RK> hi
19:01:31 <instagibbs> hi
19:01:51 <furszy> hi
19:02:07 <achow101> there is one preproposed wallet meeting topic this week
19:02:12 <achow101> any others to add to the list?
19:02:50 <achow101> #topic blank wallet flag, how to differentiate blank and newly created wallets (S3RK)
19:02:50 <core-meetingbot> topic: blank wallet flag, how to differentiate blank and newly created wallets (S3RK)
19:03:10 <S3RK> yep, so that's about #25634
19:03:12 <gribble> https://github.com/bitcoin/bitcoin/issues/25634 | wallet, tests: Expand and test when the blank wallet flag should be un/set by achow101 · Pull Request #25634 · bitcoin/bitcoin · GitHub
19:03:16 <provoostenator> Hi
19:04:17 <provoostenator> Also about wallets with a seed but no descriptors?
19:04:20 <S3RK> We want to be able to tell apart when user wants a wallet without descriptors to import stuff manually and just newly created wallet
19:04:27 <provoostenator> (Which is useful when setting up multisig)
19:04:47 <S3RK> so that's a third case I guess
19:04:54 <achow101> also blank is used for born encrypted wallets
19:05:34 <S3RK> achow101 can you expand on that. Why the flag is required in that case?
19:06:11 <achow101> we use it to skip the normal setup stuff for new wallets so that the caller of CWallet::Create can encrypt the wallet and then generate the new descriptors
19:06:51 <provoostenator> Sounds like that can be avoided with a lock during creation though, as far as the external interface is concerned.
19:07:04 <achow101> it's basically just the steps of 'createwallet blank=true' then 'encryptwallet'
19:07:16 <provoostenator> Oh ok, manually
19:07:33 <achow101> those are the manual steps, which we are just doing internally
19:08:16 <S3RK> I think permanent flag is not needed in this caes
19:08:25 <S3RK> and it could be solved by passing some params
19:08:37 <provoostenator> I guess it doesn't matter to me if a wallet without descriptors is considered blank or not.
19:08:41 <provoostenator> As long as it work.
19:08:42 <provoostenator> s
19:09:08 <provoostenator> * a wallet with private keys but without descriptors
19:09:27 <achow101> the problem is that our wallet creation and loading code is the same
19:09:38 <S3RK> we want to know if the wallet descriptors shoudl be manually managed by the user or automatically by the wallet software
19:09:47 <S3RK> and blank flag is the closest we have today
19:09:54 <achow101> so we could load a blank wallet and think it's a newly created one, that's why the blank flag was added
19:10:34 <provoostenator> What is there to "manage" other than at creation time to add the descriptors?
19:10:56 <achow101> whether to add descriptor when encrypting
19:10:59 <S3RK> besides thatn we have rotation on encryption
19:11:23 <furszy> IIRC, we mostly need the blank flag for backward compatibility
19:11:25 <provoostenator> Ah
19:11:41 <furszy> moving forward, we could adapt the code so the load flow isn't the same as the creation one
19:12:17 <provoostenator> Well, if there's a (helper) method to create a fresh wallet that is encrypted, that method could take care of making sure there are descriptors.
19:13:01 <provoostenator> Perhaps depending on whether the user set the blank flag upon creation, though that slightly shifts the meaning of that flag.
19:13:37 <achow101> we should probably use a different flag to indicate "this wallet should only have manually set things"
19:13:49 <provoostenator> createwallet blank=true encrypted=true would then mean we want a key but no descriptors.
19:14:01 <S3RK> achow101: agree
19:14:57 <S3RK> will "manual" wallet have a seed an it? allow to import a seed?
19:14:58 <provoostenator> Though then we can't have a user request an encrypted wallet with no keys. So maybe it does need a new argument.
19:15:47 <achow101> S3RK: if a manual wallet did sethdseed, I think so
19:16:09 <achow101> but we shouldn't then auto generate things, they would have to use createwalletdescriptor (or whatever I named that rpc)
19:16:55 <achow101> and I'm not sure if that can be supported with legacy wallets
19:17:04 <S3RK> so it'll look very similar to "automatic" wallet with one exception of not rotating keys on encryption. Is that correct?
19:17:20 <achow101> yes
19:17:27 <S3RK> yeah, I'm talking descriptors only for now
19:18:36 <S3RK> can we also deprecate blank wallet flag then? We can set it for all wallets for compatiblity reasons, but ignore it in master
19:18:49 <achow101> maybe
19:19:20 <achow101> we'll probably need to revisit the creation code
19:19:47 <achow101> we used to create a new wallet if one specified in -wallet did not already exist
19:19:57 <achow101> which is why the loading and creation stuff is tied together
19:20:26 <S3RK> got it. I think we can support that use case without having it in one function
19:20:30 <achow101> if we get rid of that behavior (which IIRC we have mostly, but something was kept for backwards compatibility), then it shouldn't be an issue
19:21:02 <S3RK> we can also just do this:  if (!wallet) { create(); } load();
19:21:46 <achow101> well right now load has to happen before create because pointer invalidation
19:21:54 <achow101> we'd have to be careful there.
19:22:11 <achow101> there's a benchmark that does it in the wrong order, and some changes cause it to segfault
19:22:11 <S3RK> ok. I'll need to think more about this. Thanks for the food for thoughts.
19:23:07 <achow101> any other topics?
19:23:18 <S3RK> do we support sethdseed for blank descriptors wallet today?
19:23:24 <achow101> no
19:23:25 <S3RK> (not a topic, random question)
19:24:18 <achow101> #endmeeting