< phantomcircuit> jb55, very large wallets basically don't work currently
< phantomcircuit> it takes AGES to even load the wallet
< achow101> phantomcircuit: are those large wallets large in txs, large in keys, or both?
< phantomcircuit> achow101, unless something has drastically changed we load everything in the wallet into memory on start
< phantomcircuit> so it doesn't really matter
< achow101> yes, that's what I'm trying to change
< phantomcircuit> (though my ~2GB testnet wallet was mostly transactions by size, but had hundreds of thousands of keys)
< meshcollider> sipa or achow101: for #16807, to make a "generic" error detector which returns a basic error for invalid non-bech32 and does the more advanced error location for bech32, is it ok to just distinguish between the legacy/p2sh and bech32 cases based on "starts with a 1/3", or "starts with something else"?
< gribble> https://github.com/bitcoin/bitcoin/issues/16807 | Let validateaddress locate error in Bech32 address by meshcollider · Pull Request #16807 · bitcoin/bitcoin · GitHub
< meshcollider> It gets confusing based on what type of invalidity we expect, e.g. if the bech32 address is missing an HRP it'll start with a 1
< meshcollider> so just assume it'll be "vaguely correct" and just look for typos?
< achow101> meshcollider: a bech32 address missing the hrp will be larger than the longest legacy address
< achow101> s/larger/longer
< achow101> we know the length limits, I would prefer a distinguishing based on lengths and character set
< meshcollider> Can't use character set because one of the errors might be an invalid character for the intended address type
< meshcollider> Could use length + first byte
< sipa> meshcollider: bech32 addresses aren't restricted to v0 witness though
< meshcollider> sipa: I know, I would only check expected length or start character or whatever for legacy/p2sh
< meshcollider> Minimal assumption on the bech32
< meshcollider> sipa since it was your idea in the PR, do you have any suggestions
< meshcollider> Its very messy, I don't want to just hardcode a bunch of heuristics
< meshcollider> For example if an address contains a character like "o", both base58 and bech32 deciding will fail, then how do we know which error message to return
< meshcollider> "O" sorry*
< sipa> maybe initially just use prefix
< meshcollider> And hardcode the characters for each network? Because Params() will only provide it as a data value
< meshcollider> Otherwise if the user passes a flag to validateaddress which says which type they intend it to be it would be nicer I guess, then if they say "legacy" there is no ambiguity
< sipa> or i guess: the base58 decode (without checksum), and try bech32 decode
< sipa> if both fail, report unknown enxoding
< sipa> if they succeed, chexck version bytes
< sipa> and hrp
< meshcollider> I've pushed a commit
< meshcollider> If bech32 decoding fails we ideally still want to find the source of the error though right
< meshcollider> I think my current approach is ok, let me know what you think
< stevenroose> sipa: should the tagged hashes change when writing nothing or writing an empty byte string?
< stevenroose> When I just create a tagged writer using those methods you sent, and then call .GetSHA256().GetHex() or I first do writer << std::vector<unsigned char>{}, the result is different.
< bitcoin-git> [bitcoin] dangershony opened pull request #16817: [RPC] Fix casing in getblockchaininfo to be inline other fields (master...patch-1) https://github.com/bitcoin/bitcoin/pull/16817
< bitcoin-git> [bitcoin] MarcoFalke pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/5e202382a987...ae3e3bd151f4
< bitcoin-git> bitcoin/master 3109a1f João Barbosa: refactor: Avoid locking cs_main in ProcessNewBlockHeaders
< bitcoin-git> bitcoin/master ae3e3bd MarcoFalke: Merge #16793: refactor: Avoid locking cs_main in ProcessNewBlockHeaders
< bitcoin-git> [bitcoin] MarcoFalke merged pull request #16793: refactor: Avoid locking cs_main in ProcessNewBlockHeaders (master...2019-09-csmain-headers) https://github.com/bitcoin/bitcoin/pull/16793
< stevenroose> sipa: any chance <<'ing an empty vector prefixes that with a length byte a la consensus encoding?
< stevenroose> sipa: k it seems like that was the thing. I compared hashing the 0 byte to the empty vector hash from core and it matched. nvm dus
< bitcoin-git> [bitcoin] RajaMBZ opened pull request #16818: doc: Update CONTRIBUTING.md (master...patch-1) https://github.com/bitcoin/bitcoin/pull/16818