{
  "founder": "meshcollider",
  "channel": "#bitcoin-core-dev",
  "network": "freenode",
  "id": "588c149664f64d7eb4e5546d1d1f0651",
  "name": "#bitcoin-core-dev",
  "chair": "meshcollider",
  "chairs": [
    "meshcollider"
  ],
  "nicks": {
    "meshcollider": 26,
    "lightningbot": 2,
    "kanzure": 2,
    "achow101": 28,
    "instagibbs": 1
  },
  "start_time": "2019-06-21T19:00:21+00:00",
  "end_time": "2019-06-21T19:46:24+00:00",
  "active": false,
  "original_topic": "Bitcoin Core development discussion and commit log | This is the channel for developing Bitcoin Core. Feel free to watch, but please take commentary and usage questions to #bitcoin | Channel logs: http://www.erisian.com.au/bitcoin-core-dev/, http://gnusha.org/bitcoin-core-dev/ | Meeting topics https://gist.github.com/moneyball/071d608fdae217c2a6d7c35955881d8a",
  "current_topic": "scriptpubkeymanager wallet flags (achow101)",
  "messages": [
    {
      "id": "728d865d4e4746c880a784a68f1271e9",
      "sender": "meshcollider",
      "payload": "#startmeeting",
      "action": false,
      "timestamp": "2019-06-21T19:00:21+00:00"
    },
    {
      "id": "b6de4355d8d947aa86b4ba58038f632d",
      "sender": "lightningbot",
      "payload": "Meeting started Fri Jun 21 19:00:21 2019 UTC.  The chair is meshcollider. Information about MeetBot at http://wiki.debian.org/MeetBot.",
      "action": false,
      "timestamp": "2019-06-21T19:00:21+00:00"
    },
    {
      "id": "ad3cd89d421847c9b78f18609d24a14e",
      "sender": "lightningbot",
      "payload": "Useful Commands: #action #agreed #help #info #idea #link #topic.",
      "action": false,
      "timestamp": "2019-06-21T19:00:21+00:00"
    },
    {
      "id": "4dcd9a2742474db4b2f2c0795aa27000",
      "sender": "meshcollider",
      "payload": "#bitcoin-core-dev Wallet Meeting: wumpus sipa gmaxwell jonasschnelli morcos luke-jr sdaftuar jtimon cfields petertodd kanzure bluematt instagibbs phantomcircuit codeshark michagogo marcofalke paveljanik NicolasDorier jl2012 achow101 meshcollider jnewbery maaku fanquake promag provoostenator aj Chris_Stewart_5 dongcarl gwillen jamesob ken281221 ryanofsky",
      "action": false,
      "timestamp": "2019-06-21T19:00:38+00:00"
    },
    {
      "id": "020184c09a9e4f42b6ad66e2bc6c3da4",
      "sender": "kanzure",
      "payload": "hi",
      "action": false,
      "timestamp": "2019-06-21T19:01:01+00:00"
    },
    {
      "id": "b904523ccede4b94994e2f78030f8787",
      "sender": "achow101",
      "payload": "hi",
      "action": false,
      "timestamp": "2019-06-21T19:01:05+00:00"
    },
    {
      "id": "a2d4f09ef9694c06817e134a10334542",
      "sender": "achow101",
      "payload": "something I mentioned yesterday that we could discuss here: \"I've been working on implementing the scriptpubkeymanager  and I noticed a bunch of things related to key generation rely on the wallet version and wallet flags. Thoughts on how to handle those without introducing a circular dependency?\"",
      "action": false,
      "timestamp": "2019-06-21T19:02:13+00:00"
    },
    {
      "id": "7b03dc0de8844c22ae454342bdbd5644",
      "sender": "achow101",
      "payload": "sipa's suggestion was to have flags and version be part of the constructors for SPKmanagers, but these things get updated during key generation and imports",
      "action": false,
      "timestamp": "2019-06-21T19:03:02+00:00"
    },
    {
      "id": "a3d6e4321ded468fa06800e91224d81e",
      "sender": "achow101",
      "payload": "I tried having the spkmanager write out the updates to the wallet file, but then the parent cwallet instance wouldn't know about the flag changes. it also felt like a layer violation",
      "action": false,
      "timestamp": "2019-06-21T19:03:40+00:00"
    },
    {
      "id": "29a232d63da74dc58ce133c8be5cf367",
      "sender": "achow101",
      "payload": "any thoughts on that?",
      "action": false,
      "timestamp": "2019-06-21T19:03:45+00:00"
    },
    {
      "id": "b9212268cf4e40079e23085ad5c43134",
      "sender": "meshcollider",
      "payload": "#topic scriptpubkeymanager wallet flags (achow101)",
      "action": false,
      "timestamp": "2019-06-21T19:04:23+00:00"
    },
    {
      "id": "3126eff6da484a139f15f3f052b49fd6",
      "sender": "kanzure",
      "payload": "managers are assigned a key, or managers make keys?",
      "action": false,
      "timestamp": "2019-06-21T19:05:50+00:00"
    },
    {
      "id": "eb7591166324450d8ba398d1bc0d7c16",
      "sender": "achow101",
      "payload": "managers make keys",
      "action": false,
      "timestamp": "2019-06-21T19:06:01+00:00"
    },
    {
      "id": "2d101b181d1444d9ad5723a851da500a",
      "sender": "meshcollider",
      "payload": "Can the wallet pass a pointer on construction instead?",
      "action": false,
      "timestamp": "2019-06-21T19:06:38+00:00"
    },
    {
      "id": "424e30d6134e4025b4e798d4194d6b0c",
      "sender": "achow101",
      "payload": "yes, but locks..",
      "action": false,
      "timestamp": "2019-06-21T19:07:01+00:00"
    },
    {
      "id": "3723a52a40d54fe9b01e1864f93964f8",
      "sender": "achow101",
      "payload": "IIRC cs_wallet needs to be locked to modify flags but spkmanagers won't have access to cs_wallet",
      "action": false,
      "timestamp": "2019-06-21T19:07:23+00:00"
    },
    {
      "id": "b45ecdf814954fb8a0c404e6cb96f868",
      "sender": "achow101",
      "payload": "FWIW all of the wallet flags are things that spkmanagers care about, not the wallet. so maybe it does make sense to just have the wallet's flag stuff call through to the spkmanager's?",
      "action": false,
      "timestamp": "2019-06-21T19:09:18+00:00"
    },
    {
      "id": "14f1c155234e40f4b42803405a0e9e9a",
      "sender": "meshcollider",
      "payload": "Hmm, pass a callback function down from the wallet then?",
      "action": false,
      "timestamp": "2019-06-21T19:09:19+00:00"
    },
    {
      "id": "0dee44e0e800490bb51b5ccfb8cf2fd7",
      "sender": "instagibbs",
      "payload": "which things/flags get updated on import, just to job my memory",
      "action": false,
      "timestamp": "2019-06-21T19:10:07+00:00"
    },
    {
      "id": "9ff58b99e87d48049dd5c77a2ecb131f",
      "sender": "meshcollider",
      "payload": "Which SPKManager would provide the flags then",
      "action": false,
      "timestamp": "2019-06-21T19:10:23+00:00"
    },
    {
      "id": "fbdcb5a545194731a81cf6bb1f04d659",
      "sender": "achow101",
      "payload": "instagibbs: WALLET_FLAG_BLANK_WALLET changes on import and key generation. WALLET_FLAG_KEY_ORIGIN_METADATA can change on load. WALLET_FLAG_DISABLE_PRIVATE_KEYS is checked before keys are generated",
      "action": false,
      "timestamp": "2019-06-21T19:11:14+00:00"
    },
    {
      "id": "be102e6b9f4b4bff866c9c48ced46970",
      "sender": "achow101",
      "payload": "meshcollider: I think they would all have the same flags, so it doesn't matter. but I guess there's an update problem with that too..",
      "action": false,
      "timestamp": "2019-06-21T19:11:45+00:00"
    },
    {
      "id": "25be2ab89c7842c6a3129dac94b06e7e",
      "sender": "achow101",
      "payload": "the only flag that SPKManagers won't use is WALLET_FLAG_AVOID_REUSE",
      "action": false,
      "timestamp": "2019-06-21T19:12:08+00:00"
    },
    {
      "id": "36fee63031ea4b05b02deac6fdcc3bad",
      "sender": "achow101",
      "payload": "my initial thought was to have each spkmanager also store a pointer to it's parent cwallet, but that's circular",
      "action": false,
      "timestamp": "2019-06-21T19:13:12+00:00"
    },
    {
      "id": "07dbf49905354853a1d0119cf4384c10",
      "sender": "meshcollider",
      "payload": "I guess BLANK_ and KEY_ORIGIN_ can be per-spkmanager and the wallet can itetate over them all with OR",
      "action": false,
      "timestamp": "2019-06-21T19:14:14+00:00"
    },
    {
      "id": "1ba35c4d306f4c7883a1a71dc595e26b",
      "sender": "meshcollider",
      "payload": "Iterate*",
      "action": false,
      "timestamp": "2019-06-21T19:14:44+00:00"
    },
    {
      "id": "1a324b329655447e8d56bbad9556264c",
      "sender": "meshcollider",
      "payload": "Whereas DISABLE_PRIV doesn't change does it",
      "action": false,
      "timestamp": "2019-06-21T19:15:25+00:00"
    },
    {
      "id": "c99684a1a67b4c1fa38543ebffd0dd37",
      "sender": "achow101",
      "payload": "it doesn't",
      "action": false,
      "timestamp": "2019-06-21T19:15:37+00:00"
    },
    {
      "id": "060788882ec84adf84929df39e19b1e2",
      "sender": "meshcollider",
      "payload": "Am I right in thinking these flags only ever get set, never reset",
      "action": false,
      "timestamp": "2019-06-21T19:17:06+00:00"
    },
    {
      "id": "ef78d4b5d420438f804de6c87f059912",
      "sender": "meshcollider",
      "payload": "So you can just OR them all",
      "action": false,
      "timestamp": "2019-06-21T19:17:15+00:00"
    },
    {
      "id": "bc5e3390b92148e0ad419ac62332bcd0",
      "sender": "achow101",
      "payload": "yeah",
      "action": false,
      "timestamp": "2019-06-21T19:17:18+00:00"
    },
    {
      "id": "13e16bc510d54e059dfd3bcb7c1ce8c2",
      "sender": "meshcollider",
      "payload": "bitwise",
      "action": false,
      "timestamp": "2019-06-21T19:17:21+00:00"
    },
    {
      "id": "4cc5a04923784d8d9ec30b98587eb0cc",
      "sender": "achow101",
      "payload": "so should there be a new wallet record for spkmanager flags?",
      "action": false,
      "timestamp": "2019-06-21T19:17:31+00:00"
    },
    {
      "id": "c190280edd7f474aacc18ac69a776e5a",
      "sender": "achow101",
      "payload": "I don't think that approach will really work though since there won't necessarily be a way to uniquely identify spkmanagers",
      "action": false,
      "timestamp": "2019-06-21T19:19:13+00:00"
    },
    {
      "id": "e305d2d1e7c64f57a182782ba11991fc",
      "sender": "achow101",
      "payload": "the whole loading part is kind of an issue",
      "action": false,
      "timestamp": "2019-06-21T19:19:29+00:00"
    },
    {
      "id": "efe96842998141e192da9864883b4885",
      "sender": "meshcollider",
      "payload": "Just because one SPKManager changes a flag doesn't mean they all need to update their flags do they? It doesn't matter if they all get the same flags at reload?",
      "action": false,
      "timestamp": "2019-06-21T19:21:29+00:00"
    },
    {
      "id": "f2dd4d738bb146978265f5cda3973364",
      "sender": "meshcollider",
      "payload": "As long as whichever one updates can write it to the wallet file",
      "action": false,
      "timestamp": "2019-06-21T19:21:51+00:00"
    },
    {
      "id": "b904d96db76b444a9ed60aa96119566b",
      "sender": "achow101",
      "payload": "I think so?",
      "action": false,
      "timestamp": "2019-06-21T19:23:34+00:00"
    },
    {
      "id": "6296e7d06a674623b344ff835dd8081c",
      "sender": "achow101",
      "payload": "so i guess the conclusion is that spkmanagers will handle the storage of BLANK, KEY_ORIGIN, an DISABLE_PRIV flags and CWallet handles the storage of AVOID_REUSE",
      "action": false,
      "timestamp": "2019-06-21T19:28:33+00:00"
    },
    {
      "id": "eec90d5489434685863f508a17932d68",
      "sender": "meshcollider",
      "payload": "seems sensible",
      "action": false,
      "timestamp": "2019-06-21T19:29:25+00:00"
    },
    {
      "id": "a3720050dc944de4be13acef13412b84",
      "sender": "achow101",
      "payload": "i can foresee some concurrency issues with this",
      "action": false,
      "timestamp": "2019-06-21T19:29:33+00:00"
    },
    {
      "id": "177a48f937634f3aa45e22be74add3a2",
      "sender": "meshcollider",
      "payload": "Hmm I don't really see why there needs to be concurrency issues if they're not being used to communicate with each other at runtime",
      "action": false,
      "timestamp": "2019-06-21T19:30:43+00:00"
    },
    {
      "id": "6d420597ccd445af8e037786ad85dde7",
      "sender": "meshcollider",
      "payload": "Are there any other topics or is this the only one? Just so we aren't holding up the meeting if we continue discussing this",
      "action": false,
      "timestamp": "2019-06-21T19:32:01+00:00"
    },
    {
      "id": "d3e83e4d5d294b41a15e69bad46f22db",
      "sender": "meshcollider",
      "payload": "Doesn't seem like attendance is very high today so I assume this is it :)",
      "action": false,
      "timestamp": "2019-06-21T19:32:43+00:00"
    },
    {
      "id": "a3247186e2d14d1bb12a175161e1ca24",
      "sender": "achow101",
      "payload": "the flags between cwallet and each spkmanager can be out of sync, so the update of flags on one object can undo an update from another one",
      "action": false,
      "timestamp": "2019-06-21T19:33:14+00:00"
    },
    {
      "id": "53f17bfd705e438dac324056207cd318",
      "sender": "meshcollider",
      "payload": "But like I said earlier, isn't each flag only one-way",
      "action": false,
      "timestamp": "2019-06-21T19:34:19+00:00"
    },
    {
      "id": "1305811d3a5f4104a32ed880160f0305",
      "sender": "achow101",
      "payload": "e.g. cwallet has BLANK set. spkmanager unsets BLANK because a seed is set so it writes that to the file. CWallet still has BLANK set. it updates the flags because AVOID_REUSE is changed so now the old BLANK is written back to the wallet",
      "action": false,
      "timestamp": "2019-06-21T19:34:39+00:00"
    },
    {
      "id": "752651fe288d4a83af8e93db45f5d169",
      "sender": "achow101",
      "payload": "not so much concurrency than not updating objects i suppose",
      "action": false,
      "timestamp": "2019-06-21T19:35:26+00:00"
    },
    {
      "id": "1e37d02ed0b04957bb610b63d8dc3424",
      "sender": "meshcollider",
      "payload": "CWallet wouldn't store BLANK anyway",
      "action": false,
      "timestamp": "2019-06-21T19:36:17+00:00"
    },
    {
      "id": "841f151b02104228be901909a575b4a8",
      "sender": "meshcollider",
      "payload": "If it needs to know blank, it would ask the spkmanagers",
      "action": false,
      "timestamp": "2019-06-21T19:36:30+00:00"
    },
    {
      "id": "f0efea2975d94901822e3c65726c8547",
      "sender": "achow101",
      "payload": "yeah, but the wallet flags record is just a bitfield. it can't update it without updating the whole thing",
      "action": false,
      "timestamp": "2019-06-21T19:36:57+00:00"
    },
    {
      "id": "513a65883725412997c61f07bdcbdcfd",
      "sender": "achow101",
      "payload": "so it needs to know all flags in effect",
      "action": false,
      "timestamp": "2019-06-21T19:37:06+00:00"
    },
    {
      "id": "3db756b79dcc4c118ac3644757b6539d",
      "sender": "achow101",
      "payload": "maybe function callbacks are the best option",
      "action": false,
      "timestamp": "2019-06-21T19:41:35+00:00"
    },
    {
      "id": "e114ca11e05a430b9fa50f3a0f6b6595",
      "sender": "meshcollider",
      "payload": "It seems like it might be, or can you use the built in atomic stuff to avoid locks",
      "action": false,
      "timestamp": "2019-06-21T19:43:43+00:00"
    },
    {
      "id": "4b4e9f1780bc44a19ac0008ed35f298e",
      "sender": "achow101",
      "payload": "i'll try it out",
      "action": false,
      "timestamp": "2019-06-21T19:45:17+00:00"
    },
    {
      "id": "623baeae3780466f900687fbea45e9c0",
      "sender": "meshcollider",
      "payload": "Alright",
      "action": false,
      "timestamp": "2019-06-21T19:45:44+00:00"
    },
    {
      "id": "25966fd63d8c48e78f1911bd3c11d225",
      "sender": "meshcollider",
      "payload": "Yeah I don't see a particularly clean solution otherwise",
      "action": false,
      "timestamp": "2019-06-21T19:45:57+00:00"
    },
    {
      "id": "87b60b4e2d1b4f0fa4022150a9a9c7c4",
      "sender": "meshcollider",
      "payload": "Ok let's end the meeting there then, too many people away today",
      "action": false,
      "timestamp": "2019-06-21T19:46:21+00:00"
    },
    {
      "id": "601c03e5d2c0465684fe881635e20e67",
      "sender": "meshcollider",
      "payload": "#endmeeting",
      "action": false,
      "timestamp": "2019-06-21T19:46:24+00:00"
    }
  ],
  "events": [
    {
      "event_type": "START_MEETING",
      "message": {
        "id": "728d865d4e4746c880a784a68f1271e9",
        "sender": "meshcollider",
        "payload": "#startmeeting",
        "action": false,
        "timestamp": "2019-06-21T19:00:21+00:00"
      },
      "operand": null,
      "id": "728d865d4e4746c880a784a68f1271e9",
      "timestamp": "2019-06-21T19:00:21+00:00"
    },
    {
      "event_type": "TOPIC",
      "message": {
        "id": "b9212268cf4e40079e23085ad5c43134",
        "sender": "meshcollider",
        "payload": "#topic scriptpubkeymanager wallet flags (achow101)",
        "action": false,
        "timestamp": "2019-06-21T19:04:23+00:00"
      },
      "operand": "scriptpubkeymanager wallet flags (achow101)",
      "id": "b9212268cf4e40079e23085ad5c43134",
      "timestamp": "2019-06-21T19:04:23+00:00"
    },
    {
      "event_type": "END_MEETING",
      "message": {
        "id": "601c03e5d2c0465684fe881635e20e67",
        "sender": "meshcollider",
        "payload": "#endmeeting",
        "action": false,
        "timestamp": "2019-06-21T19:46:24+00:00"
      },
      "operand": null,
      "id": "601c03e5d2c0465684fe881635e20e67",
      "timestamp": "2019-06-21T19:46:24+00:00"
    }
  ],
  "aliases": {},
  "vote_in_progress": false,
  "motion_index": null
}