Archive of the libbitcoin Slack #general channel.
strong_tx and point (previously implemented) tables (~3.5GiB total). This compression can also be applied to a couple of other tables.Link::terminal and schema to allow for bit-aligned link terminalsuint32 buckets = some constant uint64_t entropy = hash_combine(to_int<8>(point.hash), point.index) uint32 bucket = ((uint32)entropy) % buckets
uint32 buckets = some constant uint64_t entropy = hash_combine(to_int<8>(point.hash), point.index) uint32 bucket = (uint32)(entropy % buckets)(edited)
entropy have less entropy than the rest, due to the effects of hash_combine . Otherwise the ordering of the cast should be immaterial.fnv1a). Final tests on the mini show 48 minutes with the point duplicate search enabled, and 36.8 minutes with it disabled (which is a few seconds faster than the fastest milestone run ever on any machine). Since the hash combining has a higher computational cost, and is always in effect, I wanted to make sure there was no impact from it, and it appears to be inconsequential.# sieve 9,725,943 k=4 # sieve 8,689,437 k=3 # bloom 8,734,741 k=4 # bloom 7,783,245 k=5 <== 5 just happens to be log(m) # bloom 7,882,763 k=6 # bloom 8,629,405 k=7 # bloom 9,864,516 k=8
36.8 minutes on a $350 machine to do what Core is trying to do in 18.2 hrs and currently does in 40.9 hrs (according to their own benchmarks), using a distribution of validation "hints" (in conjunction with "assume valid"). On this machine we currently fully validate in 8.7 hrs.37 mins (mini) and 50 mins (maxi). Despite having significantly more memory and CPU power, max has a slower bus (PCIe3), and therefore RAM and SSD - and also does not have shani. These numbers increase to 48 mins (mini) and 56 mins (maxi) when point duplicate tracing is enabled (for later validation optimization).
Current full validation sync times are 8.72 hrs (mini-32gb), 6.16 hrs (maxi-64gb), and 4.37 hrs (maxi-256gb). Times for full validation are driven by the combination of RAM, SSD and bus performance, as well as overall CPU power.siphash and chain::script::to_data(bool) (both within golomb_coding). These were both the result of using the boost-based iostream with the associated reader and writer. I removed this from performance critical network and database operations about a year ago, but until now I haven't seen quite so clearly how expensive it was. After swapping in the fast iostream and read/writer, these aspects barely register (less than 2% of the run). Crazy.4.37 hours and with the addition of compact filters is 4.52 hours. So compact filters adds only 9 minutes to full validation.5.6 hours for full validation with full Electrum address index (110GB) and compact filters (10GB) generation (and as always, full tx index and spender index).block.check(context) call, which will result in rejection of the block immediately after download, in the case where segwit is negotiated and required witness serialization is missing. And immediate dropping of the peer. Basically it just internally extends block.is_invalid_witness_commitment() with no interface changes.8.43 hrs with 6 sec shutdown :). This includes the additional confirmation organization behavior, the above witness fix, and a couple minor optimizations.7.5 hours! I'm going to give it a go now with the addition of the compact filters index, though not sure I have enough disk space. The store with address index is 800GB and the total drive is 1TB. Since tables over-allocate the additional 10GB might be enough to fill the remaining 34GB while running. If so I'll run it a second time with reduced growth rates. Also going to re-run full validation without address, at the 50k window. That should certainly outperform this new record.7.0 hours.7.9 hrs which would be pretty amazing. On the maxi it's all around 4.5 hrs.7.5 hrs.
I've got a couple simple table optimizations to implement, which might be material. These change the txs table and validated_bk tables to array maps. This slightly increases the head size on these small head tables (1-2MiB) but significantly reduces paging and reduces body size, since they will no longer be hashmaps.strong_tx inconsistency with candidate or confirmed indexation. One issue with it remains to be resolved.
I also wrote up an issue with simple resolution having to do with potential for conflict between candidate reorganization/regression and confirmation of the candidate chain.
Finally, I introduced a regression in confirmation work tracking, which I also posted an issue for. Hoping to have these each resolved tomorrow, as well as the change of the two tables to arraymap.
Yesterday I also checked in the first small piece of Taproot.50 mins milestone, 6.9 hrs full validation, and 7.5 hrs full validation with address index and compact filters, and maxi: 59 mins milestone, 1.9 hrs milestone with address index, 1.8hrs milestone with compact filters, 4.3 hrs full validation, 5.6 hrs full validation with address and compact filters. Notice how much closer mini validation has come to the maxi!!!7.0 hrs - full validation, address, filters. However there was a regression in that build that prevented final confirmation from fully executing. That wouldn't increase the time much, probably no more than 15 mins, but I'll have to run it again. All of the heavy lifting for confirmation is now done in the archive and validate phases, so it's still a very good test of all features running together.7.6 hrs. Still optimizing, that should come down a bit.4.76 hrs. Store size 810GiB.set_strong table (confirmation records), and simplification of the organization process. I also resolved the potential data integrity issue with confirmation records - confirmation index becoming inconsistent with strong following a disk full pause/restart. I ended up using a two phase commit between these records. By ensuring they are both allocated before becoming written and accessible there is no risk of an inconsistency (publicly atomic).