--- Log opened Mon Mar 17 00:00:48 2025 02:27 < hebasto> re "i don't think i understand - why would we have to keep a lock on BlockIndex pointers after retrieving them?" -- not an answer to this question, but, in general, it would be prudent to start from defining and documenting class invariants. It will simplify reasoning about thread safety. 03:56 <@TheCharlatan> stickies-v, I've explored some options (lol) for adding mutexes to the setters in the options. I feel like it is less straight forward to achieve this with a minimal code footprint. 03:58 <@TheCharlatan> I think ideally we would add a class that just wraps a mutex around an existing object and allows method calls for as long as a lock is held. 04:01 < hebasto> ^ this idea was suggested by vasild (if I'm not mistaken) in the main repo as well 04:02 < hebasto> could it lead to excessive locking with performance degradation? 04:03 <@TheCharlatan> performance is not really that important here, more worried about correctness and code footprint. 04:05 < hebasto> okay, it will depend on definition of "correctness" -- is it "correct" to sync an access to an object with no need? 05:06 <@TheCharlatan> yeah, still not entirely sure if making these operations sync is actually something that is our responsibility here. Getting the user to apply mutexes where needed themselves seems acceptable too. 06:07 -!- jon_atack [~jonatack@user/jonatack] has joined #bitcoin-kernel 06:09 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 260 seconds] --- Log closed Tue Mar 18 00:00:54 2025