Transcript for #bitcoin-dev 2018/04/18

00:08 OS-27110 hi all, hop youre all doing good
00:08 OS-27110 i have a question regarding where to keep the bitcoinf.conf file on a linux system
00:09 OS-27110 is it ok to put it into /etc/bicoin.conf?
00:09 OS-27110 is it ok to put it into /etc/bitcoin.conf?
00:10 OS-27110 the reason i ask is, i created a service account to run bitcoind, and when i try run bitcoin-cli i get an error saying no bitcoin.conf file in my directory
00:11 OS-27110 is it best practice to add the users i want to the service account group i created and then allow access to /etc/bitcoin.conf
00:11 OS-27110 thanks
05:46 smrtz Hey, can someone point me to where TXs are validated against consensus rules please?
06:38 wumpus src/validation.cpp
06:39 wumpus there are various functions involved, ConnectBlock is probably the most important one
08:03 smrtz Thanks wumpus
08:03 smrtz !
16:21 robzon how do SPV nodes make use of merkle tree root? I have a txid, but I still need all adjacent nodes on the path to the root, right? how do I get them without reconstructing the whole tree?
16:32 AndyS2 maybe I'm wrong, but it's like this: The tx's id whose existance you want to confirm is a leaf of the merkle tree. if your SPV client has all block headers, it knows all merkle roots. now the node the SPV client is takling to only needs to provide log n hashes from the merkle tree (it can leave out all those who don't matter for recalculating the hashes on levels above leafs)
16:33 AndyS2 *from the merkle tree the txid is in
16:34 robzon yep, but how do I get the required hashes? looking at the protocol I don't see an obvious message that would help me get the merkle proof
16:34 AndyS2 https://i.stack.imgur.com/2Ep7y.png <-- you want to confirm the existance of H_K, so a node provides your SPV client with H_K, H_L, and all other nodes (= hashes) that you need to recalculate the merkle root
16:35 AndyS2 hmm, I never looked at the RPC commands in detail to see how it's done
16:36 AndyS2 maybe I misunderstood your question
16:36 robzon yeah, let me explain again based on the image you linked, will be much easier :-)
16:37 robzon so I want to watch for block that contains Hk - to do that I need to know Hl, Hij, Hmnop and Habcdefgh and, of course, merkle root
16:37 robzon I know Hk and merkle root, how do I efficiently fetch all other required hashes?
16:38 robzon do I have to get all tx hashes from a block and rebuild the full tree or is there a way to fetch only the minimal set required to verify the path?
19:50 echeveria robzon: there's a shitty p2p call for that.
19:51 echeveria when you do `filterload` and then `getblock` the matching results come as filtered blocks, that contain the directions of the path you need as a bitmask, and the hashes.
21:17 robzon echeveria: thanks! will look into it