19:01:17 <laanwj> #startmeeting 19:01:17 <core-meetingbot> Meeting started Thu May 5 19:01:17 2022 UTC. The chair is laanwj. Information about MeetBot at https://bitcoin.jonasschnelli.ch/ircmeetings. 19:01:17 <core-meetingbot> Available commands: action commands idea info link nick 19:01:28 <josibake> hi 19:01:33 <glozow> hi 19:01:34 <jonatack> hi 19:01:36 <dongcarl> hi 19:01:37 <achow101> hi 19:01:53 <laanwj> #bitcoin -core-dev Meeting: achow101 _aj_ amiti ariard BlueMatt cfields Chris_Stewart_5 darosior digi_james dongcarl elichai2 emilengler fanquake fjahr gleb glozow gmaxwell gwillen hebasto instagibbs jamesob jarolrod jb55 jeremyrubin jl2012 jnewbery jonasschnelli jonatack jtimon kallewoof kanzure kvaciral laanwj larryruane lightlike luke-jr maaku marcofalke meshcollider michagogo moneyball 19:01:55 <laanwj> morcos nehan NicolasDorier paveljanik petertodd phantomcircuit promag provoostenator ryanofsky sdaftuar sipa vasild 19:02:02 <instagibbs> :wave: 19:02:24 <theStack> hi 19:02:26 <laanwj> there's been one pre-proposed meeting topic for today: package relay updates (glozow) 19:02:39 <laanwj> any last minute topics? 19:02:47 <lightlike> hi 19:02:59 <laanwj> (you can propose meeting topics with #proposedmeetingtopic <topic> during any time of the week) 19:03:42 <kanzure> hi 19:03:50 <kvaciral> hi 19:03:54 <MarcoFalke> #proposedmeetingtopic LIFETIMEBOUND 19:04:03 <laanwj> ack 19:04:40 <laanwj> #topic High priority for review 19:04:40 <core-meetingbot> topic: High priority for review 19:05:01 <laanwj> there's 12 blockers and 1 labaled chasing concept ACK in https://github.com/bitcoin/bitcoin/projects/8 19:05:10 <laanwj> anything to add/remove? 19:05:37 <sipa> hi 19:06:00 <ajonas> hi 19:06:41 <theStack> may i ask for #23662 to add (should be easy to review and fixes a significant slowdown of RPC calls that some users were reporting) 19:06:44 <gribble> https://github.com/bitcoin/bitcoin/issues/23662 | rpc: improve `getreceivedby{address,label}` performance by theStack ÷ Pull Request #23662 ÷ bitcoin/bitcoin ÷ GitHub 19:06:56 <b10c> hi 19:08:20 <laanwj> theStack: added! 19:09:03 <theStack> thanks 19:09:43 <laanwj> anything else? anything on that list that is (almost) ready for merge? 19:11:31 <laanwj> seems not, time for next topic then 19:11:47 <laanwj> #topic Package relay updates (glozow) 19:11:47 <core-meetingbot> topic: Package relay updates (glozow) 19:11:59 <glozow> Hi! I originally planned to propose a proposal + roadmap, but I haven't had as much time to prepare for expected questions as I hoped, so I'll defer that to another week. 19:11:59 <glozow> I can give updates on what IâÂÂm working on, but no proposal this week. So my apologies for the disappointment if anybody came specifically expecting to see a proposal. 19:12:52 <glozow> IâÂÂve split the project into two groups: mempool logic and p2p relay stuff. Since all the mempool logic apart from package RBF is done, IâÂÂm working on a p2p package relay BIP + implementation. 19:13:08 <laanwj> no problem, we can bring back the topic next week if you prefer that 19:13:27 <glozow> that would be lovely, thanks so much 19:13:43 <glozow> #24836 is the PR open for review if anybody wants to help out. #25038 is also open for browsing as well. Unfortunately there is a pinning attack that it doesnâÂÂt fix, so I am working out what to do about it. ThatâÂÂs why itâÂÂs a draft. 19:13:45 <gribble> https://github.com/bitcoin/bitcoin/issues/24836 | add RPC (-regtest only) for testing package policy by glozow ÷ Pull Request #24836 ÷ bitcoin/bitcoin ÷ GitHub 19:13:46 <gribble> https://github.com/bitcoin/bitcoin/issues/25038 | BIP125-based Package RBF by glozow ÷ Pull Request #25038 ÷ bitcoin/bitcoin ÷ GitHub 19:14:08 <glozow> that's all I wanted to share for today, thanks! 19:15:22 <instagibbs> if I may glozow, which pinning are you referring to? there are so many to choose from 19:15:57 <instagibbs> or just discuss on thread, nevermind! 19:16:01 <glozow> instagibbs: yeah good question. it's Rule #3 https://usercontent.irccloud-cdn.com/file/CoG1SqvV/image.png 19:16:02 <laanwj> thanks for the quick update, i'll take a look at #24836 some time this week 19:16:03 <gribble> https://github.com/bitcoin/bitcoin/issues/3 | Encrypt wallet ÷ Issue #3 ÷ bitcoin/bitcoin ÷ GitHub 19:16:05 <gribble> https://github.com/bitcoin/bitcoin/issues/24836 | add RPC (-regtest only) for testing package policy by glozow ÷ Pull Request #24836 ÷ bitcoin/bitcoin ÷ GitHub 19:16:18 <glozow> yeah we can discuss offline ð 19:16:18 <instagibbs> ok on same page :+1: 19:16:47 <laanwj> #topic LIFETIMEBOUND (MarcoFalke) 19:16:47 <core-meetingbot> topic: LIFETIMEBOUND (MarcoFalke) 19:17:08 <MarcoFalke> hi, so the attribute is used in some places 19:17:33 <MarcoFalke> Though, while it does catch some errors (temporaries), it doesn't catch most other issues 19:17:41 <MarcoFalke> (lifetime-related issues) 19:17:55 <jonatack> link for info: https://releases.llvm.org/12.0.0/tools/clang/docs/AttributeReference.html#lifetimebound 19:18:01 <MarcoFalke> And #20493 19:18:02 <gribble> https://github.com/bitcoin/bitcoin/issues/20493 | lifetimebound compile attribute ÷ Issue #20493 ÷ bitcoin/bitcoin ÷ GitHub 19:18:04 <laanwj> is there anything better? 19:18:17 <sipa> I'd expect cases where temporaries are accidentally passed to be the ones that are most likely to be missed through code review. 19:18:20 <MarcoFalke> Only at run time: valgrind, msan, asan, etc 19:18:26 <laanwj> (besides switching to another programming language) 19:18:41 <laanwj> so i'd say this is the "Better than nothing" category then 19:18:45 <laanwj> combine it with run-time approaches 19:18:57 <sipa> And even if the analysis isn't all that strong, they're still useful as developer documentation. 19:19:28 <laanwj> and don't add functions that are clearly dangerous like return string views *ducks* 19:19:45 <MarcoFalke> I think it can be applied pretty broadly, basically everywhere where a pointer/reference is passed and the pointer/reference lifes on after the functions returns 19:20:21 <laanwj> yes 19:20:35 <MarcoFalke> So I think if we start applying them, the code will become a bit more verbose 19:20:48 <MarcoFalke> Just wanted to see if anyone would want to object that 19:21:11 <sipa> Just in function/constructor declarations, rights? 19:21:11 <laanwj> it depends on how much more verbose 19:21:35 <jonatack> I don't think it's too bad, see https://github.com/bitcoin/bitcoin/pull/25060/files for an example 19:22:06 <MarcoFalke> #20493 has a list, but it is not complete 19:22:07 <gribble> https://github.com/bitcoin/bitcoin/issues/20493 | lifetimebound compile attribute ÷ Issue #20493 ÷ bitcoin/bitcoin ÷ GitHub 19:22:07 <laanwj> i mean there's clearly some degree of verbosity where it just becomes silly make-work and isn't worth it compared that what is gained 19:22:54 <MarcoFalke> I think it is missing any stuff that was recently added at least: m_params references, and potentially more CBlockIndex passing 19:23:33 <laanwj> jonatack: that doesn't look bad 19:23:39 <laanwj> sipa: seems so then? 19:24:16 <MarcoFalke> Right, it only attaches to functions or function parameters 19:24:37 <laanwj> also important is how difficult it is to maintain, e.g. can we expect a lot of false positives when people compile with a different compiler 19:24:40 <sipa> Yeah, I don't mind adding them. I don't think we go start hunting down every last place where such an attribute could be added, but there seem to be very little downsides to adding them where appropriate. 19:25:02 <laanwj> (remembers -Wshadow) 19:25:02 <sipa> it preprocesses to nothing on non-clang compilers 19:25:43 <laanwj> right 19:25:58 <MarcoFalke> When I added it in #22278 for CScript I actually ran into the bug before, but for other places, I am less sure if it will be equally useful 19:26:00 <gribble> https://github.com/bitcoin/bitcoin/issues/22278 | Add LIFETIMEBOUND to CScript where needed by MarcoFalke ÷ Pull Request #22278 ÷ bitcoin/bitcoin ÷ GitHub 19:26:02 <laanwj> well i think it's fine to add them then 19:26:33 <sipa> which bug? 19:26:53 <MarcoFalke> I did some odd CScript{ stuff } in tests and broke valgrind 19:26:59 <josibake> if it's encouraged to add them where appropriate, can we add something to the developer docs? perhaps a brief explanation of why to use them? 19:27:01 <sipa> hmm 19:27:32 <josibake> s/them/it 19:27:54 <MarcoFalke> Probably was []{return CScript{} << 1;}() 19:29:18 <MarcoFalke> Ah no, []-> decltype(auto) {return CScript{} << 1;}() 19:29:23 <MarcoFalke> Pretty obscure 19:29:41 <sipa> Is that returning a `CScript` or a (const) `CScript&`? 19:30:17 <sipa> (the latter would actually be a lifetime issue) 19:30:18 <MarcoFalke> operator<< returns & 19:30:30 <MarcoFalke> sipa: Yeah, that was the reason I added LIFETIMEBOUND 19:30:41 <sipa> Yes, but doesn't `-> decltype(auto)` return a non-reference? 19:30:57 <MarcoFalke> no, IIRC 19:31:17 <sipa> ok 19:31:29 <sipa> Sounds like the lifetimebound is doing its job then. 19:32:06 <jonatack> josibake: good point. i'll propose a doc along with another (non-contentious) developer notes improvement i have in mind 19:32:28 <MarcoFalke> https://github.com/bitcoin/bitcoin/pull/20495#issuecomment-734236027 19:33:55 <sipa> decltype(auto) apparently can indeed deduce a reference type 19:34:36 <laanwj> that's quite a footgun in itself 19:36:22 <josibake> jonatack: ty! 19:36:59 <laanwj> any other topics? 19:38:15 <laanwj> seems like not; time to close the meeting, thanks for attending everyone 19:38:19 <laanwj> #endmeeting