< bitcoin-git> [bitcoin] denis2342 closed pull request #12541: streamlined the use of include_hex (master...master) https://github.com/bitcoin/bitcoin/pull/12541
< eklitzke> 31% of the time in ReadBlockFromDisk() is spent in prevector::resize
< eklitzke> smh
< eklitzke> actually that's just one of the code paths, altogether it's 37% if you count the other code paths
< sipa> that's remarkable
< sipa> oh, scriptSigs
< sipa> (for scriptPubKeys, prevector should almost never need an allocation)
< sipa> \o/ flame diagram
< sipa> and 44% in sse4_transform
< eklitzke> i don't quite get it, so when you call resize() on a prevector, if it grows the vector it calls operator new in a loop for the full new capacity?
< cfields> eklitzke: I assume it mallocs what's needed, then calls placement-new for each element
< sipa> eklitzke: those are just placement news, they don't allocate
< eklitzke> ah
< cfields> if that's the case and where it's spending its time, we could short-circuit that for the unsigned char case.
< sipa> eklitzke: it's filling the new space with objects (which should be trivial in the case the type is unsigned char)
< sipa> cfields: ack
< sipa> didn't you have a branch to do that?
< cfields> sipa: i did at one point, but I believe the main slow-down was in the dtor, which was fixed. so I didn't go any further with it
< cfields> eklitzke: grep for is_trivially_destructible. We could do the same for the ctor and is_trivially_default_constructible.
< cfields> (though it should be possible to skip the runtime check entirely with SFINAE)
< eklitzke> wait does this actually do the is_trivially_destructible check at runtime?
< eklitzke> yeah
< eklitzke> that's where i was going to go
< sipa> eklitzke: a smart compiler will do it at compile time
< cfields> eklitzke: hopefully the compiler optimizes it away
< cfields> heh
< eklitzke> right, looks strange to me though
< sipa> it's possible to write the code in a way that forces it at compile time
< eklitzke> yeah i'm used to doing this with std::enable_if
< eklitzke> i'll try to make the prevector code a little faster
< cfields> eklitzke: you may find it helpful to add resize() to the existing prevector benches
< cfields> that'd make it trivial to demonstrate a speedup
< eklitzke> good advice, i wouldn't have thought of that
< sipa> also, given that the only instance of prevector today uses unsigned char, you could just unconditionally hack it in and remove that loop entirely (for the purpose of benchmarking it)
< Randolf> I'm hoping someone can help me with this -- I tried to rebase PR #12546 down to a single commit, but it's just not showing up on GitHub, although "git log" shows me what I'm expecting to see. Is "git push -f" not synchronizing because the Travis CI build failed? Thanks in advance.
< gribble> https://github.com/bitcoin/bitcoin/issues/12546 | [docs] Minor improvements to Compatibility notes by randolf · Pull Request #12546 · bitcoin/bitcoin · GitHub
< esotericnonsense> Randolf: you pushed to randolf:master rather than randolf:patch-3
< esotericnonsense> Randolf: the PR is tracking patch-3, https://github.com/randolf/bitcoin looks to have the single commit on top of master I think?
< Randolf> esotericnonsense: Oh, okay. I'll try to figure out what I've missed then. Thank you.
< Randolf> I did use this command prior to rebase: git reset --hard origin/patch-3
< cfields> eklitzke: something else you may be interested in benching, our utxo decompressor decompresses to a std::vector rather than a prevec, forcing an unnecessary copy into the resulting prevec.
< cfields> (from my reading of the code, anyway)
< cfields> though I realize you're probably just looking at blocks atm
< Randolf> Ah, yes, I see that "git push -f" is resulting in this: + 393545d85...b787a7fc6 master -> master (forced update)
< esotericnonsense> it sounds like you checked out master, reset it to origin/patch-3, then rebased and squashed, something like that.
< Randolf> I'm going to try again with a "git checkout patch-3" command. (I'm still new to git.)
< Randolf> That was it -- I missed the checkout step. It seems that I don't need to do the reset step then.
< bitcoin-git> [bitcoin] eklitzke opened pull request #12549: Make prevector::resize() and other prevector operations much faster (master...prevector) https://github.com/bitcoin/bitcoin/pull/12549
< sipa> eklitzke: nice!
< bitcoin-git> [bitcoin] bedri opened pull request #12550: Utils and libraries: Leveldb warning fixes (0.16...leveldbWarningFixes) https://github.com/bitcoin/bitcoin/pull/12550
< eklitzke> hmm, what version of gcc/libstdc++ does travis use?
< sipa> gcc 4.8 i believe
< bitcoin-git> [bitcoin] bedri closed pull request #12550: Utils and libraries: Leveldb warning fixes (0.16...leveldbWarningFixes) https://github.com/bitcoin/bitcoin/pull/12550
< bitcoin-git> [bitcoin] bedri opened pull request #12551: Leveldb warning fixes (master...leveldbWarningFixes) https://github.com/bitcoin/bitcoin/pull/12551
< esotericnonsense> hm.
< bitcoin-git> [bitcoin] fanquake closed pull request #12551: Utils and libraries: Leveldb warning fixes (master...leveldbWarningFixes) https://github.com/bitcoin/bitcoin/pull/12551
< bitcoin-git> [bitcoin] Empact opened pull request #12553: Prefer wait_until over polling with time.sleep (master...wait-until) https://github.com/bitcoin/bitcoin/pull/12553
< bitcoin-git> [bitcoin] multibhw opened pull request #12555: Tweet RUN TIME (master...TWEET) https://github.com/bitcoin/bitcoin/pull/12555
< bitcoin-git> [bitcoin] fanquake closed pull request #12555: Tweet RUN TIME (master...TWEET) https://github.com/bitcoin/bitcoin/pull/12555
< hkjn0> eklitzke: cool flame graph! mind sharing how you produced it?
< mistakenine> hi,Is there anyone interested in a parallel block chain?a complex data structure
< bitcoin-git> [bitcoin] laanwj pushed 1 new commit to 0.16: https://github.com/bitcoin/bitcoin/commit/5d41110c745c74e1eeb85f187f54777bf5e6407f
< bitcoin-git> bitcoin/0.16 5d41110 Wladimir J. van der Laan: doc: Clear out release notes post-0.16.0...
< bitcoin-git> [bitcoin] laanwj pushed 1 new commit to 0.16: https://github.com/bitcoin/bitcoin/commit/01f931b928fbe0266b3a8d48d0fb2ecc728bd7f3
< bitcoin-git> bitcoin/0.16 01f931b Wladimir J. van der Laan: test: Add missing signal.h header...
< mistakenine> hi,Is there anyone interested in a parallel block chain?a complex data structure
< mistakenine> to see all the parallel blockchain as a whole
< wumpus> mistakenine: not here please
< provoostenator> CubicEarths: I know, I prefer the GUI myself. But technical people can use bitcoin.conf, so it's the less-technical users I'm trying to help here.
< wumpus> (a "parallel chain" is an interesting self-contradiction, anyway)
< mistakenine> yes,but i find a way to give a solution
< mistakenine> it's a very hard problem
< CubicEarths> provoostenator: understood.
< mistakenine> i give a math proof,but don't know how where to discuss that
< wumpus> mistakenine: not here at least, it has nothing to do with bitcoin core development
< bitcoin-git> [bitcoin] tamasblummer opened pull request #12556: [Trivial] fix version typo in getpeerinfo RPC call help (master...fix_version_typo) https://github.com/bitcoin/bitcoin/pull/12556
< bitcoin-git> [bitcoin] Sjors opened pull request #12557: [WIP] [depends] openssl: add aarch64_darwin (master...2018/02/depends-openssl-aarch64-apple-darwin1) https://github.com/bitcoin/bitcoin/pull/12557
< rabidus> Am I the only one who gets their top-bar written in chinese when clicking "use previously used address" in 0.16.0 @ windows? Binaries was downloaded from bitcoin.org. AVG detected something and moved quarantine, but I granted permission. Screenshot: https://pasteboard.co/H9zSGvJ.png
< michagogo> mlz: but I assume you don’t test on Vista
< michagogo> rabidus: o_O
< michagogo> I’ll check…
< mlz> michagogo, oh.. no, I do have a Vista, it doesn't have enough space for bitcoin :D
< michagogo> Seriously?
< michagogo> Why?
< rabidus> ok, AVG now says that the file is ok, so I assume that was because because of too fresh binaries :). Still that chinese top-bar is confusing
< rabidus> seems "ok" then :)
< michagogo> ken2812221: …
< michagogo> oops.
< rabidus> at least I'm not running any chinese binaries .. probably
< * michagogo> wonders if wumpus will want to put out a
< mlz> rabidus, that's very strange, i wouldn't use it, did you verify the binaries ?
< ken2812221> Maybe someone can fix it on Transifex
< michagogo> mlz: look at the link ken2812221 just posted
< michagogo> It’s in the source code
< rabidus> no, i didn't check any hashes, but as you can see from that translation url, it's "feature" :)
< michagogo> No, it’s definitely a bug
< rabidus> hehe, jk
< mlz> i see, but not verifying download files on windows is a crime :P
< Anduck> ^
< michagogo> I mean, the installer _is_ signed
< rabidus> wouldn't change anything
< rabidus> top bar would still be in chinese
< rabidus> :)
< michagogo> Which shows up when it asks you to elevate
< michagogo> Oh, there’s already #12577
< gribble> https://github.com/bitcoin/bitcoin/issues/12577 | HTTP Error 404: Not Found
< michagogo> I mean #12544
< gribble> https://github.com/bitcoin/bitcoin/issues/12544 | Bitcoin Qt 0.16.0 displays a window title in Chinese instead of English · Issue #12544 · bitcoin/bitcoin · GitHub
< rabidus> oh, ok, nice
< bitcoin-git> [bitcoin] drodil opened pull request #12558: Fix translations in en_US.ts (0.16...patch-1) https://github.com/bitcoin/bitcoin/pull/12558
< provoostenator> Somewhat related to the issue of translation review: #11875
< gribble> https://github.com/bitcoin/bitcoin/issues/11875 | Snoei: a.k.a. how to translate technical jargon · Issue #11875 · bitcoin/bitcoin · GitHub
< TyrfingMjolnir> Anyone got 2 consequtive sample blocks?
< TyrfingMjolnir> with full schematics
< bitcoin-git> [bitcoin] laanwj pushed 1 new commit to 0.16: https://github.com/bitcoin/bitcoin/commit/ea2e39fd2004e83375c1703543e32a10e3b9d981
< bitcoin-git> bitcoin/0.16 ea2e39f Wladimir J. van der Laan: qt: Remove faulty and unnecessary en_US translation...
< eklitzke> hkjn0: i have a wrapper script around perf(1) here that i use to actually collect the profiling data (which requires that you have a build with debug symbols): https://github.com/eklitzke/bitcoin-tools/blob/master/perf.sh
< eklitzke> then the flame graph itself is generated using https://github.com/brendangregg/FlameGraph
< eklitzke> i have a wrapper script for invoking that as well here: https://github.com/eklitzke/bitcoin-tools/blob/master/gensvg.sh (although in practice i've found i often want to use grep to filter out more data before invoking flamegraph.pl)
< bitcoin-git> [bitcoin] laanwj closed pull request #12558: Fix translations in en_US.ts (0.16...patch-1) https://github.com/bitcoin/bitcoin/pull/12558
< bitcoin-git> [bitcoin] laanwj pushed 2 new commits to master: https://github.com/bitcoin/bitcoin/compare/228b086b9a3d...9e2ed253f505
< bitcoin-git> bitcoin/master d16bfaa Tamas Blummer: fix version typo
< bitcoin-git> bitcoin/master 9e2ed25 Wladimir J. van der Laan: Merge #12556: [Trivial] fix version typo in getpeerinfo RPC call help...
< bitcoin-git> [bitcoin] laanwj closed pull request #12556: [Trivial] fix version typo in getpeerinfo RPC call help (master...fix_version_typo) https://github.com/bitcoin/bitcoin/pull/12556
< wumpus> michagogo: nah, IMO the only thing to warrant a release is a crash bug
< luke-jr> 0.16.0 crashes if I overclock my CPU by 50%. hjelp! :p
< wumpus> I get bit flips on one of my nodes even without overclocking, caused quite a panic this morning when it resulted in the node splitting from consensus
< provoostenator> So I've been studying how the QT send screen composes a transaction. It all seems to revolve around WalletModelTransaction.
< wumpus> yes, walletmodeltransaction is the GUI-side model for a transaction to be sent
< provoostenator> The way it works now is that an initial WalletModelTransaction is created, but several aspects of the transaciton are "stored" in the UI itself. E.g. there's a UI element that holds the list of destinations. Only when you hit Send is all that information collected and added to the WalletModelTransaciton instance.
< wumpus> yes, don't forget about the static coincontrol instance :(
< provoostenator> So I'm thinking about seperating the model from the view a bit better, so that any time you add / change a destination the WalletModelTransaction instance is updated and that's the source of truth.
< provoostenator> Which would be very nice for RBF: just give it a transaction hex, deserialize it and then render the UI.
< wumpus> that was really a bad design choice, but it was never cleaned up after the initial coin control contribution
< provoostenator> Yeah I've been digging through historical commits to see how this came to be :-)
< wumpus> yes, that'd probably be better
< provoostenator> But I wonder about the RPC. Wouldn't it benefit from some mechanism to build up a transaction in a modular way as well? So rather than needing to create a tranaction in one giant RPC command, you'd create a draft and manipulate that through smaller commands.
< provoostenator> And if that's the case, maybe this should all be moved one level deeper (and not depend on QT).
< wumpus> that's what the raw transactions API does
< wumpus> createrawtransaction, fundrawtransaction, signrwatransactions are the RPC equivalent of building up a transaction step by step
< wumpus> but intentionally entirely stateless
< wumpus> please do keep that code in qt, the reason for having a UI-specific structure there is to make it easier to split off the GUI some day
< provoostenator> Would it make sense to make CMutableTransaction more powerful though? Why wouldn't QT be able to include that?
< wumpus> if things are only necessary for the UI, it's better to keep the code in the UI
< provoostenator> Coin selection and replacing transaction seem useful to both RPC and UI to me.
< wumpus> RPC has that, in other ways
< wumpus> I think you're extending the scope of what you want to do too much
< provoostenator> I don't know, I'm trying to figure out what's the best approach here. My own scope was to improve RBF in QT, prefereably without reinventing the wheel.
< provoostenator> If that makes the RPC better that's nice, but not my goal.
< wumpus> if you want to improve the UI, then improving th UI is what to do, if you start refactoring all over the place it's much harder to move forward
< provoostenator> I agree that a huge refactor is a bad idea regardless.
< wumpus> refactor of the UI would be ok, but combining it with changing CMutableTransaction etc is just too much
< provoostenator> Actually I'm not sure if UI is my only concern here. I like the idea of keeping QT relatively simple and making it possible to build a UI on top of RPC (using whatever framework).
< provoostenator> But I agree that changing both at this point would involve too many moving parts.
< wumpus> I'm fairly sure it's possible to build this UI on top of listunspent and *rawtransaction API
< provoostenator> The above is a fairly complicated way to achieve RBF, but has the advatage of letting UI users tweak the new transaction anyway they want.
< provoostenator> A simpler approach would be improve the bumpfee RPC stuff and then create a UI where the user can merely change the fee, nothing else.
< provoostenator> (by "the above" I mean moving some stuff from the view code into WalletModelTransaction, I don't mean changing CMutableTransaction)
< michagogo> wumpus: I think I actually saw the commit that introduced the en_us translation
< michagogo> It was 5109347, which added a whole lot of translations
< michagogo> I remember I saw that and idly wondered what was going on there
< michagogo> And forgot to follow up on that thought
< michagogo> For example, I haven’t looked at the content, but I saw that it added a he_IL translation in addition to the existing he?
< michagogo> As far as I know there isn’t really a Hebrew besides he_IL
< michagogo> I also don’t really know how the translation stuff works
< wumpus> well it synced the transifex translations with the ones in the repository
< michagogo> That commit seems to introduce a bunch of new languages, but also a whole lot of new files with country codes where previously there was just the country-less language
< michagogo> Can anyone on transifex just create a new language?
< wumpus> well, if translations need to be deleted they need to be deleted from transifex first,t hen from the repository, that prevents them from coming back
< wumpus> no, they have to be approved
< wumpus> though the policy seems to be that everything is approved
< michagogo> And within the release cycle all those new ones went in?
< wumpus> it's hard to think of a valid reason to reject someone adding a translation for someone's language/country
< wumpus> though adding en_US was stupid :)
< michagogo> I suspect it might be a good idea to go over and do a sanity check of the languages that added a new single country code where previously there was just a bare language
< michagogo> For example, adding he_IL when he exists seems vaguely suspicious to me
< michagogo> Another example, de_DE was added when de exists, and no other de_XX versions
< michagogo> I would expect that bare de would be German German
< michagogo> If the new file were de_CH or something it would make sense, but…
< bitcoin-git> [bitcoin] promag opened pull request #12559: Avoid locking cs_main in some wallet RPC (master...2018-02-avoid-cs_main-lock) https://github.com/bitcoin/bitcoin/pull/12559
< bitcoin-git> [bitcoin] achow101 opened pull request #12560: [wallet][RPC] Set or generate a new HD seed (master...sethdseed) https://github.com/bitcoin/bitcoin/pull/12560
< bitcoin-git> [bitcoin] sdaftuar opened pull request #12561: Remove call to CheckBlock() in ConnectBlock() (master...2018-02-improve-checkblock-failure) https://github.com/bitcoin/bitcoin/pull/12561
< TyrfingMjolnir> How can I create my own local block chain and generate 10 valid blocks at random for development purposes?
< Chris_Stewart_5> TyrfingMjolnir: $ bitcoind -regtest -daemon && bitcoin-cli -regtest generate 10
< TyrfingMjolnir> Perfect, thanks
< wumpus> michagogo: I agree, but I don't have enough international lingual knowledge to make decisions about such things, if you find specific ones that make no sense, please report them
< wumpus> this has happened in the past, that a transifex translator reported that a certain language/locale pair makes no sense and it was removed
< michagogo> Yeah, I guess
< michagogo> It’s things like this that make me really wish I had free time to do stuff like go and look at he vs he_IL
< wumpus> but in the absence of specific information I tend to err on the side of allowing it
< michagogo> I’m on my phone on the bus, so I didn’t look into the content, but I see the new he_IL is much, much shorter than the existing he
< michagogo> Does Qt have a fallback thing, where if you’re set to xx_YY and a string is missing, it will use the translation for bare xx?
< michagogo> Or is each translation completely independent?
< wumpus> shortness doesn't matter, it will just override the general one for the messages that are specified
< michagogo> Okay, good - at least there’s that
< wumpus> e.g. fallback order would be he_IL -> he -> en/original
< michagogo> Okay, that’s good at least
< luke-jr> michagogo: wumpus: I did a sanity check a few months ago, and made a todo list
< luke-jr> but it's probably not updated anymore
< luke-jr> and I have no clue where I saved it :x
< michagogo> But I still doubt there’s anything that belongs in he_IL that shouldn’t just be in he
< luke-jr> someone should probably just do the obvious ones (eg, if there's no he, rename he_IL to it)
< luke-jr> and then contact people in non-obvious cases
< wumpus> wanted: localization maintainer
< michagogo> There’s a Hebrew with >80% coverage, and a Hebrew (Israel) with <3%
< luke-jr> that sounds about right?
< michagogo> Well, that’s not really a division that makes sense AFAIK
< luke-jr> the Israel one would presumably just have strings that differ from the "standard" Hebrew
< luke-jr> oh
< wumpus> right.
< luke-jr> disclaimer: I know nothing about the Hebrew language or its variations :P
< michagogo> Actually, the Windows 10 setup process asks you that at some point
< michagogo> When you choose a keyboard layout
< michagogo> I have no clue what the difference is…
< esotericnonsense> i think I submitted a translation for en_GB vs en_US at some point
< esotericnonsense> and then realised that someone who actually cares about the distinction should do it
< esotericnonsense> what's the default en? !?!?!?!?! </trollface>
< wumpus> US is the default
< wumpus> that's why it was wrong for a separate en_US translation to exist
< wumpus> en_UK would be a possible addition
< esotericnonsense> there is an en_GB
< esotericnonsense> or at least there was
< wumpus> ehh yes, GB
< wumpus> Great Britain instead of United Kingdom, I guess a distinction like Holland versus The Netherlands
< michagogo> I don’t know about the latter
< michagogo> But it’s the United Kingdom of Great Britain and Northern Ireland
< esotericnonsense> in this context it doesn't make a difference because there's no 'locality' to the fact we spell a few words slightly differently other than 'generally on that island'
< wumpus> strictly, Holland is a part of the Netherlands, Zuid and Noord Holland, but everyone uses them interchangably in practice
< michagogo> So UK would make more sense than GB, but that’s not what the standards organizations decided
< esotericnonsense> do norwegians learn 'color' or 'colour'? :D
< esotericnonsense> i feel like i'm bikeshedding a thing that no-one actually cares about, but the idea of inheriting feels a bit odd to me
< michagogo> Hm, why is en_US the default and not bare en?
< michagogo> Oh, I guess if something isn’t defined in en then it’ll fall through to en_US
< wumpus> esotericnonsense: it's simply how localization tends to work, so there's no use bikeshedding that here
< michagogo> But why have bare en at all?
< esotericnonsense> heh. some dialogs with 'colour' and some with 'color'. *shudders*
< wumpus> bare en is the source language
< * esotericnonsense> wanders off to do something useful
< wumpus> it cannot be edited on transifex
< michagogo> Uh
< michagogo> Is source different from default
< michagogo> ?
< wumpus> it's the language that the messages in the source code are in
< michagogo> Right, makes sense
< michagogo> But why have the default be en_US, and not just not use a translation by default?
< michagogo> Oh, wait
< michagogo> That’s what we do, since we deleted en_US
< michagogo> Never mind.
< wumpus> right, 'en' is not really a translation in our case, it only contains messages to be translated, no translations. There is no strict requirement that American English is the source language, it just happens to be the case for our project (and for many other projects).
< luke-jr> wumpus: American English is? I thought standard English was, and that's why we have an en_US translation? :x
< wumpus> no, we don't have an en_US translation, that was a mistake
< wumpus> it was accidentally added for 0.16
< wumpus> and removed again, now
< wumpus> the messages in the source code are American English (minimize, synchronize, etc), and that's what defines the source language
< wumpus> en_GB would be 'standard English'
< bitcoin-git> [bitcoin] bedri opened pull request #12562: Utils and libraries: Leveldb compile warnings (master...leveldbCompileWarnings) https://github.com/bitcoin/bitcoin/pull/12562
< eklitzke> i'm going to show my github ignorance here, but when a pull request gets merged, is the first comment on the PR (the one created by the PR author) what ends up in the git logs for the merge commit?
< achow101> eklitzke: we have our own github merging script that does that
< eklitzke> ok i think i understand, the right side of the merge has the original commits with their descriptions intact, and the merge commit itself is autogenerated with the pull request title, first comment description, and a signature
< sipa> correct
< CubicEarths> Why does the client seem to only download blocks a certain distance ahead of what the CPU has processed?
< sipa> CubicEarths: to not interfere too much with pruning
< sipa> (if the blocks are too much out of order on disk, you need to wait very long before a file which can contain a block of blocks from everywhere can be deleted)
< CubicEarths> I don't understand... I can see reasons related to being a good citizen on the network, but you are saying it has to do with my own node's syncing performance?
< sipa> if you enable pruning, you delete block files which only have old blocks in them
< sipa> this is not possible if every block files contains blocks from all over the place
< CubicEarths> ahh
< sipa> by not letting downloading getting ahead too far of validation (1024 blocks ahead max), we guarantee that after 1024 blocks, you're always able to delete the old files with blocks before that point (plus some overhead blocks, i think 288, to not interfere with reorgs)
< sipa> it doesn't really matter if you don't prune and don't plan to ever do so
< CubicEarths> yeah
< sipa> but it also doesn't hurt you much to restrict yourself to 1024 blocks ahead
< CubicEarths> well, sometimes you are near great internet, and it would be nice to be able to download blocks as fast as possible, and allow the processing to happen later
< CubicEarths> I am surprised that blocks are not put in blockfiles according to the block number
< CubicEarths> But it sounds like the files are just filled up sequentially with blocks as the come in?
< bitcoin-git> [bitcoin] AkioNak closed pull request #11988: Reduce redundant code of prevector and speed it up (master...prevector) https://github.com/bitcoin/bitcoin/pull/11988
< aj> CubicEarths: if you had blocks 1000-2000 in a single file, then had hundreds of reorgs in that range, that particular file could grow absurdly large; likewise if all those blocks were empty, you'd end up with unnecessarily small files