19:00:04 #startmeeting 19:00:04 Meeting started Thu Jun 8 19:00:04 2017 UTC. The chair is wumpus. Information about MeetBot at http://wiki.debian.org/MeetBot. 19:00:04 Useful Commands: #action #agreed #help #info #idea #link #topic. 19:00:07 #bitcoin-core-dev Meeting: wumpus sipa gmaxwell jonasschnelli morcos luke-jr btcdrak sdaftuar jtimon cfields petertodd kanzure bluematt instagibbs phantomcircuit codeshark michagogo marcofalke paveljanik NicolasDorier jl2012 instagibbs 19:00:10 hi 19:00:12 hi 19:00:14 hi 19:00:15 hi 19:00:29 proposed topics? 19:00:49 hi. 19:00:51 UI interaction with pertxout upgrade? 19:00:57 #bitcoin-core-dev Meeting: wumpus sipa gmaxwell jonasschnelli morcos luke-jr btcdrak sdaftuar jtimon cfields petertodd kanzure bluematt instagibbs phantomcircuit codeshark michagogo marcofalke paveljanik NicolasDorier 19:01:07 sipa: ack 19:01:33 ok, let's do high priority for review first, then that 19:01:37 #topic high priority for review 19:01:54 #10148 19:01:56 https://github.com/bitcoin/bitcoin/issues/10148 | Use non-atomic flushing with block replay by sipa · Pull Request #10148 · bitcoin/bitcoin · GitHub 19:01:59 I've rebased multiwallet etc 19:02:08 luke-jr: great! 19:02:12 (^ will double our effectively available dbcache) 19:02:30 luke-jr: sae there were some new review comments, did you address them yet? 19:03:00 wumpus: I believe all review comments are addressed or answered 19:03:12 added 10148 19:03:15 thanks! 19:03:51 still waiting on my current one, thanks wumpus for benchmarking 19:03:58 #8694 now passes gitian, will re-utack soon 19:04:01 https://github.com/bitcoin/bitcoin/issues/8694 | Basic multiwallet support by luke-jr · Pull Request #8694 · bitcoin/bitcoin · GitHub 19:04:13 jtimon: a very nice gain! 19:04:38 oh, there was a comment asking for tests.. 19:04:52 I didn't write any, although I agree they would be nice 19:04:55 jtimon: unfortunately bitcoind nuked my log so I can't get the timings, but 26% savings in block hash operations is noce 19:05:06 wumpus: nice 19:05:37 we're talking about #10339 in case someone is lost 19:05:40 https://github.com/bitcoin/bitcoin/issues/10339 | Optimization: Calculate block hash less times by jtimon · Pull Request #10339 · bitcoin/bitcoin · GitHub 19:05:43 luke-jr: well I'd say add those later, this is only the first in a series towards multiwallet after all 19:06:02 wumpus: status on account to label conversion? 19:06:02 indeed, it might not be possible to test right now since it's not exposed to RPC 19:06:06 wumpus: "in block hash operations" hmm? can you be more specific? 19:06:08 Related to hashing, does anyone here have AMD ryzen yet? 19:06:12 whats that compared to total runtime? 19:06:32 BlueMatt: I don't know about time, I just instrumented the block header hash function 19:06:34 BlueMatt: it's tiny vs total runtime, I assume-- but it should impact latency on block handling somewhat. 19:06:38 gmaxwell: no, but I'd been holding out for SHA2 acceleration before upgrading, so I might get one if AMD is competing with Intel again 19:06:55 related topic: sha2/crc32 hw accel? 19:07:08 as I said, I lost the timings (blame bitcoind nuking the log if it's too large) 19:07:11 luke-jr: Ryzen has the sha2 instructions... so I'm asking to find out if anyone will be able to test support for them. :) 19:07:23 gmaxwell: right, that's why ;) 19:07:48 I just haven't had time to investigate the pros/cons otherwise yet 19:07:58 sipa: no progress on that yet 19:08:02 In any case, 98% of the work needed to support sha2 instructions is the same as using SSE4 SHA2 which will itself be a non-trival speedup. 19:08:29 crc speedup should be possible after the leveldb upgrade that sipa PRed 19:08:39 gmaxwell: we removed SSE4 stuff years ago, but I'm not sure if it was used for non-mining 19:08:49 luke-jr: it was only used for mining at the time 19:08:50 BlueMatt: IIRC I instrumented and measured accepting a block at tip hashed the header ~6 times or so. 19:08:53 luke-jr: it was mining only. 19:09:00 luke-jr: that was a different one, the N-way-parallel 19:09:11 yup 4-way parallel SSE2, iirc 19:09:11 and it was a vector SHA2 that had to work on 4 elements at a time. 19:09:36 gmaxwell: that's before or after the patch? 19:09:37 What we should be implementing now is the one at a time SIMD sha2. I believe matt uses it in fibre but without autodetection. 19:09:38 it seems we've strayed from the topic? 19:09:41 jtimon: before. 19:09:41 I wonder if it'd be worth using 4-way for merkle trees etc 19:09:42 gmaxwell: yea, but if its not measurable on the total, unlikely to be worth the effort and complexity.....an alternative - do we have CBlockIndex*es in most of those places? pblockindex->GetBlockHash() is free and simpler than passing hashes around 19:09:45 Will have access to a Ryzen in a couple of days via Hetzner 19:10:13 * luke-jr wonders if the GCC compile farm has a Ryzen 19:10:37 Without doing a thorough review of 10339, is the speedup worth it as opposed to the tradeoff on making the code a little more complicated/involved. Who was it that said the primary point of source code is to communicate between developers 19:10:51 #10339 19:10:53 It just seems weird to pass a block and separately it's hash into a bunch of functions 19:10:53 https://github.com/bitcoin/bitcoin/issues/10339 | Optimization: Calculate block hash less times by jtimon · Pull Request #10339 · bitcoin/bitcoin · GitHub 19:11:07 BlueMatt: what's wrong with passing hashes around? 19:11:26 DoPartOfConnectBlock(42 args) 19:11:27 #topic Optimization: Calculate block hash less times by jtimon 19:11:35 we already have too many args in many of those functions 19:11:38 "fewer" :P 19:11:54 well if hashing is a bottleneck, the obvious optimization is to just to it less 19:11:56 instagibbs: i didn't want to say anything :) 19:12:04 wumpus: is it? 19:12:08 if hashing is not a bottleneck, then going after SSE and such makes no sense either 19:12:26 BlueMatt: i believe that in all places where we already have CBlockIndex, no new block hashes are computed 19:12:34 all of the cases in 10339 are before having a CBlockIndex 19:12:39 so if #10339 is not an improvement then we can leave hashing alone 19:12:41 https://github.com/bitcoin/bitcoin/issues/10339 | Optimization: Calculate block hash less times by jtimon · Pull Request #10339 · bitcoin/bitcoin · GitHub 19:12:44 Well my suggestion on that hash thing was just to cache the hash in the block object, but Pieter said he prefered this. 19:12:46 instagibbs: calculate fewer times? thanks 19:12:59 (I also implemented that, though in a way that wasn't correct for the mining code.) 19:13:06 gmaxwell: I highly prefer that, though making CBlock const ala CTransaction is a bit more involved 19:13:09 gmaxwell: if we create another CBlock for the cases where that's not needed 19:13:18 (like GetTransaction and mining code) 19:13:26 Node also that we're sometimes getting the hash from the index and sometimes from the CBlock 19:13:38 right, calculating it eagerly can also result in overhead 19:13:43 I'd just like to see some evidence, even a little bit, that this optimization is worth it. 26% fewer hashing operations results in what savings? Or do people not agree it makes the code a bit more cumbersome 19:14:07 i don't see much problem in passing a hash along with a block if you know it 19:14:21 passing in the hash as a part of ProcessNewBlock? yuck 19:14:22 it's certainly a bit of complication, but a trivial one 19:14:22 morcos: sure, my point is just that if 26% fewer hashing operations isn't worth it, then using special intstructions to gain a few % is netiher worth it 19:14:25 seems like there are probably lower hanging fruit in optimizations but meh 19:14:28 I just spent a bunch of time getting fewer args there 19:14:45 wumpus: well hashing occurs a lot more often than in the calculations of these block hashes 19:14:52 to separate the consensus code from net_processing, now we're adding more coupling :( 19:14:53 it seems to me that the reserve is mostly a question of style 19:14:54 morcos: My reason for bringing it up is that I believe the repeated hashing is on the latency critical path for block propagation to the tune of maybe a millisecond-ish. 19:15:08 I mean calculating it eagerly can penalize in some cases, right 19:15:22 wumpus: these optimizations just prevent repeated hashing of the headers, in terms of total bytes hashed while syncing thats pretty small even though we do have a high repetition factor. 19:15:36 jtimon: what case would computing it early peanalize? 19:15:37 gmaxwell: ok... 19:15:38 BlueMatt: my preference is to sacrifice a little performance for better architecture ;) 19:15:42 i will try to benchmark the effect on validation speed for this 19:15:52 CodeShark: I think that's a fair argument 19:15:56 wumpus: transaction hashing accounts for far more than block header hashing, but not on the critical path 19:16:02 gmaxwell: when the validation fails for some other reason before you need the hash? 19:16:04 * BlueMatt would be more ok if we calculated it at the top of ProcessNewBlock and pass that one around, but still not ideal 19:16:11 passing it in to ProcessNewBlock is.....ugh 19:16:36 jtimon: I don't think there is any validation failure path where we don't hash... after all, we'll want to know _what_ block hash failed to validate. 19:16:38 BlueMatt: you could have said that when each function had a separated commit, but I can leave that out 19:16:46 or, really, chnging the signatures of stuff in validation.h for this without a benchmark showing its a real win :( 19:16:58 gmaxwell: yeah, fair enough 19:17:16 * morcos has said his piece and is willing to let the people who spent more time thinking about this decide 19:17:22 ok, clear, better to close it I guess, would have made sense to have this discussion earlier 19:17:24 so we come back to only the "ugh" argument 19:17:40 But I still don't understand why sipa prefered to do this jtimon patch instead of making the object cache it. FWIW, just monkey patching it 'works' and the only obvious issue is mining. 19:17:57 gmaxwell: and every other read from disk 19:18:46 I preferred this because I think it's simpler than the cache, even if it's "ugh" 19:18:49 sipa: I don't understand your comment. 19:18:54 i consider adding more arguments to validation-specific functions less invasively than changing a primitive datastructure 19:18:58 we can do both, if needed 19:19:16 sipa: I tend to agree 19:19:26 gmaxwell: i believe we often read blocks from disk without caring about its hash, because we already know it 19:19:35 sipa: just passing extra arguments is easier to reason about than extending primitive datastructures 19:19:39 sipa: the read funcion computes it! 19:19:46 gmaxwell: ? 19:20:01 currently, yes, as a checksum 19:20:17 if we care about the checksum functionality, we should add a crc 19:20:20 // Check the header 19:20:20 if (!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams)) 19:20:20 jtimon: I agree, caching is always somewhat risky and error prone, this is more explicit and clear 19:20:23 return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString()); 19:20:48 then again if it's not worth it, performanec wise, we shouldn't do it at all 19:20:52 not in another way either 19:21:02 making the block hash part of CBlock makes us unable to skip computing that hash 19:21:09 even in places where we don't care about it 19:21:13 I think I previously gave figures on the latency impact of caching. 19:21:17 how can I benchmark this to convince morcos? 19:21:34 sipa: Where are those places? 19:21:34 I don't know, I tried 19:22:09 gmaxwell: every time we read a block from disk, we already have its hash (because that's how we look it up!) 19:22:26 sipa: don't we also hash all the transactions when we read a block from disk? 19:22:28 gmaxwell: recomputing it there serves as nothing more than a checksum 19:22:30 surely that dominates all this 19:22:34 sipa: i know i said i'd shut up, but you just read from DISK, who cares if you hash 80 bytes? 19:22:41 might be time for next topic, if this is not a perf issue, might be better to discuss it after meeting 19:22:57 sdaftuar: good point. 19:23:02 sdaftuar: we don't. I used to think we did but we do not. 19:23:15 yes, we do 19:23:23 sipa: where? 19:23:32 deserializing a transaction computes its hash 19:23:50 oh right, what we don't do is validate the hashroot. 19:23:53 let's discuss this after the meeting 19:23:59 k 19:24:45 next topic? 19:24:56 #topic UI interaction with pertxout upgrade 19:25:16 in any case, BlueMatt morcos if you already knew you didn't liked this, I would have appreaciated knowing it earlier, maybe a provisional concept NACK or something 19:25:45 so, since 10195, we'll have a possibly lengthy (minutes on decent hardware, possibly much longer elsewhere) upgrade process from the old per-txid utxo db to the per-txout one 19:25:52 jtimon: yes sorry, i only looked at the PR during todays meeting, also why i said i'd stop arguing about it 19:26:04 that needs some GUI interaction, i believe 19:26:08 jtimon: same here, this should have been clear sooner, otherwise I wouldn't have spent as much time on it 19:26:19 or perhaps even in bitcoind 19:26:36 wumpus: in general perf improvements shoudl include data in the PR request when possible I think 19:26:40 jtimon: it's kind of disappointing to discover this does what it says on the tin, save ~1/4th of block hash operations, just to discover that's not even important 19:26:44 Can you not just use uiInterface.Progress() like in VerifyDB? 19:26:45 jtimon: that kind of annoys me 19:26:57 jonasschnelli: that doesn't let you interrupt 19:27:07 sipa: yeah i noticed that it doesn't even output to debug log that its doing an upgrade right? 19:27:14 it should log 19:27:19 "Upgrading database..." 19:27:20 jonasschnelli: I'd think users should be able to send txs during the upgrade. 19:27:21 oh 19:27:40 luke-jr: but RPC is also not ready in this case? RIght? 19:27:44 morcos: it logs, but you won't see it if you have leveldb logging turned on. :P 19:27:46 nothing works during the upgrade 19:27:51 there is no full node available 19:28:05 why would you then need interruption? 19:28:10 it should at least show a progress indicator and be interruptible indeed, ideally 19:28:13 because maybe it takes too long 19:28:20 and they want to continue another time 19:28:36 yes, because the user may want to do something else with the computer, having not expected to have to spend a long time upgrading 19:28:44 by interruption this means 'crash', not continue running without the upgrade. 19:28:44 anyway, I would still like to benchmark it if anyone can help me (not sure what to do) 19:28:50 Ah.. the update can be done in multiple steps.. 19:28:57 yes 19:28:58 well that would also need communication then 19:28:59 gmaxwell: well 'exit' not crash 19:29:07 same difference 19:29:10 sipa: yeah i missed that somehow, sorry 19:29:13 crashing "should" be fine 19:29:29 it better be! :) (also, I've tested it a fair bit) 19:29:30 [Updating 0%] \n You can shutdown and continue later [Shutdown-Button] <-- something like that? 19:29:37 jtimon: benchmarking the reindex chainstate maybe? 19:29:39 jonasschnelli: like that. 19:29:39 what if you crash, run the old version, and then the new one again? 19:29:47 jtimon: I still wonder why -stopatblock doesn't work 19:30:18 luke-jr: you get to keep both pieces? (I believe the old version will tell you the database is corrupt and stop there.... but I haven't tested that, so it's a good question.) 19:30:21 wumpus: no; that's dominated by tx validation/deserialization... a good benchmark tests block validation given fully populated mempool and sigcache etc 19:30:29 How about logging? Can we log similar to the VerifyDB [the non-newline % steps]? 19:30:38 jonasschnelli: sure 19:30:40 sipa: ok... 19:30:48 I can work on that. Seems to fit my skillset. :) 19:30:51 gmaxwell: IMO users may get tired of waiting and prefer to start the upgrade over in exchange for being able to use the old version in the meantime 19:30:51 sipa: perhaps it could be as simple as using -upgradeutxodb=1 once or something of the sort? 19:30:52 sipa: good luck doing that in a deterministic way, though 19:30:53 maybe VerifyDB or something like that can pass a bool saying "interruptible" ? 19:31:04 luke-jr: sounds like a case we should handle. 19:31:05 jtimon: you can't not do it 19:31:29 jtimon: i mean, -upgradeutxodb=0 would mean just exiting immediately :) 19:31:37 no, the upgrade needs to be done 19:31:42 we could prompt before starting to warn the user, but IMO we'd probably want to begin ASAP, even if we hold off destroying backward compat until the user OKs it 19:31:51 meh. 19:32:01 sure, you could warn... 19:32:07 Keep in mind that on a reasonably fast computer the upgrade does not take long. 19:32:07 no, I mean once you set -upgradeutxodb=1 once it doesn't matter what you set anymore 19:32:09 it's a new major release, i don't care about backward compatibility; the user can always reindex if they really need to 19:32:13 so just to be clear, right now if someone went back to an old version, there is some chance they'd screw themselves right? 19:32:23 (and need to reindex) 19:32:32 morcos: yes, it simply doesn't work. We should warn in the release notes. 19:32:37 morcos: i believe that with very high probability the startup sanity check will fail 19:32:38 pruned nodes cant reindex 19:32:44 morcos: old version rejects with a "your database is corrupted" though luke was asking an interesting question about what happens if you do this mid-conversion. 19:33:02 we coudl have added logic to 0.14.2 to detect the new format and give a more specific error 19:33:03 sipa: yeah that was my question, how far do you have to get along in the upgrade before your sanity check would fail with high probability 19:33:07 sipa: I did test that case, how could it not fail? 19:33:25 we only go back 6 blocks now in the startup sanity check i think 19:33:26 wumpus: IMO it'd be better to destroy the upgrade so it starts over, and work (for incomplete upgrades) 19:33:31 isn't it possible you don't come across any bad entries? 19:33:35 wumpus: hm? I don't think that would be the right way, the right way would be to make the new version more incompatible. 19:33:53 gmaxwell: ok... 19:34:02 there is a trivial change we can make that guarantees old versions will treat it as an empty db 19:34:24 change the dir name? 19:34:28 haha 19:34:31 gmaxwell: I just mean a specific error like 'the utxo database is in a newer format than supported by this version' would be clearer than a general sanity check error 19:34:33 yes, i've considered that too 19:34:34 empty db == corrupt and leave it so the new version can continue 19:34:39 no there is just the height index entry. 19:34:39 wumpus +1 19:34:45 but I don't know ,sorry for suggesting it 19:34:46 wumpus: oh, sure that would have been okay! 19:34:51 thats at least somethign we shoudl do for future changes 19:34:51 wumpus: unfortunately it doesn't have a version number 19:34:55 luke-jr: we could move the main datadir to ./bitcoin/main maybe 19:34:55 agree 19:34:57 using a new db would also mean users from pre-obfuscation get that enabled.. 19:35:10 a new db is a possibility 19:35:18 sipa: we could have added one! but yes, too late. 19:35:19 though i'd prefer to not need 2x disk storage during the upgrade 19:35:25 not too late 19:35:27 sipa: what was the trivial change you were referring to 19:35:45 morcos: change the record name for the 'best block hash' entry 19:35:52 the database stores a record to indicate the current tip; we can just change that. 19:35:56 and set the old one to something invalid 19:36:23 [19:35:19] though i'd prefer to not need 2x disk storage during the upgrade <-- IMO unavoidable if the "user gets tired of waiting and runs old version" is desired to work okay 19:36:32 FWIW the non-atomic flushing change already changes those records around. 19:36:39 yup 19:36:46 well, in a backward compatible way 19:36:47 I don't think we should support user gets tired of waiting. 19:36:59 too high a cost for too low a benefit. 19:36:59 it's even easier if it doesn't need to be backward compatible 19:37:15 gmaxwell: yes we shouldn't support it, but it might be nice to support they tried to do it and didn't corrupt their database by trying so they now have to reindex 19:37:41 morcos: yes, in practice that is the case but it isn't guarenteed. We could make it guarenteed. 19:37:44 gmaxwell: well just exiting and continuing the upgrade later would be ok 19:38:02 wumpus: yea, that works except we don't have an exit button other than kill -9 :) 19:38:03 wumpus: also, i don't understand why the CompactRange doesn't work for you 19:38:21 if it's not guaranteed (or even not likely) to work, maybe the 2x disk storage is inevitable 19:38:27 and we're better off explicitly creating a new db 19:38:36 sipa: I don't know either, could try it again if you think it's a fluke... 19:38:48 i'll test it myself again too 19:38:51 I tested an earlier range compacting patch and it did work. 19:39:00 I'll also test. 19:39:21 monitor disk usage during upgrade, with and without compactrange patch 19:39:23 would be nice 19:39:37 and maybe this discussion depends on the outcome there 19:39:58 if indeed compacting isn't reliable we should change to create a new database. IMO 19:40:05 agree 19:40:30 it might have to do with my test framework, I'll copy the database directory next time instead of using my usual hardlink hack 19:41:02 (FWIW, the reason I checked compacting before is because I was going to suggest changing to a new database if it didn't work.) 19:41:06 other topics? 19:41:27 crc32 leveldb 1.20? 19:41:32 ^ 19:41:41 #topic crc32 leveldb 1.20 19:41:41 gmaxwell: agreed on cost/benefit for supporting interruption, much easier to require confirmation with a warning "this may take a while and cannot be interrupted" or something 19:42:07 sipa: Why is travis failing? 19:42:09 i personally really dislike the approach they're using (which seems to be the advised way even), which requires a separate object compiled with different flags 19:42:25 gmaxwell: i assume incompatibility with our own build system integration of leveldb 19:42:35 compiling a separate object with special flags is pretty much the standard way of doing it 19:42:57 they're even abusing it... they're calling the new object without knowing that the CPU supports it 19:43:25 ok, that's not good 19:43:27 Compiling a new object with different flags is standard and correct, calling it without knowing, is wrong. 19:43:33 yes 19:43:45 the detection function should not be in that object 19:43:46 the approach in #10377 is so much easier 19:43:48 https://github.com/bitcoin/bitcoin/issues/10377 | Use rdrand as entropy source on supported platforms by sipa · Pull Request #10377 · bitcoin/bitcoin · GitHub 19:43:49 simple as that 19:44:34 that only works because you don't spell out the instruction but put it in binary, if you spelled out the instruction it would have to be compiled with a special flag 19:44:56 you can't use e.g. sse4.2 instructions if the object isn't compiled with that 19:45:00 IIRC MSVC has banned inline ASM, if we don't care about MSVC then we're free to do other things. However, you need to do the object thing if you want to use code that accesses simd via intrensics, for something like rdrand or clmul it's no big deal to use asm. 19:45:07 ok ok 19:45:36 gmaxwell: yes, intrinsics are more compatible 19:45:57 here! 19:46:31 so we need to fix leveldb to now call into that object without having done the detection. Anything else needed there? 19:46:41 I don't think leveldb's way is wrong, except for putting the detection function in the instruction-set specific object 19:47:14 oh, i was supposed to mention cfields_ would be late 19:47:25 heh, thanks 19:47:34 maybe we can open an issue on their repo or something? 19:47:38 you're welcome :) 19:47:48 jtimon: the issue is in our own build system integration, i'm sure 19:47:51 not upstream 19:48:05 oh, you mean for calling the machine specific object? yeah 19:48:06 wouldn't upstream have the same problem then? 19:48:08 jtimon might have been referring to the detection in the wrong object, thats just wrong. 19:48:13 yeah, agree 19:48:18 if they ever look at issues... 19:48:18 gmaxwell: sipa right 19:48:21 we should submit a fix, it should be trivial. 19:48:27 that's done already: https://github.com/theuni/bitcoin/commit/2cb7dda13884e44105f33c16e7e2c1a9aed46295 19:48:33 yes better to submit a fix, submitting an issue likely won't help 19:48:35 cfields_: oh! 19:48:36 or are you guys talking about something else? 19:48:56 probably not 19:48:58 let's try 19:49:09 okay, we have actions here. 19:49:33 lol oh, cfields did it already 19:49:37 that enables the runtime detection and separate object, but iirc there's still a little generic code that may end up with the wrong instructions 19:49:45 cfields_: yup... 19:50:15 that just needs to be moved into another file, I expect. 19:50:22 yup 19:50:26 let's do that independently 19:50:28 yes, move all the code out of it except for the function itself 19:50:42 should be a trivial patch we can take locally and send upstream. 19:50:51 i even linked it on the PR! :) 19:50:51 heh, sorry I was late. Movers showed up at 3:00 exactly :\ 19:51:19 We'll need to do the same thing for SSE4 (and sha2 instruction) sha2. 19:51:40 cfields_: that doesn't seem related the meeting started at 21:00 :p 19:51:59 from what I remember that's actual assembly code from intel, in .s format, not using intrinsics 19:52:07 ah. okay! 19:52:18 jtimon: 3:00 is meeting time for east USA 19:52:29 luke-jr: sure, bad joke, sorry 19:52:38 i suspect I missed this discussion too, but I have intrinsics done for sha2 19:52:43 I usually expect corporate code to be intrinsics because having good performance is not enterprise enough. :P 19:52:55 https://github.com/laanwj/bitcoin/commit/7e3e717892d96cae7f05dd1b6742425a298cc12e 19:53:05 it's even in yasm format 19:53:19 wumpus: ah, i'll shut up :) 19:53:36 I'm very exicited about getting the faster hash in, with all our other improvements, I'm now expecting a 8% IBD speedup. 19:53:46 if not more. 19:53:55 cfields_: you mean sha-specific instructions? the stuff I quote is from before that 19:54:12 * jtimon was used to the other notation and used assemble with nasm, but it's pretty sure we don't want that 19:54:15 wumpus: yea, intrinsics for intel sha1/2 19:54:27 it just implements a SHA using SSE4/AVX, so it works on older architectures.. 19:54:29 jtimon: ha, cool 19:54:44 wumpus: no license issues? 19:54:59 sipa: not cool, I should have learned with the at & t notation, no? 19:55:01 sipa: it's permissively licensed IIRC. 19:55:09 wumpus: ah, nice. I suspect that's where the leveldb discussion came from. We can re-use the build-time logic for sure. 19:55:10 sipa: it's either MIT or BSD 19:55:20 jtimon: just swap the argument order :) 19:55:52 spot-the-license https://github.com/laanwj/bitcoin/blob/7e3e717892d96cae7f05dd1b6742425a298cc12e/src/crypto/sha256_avx1.asm#L10 19:55:55 Before the metting closes, I'd like to remind people that Matt's caching change #10192 is a 31% block connection speedup. It's done, rebased current, and needs review. 19:55:59 https://github.com/bitcoin/bitcoin/issues/10192 | Cache full script execution results in addition to signatures by TheBlueMatt · Pull Request #10192 · bitcoin/bitcoin · GitHub 19:56:24 #topic cache full script execution 19:56:24 sipa: yeah, I think that's mostly it, and some minor things I think, but I was too lazzy to translate the programs I had 19:57:41 I don't know that there is too much to say about 10192. It saves a lot of operations when checking if an already validated tx is cached. It's fairly straight forward. 19:58:14 yeah, let's do it 19:58:28 seems it had a lot of review, no (ut)ACKs though 19:58:57 I'm working on an ACK now. Just want other people to look, it sat for a long time needing rebase. 19:59:16 right 19:59:18 on the list 19:59:20 +1 19:59:48 it's already on the high priority for review list 19:59:57 The non-atomic flush stuff is also still outstanding, but I think it might get slightly changed based on todays per txo discussion. 19:59:58 cfields_: yours commit (after trivial cherry pick) works 20:00:33 #endmeeting