--- Log opened Thu May 28 00:00:33 2020 03:35 -!- dergoegg1 [~dergoegge@196.240.57.204] has joined #utreexo 03:38 -!- dergoegge [~dergoegge@196.240.57.204] has quit [Ping timeout: 246 seconds] 04:00 -!- dergoegg1 [~dergoegge@196.240.57.204] has quit [Ping timeout: 272 seconds] 04:02 -!- dergoegge [~dergoegge@196.240.57.204] has joined #utreexo 04:13 -!- dergoegg1 [~dergoegge@196.240.57.204] has joined #utreexo 04:16 -!- dergoegge [~dergoegge@196.240.57.204] has quit [Ping timeout: 272 seconds] 04:44 -!- instagibbs [~instagibb@pool-71-178-191-230.washdc.fios.verizon.net] has joined #utreexo 05:16 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 05:17 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 05:33 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 05:34 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 06:13 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 06:13 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 06:15 -!- dergoegge [dergoegge@gateway/vpn/nordvpn/dergoegge] has joined #utreexo 06:17 -!- dergoegg1 [~dergoegge@196.240.57.204] has quit [Ping timeout: 246 seconds] 07:22 < kcalvinalvin> adiabat I made a PR that does has minimal code change 07:23 < kcalvinalvin> But idk... there really isn't any good way to get UtxoViewPoint to work without unsafe or copying the whole code 07:24 < kcalvinalvin> Unless I guess something is pushed to btcd... Not sure how they'll like the change since it does make the package more dangerous 07:31 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 07:32 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 07:56 -!- dergoegge [dergoegge@gateway/vpn/nordvpn/dergoegge] has quit [Read error: Connection reset by peer] 08:05 -!- dergoegge [dergoegge@gateway/vpn/nordvpn/dergoegge] has joined #utreexo 08:53 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 08:53 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 09:51 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 09:51 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 11:33 < adiabat> kcalvinalvin: ok looking at PR 11:43 < adiabat> I think I see where you're going with this but I don't think this apporach works... 11:43 < adiabat> *approach 11:44 < adiabat> the vp.AddTxOuts(tx, ub.Height) part I think will not work properly 11:44 < adiabat> because UtxoViewpoint.AddTxOuts() puts the utxos into the map indexed by outpoint, which includes the txid 11:45 < adiabat> and there isn't any way to manually force a txid; when you give it the tx in vp.AddTxOuts() it calculates the txid itself 11:45 < adiabat> from the tx you give it 11:46 < adiabat> but the tx we're giving it, in this case the one constructed on line 76, doesn't have any inputs 11:46 < adiabat> so the txid will be different and not match any actual txid that shows up in a real block 11:46 < adiabat> and we don't have access to the previous inputs in this case. We do know what the txid was, because we know the outpoint 11:47 < adiabat> but we don't have the whole previous transaction. We could try to store the whole thing, so that we could feed it to vp.AddTxOuts() 11:47 < adiabat> that would get the correct txids but... 11:47 < adiabat> that's a big change ... no that's huge, that would change everything 11:47 < adiabat> we can't get it from the rev data at all 11:48 < adiabat> anyway this is why I think we do need a NewUtxoEntry() call; otherwise we can't add correct entries to the utxoViewpoint 11:49 < adiabat> either that, or a way to get a msgTx to have a forced txid. Which is cached, so maybe...? 11:50 < adiabat> or just get em to capitalize their func (view *UtxoViewpoint) addTxOut() 11:50 < adiabat> which takes totally different arguments from the func (view *UtxoViewpoint) AddTxOut() 11:50 < adiabat> despite being named... the same thing! 11:51 < adiabat> the lowercase one we could use, as it accepts an outpoint directly, but the uppercase one calls tx.Hash() itself 11:51 < adiabat> the first line of which is if t.txHash != nil { return t.txHash } ... which is also not exported! hah 11:52 < adiabat> I mean if I was in charge of the btcd codebase, I think having UtxoViewpoint.AddTxOut() and UtxoViewpoint.addTxOut() 11:53 < adiabat> which take completely different arguments and work differently is... a bit daft and I'd just export the lowercase one 11:53 < adiabat> and get rid of the uppercase one 11:53 < adiabat> But... that seems like a bigger change, because things call those two 11:54 < adiabat> not just but in mempool.go they call utxoView.AddTxOut() 11:55 < adiabat> I mean it'd be super easy to change that to have the caller calculate the outpoint but whatever 11:55 < adiabat> Adding a NewUtxoEntry() call is 5 lines or so, and doesn't affect anything else, nothing else in btcd has to change 11:56 < adiabat> anyway I think that's the best / lowest impact way but if there are other ways we can definitely try. I just don't see any 11:56 < adiabat> and their current exported AddTxOuts() doesn't work for us, unless there's some tricky way around it but I couldn't find one 13:19 -!- gojiHmPFPN [~textual@c-73-47-220-190.hsd1.ma.comcast.net] has joined #utreexo 14:53 < dergoegge> adiabat: currently ibdsim panics on regtest, i think its because util.UblockNetworkReader does not check for EOF when receiving ublocks, so when the server closes the connection because its done sending the ibdsim panics on the deserialization call. ideally the server should probably not close the connection and announce a new ublock when it sees a new block right? 14:53 < dergoegge> but i wonder why this did not happen on test/mainnet 14:54 < dergoegge> (which i have not tested, but you said that it works) 15:43 < dergoegge> btw. there is way to read/write private go fields: https://itnext.io/manipulating-private-fields-in-go-4da4ca525717. don't know if using unsafe pointers is worth it though. 15:46 < dergoegge> could be used to set t.txHash, and then call AddTxOut 15:46 < dergoegge> thats a total hack though :D 16:08 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 16:09 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 16:16 < adiabat> dergoegge: oh it's giving EOF errors on testnet after everytyhing's done 16:16 < adiabat> yeah IBDsim needs to do something besides panic when done, just have a clean exit 16:17 < dergoegge> i already implemented an exit to get the test running, should i send a PR? 16:26 < dergoegge> #136 16:27 < adiabat> OK 17:11 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 17:12 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #utreexo 22:05 < kcalvinalvin> adiabat yup am aware of that 22:07 < kcalvinalvin> If NewUtxoEntry() can be put inside btcd code then sure.... but it's not gonna build for anyone unless we make a patch script... --- Log closed Fri May 29 00:00:37 2020