--- Day changed Fri May 12 2017 00:17 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #bitcoin-core-dev 00:28 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has joined #bitcoin-core-dev 00:35 -!- dcousens [~anon@110.22.219.15] has quit [Remote host closed the connection] 01:16 -!- JackH [~laptop@79-73-189-229.dynamic.dsl.as9105.com] has joined #bitcoin-core-dev 01:38 -!- jannes [~jannes@095-097-246-234.static.chello.nl] has joined #bitcoin-core-dev 01:38 -!- riemann [~riemann@84-10-11-234.static.chello.pl] has joined #bitcoin-core-dev 01:50 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 240 seconds] 01:53 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #bitcoin-core-dev 02:10 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has quit [Read error: Connection reset by peer] 02:18 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has joined #bitcoin-core-dev 03:01 -!- shesek [~shesek@unaffiliated/shesek] has joined #bitcoin-core-dev 03:45 < petertodd> gmaxwell: no worries, I was just wondering if there was something I missed :) 03:45 < petertodd> gmaxwell: I'm sure I've done that in the far past! :) 04:10 -!- gm2053 [~gm2051@2a02:c7d:12e:100:448c:722d:fff0:cd62] has quit [Ping timeout: 272 seconds] 05:00 < SopaXorzTaker> the possibility of ASICBOOST is a vulnerability in the PoW 05:00 < SopaXorzTaker> let's fix it now 05:01 < SopaXorzTaker> then Bitmain would finally move their fat lazy... uhm and accept SegWit 05:02 < SopaXorzTaker> I mean, that's suggested on Reddit and is definitely about the Core 05:22 -!- waxwing__ [~waxwing@38.95.111.75] has joined #bitcoin-core-dev 05:22 -!- waxwing__ is now known as waxwing 05:24 -!- anthonyjd [~Anthony@2001:470:daef:e1e1:27a3:b8c8:9db:79f6] has left #bitcoin-core-dev ["Leaving"] 05:25 -!- ajd_ [~Anthony@2001:470:daef:e1e1:27a3:b8c8:9db:79f6] has joined #bitcoin-core-dev 05:28 -!- rgod [~rgod@12.20.48.10] has joined #bitcoin-core-dev 05:28 -!- waxwing [~waxwing@38.95.111.75] has quit [Ping timeout: 255 seconds] 05:51 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has joined #bitcoin-core-dev 05:55 < jonasschnelli> sipa: what do you think about ryanofsky comment here? https://github.com/bitcoin/bitcoin/pull/8501#discussion_r115811850 05:56 < jonasschnelli> I guess the 26bytes may be padded to 32... so I guess ryanofsky is right here. 06:03 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 06:04 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 06:12 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has quit [Quit: mining] 06:22 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Quit: WeeChat 0.4.2] 06:28 -!- waxwing [waxwing@gateway/vpn/mullvad/x-tavcerdlvsgtabog] has joined #bitcoin-core-dev 06:40 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 06:42 -!- Sprh [~Sprh@12.20.48.10] has joined #bitcoin-core-dev 06:49 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 06:50 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has joined #bitcoin-core-dev 06:55 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 272 seconds] 06:57 < SopaXorzTaker> jonasschnelli, hey 06:58 < SopaXorzTaker> could I ask for some offtopic help? 07:00 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Remote host closed the connection] 07:01 -!- vedochiaro [~mariovari@host111-180-dynamic.0-87-r.retail.telecomitalia.it] has joined #bitcoin-core-dev 07:01 -!- twistedline [~quassel@unaffiliated/twistedline] has quit [Ping timeout: 246 seconds] 07:01 -!- twistedline_ [~quassel@unaffiliated/twistedline] has joined #bitcoin-core-dev 07:01 < vedochiaro> ciao 07:01 < vedochiaro> musica anni 80 07:02 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 07:04 -!- vedochiaro [~mariovari@host111-180-dynamic.0-87-r.retail.telecomitalia.it] has quit [Client Quit] 07:04 -!- vedochiaro [~mariovari@host111-180-dynamic.0-87-r.retail.telecomitalia.it] has joined #bitcoin-core-dev 07:11 -!- vedochiaro [~mariovari@host111-180-dynamic.0-87-r.retail.telecomitalia.it] has quit [] 07:20 -!- riemann [~riemann@84-10-11-234.static.chello.pl] has quit [Quit: Leaving] 07:23 -!- cryptapus [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 07:23 -!- cryptapus is now known as cryptapus_afk 07:34 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has joined #bitcoin-core-dev 07:38 -!- Giszmo [~leo@pc-240-13-215-201.cm.vtr.net] has joined #bitcoin-core-dev 07:41 < jonasschnelli> SopaXorzTaker: shoot 07:41 < jonasschnelli> If its offtopic use a on-topic channel or PM me 07:42 -!- cchadwicka [~cchadwick@99-60-70-220.lightspeed.ltrkar.sbcglobal.net] has joined #bitcoin-core-dev 07:45 < cchadwicka> i need to find an online wallet that allows me to buy bitcoin from within the wallet with a credit card, like coinbase, but a different one 07:45 < cchadwicka> any ideas 07:46 < instagibbs> cchadwicka, #bitcoin 07:46 < jonasschnelli> cchadwicka: please no cross posts... use #bitcoin 07:47 < cchadwicka> i am banned from bitcoin 07:47 < cchadwicka> im new here and they kicked me out yesterday 07:47 < cchadwicka> because i was off topic 07:48 < sipa> and if you keep posting offtopic things here, i'll ban you too 07:55 < sipa> jonasschnelli: absolutely, you need to pack the bytes if you want to save space on it 07:55 < sipa> jonasschnelli: but don't bother, saving 2 bytes in such a structure is negligablr 07:57 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Remote host closed the connection] 07:58 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 08:02 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Ping timeout: 268 seconds] 08:12 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 08:14 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Remote host closed the connection] 08:19 -!- Sprh [~Sprh@12.20.48.10] has quit [Read error: Connection reset by peer] 08:20 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 08:23 -!- Guyver2 [~Guyver2@guyver2.xs4all.nl] has joined #bitcoin-core-dev 08:28 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 260 seconds] 08:43 -!- abpa [~abpa@96-82-80-28-static.hfc.comcastbusiness.net] has joined #bitcoin-core-dev 08:51 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #bitcoin-core-dev 08:52 -!- waxwing [waxwing@gateway/vpn/mullvad/x-tavcerdlvsgtabog] has quit [Ping timeout: 260 seconds] 09:01 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has joined #bitcoin-core-dev 09:12 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has quit [Quit: mining] 09:20 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 09:20 < kanzure> jonasschnelli: fundrawtransaction complains about minimum fee policy when i set feeRate to 0; i have an output with the fee and i was just going to delete the output later... 09:20 -!- waxwing [~waxwing@185.9.18.99] has joined #bitcoin-core-dev 09:22 < kanzure> "Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees)." 09:23 < kanzure> does that mean that if i'm spending p2sh inputs that my wallet doesn't know about (except by importaddress p2sh-address) in my fundrawtransaction input transaction, do i need to first run importaddress redeemscript? 09:26 < kanzure> really i just want it to ignore my existing inputs-- i could easily pass my estimate of the final transaction size, if necessary. 09:28 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 09:29 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Ping timeout: 255 seconds] 09:29 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 09:32 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 09:38 < kanzure> this seems related https://github.com/bitcoin/bitcoin/pull/9965 09:39 < kanzure> this claims to override minimum estimated fee but i get error "Transaction too large for fee policy" with feeRate=0 https://github.com/bitcoin/bitcoin/pull/7967 09:41 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has joined #bitcoin-core-dev 09:49 -!- waxwing [~waxwing@185.9.18.99] has quit [Ping timeout: 240 seconds] 09:52 < instagibbs> kanzure, ah, yes that's a check I've always wondered about, that sounds like a sharp edge 09:52 < instagibbs> It's checking the fee you're getting against the entire transaction size once constructed 09:52 < kanzure> sure. 09:58 < instagibbs> I don't totally get the check's reasoning tbh. 09:58 < instagibbs> / If we made it here and we aren't even able to meet the relay fee on the next pass, give up 09:58 < instagibbs> // because we must be at the maximum allowed fee. 10:02 < kanzure> workaround: create a fake transaction of the same size as the estimated final size of my unsigned watchonly-p2sh-spending transaction, and then use fundrawtransaction and i'll pass a realistic feeRate value. 10:02 < instagibbs> I think the check is just supposed to be reversed. 10:02 < kanzure> and then i'll delete the fake inputs/outputs from the fundrawtransaction output. 10:04 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has joined #bitcoin-core-dev 10:05 < kanzure> specifically my problem is that fundrawtransaction gives me "Signing transaction failed" when i directly pass my unsigned watcholy-p2sh-spending transaction as the input to fundrawtransaction. so i figured hey i'll just set feeRate to 0 on a dummy transaction, add a change output that i'll delete later, and then use fundrawtransaction... which also has problems. 10:05 < kanzure> *watchonly 10:07 < instagibbs> possibly related: https://github.com/bitcoin/bitcoin/pull/10202 10:11 -!- mol [~molly@unaffiliated/molly] has joined #bitcoin-core-dev 10:13 < kanzure> replied, https://github.com/bitcoin/bitcoin/pull/10202#issuecomment-301134038 10:15 -!- moli_ [~molly@unaffiliated/molly] has quit [Ping timeout: 260 seconds] 10:24 < kanzure> instagibbs: okay here is my new workaround. createrawtransaction with a change output spending back to myself the total fee that i would like to spend. fundrawtransaction with reasonable feeRate. using fundrawtransaction output dictionary, i'll switch the "change" output amount to be the fundrawtransaction fee amount, so ultimately there is no extra fee and my original "fee" request shou... 10:24 < kanzure> ...ld be satisfied. 10:25 < kanzure> and the final transaction will have two change outputs (unless i consolidate). 10:31 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 11:02 < paveljanik> Are GetDustThreshold and IsDust expected to be called with dustRelayFee other than ::dustRelayFee? 11:11 < instagibbs> It seems surprising behavior to me to have the wallet simply reduce the fee if it hits maxTxFee, other than panic and abort. 11:13 < instagibbs> rather than* 11:26 < kanzure> huh, signrawtransaction also gives me an error ("Operation not valid with the current stack size") 11:26 < Chris_Stewart_5> Hmm, I think I have had that problem when I forgot to call fundrawtransaction first? 11:27 < kanzure> i have definitely called fundrawtransaction; i excised the inputs and outputs, and added them to my unsigned p2sh-spending transaction. 11:31 < Chris_Stewart_5> with watch-only p2sh spending txs the redeemScript is imported right? 11:32 < kanzure> i am spending watch-only p2sh transactions, however i did not pass includeWatching to fundrawtransaction -- i supplied an unsigned transaction to start with. 11:33 < kanzure> also, i did not import the redeemscripts, is that important 11:33 < kanzure> (why would that be important for signrawtransaction? i want to sign only the inputs i'm able to sign.) 11:34 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 11:34 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 11:38 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Remote host closed the connection] 11:38 < kanzure> oh, that's a misleading error message, that's how it reports the transaction is incompletely signed? 11:39 < Chris_Stewart_5> No, it returns a bool indicating if it is fully signed: https://bitcoin.org/en/developer-reference#signrawtransaction 11:40 < Chris_Stewart_5> Why are you adding a watch-only output to a tx you are creating? You can't fullfill the spending conditions of it by definition 11:40 -!- waxwing [~waxwing@185.16.85.171] has joined #bitcoin-core-dev 11:41 < Chris_Stewart_5> fundrawtransaction will add inputs to the tx until it *fully* funds the outputs of that tx 11:44 < kanzure> the transaction is fully funded by my inputs, to my knowledge, prior to calling fundrawtransaction with the exception of any extra fee i'm trying to add. 11:44 -!- NewLiberty_ [~NewLibert@2602:306:b8e0:8160:9d81:67d3:fd20:96c7] has quit [Ping timeout: 272 seconds] 11:45 < kanzure> Chris_Stewart_5: yeah i was overly focused on "errors" that i overlooked "complete: False" and that it had a new scriptsig :) 11:47 < Chris_Stewart_5> so fundrawtransaction isn't giving you a large enough fee? 11:47 < kanzure> fundrawtransaction is giving me an error "Signing transaction failed" if i try to directly call it with my transaction 11:47 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 11:47 < kanzure> probably because it's using dummy signatures somewhere-- i dunno- and yeah i have not imported the redeemscripts (if that's necessary- which is still unclear to me) 11:48 < Chris_Stewart_5> Well, if you (or some one else) is trying to spend a p2sh output the redeem script must be provided in the scriptSig 11:48 < kanzure> i may not have put the reedemScripts in the scriptSigs yet. 11:48 < Chris_Stewart_5> But since it seems like the p2sh output isn't yours, your counterparty will have to sign the p2sh output and provide the redeem script 11:49 < instagibbs> kanzure, that would explain it as it's expecting more stack items 11:49 < Chris_Stewart_5> ^ 11:49 < kanzure> i'd like to add fee first, sign for the fee, then sign the other outputs-- it's exceedingly inconvenient for me to do this in another order. 11:49 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Remote host closed the connection] 11:49 < kanzure> *sign for the other inputs 11:50 < Chris_Stewart_5> You should be able to do it that way, then just pass the partially signed tx to your counterparty 11:50 < kanzure> i think we've already confirmed that i can't because of the error? 11:51 < Chris_Stewart_5> oh, yes.. hmm.. 11:51 < kanzure> anyway, my workaround seems to be working for me, where i use createrawtransaction with an output that represents my fee, then later i remove the output, copy the inputs and any extra outputs added by fundrawtransaction to my actual transaction, and then i call signrawtransaction. 11:53 < kanzure> (also i'm adding the "fee" reported by fundrawtransaction to the change output reported by fundrawtransaction, since i have deleted the output that has my actual fee) 11:53 < Chris_Stewart_5> kanzure: Can't your counter party just add the p2sh output to the transaction? If you remove that outpoint your wallet can sign the tx right? 11:54 < kanzure> er, maybe. but keep in mind that i was calling fundrawtransaction not signrawtransaction-- it's something about dummy sigs. 11:54 < sipa> is the problem that fundrawtransactrion can't determine the feerate of your overall transaction as it does not know how large the scriptSigs of some inputs will need to be? 11:54 < kanzure> so you're saying that i have a partial outpoint and that fundrawtransaction should not report "Signing transaction failed" once i remove the incompete outpoint? 11:54 < Chris_Stewart_5> but in the hex transaction you provided to fundrawtransaction you had specified the watch-only p2sh output? 11:55 < sipa> and as a result can't determine how much fee to use? 11:55 < kanzure> sipa: right, that seems likely to me. i am also interested in confirming/denying with someone whether i need to "importpubkey redeemscript" to overcome that? 11:56 < sipa> or importscript 11:56 < sipa> if fundrawtransaction doesn't know what kind of redeemscript a P2SH output that's being spent has, it can't determine feerate 11:57 < sipa> it may need both, unsure 11:57 < kanzure> i added a comment here explaining that perhaps a better design would be to let user specify the final transaction size (if the user knows it) or allowing feeRate=0 if the user plans to delete an output later https://github.com/bitcoin/bitcoin/pull/10202#issuecomment-301134038 11:58 -!- fengling [~fengling@223.223.187.142] has quit [Ping timeout: 252 seconds] 11:58 -!- xiangfu_ [~xiangfu@223.223.187.142] has quit [Ping timeout: 268 seconds] 11:59 < kanzure> perhaps CreateTransaction is overloaded at this point :p 12:00 < sipa> just slightly 12:01 -!- fengling [~fengling@223.223.187.142] has joined #bitcoin-core-dev 12:06 -!- xiangfu [~xiangfu@223.223.187.142] has joined #bitcoin-core-dev 12:06 -!- Conficker [~inteligen@201.20.137.1] has joined #bitcoin-core-dev 12:08 < SopaXorzTaker> sipa, can you provide some secp256k1 test cases? 12:09 < SopaXorzTaker> such as, "for private key 0xdeadbeef, z=0xabcd, k=0x1337, r=0x1234 and s=0x5678 12:16 -!- fengling [~fengling@223.223.187.142] has quit [Ping timeout: 252 seconds] 12:16 -!- xiangfu [~xiangfu@223.223.187.142] has quit [Ping timeout: 258 seconds] 12:20 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 12:23 -!- fengling [~fengling@223.223.187.142] has joined #bitcoin-core-dev 12:23 -!- xiangfu [~xiangfu@223.223.187.142] has joined #bitcoin-core-dev 12:38 -!- rgod [~rgod@12.20.48.10] has quit [Remote host closed the connection] 12:53 -!- talmai [~T@c-76-24-28-74.hsd1.ma.comcast.net] has quit [Quit: mining] 13:10 -!- [Author] [~Author]@2401:a400:3200:5600:bad:d09:15:90d] has quit [Ping timeout: 252 seconds] 13:23 -!- NewLiberty_ [~NewLibert@adsl-75-16-33-138.dsl.irvnca.sbcglobal.net] has joined #bitcoin-core-dev 13:24 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has quit [Read error: Connection reset by peer] 13:29 -!- [Author] [~Author]@2401:a400:3200:5600:bad:d09:15:90d] has joined #bitcoin-core-dev 13:31 -!- LeMiner2 [LeMiner@5ED1AFBF.cm-7-2c.dynamic.ziggo.nl] has quit [Read error: Connection reset by peer] 13:39 -!- LeMiner [LeMiner@unaffiliated/leminer] has joined #bitcoin-core-dev 13:43 -!- NewLiberty_ [~NewLibert@adsl-75-16-33-138.dsl.irvnca.sbcglobal.net] has quit [Ping timeout: 268 seconds] 14:02 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has quit [Remote host closed the connection] 14:12 -!- justan0theruser [~justanoth@unaffiliated/justanotheruser] has joined #bitcoin-core-dev 14:15 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 240 seconds] 14:16 -!- Guyver2 [~Guyver2@guyver2.xs4all.nl] has quit [Quit: :)] 14:22 -!- goksinen [~goksinen@rrcs-50-75-193-138.nyc.biz.rr.com] has joined #bitcoin-core-dev 14:22 -!- elkalamar [~elkalamar@84.126.69.179] has joined #bitcoin-core-dev 14:25 -!- jcliff42 [~jcliff42@4.16.87.162] has joined #bitcoin-core-dev 14:30 -!- jannes [~jannes@095-097-246-234.static.chello.nl] has quit [Remote host closed the connection] 14:40 < sipa> general question: how useful is gettxoutsetinfo's serialized_bytes field? 14:40 < sipa> it does not correspond to actual disk usage, and is highly database dependent 14:41 < sipa> it's also impossible to even give a reasonable estimate for after pertxout, except by iterating over the whole database (which I'd like to get rid of) 14:49 < gmaxwell> I think it's not useful, or rather the only thing I've ever used it for is taking about how big the utxo set is on reddit, and an on-disk size would be _better_ for that. 14:55 -!- jcliff42 [~jcliff42@4.16.87.162] has quit [Remote host closed the connection] 14:59 -!- jcliff42 [~jcliff42@4.16.87.162] has joined #bitcoin-core-dev 15:09 < BlueMatt> sipa: heh, I have some reivew comments noting it seems out of sync with everything.... 15:09 < BlueMatt> sipa: gah, why did you kill Accessors? 15:10 -!- jcliff42 [~jcliff42@4.16.87.162] has quit [Remote host closed the connection] 15:13 < sipa> BlueMatt: i didn't 15:13 < sipa> how do you mean out of sync? 15:20 < BlueMatt> ehh, meant Modifiers not Accessors 15:20 < BlueMatt> sipa: what is serialized_bytes /supposed/ to show? it seems to not represent anything that actually means something (both before and especially, as you note, after) 15:21 < sipa> BlueMatt: i'm very happy to get rid of Modifiers :D 15:21 < sipa> they're so complicated to reason about 15:21 -!- Chris_Stewart_5 [~Chris_Ste@unaffiliated/chris-stewart-5/x-3612383] has quit [Quit: WeeChat 0.4.2] 15:21 < BlueMatt> they were there to prevent footgun incidents :( 15:21 < sipa> yes, if you have modifiable references 15:21 < BlueMatt> now you can take a AccessCoins, then add something to the cache, then blow your face off 15:21 < sipa> AccessCoins returns a const reference 15:21 < BlueMatt> AccessCoins gives you such a reference, though? 15:22 < sipa> the only way to modify is through AddCoin and SpendCoin (and BatchWrite) 15:22 < BlueMatt> yes, but if you add something to the cache the reference is still invalid? or are unordered_map refs still valid? 15:22 < BlueMatt> ofc if you remove from cache the same element you've still blown your face off 15:23 < sipa> adding something to the cache may always invalidate references 15:23 < sipa> Modifiers didn't help with that 15:23 < BlueMatt> didnt add assert(!fHasModifier)? 15:23 < BlueMatt> which is what you want if you're returning refs from inside the object 15:23 < BlueMatt> (or, it should have, if it didnt) 15:23 < sipa> yes, there could be at most be one modifier at a time 15:24 < sipa> but that didn't prevent any concurrent references 15:24 < BlueMatt> well we could trivially fix that - reintroduce modifiers and allow multiple ones, but assert when you actually modify the cache that there are no other ones 15:24 < sipa> that won't do anything 15:24 < BlueMatt> they did prevent some footguns, though, like you couldnt take two at a time because that implies you're possibly modifying the cache 15:25 < BlueMatt> sipa: I meant modifier here as accessor, really, from AccessCoins 15:25 < BlueMatt> since its returning a possibly-invalidated-by-other-action reference 15:25 < sipa> they prevented exactly the same footguns as are now prevented by just having explicit modification methods 15:25 < BlueMatt> easy to accidentally have one stick around too long 15:25 < sipa> yes, we could make AccessCoin return something like a modifier... but that seems an independent change 15:25 < BlueMatt> fair 15:25 < BlueMatt> I'd like to see that (or just not return a ref, have you checked the performance overhead of doing that copy everywhere?) 15:27 < sipa> i really don't like copying potentially large data structures where it's unneeded 15:27 < sipa> it's also imcompatible with reducing some of the duplicate output lookups during block/tx validation 15:28 < BlueMatt> fair, I am worried about the footgun potential there, though 15:28 < BlueMatt> maybe we can do the copy for now and introduce an accessor in a separate pr? 15:28 < sipa> please 15:28 * BlueMatt doesnt want to audit for this case :( 15:28 < sipa> you don't have to 15:28 < sipa> nothing has changed wrt that case 15:28 < sipa> nothing that was prevented is no longer prevent 15:29 < sipa> and nothing that wasn't prevent is prevented now 15:29 < BlueMatt> hmm, maybe i missed part of how it used to work, though i vaguely recall you doing some AccessCoins in place of old modifiers 15:29 < BlueMatt> maybe im wrong 15:30 < sipa> modifiers were only used when a modification was expected 15:33 < sipa> ok, so in the rpc signing code and in bitcoin-tx, there used to be a Modifier that was both used check whether an output already existed, and then add it 15:33 < sipa> which is now turned into an AccessCoin + AddCoin 15:34 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Ping timeout: 240 seconds] 15:35 < BlueMatt> yea, i mean its probably no big deal, just more shit to review, would be good to also add some kind of checker later so that it doesnt blow up in our face 15:35 < BlueMatt> cause it'd be easy to slip a change in later that breaks that 15:37 < sipa> FWIW, i'm adding a commit that adds a disk_size to gettexoutsetinfo instead, which just asks LevelDB for the actual size 15:37 < BlueMatt> that sounds much better 15:40 < sipa> BlueMatt: std::unordered_map references are only invalidated when the corresponding entry is deleted 15:40 < sipa> they remain valid under addition, including when rehashing occurs 15:43 < BlueMatt> oh, heh, i thought you said no earlier, ok 15:43 < BlueMatt> yea, makes sense 15:44 < sipa> iterators are invalidated, but iterators from the underlying CCoinsViewCache are never exposed anymore 15:44 < BlueMatt> ohoh, ok 15:53 -!- spinza [~spin@196.212.164.26] has quit [Quit: Coyote finally caught up with me...] 15:55 -!- cryptapus_afk [~cryptapus@jupiter.osmus.org] has joined #bitcoin-core-dev 15:55 -!- cryptapus_afk [~cryptapus@jupiter.osmus.org] has quit [Changing host] 15:55 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 15:56 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #bitcoin-core-dev 15:57 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 16:00 -!- cchadwicka [~cchadwick@99-60-70-220.lightspeed.ltrkar.sbcglobal.net] has quit [Quit: —I-n-v-i-s-i-o-n— 3.3 (November '11)] 16:15 -!- abpa [~abpa@96-82-80-28-static.hfc.comcastbusiness.net] has quit [Quit: Textual IRC Client: www.textualapp.com] 16:21 -!- PaulCape_ [~PaulCapes@2604:5500:17:2ea:79c9:619b:e829:1fa6] has joined #bitcoin-core-dev 16:23 -!- PaulCapestany [~PaulCapes@2604:5500:17:2ea:4db6:b6bb:1721:1fe3] has quit [Ping timeout: 255 seconds] 16:32 -!- spinza [~spin@196.212.164.26] has joined #bitcoin-core-dev 17:08 -!- marcoagn1 [~user@187.113.155.232] has quit [Read error: Connection reset by peer] 17:09 -!- marcoagner [~user@187.113.155.232] has joined #bitcoin-core-dev 17:29 -!- sw1f7 [~sw1f7@cpe-172-112-220-177.socal.res.rr.com] has quit [Remote host closed the connection] 17:47 -!- PaulCape_ [~PaulCapes@2604:5500:17:2ea:79c9:619b:e829:1fa6] has quit [Quit: .] 17:49 -!- PaulCapestany [~PaulCapes@2604:5500:17:2ea:79c9:619b:e829:1fa6] has joined #bitcoin-core-dev 17:59 -!- harrymm [~wayne@104.237.91.86] has quit [Ping timeout: 240 seconds] 18:45 -!- JackH [~laptop@79-73-189-229.dynamic.dsl.as9105.com] has quit [Ping timeout: 258 seconds] 19:05 -!- kadoban [~mud@unaffiliated/kadoban] has joined #bitcoin-core-dev 19:22 -!- Dyaheon [~Dya@a91-156-192-24.elisa-laajakaista.fi] has quit [Ping timeout: 272 seconds] 19:22 -!- Dyaheon [~Dya@a91-156-192-24.elisa-laajakaista.fi] has joined #bitcoin-core-dev 19:33 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-sbibnlgefajgorpk] has quit [Quit: Connection closed for inactivity] 19:38 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has joined #bitcoin-core-dev 20:02 -!- d_t [~textual@108-65-78-188.lightspeed.sntcca.sbcglobal.net] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 20:12 * luke-jr wonders if his reply to petertodd was poorly worded 20:48 -!- waxwing [~waxwing@185.16.85.171] has quit [Ping timeout: 240 seconds] 20:52 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Remote host closed the connection] 20:53 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 21:04 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Remote host closed the connection] 21:04 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 21:13 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Remote host closed the connection] 21:13 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 21:17 -!- mol [~molly@unaffiliated/molly] has quit [Ping timeout: 240 seconds] 21:22 -!- moli_ [~molly@unaffiliated/molly] has joined #bitcoin-core-dev 21:24 -!- Dyaheon [~Dya@a91-156-192-24.elisa-laajakaista.fi] has quit [Ping timeout: 246 seconds] 21:27 -!- Dyaheon [~Dya@a91-156-192-24.elisa-laajakaista.fi] has joined #bitcoin-core-dev 21:51 -!- Giszmo [~leo@pc-240-13-215-201.cm.vtr.net] has quit [Quit: Leaving.] 22:01 -!- paveljanik [~paveljani@unaffiliated/paveljanik] has quit [Quit: Leaving] 22:04 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has quit [Remote host closed the connection] 22:22 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has joined #bitcoin-core-dev 22:29 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has quit [Remote host closed the connection] 22:30 -!- SopaXorzTaker [~SopaXorzT@unaffiliated/sopaxorztaker] has joined #bitcoin-core-dev 22:31 -!- cryptapus_afk [~cryptapus@unaffiliated/cryptapus] has joined #bitcoin-core-dev 23:42 -!- marcoagner [~user@187.113.155.232] has quit [Ping timeout: 260 seconds] 23:54 -!- marcoagner [~user@177.99.121.149] has joined #bitcoin-core-dev