From 7241ed9c41063c3ee2c34207f4a0bc4ee4e3d98b Mon Sep 17 00:00:00 2001 From: Brannon King Date: Mon, 18 Nov 2019 17:34:07 -0700 Subject: [PATCH] goes through block 664641 --- src/claimtrie.cpp | 938 +++++++++++++++++++++-------------------- src/claimtrie.h | 2 + src/claimtrieforks.cpp | 62 ++- 3 files changed, 535 insertions(+), 467 deletions(-) diff --git a/src/claimtrie.cpp b/src/claimtrie.cpp index e950769ce..899e559bc 100644 --- a/src/claimtrie.cpp +++ b/src/claimtrie.cpp @@ -215,7 +215,7 @@ void CClaimTrieCacheBase::ensureTreeStructureIsUpToDate() { // the plan: update all the claim hashes first std::vector names; - db << "SELECT name FROM nodes WHERE hash IS NULL ORDER BY LENGTH(name), name" + db << "SELECT name FROM nodes WHERE hash IS NULL ORDER BY name" >> [&names](std::string name) { names.push_back(std::move(name)); }; @@ -226,7 +226,7 @@ void CClaimTrieCacheBase::ensureTreeStructureIsUpToDate() { // assume parents are not set correctly here: auto parentQuery = db << "SELECT name FROM nodes WHERE " "name IN (WITH RECURSIVE prefix(p) AS (VALUES(?) UNION ALL " - "SELECT SUBSTR(p, 1, LENGTH(p)-1) FROM prefix WHERE p != '') SELECT p FROM prefix) " + "SELECT POPS(p) FROM prefix WHERE p != '') SELECT p FROM prefix) " "ORDER BY name DESC LIMIT 1"; auto insertQuery = db << "INSERT INTO nodes(name, parent, hash) VALUES(?, ?, NULL) " @@ -486,6 +486,7 @@ bool CClaimTrieCacheBase::flush() transacting = false; } base->nNextHeight = nNextHeight; + removalWorkaround.clear(); return true; } @@ -534,6 +535,8 @@ CClaimTrieCacheBase::CClaimTrieCacheBase(CClaimTrie* base) db << "PRAGMA journal_mode=MEMORY"; db << "PRAGMA temp_store=MEMORY"; db << "PRAGMA case_sensitive_like=true"; + + db.define("POPS", [](std::string s) -> std::string { if (s.empty()) return s; s.pop_back(); return s; }); } int CClaimTrieCacheBase::expirationTime() const @@ -634,6 +637,22 @@ bool CClaimTrieCacheBase::addSupport(const std::string& name, const COutPoint& o if (!db.rows_modified()) return false; db << "UPDATE nodes SET hash = NULL WHERE name = ?" << nodeName; + + if (nNextHeight < Params().GetConsensus().nMaxTakeoverWorkaroundHeight) { + auto workaroundQuery = db << "SELECT nodeName FROM claims WHERE nodeName LIKE ?1 " + "AND validHeight < ?2 AND expirationHeight >= ?2 ORDER BY nodeName LIMIT 1" + << nodeName + "%" << nNextHeight; + auto wit = workaroundQuery.begin(); + if (wit != workaroundQuery.end()) { + std::string shortestMatch; + *wit >> shortestMatch; + if (shortestMatch != nodeName) { + // set this when there are no more claims on that name and that node still has children + removalWorkaround.insert(nodeName); + } + } + } + return true; } @@ -652,291 +671,449 @@ bool CClaimTrieCacheBase::removeSupport(const COutPoint& outPoint, std::string& } static const boost::container::flat_map, int> takeoverWorkarounds = { - {{ 496856, "HunterxHunterAMV" }, 496835}, - {{ 542978, "namethattune1" }, 542429}, - {{ 543508, "namethattune-5" }, 543306}, - {{ 546780, "forecasts" }, 546624}, - {{ 548730, "forecasts" }, 546780}, - {{ 551540, "forecasts" }, 548730}, - {{ 552380, "chicthinkingofyou" }, 550804}, - {{ 560363, "takephotowithlbryteam" }, 559962}, - {{ 563710, "test-img" }, 563700}, - {{ 566750, "itila" }, 543261}, - {{ 567082, "malabarismo-com-bolas-de-futebol-vs-chap" }, 563592}, - {{ 596860, "180mphpullsthrougheurope" }, 596757}, - {{ 617743, "vaccines" }, 572756}, - {{ 619609, "copface-slamshandcuffedteengirlintoconcrete" }, 539940}, - {{ 620392, "banker-exposes-satanic-elite" }, 597788}, - {{ 624997, "direttiva-sulle-armi-ue-in-svizzera-di" }, 567908}, - {{ 624997, "best-of-apex" }, 585580}, - {{ 629970, "cannot-ignore-my-veins" }, 629914}, - {{ 633058, "bio-waste-we-programmed-your-brain" }, 617185}, - {{ 633601, "macrolauncher-overview-first-look" }, 633058}, - {{ 640186, "its-up-to-you-and-i-2019" }, 639116}, - {{ 640241, "tor-eas-3-20" }, 592645}, - {{ 640522, "seadoxdark" }, 619531}, - {{ 640617, "lbry-przewodnik-1-instalacja" }, 451186}, - {{ 640623, "avxchange-2019-the-next-netflix-spotify" }, 606790}, - {{ 640684, "algebra-introduction" }, 624152}, - {{ 640684, "a-high-school-math-teacher-does-a" }, 600885}, - {{ 640684, "another-random-life-update" }, 600884}, - {{ 640684, "who-is-the-taylor-series-for" }, 600882}, - {{ 640684, "tedx-talk-released" }, 612303}, - {{ 640730, "e-mental" }, 615375}, - {{ 641143, "amiga-1200-bespoke-virgin-cinema" }, 623542}, - {{ 641161, "dreamscape-432-omega" }, 618894}, - {{ 641162, "2019-topstone-carbon-force-etap-axs-bike" }, 639107}, - {{ 641186, "arin-sings-big-floppy-penis-live-jazz-2" }, 638904}, - {{ 641421, "edward-snowden-on-bitcoin-and-privacy" }, 522729}, - {{ 641421, "what-is-libra-facebook-s-new" }, 598236}, - {{ 641421, "what-are-stablecoins-counter-party-risk" }, 583508}, - {{ 641421, "anthony-pomp-pompliano-discusses-crypto" }, 564416}, - {{ 641421, "tim-draper-crypto-invest-summit-2019" }, 550329}, - {{ 641421, "mass-adoption-and-what-will-it-take-to" }, 549781}, - {{ 641421, "dragonwolftech-youtube-channel-trailer" }, 567128}, - {{ 641421, "naomi-brockwell-s-weekly-crypto-recap" }, 540006}, - {{ 641421, "blockchain-based-youtube-twitter" }, 580809}, - {{ 641421, "andreas-antonopoulos-on-privacy-privacy" }, 533522}, - {{ 641817, "mexico-submits-and-big-tech-worsens" }, 582977}, - {{ 641817, "why-we-need-travel-bans" }, 581354}, - {{ 641880, "censored-by-patreon-bitchute-shares" }, 482460}, - {{ 641880, "crypto-wonderland" }, 485218}, - {{ 642168, "1-diabolo-julio-cezar-16-cbmcp-freestyle" }, 374999}, - {{ 642314, "tough-students" }, 615780}, - {{ 642697, "gamercauldronep2" }, 642153}, - {{ 643406, "the-most-fun-i-ve-had-in-a-long-time" }, 616506}, - {{ 643893, "spitshine69-and-uk-freedom-audits" }, 616876}, - {{ 644480, "my-mum-getting-attacked-a-duck" }, 567624}, - {{ 644486, "the-cryptocurrency-experiment" }, 569189}, - {{ 644486, "tag-you-re-it" }, 558316}, - {{ 644486, "orange-county-mineral-society-rock-and" }, 397138}, - {{ 644486, "sampling-with-the-gold-rush-nugget" }, 527960}, - {{ 644562, "september-15-21-a-new-way-of-doing" }, 634792}, - {{ 644562, "july-week-3-collective-frequency-general" }, 607942}, - {{ 644562, "september-8-14-growing-up-general" }, 630977}, - {{ 644562, "august-4-10-collective-frequency-general" }, 612307}, - {{ 644562, "august-11-17-collective-frequency" }, 617279}, - {{ 644562, "september-1-7-gentle-wake-up-call" }, 627104}, - {{ 644607, "no-more-lol" }, 643497}, - {{ 644607, "minion-masters-who-knew" }, 641313}, - {{ 645236, "danganronpa-3-the-end-of-hope-s-peak" }, 644153}, - {{ 645348, "captchabot-a-discord-bot-to-protect-your" }, 592810}, - {{ 645701, "the-xero-hour-saint-greta-of-thunberg" }, 644081}, - {{ 645701, "batman-v-superman-theological-notions" }, 590189}, - {{ 645918, "emacs-is-great-ep-0-init-el-from-org" }, 575666}, - {{ 645918, "emacs-is-great-ep-1-packages" }, 575666}, - {{ 645918, "emacs-is-great-ep-40-pt-2-hebrew" }, 575668}, - {{ 645923, "nasal-snuff-review-osp-batch-2" }, 575658}, - {{ 645923, "why-bit-coin" }, 575658}, - {{ 645929, "begin-quest" }, 598822}, - {{ 645929, "filthy-foe" }, 588386}, - {{ 645929, "unsanitary-snow" }, 588386}, - {{ 645929, "famispam-1-music-box" }, 588386}, - {{ 645929, "running-away" }, 598822}, - {{ 645931, "my-beloved-chris-madsen" }, 589114}, - {{ 645931, "space-is-consciousness-chris-madsen" }, 589116}, - {{ 645947, "gasifier-rocket-stove-secondary-burn" }, 590595}, - {{ 645949, "mouse-razer-abyssus-v2-e-mousepad" }, 591139}, - {{ 645949, "pr-temporada-2018-league-of-legends" }, 591138}, - {{ 645949, "windows-10-build-9901-pt-br" }, 591137}, - {{ 645949, "abrindo-pacotes-do-festival-lunar-2018" }, 591139}, - {{ 645949, "unboxing-camisetas-personalizadas-play-e" }, 591138}, - {{ 645949, "abrindo-envelopes-do-festival-lunar-2017" }, 591138}, - {{ 645951, "grub-my-grub-played-guruku-tersayang" }, 618033}, - {{ 645951, "ismeeltimepiece" }, 618038}, - {{ 645951, "thoughts-on-doom" }, 596485}, - {{ 645951, "thoughts-on-god-of-war-about-as-deep-as" }, 596485}, - {{ 645956, "linux-lite-3-6-see-what-s-new" }, 645195}, - {{ 646191, "kahlil-gibran-the-prophet-part-1" }, 597637}, - {{ 646551, "crypto-market-crash-should-you-sell-your" }, 442613}, - {{ 646551, "live-crypto-trading-and-market-analysis" }, 442615}, - {{ 646551, "5-reasons-trading-is-always-better-than" }, 500850}, - {{ 646551, "digitex-futures-dump-panic-selling-or" }, 568065}, - {{ 646552, "how-to-install-polarr-on-kali-linux-bynp" }, 466235}, - {{ 646586, "electoral-college-kids-civics-lesson" }, 430818}, - {{ 646602, "grapes-full-90-minute-watercolour" }, 537108}, - {{ 646602, "meizu-mx4-the-second-ubuntu-phone" }, 537109}, - {{ 646609, "how-to-set-up-the-ledger-nano-x" }, 569992}, - {{ 646609, "how-to-buy-ethereum" }, 482354}, - {{ 646609, "how-to-install-setup-the-exodus-multi" }, 482356}, - {{ 646609, "how-to-manage-your-passwords-using" }, 531987}, - {{ 646609, "cryptodad-s-live-q-a-friday-may-3rd-2019" }, 562303}, - {{ 646638, "resident-evil-ada-chapter-5-final" }, 605612}, - {{ 646639, "taurus-june-2019-career-love-tarot" }, 586910}, - {{ 646652, "digital-bullpen-ep-5-building-a-digital" }, 589274}, - {{ 646661, "sunlight" }, 591076}, - {{ 646661, "grasp-lab-nasa-open-mct-series" }, 589414}, - {{ 646663, "bunnula-s-creepers-tim-pool-s-beanie-a" }, 599669}, - {{ 646663, "bunnula-music-hey-ya-by-outkast" }, 605685}, - {{ 646663, "bunnula-tv-s-music-television-eunoia" }, 644437}, - {{ 646663, "the-pussy-centipede-40-sneakers-and" }, 587265}, - {{ 646663, "bunnula-reacts-ashton-titty-whitty" }, 596988}, - {{ 646677, "filip-reviews-jeromes-dream-cataracts-so" }, 589751}, - {{ 646691, "fascism-and-its-mobilizing-passions" }, 464342}, - {{ 646692, "hsb-color-layers-action-for-adobe" }, 586533}, - {{ 646692, "master-colorist-action-pack-extracting" }, 631830}, - {{ 646693, "how-to-protect-your-garden-from-animals" }, 588476}, - {{ 646693, "gardening-for-the-apocalypse-epic" }, 588472}, - {{ 646693, "my-first-bee-hive-foundationless-natural" }, 588469}, - {{ 646693, "dragon-fruit-and-passion-fruit-planting" }, 588470}, - {{ 646693, "installing-my-first-foundationless" }, 588469}, - {{ 646705, "first-naza-fpv" }, 590411}, - {{ 646717, "first-burning-man-2019-detour-034" }, 630247}, - {{ 646717, "why-bob-marley-was-an-idiot-test-driving" }, 477558}, - {{ 646717, "we-are-addicted-to-gambling-ufc-207-w" }, 481398}, - {{ 646717, "ghetto-swap-meet-selling-storage-lockers" }, 498291}, - {{ 646738, "1-kings-chapter-7-summary-and-what-god" }, 586599}, - {{ 646814, "brand-spanking-new-junior-high-school" }, 592378}, - {{ 646814, "lupe-fiasco-freestyle-at-end-of-the-weak" }, 639535}, - {{ 646824, "how-to-one-stroke-painting-doodles-mixed" }, 592404}, - {{ 646824, "acrylic-pouring-landscape-with-a-tree" }, 592404}, - {{ 646824, "how-to-make-a-diy-concrete-paste-planter" }, 595976}, - {{ 646824, "how-to-make-a-rustic-sand-planter-sand" }, 592404}, - {{ 646833, "3-day-festival-at-the-galilee-lake-and" }, 592842}, - {{ 646833, "rainbow-circle-around-the-noon-sun-above" }, 592842}, - {{ 646833, "energetic-self-control-demonstration" }, 623811}, - {{ 646833, "bees-congregating" }, 592842}, - {{ 646856, "formula-offroad-honefoss-sunday-track2" }, 592872}, - {{ 646862, "h3video1-dc-vs-mb-1" }, 593237}, - {{ 646862, "h3video1-iwasgoingto-load-up-gmod-but" }, 593237}, - {{ 646883, "watch-this-game-developer-make-a-video" }, 592593}, - {{ 646883, "how-to-write-secure-javascript" }, 592593}, - {{ 646883, "blockchain-technology-explained-2-hour" }, 592593}, - {{ 646888, "fl-studio-bits" }, 608155}, - {{ 646914, "andy-s-shed-live-s03e02-the-longest" }, 592200}, - {{ 646914, "gpo-telephone-776-phone-restoration" }, 592201}, - {{ 646916, "toxic-studios-co-stream-pubg" }, 597126}, - {{ 646916, "hyperlapse-of-prague-praha-from-inside" }, 597109}, - {{ 646933, "videobits-1" }, 597378}, - {{ 646933, "clouds-developing-daytime-8" }, 597378}, - {{ 646933, "slechtvalk-in-watertoren-bodegraven" }, 597378}, - {{ 646933, "timelapse-maansverduistering-16-juli" }, 605880}, - {{ 646933, "startrails-27" }, 597378}, - {{ 646933, "passing-clouds-daytime-3" }, 597378}, - {{ 646940, "nerdgasm-unboxing-massive-playing-cards" }, 597421}, - {{ 646946, "debunking-cops-volume-3-the-murder-of" }, 630570}, - {{ 646961, "kingsong-ks16x-electric-unicycle-250km" }, 636725}, - {{ 646968, "wild-mountain-goats-amazing-rock" }, 621940}, - {{ 646968, "no-shelter-backcountry-camping-in" }, 621940}, - {{ 646968, "can-i-live-in-this-through-winter-lets" }, 645750}, - {{ 646968, "why-i-wear-a-chest-rig-backcountry-or" }, 621940}, - {{ 646989, "marc-ivan-o-gorman-promo-producer-editor" }, 645656}, - {{ 647045, "@moraltis" }, 646367}, - {{ 647045, "moraltis-twitch-highlights-first-edit" }, 646368}, - {{ 647075, "the-3-massive-tinder-convo-mistakes" }, 629464}, - {{ 647075, "how-to-get-friend-zoned-via-text" }, 592298}, - {{ 647075, "don-t-do-this-on-tinder" }, 624591}, - {{ 647322, "world-of-tanks-7-kills" }, 609905}, - {{ 647322, "the-tier-6-auto-loading-swedish-meatball" }, 591338}, - {{ 647416, "hypnotic-soundscapes-garden-of-the" }, 596923}, - {{ 647416, "hypnotic-soundscapes-the-cauldron-sacred" }, 596928}, - {{ 647416, "schumann-resonance-to-theta-sweep" }, 596920}, - {{ 647416, "conversational-indirect-hypnosis-why" }, 596913}, - {{ 647493, "mimirs-brunnr" }, 590498}, - {{ 648143, "live-ita-completiamo-the-evil-within-2" }, 646568}, - {{ 648203, "why-we-love-people-that-hurt-us" }, 591128}, - {{ 648203, "i-didn-t-like-my-baby-and-considered" }, 591128}, - {{ 648220, "trade-talk-001-i-m-a-vlogger-now-fielder" }, 597303}, - {{ 648220, "vise-restoration-record-no-6-vise" }, 597303}, - {{ 648540, "amv-reign" }, 571863}, - {{ 648540, "amv-virus" }, 571863}, - {{ 648588, "audial-drift-(a-journey-into-sound)" }, 630217}, - {{ 648616, "quick-zbrush-tip-transpose-master-scale" }, 463205}, - {{ 648616, "how-to-create-3d-horns-maya-to-zbrush-2" }, 463205}, - {{ 648815, "arduino-based-cartridge-game-handheld" }, 593252}, - {{ 648815, "a-maze-update-3-new-game-modes-amazing" }, 593252}, - {{ 649209, "denmark-trip" }, 591428}, - {{ 649209, "stunning-4k-drone-footage" }, 591428}, - {{ 649215, "how-to-create-a-channel-and-publish-a" }, 414908}, - {{ 649215, "lbryclass-11-how-to-get-your-deposit" }, 632420}, - {{ 649543, "spring-break-madness-at-universal" }, 599698}, - {{ 649921, "navegador-brave-navegador-da-web-seguro" }, 649261}, - {{ 650191, "stream-intro" }, 591301}, - {{ 650946, "platelet-chan-fan-art" }, 584601}, - {{ 650946, "aqua-fanart" }, 584601}, - {{ 650946, "virginmedia-stores-password-in-plain" }, 619537}, - {{ 650946, "running-linux-on-android-teaser" }, 604441}, - {{ 650946, "hatsune-miku-ievan-polka" }, 600126}, - {{ 650946, "digital-security-and-privacy-2-and-a-new" }, 600135}, - {{ 650993, "my-editorial-comment-on-recent-youtube" }, 590305}, - {{ 650993, "drive-7-18-2018" }, 590305}, - {{ 651011, "old-world-put-on-realm-realms-gg" }, 591899}, - {{ 651011, "make-your-own-soundboard-with-autohotkey" }, 591899}, - {{ 651011, "ark-survival-https-discord-gg-ad26xa" }, 637680}, - {{ 651011, "minecraft-featuring-seus-8-just-came-4" }, 596488}, - {{ 651057, "found-footage-bikinis-at-the-beach-with" }, 593586}, - {{ 651057, "found-footage-sexy-mom-a-mink-stole" }, 593586}, - {{ 651067, "who-are-the-gentiles-gomer" }, 597094}, - {{ 651067, "take-back-the-kingdom-ep-2-450-million" }, 597094}, - {{ 651067, "mmxtac-implemented-footstep-sounds-and" }, 597094}, - {{ 651067, "dynasoul-s-blender-to-unreal-animated" }, 597094}, - {{ 651103, "calling-a-scammer-syntax-error" }, 612532}, - {{ 651103, "quick-highlight-of-my-day" }, 647651}, - {{ 651103, "calling-scammers-and-singing-christmas" }, 612531}, - {{ 651109, "@livingtzm" }, 637322}, - {{ 651109, "living-tzm-juuso-from-finland-september" }, 643412}, - {{ 651373, "se-voc-rir-ou-sorrir-reinicie-o-v-deo" }, 649302}, - {{ 651476, "what-is-pagan-online-polished-new-arpg" }, 592157}, - {{ 651476, "must-have-elder-scrolls-online-addons" }, 592156}, - {{ 651476, "who-should-play-albion-online" }, 592156}, - {{ 651730, "person-detection-with-keras-tensorflow" }, 621276}, - {{ 651730, "youtube-censorship-take-two" }, 587249}, - {{ 651730, "new-red-tail-shark-and-two-silver-sharks" }, 587251}, - {{ 651730, "around-auckland" }, 587250}, - {{ 651730, "humanism-in-islam" }, 587250}, - {{ 651730, "tigers-at-auckland-zoo" }, 587250}, - {{ 651730, "gravity-demonstration" }, 587250}, - {{ 651730, "copyright-question" }, 587249}, - {{ 651730, "uberg33k-the-ultimate-software-developer" }, 599522}, - {{ 651730, "chl-e-swarbrick-auckland-mayoral" }, 587250}, - {{ 651730, "code-reviews" }, 587249}, - {{ 651730, "raising-robots" }, 587251}, - {{ 651730, "teaching-python" }, 587250}, - {{ 651730, "kelly-tarlton-2016" }, 587250}, - {{ 652172, "where-is-everything" }, 589491}, - {{ 652172, "some-guy-and-his-camera" }, 617062}, - {{ 652172, "practical-information-pt-1" }, 589491}, - {{ 652172, "latent-vibrations" }, 589491}, - {{ 652172, "maldek-compilation" }, 589491}, - {{ 652444, "thank-you-etika-thank-you-desmond" }, 652121}, - {{ 652611, "plants-vs-zombies-gw2-20190827183609" }, 624339}, - {{ 652611, "wolfenstein-the-new-order-playthrough-6" }, 650299}, - {{ 652887, "a-codeigniter-cms-open-source-download" }, 652737}, - {{ 652966, "@pokesadventures" }, 632391}, - {{ 653009, "flat-earth-uk-convention-is-a-bust" }, 585786}, - {{ 653009, "flat-earth-reset-flat-earth-money-tree" }, 585786}, - {{ 653011, "veil-of-thorns-dispirit-brutal-leech-3" }, 652475}, - {{ 653069, "being-born-after-9-11" }, 632218}, - {{ 653069, "8-years-on-youtube-what-it-has-done-for" }, 637130}, - {{ 653069, "answering-questions-how-original" }, 521447}, - {{ 653069, "talking-about-my-first-comedy-stand-up" }, 583450}, - {{ 653069, "doing-push-ups-in-public" }, 650920}, - {{ 653069, "vlog-extra" }, 465997}, - {{ 653069, "crying-myself" }, 465997}, - {{ 653069, "xbox-rejection" }, 465992}, - {{ 653354, "msps-how-to-find-a-linux-job-where-no" }, 642537}, - {{ 653354, "windows-is-better-than-linux-vlog-it-and" }, 646306}, - {{ 653354, "luke-smith-is-wrong-about-everything" }, 507717}, - {{ 653354, "advice-for-those-starting-out-in-tech" }, 612452}, - {{ 653354, "treating-yourself-to-make-studying-more" }, 623561}, - {{ 653354, "lpi-linux-essential-dns-tools-vlog-what" }, 559464}, - {{ 653354, "is-learning-linux-worth-it-in-2019-vlog" }, 570886}, - {{ 653354, "huawei-linux-and-cellphones-in-2019-vlog" }, 578501}, - {{ 653354, "how-to-use-webmin-to-manage-linux" }, 511507}, - {{ 653354, "latency-concurrency-and-the-best-value" }, 596857}, - {{ 653354, "how-to-use-the-pomodoro-method-in-it" }, 506632}, - {{ 653354, "negotiating-compensation-vlog-it-and" }, 542317}, - {{ 653354, "procedural-goals-vs-outcome-goals-vlog" }, 626785}, - {{ 653354, "intro-to-raid-understanding-how-raid" }, 529341}, - {{ 653354, "smokeping" }, 574693}, - {{ 653354, "richard-stallman-should-not-be-fired" }, 634928}, - {{ 653354, "unusual-or-specialty-certifications-vlog" }, 620146}, - {{ 653354, "gratitude-and-small-projects-vlog-it" }, 564900}, - {{ 653354, "why-linux-on-the-smartphone-is-important" }, 649543}, - {{ 653354, "opportunity-costs-vlog-it-devops-career" }, 549708}, - {{ 653354, "double-giveaway-lpi-class-dates-and" }, 608129}, - {{ 653354, "linux-on-the-smartphone-in-2019-librem" }, 530426}, - {{ 653524, "celtic-folk-music-full-live-concert-mps" }, 589762}, + {{496856, "HunterxHunterAMV"}, 496835}, + {{542978, "namethattune1"}, 542429}, + {{543508, "namethattune-5"}, 543306}, + {{546780, "forecasts"}, 546624}, + {{548730, "forecasts"}, 546780}, + {{551540, "forecasts"}, 548730}, + {{552380, "chicthinkingofyou"}, 550804}, + {{560363, "takephotowithlbryteam"}, 559962}, + {{563710, "test-img"}, 563700}, + {{566750, "itila"}, 543261}, + {{567082, "malabarismo-com-bolas-de-futebol-vs-chap"}, 563592}, + {{596860, "180mphpullsthrougheurope"}, 596757}, + {{617743, "vaccines"}, 572756}, + {{619609, "copface-slamshandcuffedteengirlintoconcrete"}, 539940}, + {{620392, "banker-exposes-satanic-elite"}, 597788}, + {{624997, "direttiva-sulle-armi-ue-in-svizzera-di"}, 567908}, + {{624997, "best-of-apex"}, 585580}, + {{629970, "cannot-ignore-my-veins"}, 629914}, + {{633058, "bio-waste-we-programmed-your-brain"}, 617185}, + {{633601, "macrolauncher-overview-first-look"}, 633058}, + {{640186, "its-up-to-you-and-i-2019"}, 639116}, + {{640241, "tor-eas-3-20"}, 592645}, + {{640522, "seadoxdark"}, 619531}, + {{640617, "lbry-przewodnik-1-instalacja"}, 451186}, + {{640623, "avxchange-2019-the-next-netflix-spotify"}, 606790}, + {{640684, "algebra-introduction"}, 624152}, + {{640684, "a-high-school-math-teacher-does-a"}, 600885}, + {{640684, "another-random-life-update"}, 600884}, + {{640684, "who-is-the-taylor-series-for"}, 600882}, + {{640684, "tedx-talk-released"}, 612303}, + {{640730, "e-mental"}, 615375}, + {{641143, "amiga-1200-bespoke-virgin-cinema"}, 623542}, + {{641161, "dreamscape-432-omega"}, 618894}, + {{641162, "2019-topstone-carbon-force-etap-axs-bike"}, 639107}, + {{641186, "arin-sings-big-floppy-penis-live-jazz-2"}, 638904}, + {{641421, "edward-snowden-on-bitcoin-and-privacy"}, 522729}, + {{641421, "what-is-libra-facebook-s-new"}, 598236}, + {{641421, "what-are-stablecoins-counter-party-risk"}, 583508}, + {{641421, "anthony-pomp-pompliano-discusses-crypto"}, 564416}, + {{641421, "tim-draper-crypto-invest-summit-2019"}, 550329}, + {{641421, "mass-adoption-and-what-will-it-take-to"}, 549781}, + {{641421, "dragonwolftech-youtube-channel-trailer"}, 567128}, + {{641421, "naomi-brockwell-s-weekly-crypto-recap"}, 540006}, + {{641421, "blockchain-based-youtube-twitter"}, 580809}, + {{641421, "andreas-antonopoulos-on-privacy-privacy"}, 533522}, + {{641817, "mexico-submits-and-big-tech-worsens"}, 582977}, + {{641817, "why-we-need-travel-bans"}, 581354}, + {{641880, "censored-by-patreon-bitchute-shares"}, 482460}, + {{641880, "crypto-wonderland"}, 485218}, + {{642168, "1-diabolo-julio-cezar-16-cbmcp-freestyle"}, 374999}, + {{642314, "tough-students"}, 615780}, + {{642697, "gamercauldronep2"}, 642153}, + {{643406, "the-most-fun-i-ve-had-in-a-long-time"}, 616506}, + {{643893, "spitshine69-and-uk-freedom-audits"}, 616876}, + {{644480, "my-mum-getting-attacked-a-duck"}, 567624}, + {{644486, "the-cryptocurrency-experiment"}, 569189}, + {{644486, "tag-you-re-it"}, 558316}, + {{644486, "orange-county-mineral-society-rock-and"}, 397138}, + {{644486, "sampling-with-the-gold-rush-nugget"}, 527960}, + {{644562, "september-15-21-a-new-way-of-doing"}, 634792}, + {{644562, "july-week-3-collective-frequency-general"}, 607942}, + {{644562, "september-8-14-growing-up-general"}, 630977}, + {{644562, "august-4-10-collective-frequency-general"}, 612307}, + {{644562, "august-11-17-collective-frequency"}, 617279}, + {{644562, "september-1-7-gentle-wake-up-call"}, 627104}, + {{644607, "no-more-lol"}, 643497}, + {{644607, "minion-masters-who-knew"}, 641313}, + {{645236, "danganronpa-3-the-end-of-hope-s-peak"}, 644153}, + {{645348, "captchabot-a-discord-bot-to-protect-your"}, 592810}, + {{645701, "the-xero-hour-saint-greta-of-thunberg"}, 644081}, + {{645701, "batman-v-superman-theological-notions"}, 590189}, + {{645918, "emacs-is-great-ep-0-init-el-from-org"}, 575666}, + {{645918, "emacs-is-great-ep-1-packages"}, 575666}, + {{645918, "emacs-is-great-ep-40-pt-2-hebrew"}, 575668}, + {{645923, "nasal-snuff-review-osp-batch-2"}, 575658}, + {{645923, "why-bit-coin"}, 575658}, + {{645929, "begin-quest"}, 598822}, + {{645929, "filthy-foe"}, 588386}, + {{645929, "unsanitary-snow"}, 588386}, + {{645929, "famispam-1-music-box"}, 588386}, + {{645929, "running-away"}, 598822}, + {{645931, "my-beloved-chris-madsen"}, 589114}, + {{645931, "space-is-consciousness-chris-madsen"}, 589116}, + {{645947, "gasifier-rocket-stove-secondary-burn"}, 590595}, + {{645949, "mouse-razer-abyssus-v2-e-mousepad"}, 591139}, + {{645949, "pr-temporada-2018-league-of-legends"}, 591138}, + {{645949, "windows-10-build-9901-pt-br"}, 591137}, + {{645949, "abrindo-pacotes-do-festival-lunar-2018"}, 591139}, + {{645949, "unboxing-camisetas-personalizadas-play-e"}, 591138}, + {{645949, "abrindo-envelopes-do-festival-lunar-2017"}, 591138}, + {{645951, "grub-my-grub-played-guruku-tersayang"}, 618033}, + {{645951, "ismeeltimepiece"}, 618038}, + {{645951, "thoughts-on-doom"}, 596485}, + {{645951, "thoughts-on-god-of-war-about-as-deep-as"}, 596485}, + {{645956, "linux-lite-3-6-see-what-s-new"}, 645195}, + {{646191, "kahlil-gibran-the-prophet-part-1"}, 597637}, + {{646551, "crypto-market-crash-should-you-sell-your"}, 442613}, + {{646551, "live-crypto-trading-and-market-analysis"}, 442615}, + {{646551, "5-reasons-trading-is-always-better-than"}, 500850}, + {{646551, "digitex-futures-dump-panic-selling-or"}, 568065}, + {{646552, "how-to-install-polarr-on-kali-linux-bynp"}, 466235}, + {{646586, "electoral-college-kids-civics-lesson"}, 430818}, + {{646602, "grapes-full-90-minute-watercolour"}, 537108}, + {{646602, "meizu-mx4-the-second-ubuntu-phone"}, 537109}, + {{646609, "how-to-set-up-the-ledger-nano-x"}, 569992}, + {{646609, "how-to-buy-ethereum"}, 482354}, + {{646609, "how-to-install-setup-the-exodus-multi"}, 482356}, + {{646609, "how-to-manage-your-passwords-using"}, 531987}, + {{646609, "cryptodad-s-live-q-a-friday-may-3rd-2019"}, 562303}, + {{646638, "resident-evil-ada-chapter-5-final"}, 605612}, + {{646639, "taurus-june-2019-career-love-tarot"}, 586910}, + {{646652, "digital-bullpen-ep-5-building-a-digital"}, 589274}, + {{646661, "sunlight"}, 591076}, + {{646661, "grasp-lab-nasa-open-mct-series"}, 589414}, + {{646663, "bunnula-s-creepers-tim-pool-s-beanie-a"}, 599669}, + {{646663, "bunnula-music-hey-ya-by-outkast"}, 605685}, + {{646663, "bunnula-tv-s-music-television-eunoia"}, 644437}, + {{646663, "the-pussy-centipede-40-sneakers-and"}, 587265}, + {{646663, "bunnula-reacts-ashton-titty-whitty"}, 596988}, + {{646677, "filip-reviews-jeromes-dream-cataracts-so"}, 589751}, + {{646691, "fascism-and-its-mobilizing-passions"}, 464342}, + {{646692, "hsb-color-layers-action-for-adobe"}, 586533}, + {{646692, "master-colorist-action-pack-extracting"}, 631830}, + {{646693, "how-to-protect-your-garden-from-animals"}, 588476}, + {{646693, "gardening-for-the-apocalypse-epic"}, 588472}, + {{646693, "my-first-bee-hive-foundationless-natural"}, 588469}, + {{646693, "dragon-fruit-and-passion-fruit-planting"}, 588470}, + {{646693, "installing-my-first-foundationless"}, 588469}, + {{646705, "first-naza-fpv"}, 590411}, + {{646717, "first-burning-man-2019-detour-034"}, 630247}, + {{646717, "why-bob-marley-was-an-idiot-test-driving"}, 477558}, + {{646717, "we-are-addicted-to-gambling-ufc-207-w"}, 481398}, + {{646717, "ghetto-swap-meet-selling-storage-lockers"}, 498291}, + {{646738, "1-kings-chapter-7-summary-and-what-god"}, 586599}, + {{646814, "brand-spanking-new-junior-high-school"}, 592378}, + {{646814, "lupe-fiasco-freestyle-at-end-of-the-weak"}, 639535}, + {{646824, "how-to-one-stroke-painting-doodles-mixed"}, 592404}, + {{646824, "acrylic-pouring-landscape-with-a-tree"}, 592404}, + {{646824, "how-to-make-a-diy-concrete-paste-planter"}, 595976}, + {{646824, "how-to-make-a-rustic-sand-planter-sand"}, 592404}, + {{646833, "3-day-festival-at-the-galilee-lake-and"}, 592842}, + {{646833, "rainbow-circle-around-the-noon-sun-above"}, 592842}, + {{646833, "energetic-self-control-demonstration"}, 623811}, + {{646833, "bees-congregating"}, 592842}, + {{646856, "formula-offroad-honefoss-sunday-track2"}, 592872}, + {{646862, "h3video1-dc-vs-mb-1"}, 593237}, + {{646862, "h3video1-iwasgoingto-load-up-gmod-but"}, 593237}, + {{646883, "watch-this-game-developer-make-a-video"}, 592593}, + {{646883, "how-to-write-secure-javascript"}, 592593}, + {{646883, "blockchain-technology-explained-2-hour"}, 592593}, + {{646888, "fl-studio-bits"}, 608155}, + {{646914, "andy-s-shed-live-s03e02-the-longest"}, 592200}, + {{646914, "gpo-telephone-776-phone-restoration"}, 592201}, + {{646916, "toxic-studios-co-stream-pubg"}, 597126}, + {{646916, "hyperlapse-of-prague-praha-from-inside"}, 597109}, + {{646933, "videobits-1"}, 597378}, + {{646933, "clouds-developing-daytime-8"}, 597378}, + {{646933, "slechtvalk-in-watertoren-bodegraven"}, 597378}, + {{646933, "timelapse-maansverduistering-16-juli"}, 605880}, + {{646933, "startrails-27"}, 597378}, + {{646933, "passing-clouds-daytime-3"}, 597378}, + {{646940, "nerdgasm-unboxing-massive-playing-cards"}, 597421}, + {{646946, "debunking-cops-volume-3-the-murder-of"}, 630570}, + {{646961, "kingsong-ks16x-electric-unicycle-250km"}, 636725}, + {{646968, "wild-mountain-goats-amazing-rock"}, 621940}, + {{646968, "no-shelter-backcountry-camping-in"}, 621940}, + {{646968, "can-i-live-in-this-through-winter-lets"}, 645750}, + {{646968, "why-i-wear-a-chest-rig-backcountry-or"}, 621940}, + {{646989, "marc-ivan-o-gorman-promo-producer-editor"}, 645656}, + {{647045, "@moraltis"}, 646367}, + {{647045, "moraltis-twitch-highlights-first-edit"}, 646368}, + {{647075, "the-3-massive-tinder-convo-mistakes"}, 629464}, + {{647075, "how-to-get-friend-zoned-via-text"}, 592298}, + {{647075, "don-t-do-this-on-tinder"}, 624591}, + {{647322, "world-of-tanks-7-kills"}, 609905}, + {{647322, "the-tier-6-auto-loading-swedish-meatball"}, 591338}, + {{647416, "hypnotic-soundscapes-garden-of-the"}, 596923}, + {{647416, "hypnotic-soundscapes-the-cauldron-sacred"}, 596928}, + {{647416, "schumann-resonance-to-theta-sweep"}, 596920}, + {{647416, "conversational-indirect-hypnosis-why"}, 596913}, + {{647493, "mimirs-brunnr"}, 590498}, + {{648143, "live-ita-completiamo-the-evil-within-2"}, 646568}, + {{648203, "why-we-love-people-that-hurt-us"}, 591128}, + {{648203, "i-didn-t-like-my-baby-and-considered"}, 591128}, + {{648220, "trade-talk-001-i-m-a-vlogger-now-fielder"}, 597303}, + {{648220, "vise-restoration-record-no-6-vise"}, 597303}, + {{648540, "amv-reign"}, 571863}, + {{648540, "amv-virus"}, 571863}, + {{648588, "audial-drift-(a-journey-into-sound)"}, 630217}, + {{648616, "quick-zbrush-tip-transpose-master-scale"}, 463205}, + {{648616, "how-to-create-3d-horns-maya-to-zbrush-2"}, 463205}, + {{648815, "arduino-based-cartridge-game-handheld"}, 593252}, + {{648815, "a-maze-update-3-new-game-modes-amazing"}, 593252}, + {{649209, "denmark-trip"}, 591428}, + {{649209, "stunning-4k-drone-footage"}, 591428}, + {{649215, "how-to-create-a-channel-and-publish-a"}, 414908}, + {{649215, "lbryclass-11-how-to-get-your-deposit"}, 632420}, + {{649543, "spring-break-madness-at-universal"}, 599698}, + {{649921, "navegador-brave-navegador-da-web-seguro"}, 649261}, + {{650191, "stream-intro"}, 591301}, + {{650946, "platelet-chan-fan-art"}, 584601}, + {{650946, "aqua-fanart"}, 584601}, + {{650946, "virginmedia-stores-password-in-plain"}, 619537}, + {{650946, "running-linux-on-android-teaser"}, 604441}, + {{650946, "hatsune-miku-ievan-polka"}, 600126}, + {{650946, "digital-security-and-privacy-2-and-a-new"}, 600135}, + {{650993, "my-editorial-comment-on-recent-youtube"}, 590305}, + {{650993, "drive-7-18-2018"}, 590305}, + {{651011, "old-world-put-on-realm-realms-gg"}, 591899}, + {{651011, "make-your-own-soundboard-with-autohotkey"}, 591899}, + {{651011, "ark-survival-https-discord-gg-ad26xa"}, 637680}, + {{651011, "minecraft-featuring-seus-8-just-came-4"}, 596488}, + {{651057, "found-footage-bikinis-at-the-beach-with"}, 593586}, + {{651057, "found-footage-sexy-mom-a-mink-stole"}, 593586}, + {{651067, "who-are-the-gentiles-gomer"}, 597094}, + {{651067, "take-back-the-kingdom-ep-2-450-million"}, 597094}, + {{651067, "mmxtac-implemented-footstep-sounds-and"}, 597094}, + {{651067, "dynasoul-s-blender-to-unreal-animated"}, 597094}, + {{651103, "calling-a-scammer-syntax-error"}, 612532}, + {{651103, "quick-highlight-of-my-day"}, 647651}, + {{651103, "calling-scammers-and-singing-christmas"}, 612531}, + {{651109, "@livingtzm"}, 637322}, + {{651109, "living-tzm-juuso-from-finland-september"}, 643412}, + {{651373, "se-voc-rir-ou-sorrir-reinicie-o-v-deo"}, 649302}, + {{651476, "what-is-pagan-online-polished-new-arpg"}, 592157}, + {{651476, "must-have-elder-scrolls-online-addons"}, 592156}, + {{651476, "who-should-play-albion-online"}, 592156}, + {{651730, "person-detection-with-keras-tensorflow"}, 621276}, + {{651730, "youtube-censorship-take-two"}, 587249}, + {{651730, "new-red-tail-shark-and-two-silver-sharks"}, 587251}, + {{651730, "around-auckland"}, 587250}, + {{651730, "humanism-in-islam"}, 587250}, + {{651730, "tigers-at-auckland-zoo"}, 587250}, + {{651730, "gravity-demonstration"}, 587250}, + {{651730, "copyright-question"}, 587249}, + {{651730, "uberg33k-the-ultimate-software-developer"}, 599522}, + {{651730, "chl-e-swarbrick-auckland-mayoral"}, 587250}, + {{651730, "code-reviews"}, 587249}, + {{651730, "raising-robots"}, 587251}, + {{651730, "teaching-python"}, 587250}, + {{651730, "kelly-tarlton-2016"}, 587250}, + {{652172, "where-is-everything"}, 589491}, + {{652172, "some-guy-and-his-camera"}, 617062}, + {{652172, "practical-information-pt-1"}, 589491}, + {{652172, "latent-vibrations"}, 589491}, + {{652172, "maldek-compilation"}, 589491}, + {{652444, "thank-you-etika-thank-you-desmond"}, 652121}, + {{652611, "plants-vs-zombies-gw2-20190827183609"}, 624339}, + {{652611, "wolfenstein-the-new-order-playthrough-6"}, 650299}, + {{652887, "a-codeigniter-cms-open-source-download"}, 652737}, + {{652966, "@pokesadventures"}, 632391}, + {{653009, "flat-earth-uk-convention-is-a-bust"}, 585786}, + {{653009, "flat-earth-reset-flat-earth-money-tree"}, 585786}, + {{653011, "veil-of-thorns-dispirit-brutal-leech-3"}, 652475}, + {{653069, "being-born-after-9-11"}, 632218}, + {{653069, "8-years-on-youtube-what-it-has-done-for"}, 637130}, + {{653069, "answering-questions-how-original"}, 521447}, + {{653069, "talking-about-my-first-comedy-stand-up"}, 583450}, + {{653069, "doing-push-ups-in-public"}, 650920}, + {{653069, "vlog-extra"}, 465997}, + {{653069, "crying-myself"}, 465997}, + {{653069, "xbox-rejection"}, 465992}, + {{653354, "msps-how-to-find-a-linux-job-where-no"}, 642537}, + {{653354, "windows-is-better-than-linux-vlog-it-and"}, 646306}, + {{653354, "luke-smith-is-wrong-about-everything"}, 507717}, + {{653354, "advice-for-those-starting-out-in-tech"}, 612452}, + {{653354, "treating-yourself-to-make-studying-more"}, 623561}, + {{653354, "lpi-linux-essential-dns-tools-vlog-what"}, 559464}, + {{653354, "is-learning-linux-worth-it-in-2019-vlog"}, 570886}, + {{653354, "huawei-linux-and-cellphones-in-2019-vlog"}, 578501}, + {{653354, "how-to-use-webmin-to-manage-linux"}, 511507}, + {{653354, "latency-concurrency-and-the-best-value"}, 596857}, + {{653354, "how-to-use-the-pomodoro-method-in-it"}, 506632}, + {{653354, "negotiating-compensation-vlog-it-and"}, 542317}, + {{653354, "procedural-goals-vs-outcome-goals-vlog"}, 626785}, + {{653354, "intro-to-raid-understanding-how-raid"}, 529341}, + {{653354, "smokeping"}, 574693}, + {{653354, "richard-stallman-should-not-be-fired"}, 634928}, + {{653354, "unusual-or-specialty-certifications-vlog"}, 620146}, + {{653354, "gratitude-and-small-projects-vlog-it"}, 564900}, + {{653354, "why-linux-on-the-smartphone-is-important"}, 649543}, + {{653354, "opportunity-costs-vlog-it-devops-career"}, 549708}, + {{653354, "double-giveaway-lpi-class-dates-and"}, 608129}, + {{653354, "linux-on-the-smartphone-in-2019-librem"}, 530426}, + {{653524, "celtic-folk-music-full-live-concert-mps"}, 589762}, + {{653745, "aftermath-of-the-mac"}, 592768}, + {{653745, "b-c-a-glock-17-threaded-barrel"}, 592770}, + {{653800, "middle-earth-shadow-of-mordor-by"}, 590229}, + {{654079, "tomand-jeremy-chirs45"}, 614296}, + {{654096, "achamos-carteira-com-grana-olha-o-que"}, 466262}, + {{654096, "viagem-bizarra-e-cansativa-ao-nordeste"}, 466263}, + {{654096, "tedio-na-tailandia-limpeza-de-area"}, 466265}, + {{654425, "schau-bung-2014-in-windischgarsten"}, 654410}, + {{654425, "mitternachtseinlage-ball-rk"}, 654410}, + {{654425, "zugabe-ball-rk-windischgarsten"}, 654412}, + {{654722, "skytrain-in-korea"}, 463145}, + {{654722, "luwak-coffee-the-shit-coffee"}, 463155}, + {{654722, "puppet-show-in-bangkok-thailand"}, 462812}, + {{654722, "kyaito-market-myanmar"}, 462813}, + {{654724, "wipeout-zombies-bo3-custom-zombies-1st"}, 589569}, + {{654724, "the-street-bo3-custom-zombies"}, 589544}, + {{654880, "wwii-airsoft-pow"}, 586968}, + {{654880, "dueling-geese-fight-to-the-death"}, 586968}, + {{654880, "wwii-airsoft-torgau-raw-footage-part4"}, 586968}, + {{655173, "april-2019-q-and-a"}, 554032}, + {{655173, "the-meaning-and-reality-of-individual"}, 607892}, + {{655173, "steven-pinker-progress-despite"}, 616984}, + {{655173, "we-make-stories-out-of-totem-poles"}, 549090}, + {{655173, "jamil-jivani-author-of-why-young-men"}, 542035}, + {{655173, "commentaries-on-jb-peterson-rebel-wisdom"}, 528898}, + {{655173, "auckland-clip-4-on-cain-and-abel"}, 629242}, + {{655173, "peterson-vs-zizek-livestream-tickets"}, 545285}, + {{655173, "auckland-clip-3-the-dawning-of-the-moral"}, 621154}, + {{655173, "religious-belief-and-the-enlightenment"}, 606269}, + {{655173, "auckland-lc-highlight-1-the-presumption"}, 565783}, + {{655173, "q-a-sir-roger-scruton-dr-jordan-b"}, 544184}, + {{655173, "cancellation-polish-national-foundation"}, 562529}, + {{655173, "the-coddling-of-the-american-mind-haidt"}, 440185}, + {{655173, "02-harris-weinstein-peterson-discussion"}, 430896}, + {{655173, "jordan-peterson-threatens-everything-of"}, 519737}, + {{655173, "on-claiming-belief-in-god-commentary"}, 581738}, + {{655173, "how-to-make-the-world-better-really-with"}, 482317}, + {{655173, "quillette-discussion-with-founder-editor"}, 413749}, + {{655173, "jb-peterson-on-free-thought-and-speech"}, 462849}, + {{655173, "marxism-zizek-peterson-official-video"}, 578453}, + {{655173, "patreon-problem-solution-dave-rubin-dr"}, 490394}, + {{655173, "next-week-st-louis-salt-lake-city"}, 445933}, + {{655173, "conversations-with-john-anderson-jordan"}, 529981}, + {{655173, "nz-australia-12-rules-tour-next-2-weeks"}, 518649}, + {{655173, "a-call-to-rebellion-for-ontario-legal"}, 285451}, + {{655173, "2016-personality-lecture-12"}, 578465}, + {{655173, "on-the-vital-necessity-of-free-speech"}, 427404}, + {{655173, "2017-01-23-social-justice-freedom-of"}, 578465}, + {{655173, "discussion-sam-harris-the-idw-and-the"}, 423332}, + {{655173, "march-2018-patreon-q-a"}, 413749}, + {{655173, "take-aim-even-badly"}, 490395}, + {{655173, "jp-f-wwbgo6a2w"}, 539940}, + {{655173, "patreon-account-deletion"}, 503477}, + {{655173, "canada-us-europe-tour-august-dec-2018"}, 413749}, + {{655173, "leaders-myth-reality-general-stanley"}, 514333}, + {{655173, "jp-ifi5kkxig3s"}, 539940}, + {{655173, "documentary-a-glitch-in-the-matrix-david"}, 413749}, + {{655173, "2017-08-14-patreon-q-and-a"}, 285451}, + {{655173, "postmodernism-history-and-diagnosis"}, 285451}, + {{655173, "23-minutes-from-maps-of-meaning-the"}, 413749}, + {{655173, "milo-forbidden-conversation"}, 578493}, + {{655173, "jp-wnjbasba-qw"}, 539940}, + {{655173, "uk-12-rules-tour-october-and-november"}, 462849}, + {{655173, "2015-maps-of-meaning-10-culture-anomaly"}, 578465}, + {{655173, "ayaan-hirsi-ali-islam-mecca-vs-medina"}, 285452}, + {{655173, "jp-f9393el2z1i"}, 539940}, + {{655173, "campus-indoctrination-the-parasitization"}, 285453}, + {{655173, "jp-owgc63khcl8"}, 539940}, + {{655173, "the-death-and-resurrection-of-christ-a"}, 413749}, + {{655173, "01-harris-weinstein-peterson-discussion"}, 430896}, + {{655173, "enlightenment-now-steven-pinker-jb"}, 413749}, + {{655173, "the-lindsay-shepherd-affair-update"}, 413749}, + {{655173, "jp-g3fwumq5k8i"}, 539940}, + {{655173, "jp-evvs3l-abv4"}, 539940}, + {{655173, "former-australian-deputy-pm-john"}, 413750}, + {{655173, "message-to-my-korean-readers-90-seconds"}, 477424}, + {{655173, "jp--0xbomwjkgm"}, 539940}, + {{655173, "ben-shapiro-jordan-peterson-and-a-12"}, 413749}, + {{655173, "jp-91jwsb7zyhw"}, 539940}, + {{655173, "deconstruction-the-lindsay-shepherd"}, 299272}, + {{655173, "september-patreon-q-a"}, 285451}, + {{655173, "jp-2c3m0tt5kce"}, 539940}, + {{655173, "australia-s-john-anderson-dr-jordan-b"}, 413749}, + {{655173, "jp-hdrlq7dpiws"}, 539940}, + {{655173, "stephen-hicks-postmodernism-reprise"}, 578480}, + {{655173, "october-patreon-q-a"}, 285451}, + {{655173, "an-animated-intro-to-truth-order-and"}, 413749}, + {{655173, "jp-bsh37-x5rny"}, 539940}, + {{655173, "january-2019-q-a"}, 503477}, + {{655173, "comedians-canaries-and-coalmines"}, 498586}, + {{655173, "the-democrats-apology-and-promise"}, 465433}, + {{655173, "jp-s4c-jodptn8"}, 539940}, + {{655173, "2014-personality-lecture-16-extraversion"}, 578465}, + {{655173, "dr-jordan-b-peterson-on-femsplainers"}, 490395}, + {{655173, "higher-ed-our-cultural-inflection-point"}, 527291}, + {{655173, "archetype-reality-friendship-and"}, 519736}, + {{655173, "sir-roger-scruton-dr-jordan-b-peterson"}, 490395}, + {{655173, "jp-cf2nqmqifxc"}, 539940}, + {{655173, "penguin-uk-12-rules-for-life"}, 413749}, + {{655173, "march-2019-q-and-a"}, 537138}, + {{655173, "jp-ne5vbomsqjc"}, 539940}, + {{655173, "dublin-london-harris-murray-new-usa-12"}, 413749}, + {{655173, "12-rules-12-cities-tickets-now-available"}, 413749}, + {{655173, "jp-j9j-bvdrgdi"}, 539940}, + {{655173, "responsibility-conscience-and-meaning"}, 499123}, + {{655173, "04-harris-murray-peterson-discussion"}, 436678}, + {{655173, "jp-ayhaz9k008q"}, 539940}, + {{655173, "with-jocko-willink-the-catastrophe-of"}, 490395}, + {{655173, "interview-with-the-grievance-studies"}, 501296}, + {{655173, "russell-brand-jordan-b-peterson-under"}, 413750}, + {{655173, "goodbye-to-patreon"}, 496771}, + {{655173, "revamped-podcast-announcement-with"}, 540943}, + {{655173, "swedes-want-to-know"}, 285453}, + {{655173, "auckland-clip-2-the-four-fundamental"}, 607892}, + {{655173, "jp-dtirzqmgbdm"}, 539940}, + {{655173, "political-correctness-a-force-for-good-a"}, 413750}, + {{655173, "sean-plunket-full-interview-new-zealand"}, 597638}, + {{655173, "q-a-the-meaning-and-reality-of"}, 616984}, + {{655173, "lecture-and-q-a-with-jordan-peterson-the"}, 413749}, + {{655173, "2017-personality-07-carl-jung-and-the"}, 578465}, + {{655173, "nina-paley-animator-extraordinaire"}, 413750}, + {{655173, "truth-as-the-antidote-to-suffering-with"}, 455127}, + {{655173, "bishop-barron-word-on-fire"}, 599814}, + {{655173, "zizek-vs-peterson-april-19"}, 527291}, + {{655173, "revamped-podcast-with-westwood-one"}, 540943}, + {{655173, "2016-11-19-university-of-toronto-free"}, 578465}, + {{655173, "jp-1emrmtrj5jc"}, 539940}, + {{655173, "who-is-joe-rogan-with-jordan-peterson"}, 585578}, + {{655173, "who-dares-say-he-believes-in-god"}, 581738}, + {{655252, "games-with-live2d"}, 589978}, + {{655252, "kaenbyou-rin-live2d"}, 589978}, + {{655374, "steam-groups-are-crazy"}, 607590}, + {{655379, "asmr-captain-falcon-happily-beats-you-up"}, 644574}, + {{655379, "pixel-art-series-5-link-holding-the"}, 442952}, + {{655379, "who-can-cross-the-planck-length-the-hero"}, 610830}, + {{655379, "ssbb-the-yoshi-grab-release-crash"}, 609747}, + {{655379, "tas-captain-falcon-s-bizarre-adventure"}, 442958}, + {{655379, "super-smash-bros-in-360-test"}, 442963}, + {{655379, "what-if-luigi-was-b-u-f-f"}, 442971}, + {{655803, "sun-time-lapse-test-7"}, 610634}, + {{655952, "upper-build-complete"}, 591728}, + {{656758, "cryptocurrency-awareness-adoption-the"}, 541770}, + {{656829, "3d-printing-technologies-comparison"}, 462685}, + {{656829, "3d-printing-for-everyone"}, 462685}, + {{657052, "tni-punya-ilmu-kanuragan-gaya-baru"}, 657045}, + {{657052, "papa-sunimah-nelpon-sri-utami-emon"}, 657045}, + {{657274, "rapforlife-4-win"}, 656856}, + {{657274, "bizzilion-proof-of-withdrawal"}, 656856}, + {{657420, "quick-drawing-prince-tribute-colored"}, 605630}, + {{657453, "white-boy-tom-mcdonald-facts"}, 597169}, + {{657453, "is-it-ok-to-look-when-you-with-your-girl"}, 610508}, + {{657584, "need-for-speed-ryzen-5-1600-gtx-1050-ti"}, 657161}, + {{657584, "quantum-break-ryzen-5-1600-gtx-1050-ti-4"}, 657161}, + {{657584, "nightcore-legends-never-die"}, 657161}, + {{657706, "mtb-enduro-ferragosto-2019-sestri"}, 638904}, + {{657706, "warface-free-for-all"}, 638908}, + {{657782, "nick-warren-at-loveland-but-not-really"}, 444299}, + {{658098, "le-temps-nous-glisse-entre-les-doigts"}, 600099}, }; bool CClaimTrieCacheBase::incrementBlock(insertUndoType& insertUndo, claimUndoType& expireUndo, @@ -994,14 +1171,9 @@ bool CClaimTrieCacheBase::incrementBlock(insertUndoType& insertUndo, claimUndoTy auto getTakeoverQuery = db << "SELECT IFNULL(takeoverHeight, 0), takeoverID FROM nodes WHERE name = ?"; auto hasCandidateQuery = db << "UPDATE nodes SET takeoverHeight = ?, takeoverID = ? WHERE name = ?"; auto noCandidateQuery = db << "UPDATE nodes SET takeoverHeight = NULL, takeoverID = NULL WHERE name = ?"; + auto maxWorkaround = Params().GetConsensus().nMaxTakeoverWorkaroundHeight; for (const auto& nameWithTakeover : takeovers) { - auto needsActivate = false; - if (nNextHeight >= 496856 && nNextHeight <= 653524) { - auto wit = takeoverWorkarounds.find(std::make_pair(nNextHeight, nameWithTakeover)); - needsActivate = wit != takeoverWorkarounds.end(); - } - // if somebody activates on this block and they are the new best, then everybody activates on this block CClaimValue candidateValue; auto hasCandidate = getInfoForName(nameWithTakeover, candidateValue, 1); @@ -1012,10 +1184,18 @@ bool CClaimTrieCacheBase::incrementBlock(insertUndoType& insertUndo, claimUndoTy getTakeoverQuery++; // reset it auto hasBeenSetBefore = existingID != nullptr && !existingID->IsNull(); - auto takeoverHappening = needsActivate || !hasCandidate || (hasBeenSetBefore && *existingID != candidateValue.claimId); + auto takeoverHappening = !hasCandidate || (hasBeenSetBefore && *existingID != candidateValue.claimId); if (takeoverHappening && activateAllFor(insertUndo, insertSupportUndo, nameWithTakeover)) hasCandidate = getInfoForName(nameWithTakeover, candidateValue, 1); + // This is a super ugly hack to work around bug in old code. + // The bug: un/support a name then update it. This will cause its takeover height to be reset to current. + // This is because the old code with add to the cache without setting block originals when dealing in supports. + if (nNextHeight >= 496856 && nNextHeight < maxWorkaround) { + auto wit = takeoverWorkarounds.find(std::make_pair(nNextHeight, nameWithTakeover)); + takeoverHappening |= wit != takeoverWorkarounds.end(); + } + LogPrint(BCLog::CLAIMS, "Takeover on %s (%s) at %d, happening: %d, set before: %d\n", nameWithTakeover, HexStr(nameWithTakeover), nNextHeight, takeoverHappening, hasBeenSetBefore); if (takeoverHappening || !hasBeenSetBefore) { @@ -1132,167 +1312,6 @@ bool CClaimTrieCacheBase::finalizeDecrement(takeoverUndoType& takeoverUndo) return true; } -static const boost::container::flat_set> ownershipWorkaround = { - { 297706, "firstvideo" }, - { 300045, "whatislbry" }, - { 305742, "mrrobots01e01" }, - { 350299, "gaz" }, - { 426898, "travtest01" }, - { 466336, "network" }, - { 481633, "11111111111111111111" }, - { 538169, "cmd" }, - { 539068, "who13" }, - { 552082, "right" }, - { 557322, "pixelboard" }, - { 562221, "stats331" }, - { 583305, "gauntlet-invade-the-darkness-lvl-1-of" }, - { 584733, "0000001" }, - { 584733, "0000003" }, - { 584733, "0000002" }, - { 588287, "livestream-project-reality-arma-3" }, - { 588308, "fr-let-s-play-software-inc-jay" }, - { 588308, "fr-motorsport-manager-jay-s-racing-5" }, - { 588308, "fr-motorsport-manager-jay-s-racing" }, - { 588318, "fr-hoi-iv-the-great-war-l-empire-2" }, - { 588318, "fr-stellaris-distant-stars-la-pr" }, - { 588318, "fr-stellaris-distant-stars-la-pr-2" }, - { 588318, "fr-crusader-kings-2-la-dynastie-6" }, - { 588318, "fr-jurassic-world-evolution-let-s-play" }, - { 588322, "fr-cold-waters-campagne-asie-2000-2" }, - { 588683, "calling-tech-support-scammers-live-3" }, - { 589013, "lets-play-jackbox-games-5" }, - { 589013, "let-s-play-jackbox-games" }, - { 589534, "let-s-play-the-nightmare-before" }, - { 589538, "kabutothesnake-s-live-ps4-broadcast" }, - { 589538, "back-with-fortnite" }, - { 589554, "no-eas-strong-thunderstorm-advisory" }, - { 589606, "new-super-mario-bros-wii-walkthrough" }, - { 589606, "samurai-warrior-chronicles-hero-rise" }, - { 589630, "ullash" }, - { 589640, "today-s-professionals-2018-winter-3" }, - { 589640, "let-s-run-a-mall-series-6-1-18-no-more" }, - { 589640, "today-s-professionals-2018-winter-4" }, - { 589641, "today-s-professionals-big-brother-6-14" }, - { 589641, "today-s-professionals-2018-winter-14" }, - { 589641, "today-s-professionals-big-brother-6-13" }, - { 589641, "today-s-professionals-big-brother-6-28" }, - { 589641, "today-s-professionals-2018-winter-6" }, - { 589641, "today-s-professionals-big-brother-6-26" }, - { 589641, "today-s-professionals-big-brother-6-27" }, - { 589641, "today-s-professionals-2018-winter-10" }, - { 589641, "today-s-professionals-2018-winter-7" }, - { 589641, "today-s-professionals-big-brother-6-29" }, - { 589760, "bobby-blades" }, - { 589831, "fifa-14-android-astrodude44-vs" }, - { 589849, "gaming-and-drawing-videos-live-stream" }, - { 589849, "gaming-with-silverwolf-live-stream-2" }, - { 589849, "gaming-with-silverwolf-live-stream-3" }, - { 589849, "gaming-with-silverwolf-videos-live" }, - { 589849, "gaming-with-silverwolf-live-stream-4" }, - { 589849, "gaming-with-silverwolf-live-stream-5" }, - { 589851, "gaming-with-silverwolf-live-stream-7" }, - { 589851, "gaming-with-silverwolf-live-stream-6" }, - { 589870, "classic-sonic-games" }, - { 589926, "j-dog7973-s-fortnite-squad" }, - { 589967, "wow-warlords-of-draenor-horde-side" }, - { 590020, "come-chill-with-rekzzey-2" }, - { 590033, "gothsnake-black-ops-ii-game-clip" }, - { 590074, "a-new-stream" }, - { 590075, "a-new-stream" }, - { 590082, "a-new-stream" }, - { 590116, "a-new-stream" }, - { 590178, "father-vs-son-stickfight-stickfight" }, - { 590178, "little-t-playing-subnautica-livestream" }, - { 590179, "my-family-trip-with-my-mom-and-sister" }, - { 590206, "pomskies" }, - { 590223, "dark-souls-iii-soul-level-1-challenge-2" }, - { 590223, "dark-souls-iii-soul-level-1-challenge" }, - { 590223, "dark-souls-iii-soul-level-1-challenge-3" }, - { 590225, "skyrim-special-edition-ps4-platinum-3" }, - { 590225, "skyrim-special-edition-ps4-platinum-4" }, - { 590225, "let-s-play-sniper-elite-4-authentic-2" }, - { 590226, "let-s-play-final-fantasy-the-zodiac-2" }, - { 590226, "let-s-play-final-fantasy-the-zodiac-3" }, - { 590401, "ls-h-ppchen-halloween-stream-vom-31-10" }, - { 591982, "destiny-the-taken-king-gameplay" }, - { 591984, "ghost-recon-wildlands-100-complete-4" }, - { 591986, "uncharted-the-lost-legacy-100-complete" }, - { 593535, "3-smg4-reactions-in-1-gabrieloreacts" }, - { 593550, "speed-runs-community-versus-video" }, - { 593551, "rayman-legends-challenges-app-murphy-s" }, - { 593551, "rayman-legends-challenges-app-the" }, - { 593726, "dmt-psychedelics-death-and-rebirth" }, - { 593726, "flat-earth-and-other-shill-potatoes" }, - { 593726, "why-everyone-s-leaving-youtube" }, - { 595537, "memory-techniques-1-000-people-system" }, - { 595556, "qik-mobile-video-by-paul-clifford" }, - { 595818, "ohare12345-s-live-ps4-broadcast" }, - { 595838, "super-smash-bros-u-3-minute-smash-as" }, - { 595838, "super-smash-bros-u-multi-man-smash-3" }, - { 595838, "super-smash-bros-u-target-blast-3" }, - { 595838, "super-smash-bros-u-donkey-kong-tourney" }, - { 595839, "super-smash-bros-u-super-mario-u-smash" }, - { 595841, "super-smash-bros-u-zelda-smash-series" }, - { 595841, "super-smash-bros-u-tournament-series" }, - { 595841, "super-smash-bros-u-link-tourney-mode-a" }, - { 595841, "super-smash-bros-u-brawl-co-op-event" }, - { 595841, "super-smash-bros-u-link-tourney-mode-b" }, - { 595842, "super-smash-bros-u-3-newcomers-the" }, - { 595844, "super-smash-bros-u-home-run-contest-2" }, - { 596829, "gramy-minecraft" }, - { 596829, "gramy-minecraft-jasmc-pl" }, - { 597635, "5-new-technology-innovations-in-5" }, - { 597658, "borderlands-2-tiny-tina-s-assault-on" }, - { 597658, "let-s-play-borderlands-the-pre-sequel" }, - { 597660, "caveman-world-mountains-of-unga-boonga" }, - { 597787, "playing-hypixel-webcam-and-mic" }, - { 597789, "if-herobrine-played-yandere-simulator" }, - { 597794, "user-registration-system-in-php-mysql" }, - { 597796, "let-s-play-mario-party-luigi-s-engine" }, - { 597796, "let-s-play-mario-party-dk-s-jungle" }, - { 597803, "asphalt-8-gameplay" }, - { 597817, "roblox-phantom-forces-no-audio-just" }, - { 597824, "best-funny-clip" }, - { 597825, "let-s-play-fallout-2-restoration-3" }, - { 597826, "saturday-night-baseball-with-3" }, - { 597826, "saturday-night-baseball-with-6" }, - { 597829, "payeer" }, - { 597831, "dreamtowards" }, - { 597833, "20000" }, - { 597833, "remme" }, - { 597834, "hycon" }, - { 597834, "hearthstone-heroes-of-warcraft-3" }, - { 597837, "15-curiosidades-que-probablemente-ya" }, - { 597893, "elder-scrolls-online-road-to-level-20" }, - { 597894, "elder-scrolls-legends-beta-gameplay" }, - { 597900, "fallout-4-walkthrough" }, - { 597901, "wwe-2k18-with-that-guy-and-tricky" }, - { 597902, "dead-space-walkthroug-wcommentary-part" }, - { 597903, "how-it-feels-to-chew-5-gum-funny" }, - { 597909, "president-obama-apec-press-conference" }, - { 597909, "100-5" }, - { 597910, "eat-the-street" }, - { 597923, "rocket-league-giveaway-3" }, - { 597923, "mortal-kombat-xl-livestream" }, - { 597930, "lets-play-spore-with" }, - { 597931, "lets-play-minecraft-with" }, - { 597932, "for-honor-4" }, - { 597933, "memorize-english-words-scientifically" }, - { 597933, "true-mov" }, - { 597935, "jugando-pokemon-esmeralda-gba" }, - { 597936, "gta-5-livestream-85-92" }, - { 597937, "battlefield-hardline-9-19" }, - { 598070, "mechwarrior-2-soundtrack-clan-jade" }, - { 606424, "@apostrophe" }, - { 615725, "amazonianhunter" }, - { 615726, "amazonianhunter" }, - { 630930, "cli" }, - { 638876, "@ordinary" }, - { 638878, "@ordinary" }, - { 644575, "ratio" }, - { 646584, "calling-tech-support-scammers-live-3" }, -}; - int CClaimTrieCacheBase::getDelayForName(const std::string& name, const uint160& claimId) const { uint160 winningClaimId; @@ -1303,8 +1322,13 @@ int CClaimTrieCacheBase::getDelayForName(const std::string& name, const uint160& return 0; } - if (nNextHeight <= 646584 && ownershipWorkaround.find(std::make_pair(nNextHeight, name)) != ownershipWorkaround.end()) + // NOTE: old code had a bug in it where nodes with no claims but with children would get left in the cache after removal. + // This would cause the getNumBlocksOfContinuousOwnership to return zero (causing incorrect takeover height calc). + auto hit = removalWorkaround.find(name); + if (hit != removalWorkaround.end()) { + removalWorkaround.erase(hit); return 0; + } return found ? std::min((nNextHeight - winningTakeoverHeight) / base->nProportionalDelayFactor, 4032) : 0; } @@ -1321,7 +1345,7 @@ bool CClaimTrieCacheBase::getProofForName(const std::string& name, const uint160 proof = CClaimTrieProof(); auto nodeQuery = db << "SELECT name, IFNULL(takeoverHeight, 0) FROM nodes WHERE " "name IN (WITH RECURSIVE prefix(p) AS (VALUES(?) UNION ALL " - "SELECT SUBSTR(p, 1, LENGTH(p)-1) FROM prefix WHERE p != '') SELECT p FROM prefix) " + "SELECT POPS(p) FROM prefix WHERE p != '') SELECT p FROM prefix) " "ORDER BY name" << name; for (auto&& row: nodeQuery) { CClaimValue claim; diff --git a/src/claimtrie.h b/src/claimtrie.h index 1e93ef03f..076287852 100644 --- a/src/claimtrie.h +++ b/src/claimtrie.h @@ -383,6 +383,8 @@ protected: mutable sqlite::database db; int nNextHeight; // Height of the block that is being worked on, which is bool transacting; + mutable std::unordered_set removalWorkaround; + // one greater than the height of the chain's tip mutable sqlite::database_binder claimHashQuery, childHashQuery; diff --git a/src/claimtrieforks.cpp b/src/claimtrieforks.cpp index 9ca88d2d9..3f241b3cc 100644 --- a/src/claimtrieforks.cpp +++ b/src/claimtrieforks.cpp @@ -144,27 +144,34 @@ bool CClaimTrieCacheNormalizationFork::normalizeAllNamesInTrieIfNecessary(takeov // make the new nodes db << "INSERT INTO nodes(name) SELECT NORMALIZED(name) AS nn FROM claims WHERE nn != nodeName " - "ON CONFLICT(name) DO UPDATE SET hash = NULL"; + "AND validHeight <= ?1 AND expirationHeight > ?1 ON CONFLICT(name) DO UPDATE SET hash = NULL" << nNextHeight; db << "UPDATE nodes SET hash = NULL WHERE name IN " - "(SELECT NORMALIZED(name) AS nn FROM supports WHERE nn != nodeName)"; + "(SELECT NORMALIZED(name) AS nn FROM supports WHERE nn != nodeName " + "AND validHeight <= ?1 AND expirationHeight > ?1)" << nNextHeight; // update the claims and supports - db << "UPDATE claims SET nodeName = NORMALIZED(name)"; - db << "UPDATE supports SET nodeName = NORMALIZED(name)"; + db << "UPDATE claims SET nodeName = NORMALIZED(name) WHERE validHeight <= ?1 AND expirationHeight > ?1" << nNextHeight; + db << "UPDATE supports SET nodeName = NORMALIZED(name) WHERE validHeight <= ?1 AND expirationHeight > ?1" << nNextHeight; // remove the old nodes - auto query = db << "SELECT name, IFNULL(takeoverHeight, 0), takeoverID FROM nodes " - "WHERE name NOT IN (SELECT nodeName FROM claims)"; + auto query = db << "SELECT name, IFNULL(takeoverHeight, 0), takeoverID FROM nodes WHERE name NOT IN " + "(SELECT nodeName FROM claims WHERE validHeight <= ?1 AND expirationHeight > ?1)"; for (auto&& row: query) { std::string name; int takeoverHeight; std::unique_ptr takeoverID; row >> name >> takeoverHeight >> takeoverID; if (name.empty()) continue; // preserve our root node - takeoverUndo.emplace_back(name, std::make_pair(takeoverHeight, takeoverID ? *takeoverID : uint160())); + if (takeoverHeight > 0) + takeoverUndo.emplace_back(name, std::make_pair(takeoverHeight, takeoverID ? *takeoverID : uint160())); // we need to let the tree structure method do the actual node delete: db << "UPDATE nodes SET hash = NULL WHERE name = ?" << name; } + db << "UPDATE nodes SET hash = NULL WHERE takeoverHeight IS NULL"; + + // work around a bug in the old implementation: + db << "UPDATE claims SET validHeight = ?1 " // force a takeover on these + "WHERE blockHeight < ?1 AND validHeight > ?1 AND nodeName != name" << nNextHeight; return true; } @@ -177,7 +184,7 @@ bool CClaimTrieCacheNormalizationFork::unnormalizeAllNamesInTrieIfNecessary() db.define("NORMALIZED", [this](const std::string& str) { return normalizeClaimName(str, true); }); db << "INSERT INTO nodes(name) SELECT name FROM claims WHERE name != nodeName " - "ON CONFLICT(name) DO UPDATE SET hash = NULL"; + "AND validHeight < ?1 AND expirationHeight > ?1 ON CONFLICT(name) DO UPDATE SET hash = NULL" << nNextHeight; db << "UPDATE nodes SET hash = NULL WHERE name IN " "(SELECT name FROM supports WHERE name != nodeName UNION " "SELECT nodeName FROM supports WHERE name != nodeName UNION " @@ -197,7 +204,42 @@ bool CClaimTrieCacheNormalizationFork::incrementBlock(insertUndoType& insertUndo { if (nNextHeight == Params().GetConsensus().nNormalizedNameForkHeight) normalizeAllNamesInTrieIfNecessary(takeoverUndo); - return CClaimTrieCacheExpirationFork::incrementBlock(insertUndo, expireUndo, insertSupportUndo, expireSupportUndo, takeoverUndo); + auto ret = CClaimTrieCacheExpirationFork::incrementBlock(insertUndo, expireUndo, insertSupportUndo, expireSupportUndo, takeoverUndo); +// if (nNextHeight == 588319) { +// getMerkleHash(); +// auto q2 = db << "SELECT name, nodeName FROM claims WHERE nodeName NOT IN (SELECT name FROM nodes) " +// "AND validHeight < ?1 AND expirationHeight >= ?1" << nNextHeight; +// for (auto&& row: q2) { +// std::string name, nn; +// row >> name >> nn; +// LogPrintf("BAD NAME 2: %s, %s\n", name, nn); +// } +// std::ifstream input("dump588318.txt"); +// std::string line; +// std::vector lines; +// while (std::getline(input, line)) { +// lines.push_back(line); +// } +// std::sort(lines.begin(), lines.end()); +// auto q3 = db << "SELECT n.name, n.hash, IFNULL(n.takeoverHeight, 0), " +// "(SELECT COUNT(*) FROM claims c WHERE c.nodeName = n.name " +// "AND validHeight < ?1 AND expirationHeight >= ?1) as cc FROM nodes n ORDER BY n.name" << nNextHeight; +// for (auto&& row: q3) { +// std::string name; int takeover, childs; uint256 hash; +// row >> name >> hash >> takeover >> childs; +// std::string m = name + ", " + std::to_string(name.size()) + ", " + hash.GetHex() + ", " + std::to_string(takeover) + ", " + std::to_string(childs); +// if (!std::binary_search(lines.begin(), lines.end(), m)) { +// LogPrintf("BAD BAD: %s\n", m); +// } +// } +// auto q4 = db << "SELECT n.name, n.parent FROM nodes n LEFT JOIN claims c ON n.name = c.nodeName LEFT JOIN nodes n2 ON n.name = n2.parent WHERE c.nodeName IS NULL AND n2.parent IS NULL"; +// for (auto&& row: q4) { +// std::string name, nn; +// row >> name >> nn; +// LogPrintf("BAD NAME 3: %s, %s\n", name, nn); +// } +// } + return ret; } bool CClaimTrieCacheNormalizationFork::decrementBlock(insertUndoType& insertUndo, claimUndoType& expireUndo, insertUndoType& insertSupportUndo, supportUndoType& expireSupportUndo) @@ -353,7 +395,7 @@ bool CClaimTrieCacheHashFork::getProofForName(const std::string& name, const uin proof = CClaimTrieProof(); auto nodeQuery = db << "SELECT name, IFNULL(takeoverHeight, 0) FROM nodes WHERE " "name IN (WITH RECURSIVE prefix(p) AS (VALUES(?) UNION ALL " - "SELECT SUBSTR(p, 1, LENGTH(p)-1) FROM prefix WHERE p != '') SELECT p FROM prefix) " + "SELECT POPS(p) FROM prefix WHERE p != '') SELECT p FROM prefix) " "ORDER BY name" << name; for (auto&& row: nodeQuery) { std::string key;;