From e8fc044ccfc7fd7ce225d4888adf10567485aa63 Mon Sep 17 00:00:00 2001 From: Andy Oknen Date: Fri, 30 Sep 2022 16:02:56 +0300 Subject: [PATCH] Squashed commit of the following: commit b2cc4d04aa32e29d9f3dd014f1d143b7ce822f32 Merge: c1681924 5d6334f5 Author: lostystyg <54471935+lostystyg@users.noreply.github.com> Date: Wed Sep 28 18:00:50 2022 +0300 Merge pull request #426 from pocketnetteam/fix/notifier Fix/notifier commit 5d6334f553b08a47f9a659f571d4a8a73592ecc5 Author: only1question Date: Wed Sep 28 16:40:34 2022 +0300 Disable unused method GetUserReferrerAddress in NotifierRepository commit c168192498ea0f3a3a3a4cab8a8a6102560db491 Merge: 804cc3f9 3f38d9d2 Author: lostystyg <54471935+lostystyg@users.noreply.github.com> Date: Fri Sep 23 18:23:11 2022 +0400 Merge pull request #422 from pocketnetteam/feature/notifications_0.21 Notification and activities updates and fixes commit 3f38d9d2cbb8e1674c244ab9f1652ad474bc002a Author: lostystyg Date: Thu Sep 22 13:22:46 2022 +0400 Post hash for comments in shortforms commit 2169110aba1af68278ab0addea39ca4d19c7c5a3 Author: lostystyg Date: Wed Sep 21 14:11:19 2022 +0400 fixup! Fixed stucking in staker thread in case wallet is locked commit 695b9247c5ace3e6b256732ecbcc1d92f65faf10 Author: lostystyg Date: Wed Sep 21 13:41:23 2022 +0400 Fixed stucking in staker thread in case wallet is locked commit f40511e65d82bd56553d1de4ef4190276780515f Author: lostystyg Date: Wed Sep 21 13:38:20 2022 +0400 Added tx time for shortform commit 76d8d7bd1ca448a2d36da07d5d045235c490e9b4 Author: lostystyg Date: Wed Sep 21 11:46:36 2022 +0400 New line at the end of file commit 625b6d2470c8600492989f615c3d0ae84bb10dca Author: lostystyg Date: Wed Sep 21 11:45:49 2022 +0400 Removed unused method commit 4dd8985c71f0e9d126404330e8efa41cf265ee67 Author: lostystyg Date: Tue Sep 20 17:31:41 2022 +0400 More code readability for notifications result commit e046c9566caf3f1355a60c26d17c1c67be83ffdf Author: lostystyg Date: Mon Sep 19 18:55:58 2022 +0400 More readable code for NotificationsResult commit c6011f42b7559c884d12e69b1a5d6d07a3097023 Author: lostystyg Date: Mon Sep 19 18:47:40 2022 +0400 Removed unused method commit 5f91fa8c60a677d758029b2ed23bffa150cb2cc7 Author: lostystyg Date: Mon Sep 19 18:10:28 2022 +0400 FIxed mixing comments and answers for short forms commit 12446a4f9b5092d33ac533053384b7c09c07b98d Author: lostystyg Date: Mon Sep 19 16:34:29 2022 +0400 Moved short form builders to helpers commit 0151fbe74b7b478909efc83f7a7a6299a28954cc Author: lostystyg Date: Fri Sep 16 23:18:21 2022 +0400 Fixed account data collecting for activities commit 4ada12f38338d3505d0e2500f0e5124cf604368b Author: lostystyg Date: Thu Sep 15 20:01:52 2022 +0400 Optimizing account info collection for notifications commit 1faf213439fd389c1d515c630787119faaaef555 Author: lostystyg Date: Mon Sep 12 19:47:50 2022 +0400 Updated notifications serialization commit 345c0dc98053b6d08150fbd8051e86abecc40b70 Author: lostystyg Date: Mon Sep 12 19:39:55 2022 +0400 Allow to ignore short tx type during serialization commit 804cc3f92aa5e5de3163684238264e71bbfe4429 Merge: 4034e3ff ca2bf01a Author: Andy Oknen Date: Mon Sep 19 13:42:51 2022 +0300 Merge pull request #416 from pocketnetteam/fix/optimize-getunspents-index fix: optimize getunspents index commit ca2bf01a6870d00d169a3a793f418bbb634c25fc Author: Andy Oknen Date: Mon Sep 19 10:49:58 2022 +0300 Change used index for fast sorting GetUnspents commit 4034e3ff3096e365b0bbb1779d5975b6961d7dcc Merge: 930f8229 2d5e9c24 Author: Andy Oknen Date: Sun Sep 18 10:17:19 2022 +0300 Merge pull request #415 from pocketnetteam/fix/bad-txns-premature-spend-of-coinbase commit 930f82293c29fae26f30402f62bd38f7a60358bd Merge: 297fe2e1 2e81916d Author: Andy Oknen Date: Sun Sep 18 10:16:42 2022 +0300 Merge pull request #413 from pocketnetteam/fix/delete-account commit 2d5e9c2455e75b6f33a04277bf98ee5fa81fac50 Author: Andy Oknen Date: Sun Sep 18 01:03:24 2022 +0300 Include coinstake to check bad-txns-premature-spend-of-coinbase commit 2e81916d2f1b46f14db76412d48ecd9bc608cad0 Author: Andy Oknen Date: Fri Sep 16 18:26:05 2022 +0300 Fix enable deleting transaction commit 297fe2e1e87477a0fe0e97eff2e8ab60cfcb05b6 Author: Andy Oknen Date: Fri Sep 16 17:58:25 2022 +0300 feat: delete account (#405) * Add type for account deleting transaction * Refactoring models & AccountDelete transaction * Fix check height in ExistsInMempool * Refactoring account editing * Move to base class opReturnCheck * Squashed commit of the following: commit 84b78aab2b2f7c9baa2009f57eee3f92385aafb3 Merge: 7b7338c8 499f514b Author: Andy Oknen Date: Fri Sep 9 14:37:44 2022 +0300 Merge pull request #408 from pocketnetteam/actualization/0.20 Squashed commit of the following: commit 499f514bf494920d2847225ae31eeef5811f305b Author: Andy Oknen Date: Fri Sep 9 10:50:15 2022 +0300 Squashed commit of the following: commit aca3fe7d05c1f0c8a9ea76bf02eff87cefd47142 Merge: 78065768 1cce975f Author: Andy Oknen Date: Thu Sep 8 18:40:05 2022 +0300 Merge pull request #399 from HiHat/patch-1 Important details regarding address and fixes commit 780657681d2564844a42c24de0938da74777c642 Merge: bfaef570 5ce96412 Author: Andy Oknen Date: Thu Sep 8 15:09:22 2022 +0300 Merge pull request #402 from pocketnetteam/andyoknen-patch-1 Update README.md commit 5ce96412b1cc0f67148aa4933dd74fe3b43f6c29 Author: Andy Oknen Date: Wed Sep 7 10:51:21 2022 +0300 Update README.md commit 1cce975f41f0bc130f58e8004ac35f1f8cfd7179 Author: HiHat Date: Tue Sep 6 19:09:26 2022 +0300 Important details regarding address and fixes commit bfaef57025253beb6564dbe4afd30dfe51e059a4 Author: Pocketnet Team Date: Wed Aug 31 13:23:31 2022 +0300 Create add.tasks.to.project.yml commit 8ad81f1601554be5eb557a5fda204a78fd3d3be3 Author: Pocketnet Team Date: Tue Aug 30 15:00:15 2022 +0300 Set maximum depth 1 month for RPC GetMostCommentedFeed commit c1e5845465970d7bbafe909a9528abe0ac3cfd67 Author: Pocketnet Team Date: Tue Aug 30 14:57:23 2022 +0300 Set fork height for BlockingCancel.hpp commit b8bc0adf5c46dc3fb0d14332f49e34dec6105dd3 Merge: 8383efb4 8abd1bb7 Author: Andy Oknen Date: Tue Aug 30 14:45:32 2022 +0300 Merge pull request #385 from pocketnetteam/fix/wrong-key-threshold fix: wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8abd1bb75fb52ea6dff9ad73e560362abfd4b1c5 Author: Andy Oknen Date: Tue Aug 30 14:42:46 2022 +0300 Comment not used now RPC commit fee5e39f227d46ac0259d0b26b5680fb451a3eaa Author: Andy Oknen Date: Tue Aug 30 11:13:50 2022 +0300 Extend height for fork to 1873500 block commit 0ea51a2868b2ad0befb1149c2b5a0270cac7ecd1 Author: Andy Oknen Date: Mon Aug 29 14:14:26 2022 +0300 Fix wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8383efb46582ec24455867157474dbf29c0bc4f2 Author: Pocketnet Team Date: Thu Aug 25 00:21:32 2022 +0300 Delete project.add.issues.yml commit 95b97de883e4116a7f6d54af3be842e017e7fd01 Author: Pocketnet Team Date: Thu Aug 25 00:17:56 2022 +0300 Create project.add.issues.yml commit 9693e62933ae1ca02560fba1311dbdd4c88c8a77 Author: Pocketnet Team Date: Thu Aug 25 00:07:19 2022 +0300 Create auto_assign.yml commit 7b7338c801e665435cc429381ff3eb98d2a68f57 Merge: 88af7848 b6b9f45f Author: lostystyg <54471935+lostystyg@users.noreply.github.com> Date: Fri Sep 9 10:41:39 2022 +0300 Merge pull request #302 from lostystyg/feature/events feature: events, push notifications and activities commit 88af7848ba0e56fe22a136715bb7fbca46eda966 Merge: dddb3c6d 6280c078 Author: Andy Oknen Date: Thu Sep 8 18:45:15 2022 +0300 Merge pull request #407 from pocketnetteam/fix/clear-database Fix clear database commit 6280c078ae1e1cf38a1d69e67b6bc2203469eda8 Author: Andy Oknen Date: Thu Sep 8 18:39:43 2022 +0300 Fix clear database commit dddb3c6dd0e6a5088d46bfb70051e5fa95fc08fe Merge: 1a03ee9d 6d1975a2 Author: Andy Oknen Date: Thu Sep 8 15:22:39 2022 +0300 Merge pull request #401 from pocketnetteam/feat/txindex-disable-always feat: disable txindex by default commit 1a03ee9d2340909fbedcc8ded34915efc5c9489f Merge: adce55f2 bc022eca Author: Andy Oknen Date: Thu Sep 8 15:07:28 2022 +0300 Merge pull request #406 from pocketnetteam/fix/full-reindex-lists fix: full reindex lists commit b6b9f45f711821ba98a657b55529ae9a6037abab Author: lostystyg Date: Thu Sep 8 15:55:12 2022 +0400 Fix new line commit 314c1a84137a1bba0f246f0649cbd9334625cc03 Author: lostystyg Date: Thu Sep 8 15:52:07 2022 +0400 Temporarily disable getevents rpc commit bbd05740a461ff9ca4c68cfae216e82f28bf1b8d Merge: 32b0e15f adce55f2 Author: lostystyg Date: Thu Sep 8 15:51:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit bc022ecac23e00dfb7236ffffbb2e77e6e995682 Author: Andy Oknen Date: Thu Sep 8 14:40:46 2022 +0300 Logging clean commit 8107ae50a48790d12bb0d0662c1ea2dc21cc3e45 Author: Andy Oknen Date: Thu Sep 8 14:38:53 2022 +0300 Call rollback lists for full reindexing commit 32b0e15f67da6f08069173585fa801f641209d88 Author: lostystyg Date: Thu Sep 8 15:26:58 2022 +0400 Optimized notifications collecting commit 24e63f43b73f38a3b534682ca5c2b864863f7bf2 Author: lostystyg Date: Thu Sep 8 13:13:52 2022 +0400 Filling notification result with account info commit 1344fe5b189542b154f2bf9d9a47d23cbc4e83e9 Author: lostystyg Date: Thu Sep 8 12:29:31 2022 +0400 Language for short account commit 710886c50ae33edfda37472b2265aa2adaf127ce Author: lostystyg Date: Thu Sep 8 12:17:28 2022 +0400 Correctly filling notifications answer commit 6d1975a22e50550ff6ef7b393441e49f2cadbfe4 Author: Andy Oknen Date: Wed Sep 7 10:40:06 2022 +0300 Disable enabling txindex by default commit 5b04354199e527de52c08dd1880a12c1f8225ba5 Author: lostystyg Date: Mon Sep 5 15:33:28 2022 +0400 Removed outdated comment commit 57f275ea9dcd3c7c61a75561c809cef6a97f6937 Author: lostystyg Date: Mon Sep 5 15:04:22 2022 +0400 Cosmetics for blocking query in activities commit 88ed33a8731e61a9364840264b099e7012c659cd Author: lostystyg Date: Mon Sep 5 14:47:08 2022 +0400 Removed number from outputs in activities and notifications commit 24534072f1ece6cf940f9033fa032cd20b7471c7 Author: lostystyg Date: Mon Sep 5 13:04:59 2022 +0400 Reuse height binder in notifications for money commit 77f9e87343e7b691227dd97b5a114460a55df7f2 Author: lostystyg Date: Fri Sep 2 16:41:06 2022 +0400 Order outputs by number for activities and notifications commit 8ef4a5bbdd8aed5b860e73c95504fc9676977bec Merge: 2b3a0164 357d1558 Author: lostystyg Date: Thu Sep 1 22:28:12 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 2b3a0164de79b2ecf67f87dee0e2842fc8ec22df Author: lostystyg Date: Thu Sep 1 22:24:10 2022 +0400 Removed trash from badge in activities commit 66e9054ae456ebdb6b49a0682a141e6abc76c448 Author: lostystyg Date: Thu Sep 1 22:22:59 2022 +0400 Removed trash from badge field in notification queries commit f8924a6f595da8dbff0fe7f341a39399c1b09a6a Author: lostystyg Date: Thu Sep 1 22:21:18 2022 +0400 Ported notifications from 0.20-based dropped branch commit 6d8148ded4c31ea2019b5384fd8e90714cf5010e Author: lostystyg Date: Thu Sep 1 12:10:41 2022 +0400 Added blockings for notifications commit c23e94c4678ab27c7c4dfd1074b50f306a97e6bf Author: lostystyg Date: Wed Aug 31 13:29:41 2022 +0400 Added optional multiple addresses to shortform commit c29ab129b3c2ceb9da564a2f37649e321b50b869 Author: lostystyg Date: Tue Aug 30 19:06:08 2022 +0400 Removed unnecessary todo commit 736748f798fcbecc1f8e8b9e855ca215c3db5d3d Author: lostystyg Date: Tue Aug 30 19:03:32 2022 +0400 Some todo's commit cabb0603547edb11d29363d19fd9328729a2c7ba Author: lostystyg Date: Tue Aug 30 19:02:08 2022 +0400 All action history for comments and answers in activities commit cf5021c9c4f25c22ada7b59f2c143b953c6ad84b Author: lostystyg Date: Tue Aug 30 18:36:51 2022 +0400 Collect roottxhash in activity queries commit 328a3ecd8cad8cdef92b5baa5173f6516ac4d1de Author: lostystyg Date: Tue Aug 30 17:51:10 2022 +0400 Added root tx hash to shortform commit f6fa4a45ca88a8ce0970aaa0dc0950bce1465790 Author: lostystyg Date: Tue Aug 30 17:42:02 2022 +0400 Full history for notifications commit 077f0f26f5b52cf86229d2418cf73d465dbc0b29 Author: lostystyg Date: Thu Aug 25 09:35:42 2022 +0400 Added blocking shorttype commit e2913158f2226f719242e376b8a846ca660ef26b Author: lostystyg Date: Thu Aug 25 09:33:55 2022 +0400 Removed not up to date todo commit 884893775de6aea42350bddcdd93ec42c47c6d04 Author: lostystyg Date: Wed Aug 24 16:55:14 2022 +0400 Removed reposts from activities commit b5631e70c1e54ef4ae60207f2c25f9a72663d458 Merge: e4c102c3 b7b49914 Author: lostystyg Date: Wed Aug 24 16:21:26 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit e4c102c39cc9ebd7cd3bdf38b5c053841c39ca01 Author: lostystyg Date: Wed Aug 24 15:53:24 2022 +0400 Validate filters for events on rpc level commit ac03dcb727512a5ed29450c2a720c1259bcdd158 Author: lostystyg Date: Wed Aug 24 15:49:33 2022 +0400 Validate filters for activities on rpc level commit fcb2fed45b43c3e510be0dfb33504b680b97d016 Author: lostystyg Date: Wed Aug 24 15:49:10 2022 +0400 Removed pocketnetteam from events and activities commit 876e7b574c9ad099fd00721aa92c79561d3eb2b7 Author: lostystyg Date: Wed Aug 24 15:35:47 2022 +0400 Fixed crash if non-valid filters are specified for notifications/activities/events commit 5732263c174be41fb9be7dbc15b48acef6e1e263 Author: lostystyg Date: Mon Aug 22 23:52:32 2022 +0400 Removed todo for money in activities commit 9c7438fb22ddc857876e4cc734fd3885481e9386 Merge: 99c11087 6e530784 Author: lostystyg Date: Mon Aug 22 15:16:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 99c11087a786a017b7c1e4039cb94615d6e742c2 Author: lostystyg Date: Sat Aug 20 18:02:14 2022 +0400 Fixed typo in query commit 6057f91580b1e35399f7cfbbbf43e57d2cf6f486 Author: lostystyg Date: Sat Aug 20 17:53:37 2022 +0400 Removed commented out queries for notifications commit 35375ed1d01fa436ea83a65f910fdd746a8e1e5b Author: lostystyg Date: Sat Aug 20 16:39:23 2022 +0400 Validating filters for getnotificationssummary commit f1be1700c842a7cd1960665cbf969f97b4fe4892 Author: lostystyg Date: Sat Aug 20 16:38:13 2022 +0400 Optimization and fixed for notifications summary queries commit 1d371a0870f3053d77cf65df7c6a537370ede685 Author: lostystyg Date: Sat Aug 20 16:36:29 2022 +0400 Allow to specify union separator commit fcf526c45eb12f853f4da331398b9cf0dbfb6536 Merge: 46edf275 9df85fb7 Author: lostystyg Date: Fri Aug 19 19:26:37 2022 +0400 Merge remote-tracking branch 'origin/fixes/multiplelocks' into feature/events commit 46edf275c6f5e113be1209bca42b3ecf6962cad7 Author: lostystyg Date: Wed Aug 17 18:09:35 2022 +0400 Notifications summary commit 29164ac17d0da9ad5f8ead8f6d87fa8a9bdf30a3 Author: lostystyg Date: Mon Aug 15 11:22:23 2022 +0400 Fixed help for getnotifications commit c26ddf05be536577ca8334fbd57737a848b74805 Merge: 3a49aa58 1bbe483a Author: lostystyg Date: Fri Aug 12 14:01:39 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 3a49aa58477b3e5cac571a83eedc95b57106bbaa Merge: 5365be10 8a1b0af6 Author: lostystyg Date: Thu Aug 11 16:27:31 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 5365be10f9f6df46bf973c15b03e1915062ac75e Author: lostystyg Date: Thu Aug 11 14:52:19 2022 +0400 Correct ordering by original txs in activities commit 3339a738328bbdfeb7517254f017a85a693ddaac Author: lostystyg Date: Thu Aug 11 14:51:32 2022 +0400 Removed unnecessary todos commit 1b256cd1fb3b46266b946dca2b2f3ea7da5bb92a Author: lostystyg Date: Thu Aug 11 14:49:12 2022 +0400 Explicitly set index for account joins in activities commit 3ae1ff87786b593bcd6bdc5652f26bb066d50a0a Author: lostystyg Date: Wed Aug 10 11:30:05 2022 +0400 Fixed address positioning in sql query for activities in ContentScore and CommentScore commit fa8543b5c97ee93b84e997b74336aa55d961fbe8 Merge: a433e3ac cc77fdcb Author: lostystyg Date: Wed Aug 10 10:21:20 2022 +0400 Merge branch '0.21' into feature/events commit a433e3ac5bb2dca719697a913e14594c5f46e2d8 Author: lostystyg Date: Mon Aug 8 10:55:52 2022 +0400 Removed orig height from activities because it breaks pagination commit 67febbef23c006f91886b92bb84e88e6d10fe448 Author: lostystyg Date: Fri Jul 22 10:36:48 2022 +0300 Fixed referals for events commit 9845755c09e0e98380dd4a020db8a08e2e551545 Author: lostystyg Date: Fri Jul 22 10:11:06 2022 +0300 Orig height for activities commit eb5c9e6621d4cd35c82af7a13eaa14cb5a0f8a90 Merge: d60cfd32 c6fa67b4 Author: lostystyg Date: Fri Jul 22 09:03:43 2022 +0300 Merge branch '0.21' into feature/events commit d60cfd32e626356ae728db6f51cb3bb36148ab94 Author: lostystyg Date: Wed Jul 20 18:16:05 2022 +0300 A bit cosmetics for events commit 86e5df5a081973a2b6fd9aa546f12d8033373b33 Author: lostystyg Date: Wed Jul 20 18:01:43 2022 +0300 Full comment text in description for events and activities commit fabcc4e520227c4367a39bf0882097201acd155f Author: lostystyg Date: Wed Jul 20 15:30:28 2022 +0300 Inner join instead of cross for repost in activities commit f782b68e000f9ded107f962e8b82f2e986a828bc Author: lostystyg Date: Wed Jul 20 15:26:48 2022 +0300 Fixed repost queries for activities and events commit 7e865aa4b8a31df75f685bedd7cf0bd6973ffa5c Author: lostystyg Date: Wed Jul 20 14:56:19 2022 +0300 Fixed subscriber in activities commit c01a27472ce995c4d80da691f3ca7b3fef8e2c87 Author: lostystyg Date: Tue Jul 19 18:55:36 2022 +0300 Optimizing activity queries commit 91d85294992c2db69c6def5840b324ecdf2bedf9 Author: lostystyg Date: Mon Jul 18 16:36:03 2022 +0300 Optimizing pocketnetteam notifications commit c137b10912886fffb8f9992990873d77878b69d6 Author: lostystyg Date: Mon Jul 18 16:26:56 2022 +0300 Fixed binds for notifications commit e265c7ff37d4531133e2e792c84b444dd79349ed Author: Andy Oknen Date: Mon Jul 18 13:17:59 2022 +0300 Optimize reposts commit dadabe0f0d15f67e74157652dfab24f16ae5441e Author: Andy Oknen Date: Mon Jul 18 13:12:50 2022 +0300 Fix private content from subscribers (not reposts) commit 8c423e45e86fe237a55873828a574f7885faf73c Author: Andy Oknen Date: Mon Jul 18 13:09:11 2022 +0300 Optimize reposts query commit 814a958f101c6c3f924f6db0977d45294662f197 Author: Andy Oknen Date: Mon Jul 18 12:51:01 2022 +0300 Fix incoming money commit 1d0d17e2a8b5491b421e71f0df2547e08468804f Author: lostystyg Date: Mon Jul 18 12:32:41 2022 +0300 getnotification better todos and fixed index commit e3f474ba52e4a1d234ed1f3910014519f99ac0da Author: lostystyg Date: Fri Jul 15 18:02:37 2022 +0300 Added optional related content (in case of reposts) for pocketnetteam posts and private content for notifications commit 427d320494f6390b921ef26e85d83b67f7a5a7aa Author: lostystyg Date: Fri Jul 15 18:01:45 2022 +0300 Fixed reposts for notifications commit 5c261246ad1117d5c393f6c90511a8dc20bd83a9 Author: lostystyg Date: Fri Jul 15 18:01:06 2022 +0300 Moved pocketnetteam posts for notifications to a specific key in answer commit 5e8b8066d31046beccd717bd6cdcb45357259a60 Author: lostystyg Date: Wed Jul 13 18:11:33 2022 +0300 Fixed var name for events contentscore commit 39b478d611fe69437c45c33535fe9e01be8904aa Author: lostystyg Date: Wed Jul 13 18:10:31 2022 +0300 Ignoring empty avatar for short form account commit 848abcae88f1d0b1d922ed9be7a37c9ac820368f Author: lostystyg Date: Wed Jul 13 13:55:24 2022 +0300 Fixed typo in contentscore for activities commit aaac24ae58a9b176beee95f31dfb425281d26d01 Author: lostystyg Date: Wed Jul 13 13:54:54 2022 +0300 Fixed content description for contentscore in activities commit 5d7e566222d686212ba1d475e5581df78a805ba2 Author: lostystyg Date: Tue Jul 12 11:48:56 2022 +0300 Inner join instead of cross for activities and events commit 5bb78a6f327bcaed0cf07e229613b0d236677bcc Author: lostystyg Date: Tue Jul 12 11:22:39 2022 +0300 Updated activities query commit d3c243d4fce004f2da5fab1a83dd587f472cfb18 Author: lostystyg Date: Fri Jul 8 17:31:35 2022 +0300 Comment score activity commit 0a936ade276adea029a29aa26c645cf7f4c997a8 Author: lostystyg Date: Fri Jul 8 17:22:20 2022 +0300 Subscriber activity commit b5d0c401eb859478bdea99f883523ccb828add98 Author: lostystyg Date: Fri Jul 8 17:14:00 2022 +0300 Added comments for activities commit 638c874a0287ebd69aecbca5b675dcb24d1f7669 Author: lostystyg Date: Fri Jul 8 17:13:39 2022 +0300 Fixed answers request for activities commit f3a202681561a3426be3c37748e353907941b50f Author: lostystyg Date: Fri Jul 8 16:36:07 2022 +0300 Base activities rpc request commit 3665c8076186734a16103f1feda707d9bac0e373 Author: lostystyg Date: Fri Jul 8 14:59:17 2022 +0300 Renamed notifications rpc commit d560b5ad7b34847e8644daf7dc09cc2ef4e45927 Author: lostystyg Date: Wed Jul 6 16:18:08 2022 +0300 Fixed acc's rep for getevents commit 071f6ed8d6e7c0f1ff8ad7777675c64b83aa6c21 Author: lostystyg Date: Wed Jul 6 16:17:48 2022 +0300 Ignore badge fort short account commit 1576c8dc6fb2436f030a5f9b79ddd9db3fe843f4 Author: lostystyg Date: Wed Jul 6 15:50:37 2022 +0300 Only orig entries for notifications + some optimizations commit 60e0489fb1976fe6801ceefbaf72370c913d64d5 Author: lostystyg Date: Tue Jul 5 15:44:20 2022 +0300 Updated getnotifications rpc description commit 5e1740fb58b36c0b36b2f99b1b86d9d4bcbcd729 Author: lostystyg Date: Tue Jul 5 15:38:25 2022 +0300 Updated getevents rpc description commit a66588336365912e73e61f5921f430faf085f6b4 Merge: 6828322d 9b8e4bd6 Author: lostystyg Date: Tue Jul 5 15:11:55 2022 +0300 Merge branch '0.21' into feature/events commit 6828322d0616f5c6c9c846e5558a50eaaa4561f1 Author: lostystyg Date: Mon Jul 4 20:34:34 2022 +0300 Money notification commit b227a1cdc0888f532aaec1f86dbe544909e2c83b Author: lostystyg Date: Mon Jul 4 19:41:35 2022 +0300 Extracted common bind for notifications commit ef325659593eaf1f8faeec91fc405099024c9766 Merge: 16a3455f c0f6636c Author: lostystyg Date: Fri Jul 1 19:34:12 2022 +0300 Merge branch '0.21' into feature/events commit 16a3455f20d79b3028db961c280da0e75cea68e3 Author: lostystyg Date: Fri Jul 1 19:14:10 2022 +0300 Notifications commit 9c8a9b3f0d2d0c47c8a6ebd9de34b3fa576c9320 Author: lostystyg Date: Fri Jul 1 19:14:00 2022 +0300 Fixed ShortAccount commit 061a7ab966fafc41644034bf38a259f47bab9f10 Author: lostystyg Date: Wed Jun 29 17:17:24 2022 +0300 A bit generalization in processing filters for events commit b9f3b6a95832ac38782d9003ab4d8f4ad1af990a Author: lostystyg Date: Wed Jun 29 15:38:07 2022 +0300 Restructured events commit b8f37cbf82b986962ec85674d8859ad150567a9c Merge: f862108d 8465afed Author: lostystyg Date: Tue Jun 28 14:35:03 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit f862108dd6ca23059c62cad7b227b4d032e41d9c Merge: 8090d0e8 4429a24f Author: lostystyg Date: Mon Jun 27 13:37:20 2022 +0300 Merge branch '0.21' into feature/events commit 8090d0e8464d9b538c0617cab97cb2c08ac11411 Merge: 21b3c715 5c9755ac Author: lostystyg Date: Mon Jun 27 12:39:57 2022 +0300 Merge branch 'minor_fixes' into feature/events commit 21b3c715ae8ef56cc276e62975bb1a727cfb2cde Merge: 78eb6155 8c9006b4 Author: lostystyg Date: Mon Jun 27 12:39:51 2022 +0300 Merge branch '0.21' into feature/events commit 5c9755ac27adf6801e7936d8fefb218494fbc6a4 Author: lostystyg Date: Fri Jun 24 19:09:19 2022 +0300 Some minor fixes commit 78eb6155d9626dea1de3635f0e1484c643a27af9 Merge: 3207e0fc 97cf205e Author: lostystyg Date: Thu Jun 23 19:09:06 2022 +0300 Merge branch '0.21' into feature/events commit 3207e0fc601d9e099cb0181a1fd4dc784672001d Merge: 156ed36a 67a8917f Author: lostystyg Date: Mon Jun 13 16:15:56 2022 +0300 Merge branch '0.21' into feature/events commit 156ed36a5d4155c1b619a17c484c8587b23bb459 Author: lostystyg Date: Fri Jun 10 16:03:17 2022 +0300 Answer fixes for events commit 854e6f5b9ccba90961633409cbbcd7335857e50a Author: lostystyg Date: Fri Jun 10 14:58:52 2022 +0300 Donate value for comment event commit 576fed8fed67233522eea657f4801aa4519b6351 Author: lostystyg Date: Fri Jun 10 13:50:56 2022 +0300 Fixed events height commit 337c1efcc064e68aee3235d944c19da43b465169 Author: lostystyg Date: Fri Jun 10 13:38:03 2022 +0300 Disabled hight border in related content for events commit 7b2c630c686225e3ca28c40c3d349cc3eb295c48 Author: lostystyg Date: Fri Jun 10 13:27:55 2022 +0300 Events queries formatting commit e4f3666e6ff1aabb65efcc17ace03652209353df Author: lostystyg Date: Fri Jun 10 13:15:34 2022 +0300 Comment answer events fulfilled with data commit 775c8d454364df3d8775b78b891e4810b5fd959b Author: Andy Oknen Date: Fri Jun 10 12:14:10 2022 +0300 index comment answer commit 1b5a4966f75358c3a0140267a2e2a342b73ee755 Author: Andy Oknen Date: Fri Jun 10 11:30:03 2022 +0300 Add height limit for answer comments commit 6d0985262639ec83784ec1df4a9f74b96a5b1060 Author: Andy Oknen Date: Fri Jun 10 11:01:04 2022 +0300 comment commit 7805b8e8f7c600c471126e7304bf28fb380ad9aa Author: Andy Oknen Date: Fri Jun 10 10:54:36 2022 +0300 Sql fixes commit 011f94f29438ad36cb423a2faf6dc4686905902c Author: Andy Oknen Date: Fri Jun 10 09:43:51 2022 +0300 Fix sql typo commit a62fd177da5dfb00260cd13db1572b0824e21742 Author: lostystyg Date: Fri Jun 10 09:05:43 2022 +0300 Fixed select ordering in events commit af47ba0b7bb84185fc78c18c178720f8254281e8 Author: Andy Oknen Date: Fri Jun 10 08:50:18 2022 +0300 Fix comment answers sql index commit c97d7f55ddea43ffcde4b0c591086b8ddb6102b3 Author: lostystyg Date: Mon Jun 6 16:00:19 2022 +0300 Fixed description for scores events commit 134f3095dac5169d58a0213a795002d347c33769 Author: lostystyg Date: Mon Jun 6 15:35:51 2022 +0300 Throwing in case of event reconstructor error commit 0c3319a6878381b2bc528f9a24d8e7e491ce4dff Author: Andy Oknen Date: Mon May 23 14:11:21 2022 +0300 Downgrade likers count for testnet commit 367fa1a7a38cbe3f31ac83c3c6afef57ff1229df Author: Andy Oknen Date: Fri Apr 22 10:36:33 2022 +0300 Formatting commit 0421fbf7bf4af46fbb216517eb6f8867ca39f0a5 Author: lostystyg Date: Mon Jun 6 12:47:01 2022 +0300 Optimizing event queries commit aff9e13fece8167e8f7352c3d13206dbccde94b0 Author: lostystyg Date: Mon Jun 6 12:25:58 2022 +0300 Events fixes commit 423d4f9f91b61283e6878b408fc92ae8120ca467 Merge: 7127a3eb 039f41fb Author: lostystyg Date: Fri Jun 3 00:34:41 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit 7127a3ebd2bfff8f469afa7e5f980d5c41ae5ff0 Author: lostystyg Date: Fri Jun 3 00:34:12 2022 +0300 Short forms for events commit b8f13088d20cceb8fc67229bffb8154a00c08a20 Author: lostystyg Date: Fri Jun 3 00:34:02 2022 +0300 Updated short forms commit 03c0bd4a9c52a89d276ca9da219a9a323cb41a8c Author: lostystyg Date: Tue May 31 01:01:20 2022 +0300 ShortTxType for short forms commit dfd80a5a62d32e055cbaeabdf089bc4b1e0dbb4d Author: lostystyg Date: Mon May 30 22:52:28 2022 +0300 Added short forms commit 0b2aca0a697fd47cd0b4aee4264acf99aa57f86d Author: lostystyg Date: Mon May 30 15:26:51 2022 +0300 Raw sql query to get all events at height for each account commit 78681c897118244d758fc40732685ad9ba19c524 Author: lostystyg Date: Fri May 6 17:31:21 2022 +0300 Forgotten finalizing stmt commit 8d23c2e6e401f9a41c41d7a6236be2dc1785c19e Author: lostystyg Date: Fri May 6 17:01:01 2022 +0300 Updated args description for getevents commit 4030e741e98038f7297cccae706ba072beb992c2 Author: lostystyg Date: Fri May 6 16:57:43 2022 +0300 Events for single address commit b7ec0f7f40237ac2a6e12f3394163ba1a05a8c98 Author: lostystyg Date: Fri May 6 16:42:10 2022 +0300 constant depth for events commit 1ae34c266e55cdae51aa5df95d28cae91d5385ee Author: lostystyg Date: Fri May 6 16:40:43 2022 +0300 privatecontent for events commit 086a1fa52778907c63eab88d9e691b62edff5246 Author: lostystyg Date: Fri May 6 16:34:57 2022 +0300 Fixed binding for events commit d77c6b6cf4dda626454170d466345fadcf6b12f9 Author: lostystyg Date: Fri May 6 13:37:39 2022 +0300 Fixed filtering for events commit 19591f2421a9e7d9579fe6034f82314ccaaf4562 Author: lostystyg Date: Thu May 5 23:15:02 2022 +0300 Updated events commit 244a198523d5efe7f9c251e7ccd8111dd26eae0c Author: lostystyg Date: Wed May 4 17:04:33 2022 +0300 Fixed filtering for events commit 3deae2ea8a8dded1f50d3ec7ee9bda2616667e90 Author: lostystyg Date: Wed May 4 16:09:02 2022 +0300 FIlters, height and blocknum for events request commit 2600f314343ec9ce45acbd46774e1f2e4924e6a4 Author: lostystyg Date: Sat Apr 30 14:41:04 2022 +0300 Sorting events by height outside of sqlite commit 7f3d953ecb6c01fdf2e5fb6f1cf2d8cc424098a7 Author: lostystyg Date: Sat Apr 30 00:42:26 2022 +0300 Fixed events rpc description commit 192ad0cab7f3639824fe2c9ed4a3862941c89b2e Author: lostystyg Date: Sat Apr 30 00:41:11 2022 +0300 Events optimization commit 7a51e15cb185f07536ca713eebafd0e5c06111dc Author: lostystyg Date: Mon Apr 25 18:35:32 2022 +0300 Better indexing content from private subscribers event commit 3d8e46bfd1b13af691c876d8c82caf77f6035411 Author: lostystyg Date: Mon Apr 25 18:30:38 2022 +0300 Do not check for last for boost events commit dbea23e6036b2cd141552c408a149562351618cd Merge: af71bdf4 b0497826 Author: lostystyg Date: Mon Apr 25 18:20:24 2022 +0300 Merge remote-tracking branch 'origin/0.21.todo' into feature/events commit af71bdf4fdaaffe602ef6fa70efa63ef35ec5c63 Author: lostystyg Date: Mon Apr 25 18:17:09 2022 +0300 Base events logic commit c0e9504a610807a759cffbd239dd9bd2852ad805 Author: lostystyg Date: Mon Apr 18 17:23:50 2022 +0300 Method to get POCKETNET_TEAM address commit 9722326760ef90af0ccb57bbacc5c5c51d76f7d6 Author: lostystyg Date: Mon Apr 18 17:22:46 2022 +0300 Using network id instead of string for getting pocketnet developers * Squashed commit of the following: commit 84b78aab2b2f7c9baa2009f57eee3f92385aafb3 Merge: 7b7338c8 499f514b Author: Andy Oknen Date: Fri Sep 9 14:37:44 2022 +0300 Merge pull request #408 from pocketnetteam/actualization/0.20 Squashed commit of the following: commit 499f514bf494920d2847225ae31eeef5811f305b Author: Andy Oknen Date: Fri Sep 9 10:50:15 2022 +0300 Squashed commit of the following: commit aca3fe7d05c1f0c8a9ea76bf02eff87cefd47142 Merge: 78065768 1cce975f Author: Andy Oknen Date: Thu Sep 8 18:40:05 2022 +0300 Merge pull request #399 from HiHat/patch-1 Important details regarding address and fixes commit 780657681d2564844a42c24de0938da74777c642 Merge: bfaef570 5ce96412 Author: Andy Oknen Date: Thu Sep 8 15:09:22 2022 +0300 Merge pull request #402 from pocketnetteam/andyoknen-patch-1 Update README.md commit 5ce96412b1cc0f67148aa4933dd74fe3b43f6c29 Author: Andy Oknen Date: Wed Sep 7 10:51:21 2022 +0300 Update README.md commit 1cce975f41f0bc130f58e8004ac35f1f8cfd7179 Author: HiHat Date: Tue Sep 6 19:09:26 2022 +0300 Important details regarding address and fixes commit bfaef57025253beb6564dbe4afd30dfe51e059a4 Author: Pocketnet Team Date: Wed Aug 31 13:23:31 2022 +0300 Create add.tasks.to.project.yml commit 8ad81f1601554be5eb557a5fda204a78fd3d3be3 Author: Pocketnet Team Date: Tue Aug 30 15:00:15 2022 +0300 Set maximum depth 1 month for RPC GetMostCommentedFeed commit c1e5845465970d7bbafe909a9528abe0ac3cfd67 Author: Pocketnet Team Date: Tue Aug 30 14:57:23 2022 +0300 Set fork height for BlockingCancel.hpp commit b8bc0adf5c46dc3fb0d14332f49e34dec6105dd3 Merge: 8383efb4 8abd1bb7 Author: Andy Oknen Date: Tue Aug 30 14:45:32 2022 +0300 Merge pull request #385 from pocketnetteam/fix/wrong-key-threshold fix: wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8abd1bb75fb52ea6dff9ad73e560362abfd4b1c5 Author: Andy Oknen Date: Tue Aug 30 14:42:46 2022 +0300 Comment not used now RPC commit fee5e39f227d46ac0259d0b26b5680fb451a3eaa Author: Andy Oknen Date: Tue Aug 30 11:13:50 2022 +0300 Extend height for fork to 1873500 block commit 0ea51a2868b2ad0befb1149c2b5a0270cac7ecd1 Author: Andy Oknen Date: Mon Aug 29 14:14:26 2022 +0300 Fix wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8383efb46582ec24455867157474dbf29c0bc4f2 Author: Pocketnet Team Date: Thu Aug 25 00:21:32 2022 +0300 Delete project.add.issues.yml commit 95b97de883e4116a7f6d54af3be842e017e7fd01 Author: Pocketnet Team Date: Thu Aug 25 00:17:56 2022 +0300 Create project.add.issues.yml commit 9693e62933ae1ca02560fba1311dbdd4c88c8a77 Author: Pocketnet Team Date: Thu Aug 25 00:07:19 2022 +0300 Create auto_assign.yml commit 7b7338c801e665435cc429381ff3eb98d2a68f57 Merge: 88af7848 b6b9f45f Author: lostystyg <54471935+lostystyg@users.noreply.github.com> Date: Fri Sep 9 10:41:39 2022 +0300 Merge pull request #302 from lostystyg/feature/events feature: events, push notifications and activities commit 88af7848ba0e56fe22a136715bb7fbca46eda966 Merge: dddb3c6d 6280c078 Author: Andy Oknen Date: Thu Sep 8 18:45:15 2022 +0300 Merge pull request #407 from pocketnetteam/fix/clear-database Fix clear database commit 6280c078ae1e1cf38a1d69e67b6bc2203469eda8 Author: Andy Oknen Date: Thu Sep 8 18:39:43 2022 +0300 Fix clear database commit dddb3c6dd0e6a5088d46bfb70051e5fa95fc08fe Merge: 1a03ee9d 6d1975a2 Author: Andy Oknen Date: Thu Sep 8 15:22:39 2022 +0300 Merge pull request #401 from pocketnetteam/feat/txindex-disable-always feat: disable txindex by default commit 1a03ee9d2340909fbedcc8ded34915efc5c9489f Merge: adce55f2 bc022eca Author: Andy Oknen Date: Thu Sep 8 15:07:28 2022 +0300 Merge pull request #406 from pocketnetteam/fix/full-reindex-lists fix: full reindex lists commit b6b9f45f711821ba98a657b55529ae9a6037abab Author: lostystyg Date: Thu Sep 8 15:55:12 2022 +0400 Fix new line commit 314c1a84137a1bba0f246f0649cbd9334625cc03 Author: lostystyg Date: Thu Sep 8 15:52:07 2022 +0400 Temporarily disable getevents rpc commit bbd05740a461ff9ca4c68cfae216e82f28bf1b8d Merge: 32b0e15f adce55f2 Author: lostystyg Date: Thu Sep 8 15:51:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit bc022ecac23e00dfb7236ffffbb2e77e6e995682 Author: Andy Oknen Date: Thu Sep 8 14:40:46 2022 +0300 Logging clean commit 8107ae50a48790d12bb0d0662c1ea2dc21cc3e45 Author: Andy Oknen Date: Thu Sep 8 14:38:53 2022 +0300 Call rollback lists for full reindexing commit 32b0e15f67da6f08069173585fa801f641209d88 Author: lostystyg Date: Thu Sep 8 15:26:58 2022 +0400 Optimized notifications collecting commit 24e63f43b73f38a3b534682ca5c2b864863f7bf2 Author: lostystyg Date: Thu Sep 8 13:13:52 2022 +0400 Filling notification result with account info commit 1344fe5b189542b154f2bf9d9a47d23cbc4e83e9 Author: lostystyg Date: Thu Sep 8 12:29:31 2022 +0400 Language for short account commit 710886c50ae33edfda37472b2265aa2adaf127ce Author: lostystyg Date: Thu Sep 8 12:17:28 2022 +0400 Correctly filling notifications answer commit 6d1975a22e50550ff6ef7b393441e49f2cadbfe4 Author: Andy Oknen Date: Wed Sep 7 10:40:06 2022 +0300 Disable enabling txindex by default commit 5b04354199e527de52c08dd1880a12c1f8225ba5 Author: lostystyg Date: Mon Sep 5 15:33:28 2022 +0400 Removed outdated comment commit 57f275ea9dcd3c7c61a75561c809cef6a97f6937 Author: lostystyg Date: Mon Sep 5 15:04:22 2022 +0400 Cosmetics for blocking query in activities commit 88ed33a8731e61a9364840264b099e7012c659cd Author: lostystyg Date: Mon Sep 5 14:47:08 2022 +0400 Removed number from outputs in activities and notifications commit 24534072f1ece6cf940f9033fa032cd20b7471c7 Author: lostystyg Date: Mon Sep 5 13:04:59 2022 +0400 Reuse height binder in notifications for money commit 77f9e87343e7b691227dd97b5a114460a55df7f2 Author: lostystyg Date: Fri Sep 2 16:41:06 2022 +0400 Order outputs by number for activities and notifications commit 8ef4a5bbdd8aed5b860e73c95504fc9676977bec Merge: 2b3a0164 357d1558 Author: lostystyg Date: Thu Sep 1 22:28:12 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 2b3a0164de79b2ecf67f87dee0e2842fc8ec22df Author: lostystyg Date: Thu Sep 1 22:24:10 2022 +0400 Removed trash from badge in activities commit 66e9054ae456ebdb6b49a0682a141e6abc76c448 Author: lostystyg Date: Thu Sep 1 22:22:59 2022 +0400 Removed trash from badge field in notification queries commit f8924a6f595da8dbff0fe7f341a39399c1b09a6a Author: lostystyg Date: Thu Sep 1 22:21:18 2022 +0400 Ported notifications from 0.20-based dropped branch commit 6d8148ded4c31ea2019b5384fd8e90714cf5010e Author: lostystyg Date: Thu Sep 1 12:10:41 2022 +0400 Added blockings for notifications commit c23e94c4678ab27c7c4dfd1074b50f306a97e6bf Author: lostystyg Date: Wed Aug 31 13:29:41 2022 +0400 Added optional multiple addresses to shortform commit c29ab129b3c2ceb9da564a2f37649e321b50b869 Author: lostystyg Date: Tue Aug 30 19:06:08 2022 +0400 Removed unnecessary todo commit 736748f798fcbecc1f8e8b9e855ca215c3db5d3d Author: lostystyg Date: Tue Aug 30 19:03:32 2022 +0400 Some todo's commit cabb0603547edb11d29363d19fd9328729a2c7ba Author: lostystyg Date: Tue Aug 30 19:02:08 2022 +0400 All action history for comments and answers in activities commit cf5021c9c4f25c22ada7b59f2c143b953c6ad84b Author: lostystyg Date: Tue Aug 30 18:36:51 2022 +0400 Collect roottxhash in activity queries commit 328a3ecd8cad8cdef92b5baa5173f6516ac4d1de Author: lostystyg Date: Tue Aug 30 17:51:10 2022 +0400 Added root tx hash to shortform commit f6fa4a45ca88a8ce0970aaa0dc0950bce1465790 Author: lostystyg Date: Tue Aug 30 17:42:02 2022 +0400 Full history for notifications commit 077f0f26f5b52cf86229d2418cf73d465dbc0b29 Author: lostystyg Date: Thu Aug 25 09:35:42 2022 +0400 Added blocking shorttype commit e2913158f2226f719242e376b8a846ca660ef26b Author: lostystyg Date: Thu Aug 25 09:33:55 2022 +0400 Removed not up to date todo commit 884893775de6aea42350bddcdd93ec42c47c6d04 Author: lostystyg Date: Wed Aug 24 16:55:14 2022 +0400 Removed reposts from activities commit b5631e70c1e54ef4ae60207f2c25f9a72663d458 Merge: e4c102c3 b7b49914 Author: lostystyg Date: Wed Aug 24 16:21:26 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit e4c102c39cc9ebd7cd3bdf38b5c053841c39ca01 Author: lostystyg Date: Wed Aug 24 15:53:24 2022 +0400 Validate filters for events on rpc level commit ac03dcb727512a5ed29450c2a720c1259bcdd158 Author: lostystyg Date: Wed Aug 24 15:49:33 2022 +0400 Validate filters for activities on rpc level commit fcb2fed45b43c3e510be0dfb33504b680b97d016 Author: lostystyg Date: Wed Aug 24 15:49:10 2022 +0400 Removed pocketnetteam from events and activities commit 876e7b574c9ad099fd00721aa92c79561d3eb2b7 Author: lostystyg Date: Wed Aug 24 15:35:47 2022 +0400 Fixed crash if non-valid filters are specified for notifications/activities/events commit 5732263c174be41fb9be7dbc15b48acef6e1e263 Author: lostystyg Date: Mon Aug 22 23:52:32 2022 +0400 Removed todo for money in activities commit 9c7438fb22ddc857876e4cc734fd3885481e9386 Merge: 99c11087 6e530784 Author: lostystyg Date: Mon Aug 22 15:16:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 99c11087a786a017b7c1e4039cb94615d6e742c2 Author: lostystyg Date: Sat Aug 20 18:02:14 2022 +0400 Fixed typo in query commit 6057f91580b1e35399f7cfbbbf43e57d2cf6f486 Author: lostystyg Date: Sat Aug 20 17:53:37 2022 +0400 Removed commented out queries for notifications commit 35375ed1d01fa436ea83a65f910fdd746a8e1e5b Author: lostystyg Date: Sat Aug 20 16:39:23 2022 +0400 Validating filters for getnotificationssummary commit f1be1700c842a7cd1960665cbf969f97b4fe4892 Author: lostystyg Date: Sat Aug 20 16:38:13 2022 +0400 Optimization and fixed for notifications summary queries commit 1d371a0870f3053d77cf65df7c6a537370ede685 Author: lostystyg Date: Sat Aug 20 16:36:29 2022 +0400 Allow to specify union separator commit fcf526c45eb12f853f4da331398b9cf0dbfb6536 Merge: 46edf275 9df85fb7 Author: lostystyg Date: Fri Aug 19 19:26:37 2022 +0400 Merge remote-tracking branch 'origin/fixes/multiplelocks' into feature/events commit 46edf275c6f5e113be1209bca42b3ecf6962cad7 Author: lostystyg Date: Wed Aug 17 18:09:35 2022 +0400 Notifications summary commit 29164ac17d0da9ad5f8ead8f6d87fa8a9bdf30a3 Author: lostystyg Date: Mon Aug 15 11:22:23 2022 +0400 Fixed help for getnotifications commit c26ddf05be536577ca8334fbd57737a848b74805 Merge: 3a49aa58 1bbe483a Author: lostystyg Date: Fri Aug 12 14:01:39 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 3a49aa58477b3e5cac571a83eedc95b57106bbaa Merge: 5365be10 8a1b0af6 Author: lostystyg Date: Thu Aug 11 16:27:31 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 5365be10f9f6df46bf973c15b03e1915062ac75e Author: lostystyg Date: Thu Aug 11 14:52:19 2022 +0400 Correct ordering by original txs in activities commit 3339a738328bbdfeb7517254f017a85a693ddaac Author: lostystyg Date: Thu Aug 11 14:51:32 2022 +0400 Removed unnecessary todos commit 1b256cd1fb3b46266b946dca2b2f3ea7da5bb92a Author: lostystyg Date: Thu Aug 11 14:49:12 2022 +0400 Explicitly set index for account joins in activities commit 3ae1ff87786b593bcd6bdc5652f26bb066d50a0a Author: lostystyg Date: Wed Aug 10 11:30:05 2022 +0400 Fixed address positioning in sql query for activities in ContentScore and CommentScore commit fa8543b5c97ee93b84e997b74336aa55d961fbe8 Merge: a433e3ac cc77fdcb Author: lostystyg Date: Wed Aug 10 10:21:20 2022 +0400 Merge branch '0.21' into feature/events commit a433e3ac5bb2dca719697a913e14594c5f46e2d8 Author: lostystyg Date: Mon Aug 8 10:55:52 2022 +0400 Removed orig height from activities because it breaks pagination commit 67febbef23c006f91886b92bb84e88e6d10fe448 Author: lostystyg Date: Fri Jul 22 10:36:48 2022 +0300 Fixed referals for events commit 9845755c09e0e98380dd4a020db8a08e2e551545 Author: lostystyg Date: Fri Jul 22 10:11:06 2022 +0300 Orig height for activities commit eb5c9e6621d4cd35c82af7a13eaa14cb5a0f8a90 Merge: d60cfd32 c6fa67b4 Author: lostystyg Date: Fri Jul 22 09:03:43 2022 +0300 Merge branch '0.21' into feature/events commit d60cfd32e626356ae728db6f51cb3bb36148ab94 Author: lostystyg Date: Wed Jul 20 18:16:05 2022 +0300 A bit cosmetics for events commit 86e5df5a081973a2b6fd9aa546f12d8033373b33 Author: lostystyg Date: Wed Jul 20 18:01:43 2022 +0300 Full comment text in description for events and activities commit fabcc4e520227c4367a39bf0882097201acd155f Author: lostystyg Date: Wed Jul 20 15:30:28 2022 +0300 Inner join instead of cross for repost in activities commit f782b68e000f9ded107f962e8b82f2e986a828bc Author: lostystyg Date: Wed Jul 20 15:26:48 2022 +0300 Fixed repost queries for activities and events commit 7e865aa4b8a31df75f685bedd7cf0bd6973ffa5c Author: lostystyg Date: Wed Jul 20 14:56:19 2022 +0300 Fixed subscriber in activities commit c01a27472ce995c4d80da691f3ca7b3fef8e2c87 Author: lostystyg Date: Tue Jul 19 18:55:36 2022 +0300 Optimizing activity queries commit 91d85294992c2db69c6def5840b324ecdf2bedf9 Author: lostystyg Date: Mon Jul 18 16:36:03 2022 +0300 Optimizing pocketnetteam notifications commit c137b10912886fffb8f9992990873d77878b69d6 Author: lostystyg Date: Mon Jul 18 16:26:56 2022 +0300 Fixed binds for notifications commit e265c7ff37d4531133e2e792c84b444dd79349ed Author: Andy Oknen Date: Mon Jul 18 13:17:59 2022 +0300 Optimize reposts commit dadabe0f0d15f67e74157652dfab24f16ae5441e Author: Andy Oknen Date: Mon Jul 18 13:12:50 2022 +0300 Fix private content from subscribers (not reposts) commit 8c423e45e86fe237a55873828a574f7885faf73c Author: Andy Oknen Date: Mon Jul 18 13:09:11 2022 +0300 Optimize reposts query commit 814a958f101c6c3f924f6db0977d45294662f197 Author: Andy Oknen Date: Mon Jul 18 12:51:01 2022 +0300 Fix incoming money commit 1d0d17e2a8b5491b421e71f0df2547e08468804f Author: lostystyg Date: Mon Jul 18 12:32:41 2022 +0300 getnotification better todos and fixed index commit e3f474ba52e4a1d234ed1f3910014519f99ac0da Author: lostystyg Date: Fri Jul 15 18:02:37 2022 +0300 Added optional related content (in case of reposts) for pocketnetteam posts and private content for notifications commit 427d320494f6390b921ef26e85d83b67f7a5a7aa Author: lostystyg Date: Fri Jul 15 18:01:45 2022 +0300 Fixed reposts for notifications commit 5c261246ad1117d5c393f6c90511a8dc20bd83a9 Author: lostystyg Date: Fri Jul 15 18:01:06 2022 +0300 Moved pocketnetteam posts for notifications to a specific key in answer commit 5e8b8066d31046beccd717bd6cdcb45357259a60 Author: lostystyg Date: Wed Jul 13 18:11:33 2022 +0300 Fixed var name for events contentscore commit 39b478d611fe69437c45c33535fe9e01be8904aa Author: lostystyg Date: Wed Jul 13 18:10:31 2022 +0300 Ignoring empty avatar for short form account commit 848abcae88f1d0b1d922ed9be7a37c9ac820368f Author: lostystyg Date: Wed Jul 13 13:55:24 2022 +0300 Fixed typo in contentscore for activities commit aaac24ae58a9b176beee95f31dfb425281d26d01 Author: lostystyg Date: Wed Jul 13 13:54:54 2022 +0300 Fixed content description for contentscore in activities commit 5d7e566222d686212ba1d475e5581df78a805ba2 Author: lostystyg Date: Tue Jul 12 11:48:56 2022 +0300 Inner join instead of cross for activities and events commit 5bb78a6f327bcaed0cf07e229613b0d236677bcc Author: lostystyg Date: Tue Jul 12 11:22:39 2022 +0300 Updated activities query commit d3c243d4fce004f2da5fab1a83dd587f472cfb18 Author: lostystyg Date: Fri Jul 8 17:31:35 2022 +0300 Comment score activity commit 0a936ade276adea029a29aa26c645cf7f4c997a8 Author: lostystyg Date: Fri Jul 8 17:22:20 2022 +0300 Subscriber activity commit b5d0c401eb859478bdea99f883523ccb828add98 Author: lostystyg Date: Fri Jul 8 17:14:00 2022 +0300 Added comments for activities commit 638c874a0287ebd69aecbca5b675dcb24d1f7669 Author: lostystyg Date: Fri Jul 8 17:13:39 2022 +0300 Fixed answers request for activities commit f3a202681561a3426be3c37748e353907941b50f Author: lostystyg Date: Fri Jul 8 16:36:07 2022 +0300 Base activities rpc request commit 3665c8076186734a16103f1feda707d9bac0e373 Author: lostystyg Date: Fri Jul 8 14:59:17 2022 +0300 Renamed notifications rpc commit d560b5ad7b34847e8644daf7dc09cc2ef4e45927 Author: lostystyg Date: Wed Jul 6 16:18:08 2022 +0300 Fixed acc's rep for getevents commit 071f6ed8d6e7c0f1ff8ad7777675c64b83aa6c21 Author: lostystyg Date: Wed Jul 6 16:17:48 2022 +0300 Ignore badge fort short account commit 1576c8dc6fb2436f030a5f9b79ddd9db3fe843f4 Author: lostystyg Date: Wed Jul 6 15:50:37 2022 +0300 Only orig entries for notifications + some optimizations commit 60e0489fb1976fe6801ceefbaf72370c913d64d5 Author: lostystyg Date: Tue Jul 5 15:44:20 2022 +0300 Updated getnotifications rpc description commit 5e1740fb58b36c0b36b2f99b1b86d9d4bcbcd729 Author: lostystyg Date: Tue Jul 5 15:38:25 2022 +0300 Updated getevents rpc description commit a66588336365912e73e61f5921f430faf085f6b4 Merge: 6828322d 9b8e4bd6 Author: lostystyg Date: Tue Jul 5 15:11:55 2022 +0300 Merge branch '0.21' into feature/events commit 6828322d0616f5c6c9c846e5558a50eaaa4561f1 Author: lostystyg Date: Mon Jul 4 20:34:34 2022 +0300 Money notification commit b227a1cdc0888f532aaec1f86dbe544909e2c83b Author: lostystyg Date: Mon Jul 4 19:41:35 2022 +0300 Extracted common bind for notifications commit ef325659593eaf1f8faeec91fc405099024c9766 Merge: 16a3455f c0f6636c Author: lostystyg Date: Fri Jul 1 19:34:12 2022 +0300 Merge branch '0.21' into feature/events commit 16a3455f20d79b3028db961c280da0e75cea68e3 Author: lostystyg Date: Fri Jul 1 19:14:10 2022 +0300 Notifications commit 9c8a9b3f0d2d0c47c8a6ebd9de34b3fa576c9320 Author: lostystyg Date: Fri Jul 1 19:14:00 2022 +0300 Fixed ShortAccount commit 061a7ab966fafc41644034bf38a259f47bab9f10 Author: lostystyg Date: Wed Jun 29 17:17:24 2022 +0300 A bit generalization in processing filters for events commit b9f3b6a95832ac38782d9003ab4d8f4ad1af990a Author: lostystyg Date: Wed Jun 29 15:38:07 2022 +0300 Restructured events commit b8f37cbf82b986962ec85674d8859ad150567a9c Merge: f862108d 8465afed Author: lostystyg Date: Tue Jun 28 14:35:03 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit f862108dd6ca23059c62cad7b227b4d032e41d9c Merge: 8090d0e8 4429a24f Author: lostystyg Date: Mon Jun 27 13:37:20 2022 +0300 Merge branch '0.21' into feature/events commit 8090d0e8464d9b538c0617cab97cb2c08ac11411 Merge: 21b3c715 5c9755ac Author: lostystyg Date: Mon Jun 27 12:39:57 2022 +0300 Merge branch 'minor_fixes' into feature/events commit 21b3c715ae8ef56cc276e62975bb1a727cfb2cde Merge: 78eb6155 8c9006b4 Author: lostystyg Date: Mon Jun 27 12:39:51 2022 +0300 Merge branch '0.21' into feature/events commit 5c9755ac27adf6801e7936d8fefb218494fbc6a4 Author: lostystyg Date: Fri Jun 24 19:09:19 2022 +0300 Some minor fixes commit 78eb6155d9626dea1de3635f0e1484c643a27af9 Merge: 3207e0fc 97cf205e Author: lostystyg Date: Thu Jun 23 19:09:06 2022 +0300 Merge branch '0.21' into feature/events commit 3207e0fc601d9e099cb0181a1fd4dc784672001d Merge: 156ed36a 67a8917f Author: lostystyg Date: Mon Jun 13 16:15:56 2022 +0300 Merge branch '0.21' into feature/events commit 156ed36a5d4155c1b619a17c484c8587b23bb459 Author: lostystyg Date: Fri Jun 10 16:03:17 2022 +0300 Answer fixes for events commit 854e6f5b9ccba90961633409cbbcd7335857e50a Author: lostystyg Date: Fri Jun 10 14:58:52 2022 +0300 Donate value for comment event commit 576fed8fed67233522eea657f4801aa4519b6351 Author: lostystyg Date: Fri Jun 10 13:50:56 2022 +0300 Fixed events height commit 337c1efcc064e68aee3235d944c19da43b465169 Author: lostystyg Date: Fri Jun 10 13:38:03 2022 +0300 Disabled hight border in related content for events commit 7b2c630c686225e3ca28c40c3d349cc3eb295c48 Author: lostystyg Date: Fri Jun 10 13:27:55 2022 +0300 Events queries formatting commit e4f3666e6ff1aabb65efcc17ace03652209353df Author: lostystyg Date: Fri Jun 10 13:15:34 2022 +0300 Comment answer events fulfilled with data commit 775c8d454364df3d8775b78b891e4810b5fd959b Author: Andy Oknen Date: Fri Jun 10 12:14:10 2022 +0300 index comment answer commit 1b5a4966f75358c3a0140267a2e2a342b73ee755 Author: Andy Oknen Date: Fri Jun 10 11:30:03 2022 +0300 Add height limit for answer comments commit 6d0985262639ec83784ec1df4a9f74b96a5b1060 Author: Andy Oknen Date: Fri Jun 10 11:01:04 2022 +0300 comment commit 7805b8e8f7c600c471126e7304bf28fb380ad9aa Author: Andy Oknen Date: Fri Jun 10 10:54:36 2022 +0300 Sql fixes commit 011f94f29438ad36cb423a2faf6dc4686905902c Author: Andy Oknen Date: Fri Jun 10 09:43:51 2022 +0300 Fix sql typo commit a62fd177da5dfb00260cd13db1572b0824e21742 Author: lostystyg Date: Fri Jun 10 09:05:43 2022 +0300 Fixed select ordering in events commit af47ba0b7bb84185fc78c18c178720f8254281e8 Author: Andy Oknen Date: Fri Jun 10 08:50:18 2022 +0300 Fix comment answers sql index commit c97d7f55ddea43ffcde4b0c591086b8ddb6102b3 Author: lostystyg Date: Mon Jun 6 16:00:19 2022 +0300 Fixed description for scores events commit 134f3095dac5169d58a0213a795002d347c33769 Author: lostystyg Date: Mon Jun 6 15:35:51 2022 +0300 Throwing in case of event reconstructor error commit 0c3319a6878381b2bc528f9a24d8e7e491ce4dff Author: Andy Oknen Date: Mon May 23 14:11:21 2022 +0300 Downgrade likers count for testnet commit 367fa1a7a38cbe3f31ac83c3c6afef57ff1229df Author: Andy Oknen Date: Fri Apr 22 10:36:33 2022 +0300 Formatting commit 0421fbf7bf4af46fbb216517eb6f8867ca39f0a5 Author: lostystyg Date: Mon Jun 6 12:47:01 2022 +0300 Optimizing event queries commit aff9e13fece8167e8f7352c3d13206dbccde94b0 Author: lostystyg Date: Mon Jun 6 12:25:58 2022 +0300 Events fixes commit 423d4f9f91b61283e6878b408fc92ae8120ca467 Merge: 7127a3eb 039f41fb Author: lostystyg Date: Fri Jun 3 00:34:41 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit 7127a3ebd2bfff8f469afa7e5f980d5c41ae5ff0 Author: lostystyg Date: Fri Jun 3 00:34:12 2022 +0300 Short forms for events commit b8f13088d20cceb8fc67229bffb8154a00c08a20 Author: lostystyg Date: Fri Jun 3 00:34:02 2022 +0300 Updated short forms commit 03c0bd4a9c52a89d276ca9da219a9a323cb41a8c Author: lostystyg Date: Tue May 31 01:01:20 2022 +0300 ShortTxType for short forms commit dfd80a5a62d32e055cbaeabdf089bc4b1e0dbb4d Author: lostystyg Date: Mon May 30 22:52:28 2022 +0300 Added short forms commit 0b2aca0a697fd47cd0b4aee4264acf99aa57f86d Author: lostystyg Date: Mon May 30 15:26:51 2022 +0300 Raw sql query to get all events at height for each account commit 78681c897118244d758fc40732685ad9ba19c524 Author: lostystyg Date: Fri May 6 17:31:21 2022 +0300 Forgotten finalizing stmt commit 8d23c2e6e401f9a41c41d7a6236be2dc1785c19e Author: lostystyg Date: Fri May 6 17:01:01 2022 +0300 Updated args description for getevents commit 4030e741e98038f7297cccae706ba072beb992c2 Author: lostystyg Date: Fri May 6 16:57:43 2022 +0300 Events for single address commit b7ec0f7f40237ac2a6e12f3394163ba1a05a8c98 Author: lostystyg Date: Fri May 6 16:42:10 2022 +0300 constant depth for events commit 1ae34c266e55cdae51aa5df95d28cae91d5385ee Author: lostystyg Date: Fri May 6 16:40:43 2022 +0300 privatecontent for events commit 086a1fa52778907c63eab88d9e691b62edff5246 Author: lostystyg Date: Fri May 6 16:34:57 2022 +0300 Fixed binding for events commit d77c6b6cf4dda626454170d466345fadcf6b12f9 Author: lostystyg Date: Fri May 6 13:37:39 2022 +0300 Fixed filtering for events commit 19591f2421a9e7d9579fe6034f82314ccaaf4562 Author: lostystyg Date: Thu May 5 23:15:02 2022 +0300 Updated events commit 244a198523d5efe7f9c251e7ccd8111dd26eae0c Author: lostystyg Date: Wed May 4 17:04:33 2022 +0300 Fixed filtering for events commit 3deae2ea8a8dded1f50d3ec7ee9bda2616667e90 Author: lostystyg Date: Wed May 4 16:09:02 2022 +0300 FIlters, height and blocknum for events request commit 2600f314343ec9ce45acbd46774e1f2e4924e6a4 Author: lostystyg Date: Sat Apr 30 14:41:04 2022 +0300 Sorting events by height outside of sqlite commit 7f3d953ecb6c01fdf2e5fb6f1cf2d8cc424098a7 Author: lostystyg Date: Sat Apr 30 00:42:26 2022 +0300 Fixed events rpc description commit 192ad0cab7f3639824fe2c9ed4a3862941c89b2e Author: lostystyg Date: Sat Apr 30 00:41:11 2022 +0300 Events optimization commit 7a51e15cb185f07536ca713eebafd0e5c06111dc Author: lostystyg Date: Mon Apr 25 18:35:32 2022 +0300 Better indexing content from private subscribers event commit 3d8e46bfd1b13af691c876d8c82caf77f6035411 Author: lostystyg Date: Mon Apr 25 18:30:38 2022 +0300 Do not check for last for boost events commit dbea23e6036b2cd141552c408a149562351618cd Merge: af71bdf4 b0497826 Author: lostystyg Date: Mon Apr 25 18:20:24 2022 +0300 Merge remote-tracking branch 'origin/0.21.todo' into feature/events commit af71bdf4fdaaffe602ef6fa70efa63ef35ec5c63 Author: lostystyg Date: Mon Apr 25 18:17:09 2022 +0300 Base events logic commit c0e9504a610807a759cffbd239dd9bd2852ad805 Author: lostystyg Date: Mon Apr 18 17:23:50 2022 +0300 Method to get POCKETNET_TEAM address commit 9722326760ef90af0ccb57bbacc5c5c51d76f7d6 Author: lostystyg Date: Mon Apr 18 17:22:46 2022 +0300 Using network id instead of string for getting pocketnet developers * Revert * Fix delete transaction helper * Fix check register deleted account * Deleted account does not have payload * Fixed typo in GetProfileFeed * Remove data from deleted account in last comments * Fix begin/commit/abort sql transaction * refact * wallet log clean * Clean logs * Fix check register block * Clean logs * Remove data from deleted account in all feeds * Fix debug typo * Fixed typo in GetLastComments * Added flag if account deleted in GetAccountState * // TODO (brangr): delete * Include deleted accounts in block lists * Add 170 for get user account data * Complete check deleted account * consensus add deleted account check 2 * Remove comments from deleted accounts in GetCommentsByPost * refactoring * Fix getuseraddress for empty request * Fix check double account transaction in block * 1 * Fixed mixing stake treshhold values * Moved mutex to a proper place * Fixed cleaning sqlite * 1 * Fork height for enabling account delete transaction * Fix typos * Return check opreturn for next detect checkpoints * Description for stake threshold values * Optimizing coinstake logic * Fix checkpoints for double users * Remove counting referrals from account profile * SQLOptimizations * Fix user checkpoint check * Move notifier repository to self db connection * Extend sendtoaddress with destaddress for change * Revert "Optimizing coinstake logic" and "Fixed mixing stake treshhold values" This reverts commits 2adff23f29899754eea2fd8643742dee9abdb56a and 6e537ae9ce910cb7eadbad2d18ef0948d3900bac Co-authored-by: brangr Co-authored-by: only1question Co-authored-by: lostystyg commit 84b78aab2b2f7c9baa2009f57eee3f92385aafb3 Merge: 7b7338c8 499f514b Author: Andy Oknen Date: Fri Sep 9 14:37:44 2022 +0300 Merge pull request #408 from pocketnetteam/actualization/0.20 Squashed commit of the following: commit 499f514bf494920d2847225ae31eeef5811f305b Author: Andy Oknen Date: Fri Sep 9 10:50:15 2022 +0300 Squashed commit of the following: commit aca3fe7d05c1f0c8a9ea76bf02eff87cefd47142 Merge: 78065768 1cce975f Author: Andy Oknen Date: Thu Sep 8 18:40:05 2022 +0300 Merge pull request #399 from HiHat/patch-1 Important details regarding address and fixes commit 780657681d2564844a42c24de0938da74777c642 Merge: bfaef570 5ce96412 Author: Andy Oknen Date: Thu Sep 8 15:09:22 2022 +0300 Merge pull request #402 from pocketnetteam/andyoknen-patch-1 Update README.md commit 5ce96412b1cc0f67148aa4933dd74fe3b43f6c29 Author: Andy Oknen Date: Wed Sep 7 10:51:21 2022 +0300 Update README.md commit 1cce975f41f0bc130f58e8004ac35f1f8cfd7179 Author: HiHat Date: Tue Sep 6 19:09:26 2022 +0300 Important details regarding address and fixes commit bfaef57025253beb6564dbe4afd30dfe51e059a4 Author: Pocketnet Team Date: Wed Aug 31 13:23:31 2022 +0300 Create add.tasks.to.project.yml commit 8ad81f1601554be5eb557a5fda204a78fd3d3be3 Author: Pocketnet Team Date: Tue Aug 30 15:00:15 2022 +0300 Set maximum depth 1 month for RPC GetMostCommentedFeed commit c1e5845465970d7bbafe909a9528abe0ac3cfd67 Author: Pocketnet Team Date: Tue Aug 30 14:57:23 2022 +0300 Set fork height for BlockingCancel.hpp commit b8bc0adf5c46dc3fb0d14332f49e34dec6105dd3 Merge: 8383efb4 8abd1bb7 Author: Andy Oknen Date: Tue Aug 30 14:45:32 2022 +0300 Merge pull request #385 from pocketnetteam/fix/wrong-key-threshold fix: wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8abd1bb75fb52ea6dff9ad73e560362abfd4b1c5 Author: Andy Oknen Date: Tue Aug 30 14:42:46 2022 +0300 Comment not used now RPC commit fee5e39f227d46ac0259d0b26b5680fb451a3eaa Author: Andy Oknen Date: Tue Aug 30 11:13:50 2022 +0300 Extend height for fork to 1873500 block commit 0ea51a2868b2ad0befb1149c2b5a0270cac7ecd1 Author: Andy Oknen Date: Mon Aug 29 14:14:26 2022 +0300 Fix wrong map key threshold_shark_reg_depth -> threshold_whale_reg_depth commit 8383efb46582ec24455867157474dbf29c0bc4f2 Author: Pocketnet Team Date: Thu Aug 25 00:21:32 2022 +0300 Delete project.add.issues.yml commit 95b97de883e4116a7f6d54af3be842e017e7fd01 Author: Pocketnet Team Date: Thu Aug 25 00:17:56 2022 +0300 Create project.add.issues.yml commit 9693e62933ae1ca02560fba1311dbdd4c88c8a77 Author: Pocketnet Team Date: Thu Aug 25 00:07:19 2022 +0300 Create auto_assign.yml commit 7b7338c801e665435cc429381ff3eb98d2a68f57 Merge: 88af7848 b6b9f45f Author: lostystyg <54471935+lostystyg@users.noreply.github.com> Date: Fri Sep 9 10:41:39 2022 +0300 Merge pull request #302 from lostystyg/feature/events feature: events, push notifications and activities commit 88af7848ba0e56fe22a136715bb7fbca46eda966 Merge: dddb3c6d 6280c078 Author: Andy Oknen Date: Thu Sep 8 18:45:15 2022 +0300 Merge pull request #407 from pocketnetteam/fix/clear-database Fix clear database commit 6280c078ae1e1cf38a1d69e67b6bc2203469eda8 Author: Andy Oknen Date: Thu Sep 8 18:39:43 2022 +0300 Fix clear database commit dddb3c6dd0e6a5088d46bfb70051e5fa95fc08fe Merge: 1a03ee9d 6d1975a2 Author: Andy Oknen Date: Thu Sep 8 15:22:39 2022 +0300 Merge pull request #401 from pocketnetteam/feat/txindex-disable-always feat: disable txindex by default commit 1a03ee9d2340909fbedcc8ded34915efc5c9489f Merge: adce55f2 bc022eca Author: Andy Oknen Date: Thu Sep 8 15:07:28 2022 +0300 Merge pull request #406 from pocketnetteam/fix/full-reindex-lists fix: full reindex lists commit b6b9f45f711821ba98a657b55529ae9a6037abab Author: lostystyg Date: Thu Sep 8 15:55:12 2022 +0400 Fix new line commit 314c1a84137a1bba0f246f0649cbd9334625cc03 Author: lostystyg Date: Thu Sep 8 15:52:07 2022 +0400 Temporarily disable getevents rpc commit bbd05740a461ff9ca4c68cfae216e82f28bf1b8d Merge: 32b0e15f adce55f2 Author: lostystyg Date: Thu Sep 8 15:51:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit bc022ecac23e00dfb7236ffffbb2e77e6e995682 Author: Andy Oknen Date: Thu Sep 8 14:40:46 2022 +0300 Logging clean commit 8107ae50a48790d12bb0d0662c1ea2dc21cc3e45 Author: Andy Oknen Date: Thu Sep 8 14:38:53 2022 +0300 Call rollback lists for full reindexing commit 32b0e15f67da6f08069173585fa801f641209d88 Author: lostystyg Date: Thu Sep 8 15:26:58 2022 +0400 Optimized notifications collecting commit 24e63f43b73f38a3b534682ca5c2b864863f7bf2 Author: lostystyg Date: Thu Sep 8 13:13:52 2022 +0400 Filling notification result with account info commit 1344fe5b189542b154f2bf9d9a47d23cbc4e83e9 Author: lostystyg Date: Thu Sep 8 12:29:31 2022 +0400 Language for short account commit 710886c50ae33edfda37472b2265aa2adaf127ce Author: lostystyg Date: Thu Sep 8 12:17:28 2022 +0400 Correctly filling notifications answer commit 6d1975a22e50550ff6ef7b393441e49f2cadbfe4 Author: Andy Oknen Date: Wed Sep 7 10:40:06 2022 +0300 Disable enabling txindex by default commit 5b04354199e527de52c08dd1880a12c1f8225ba5 Author: lostystyg Date: Mon Sep 5 15:33:28 2022 +0400 Removed outdated comment commit 57f275ea9dcd3c7c61a75561c809cef6a97f6937 Author: lostystyg Date: Mon Sep 5 15:04:22 2022 +0400 Cosmetics for blocking query in activities commit 88ed33a8731e61a9364840264b099e7012c659cd Author: lostystyg Date: Mon Sep 5 14:47:08 2022 +0400 Removed number from outputs in activities and notifications commit 24534072f1ece6cf940f9033fa032cd20b7471c7 Author: lostystyg Date: Mon Sep 5 13:04:59 2022 +0400 Reuse height binder in notifications for money commit 77f9e87343e7b691227dd97b5a114460a55df7f2 Author: lostystyg Date: Fri Sep 2 16:41:06 2022 +0400 Order outputs by number for activities and notifications commit 8ef4a5bbdd8aed5b860e73c95504fc9676977bec Merge: 2b3a0164 357d1558 Author: lostystyg Date: Thu Sep 1 22:28:12 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 2b3a0164de79b2ecf67f87dee0e2842fc8ec22df Author: lostystyg Date: Thu Sep 1 22:24:10 2022 +0400 Removed trash from badge in activities commit 66e9054ae456ebdb6b49a0682a141e6abc76c448 Author: lostystyg Date: Thu Sep 1 22:22:59 2022 +0400 Removed trash from badge field in notification queries commit f8924a6f595da8dbff0fe7f341a39399c1b09a6a Author: lostystyg Date: Thu Sep 1 22:21:18 2022 +0400 Ported notifications from 0.20-based dropped branch commit adce55f2d4e57ee30e82639209439302e3a0e27c Merge: 58db46dc a182e317 Author: Andy Oknen Date: Thu Sep 1 17:53:37 2022 +0300 Merge pull request #394 from pocketnetteam/refactor/build-versioning commit a182e3172d0a7aee1d14c07761a6cbb620a289fa Author: brangr Date: Thu Sep 1 13:13:37 2022 +0300 Fix build versioning commit 58db46dce814a9f1f641cb75a9e3da084796d249 Merge: 357d1558 8c3afc0f Author: Andy Oknen Date: Thu Sep 1 11:50:24 2022 +0300 Merge pull request #393 from pocketnetteam/fix/deb-icon fix: path to icon and change icon commit 6d8148ded4c31ea2019b5384fd8e90714cf5010e Author: lostystyg Date: Thu Sep 1 12:10:41 2022 +0400 Added blockings for notifications commit 8c3afc0ff14b335dae51274f84e9d2670862ac67 Author: Andy Oknen Date: Wed Aug 31 19:02:31 2022 +0300 Fix path to icon and change to logo_color/sky_250.png commit c23e94c4678ab27c7c4dfd1074b50f306a97e6bf Author: lostystyg Date: Wed Aug 31 13:29:41 2022 +0400 Added optional multiple addresses to shortform commit c29ab129b3c2ceb9da564a2f37649e321b50b869 Author: lostystyg Date: Tue Aug 30 19:06:08 2022 +0400 Removed unnecessary todo commit 736748f798fcbecc1f8e8b9e855ca215c3db5d3d Author: lostystyg Date: Tue Aug 30 19:03:32 2022 +0400 Some todo's commit cabb0603547edb11d29363d19fd9328729a2c7ba Author: lostystyg Date: Tue Aug 30 19:02:08 2022 +0400 All action history for comments and answers in activities commit cf5021c9c4f25c22ada7b59f2c143b953c6ad84b Author: lostystyg Date: Tue Aug 30 18:36:51 2022 +0400 Collect roottxhash in activity queries commit 328a3ecd8cad8cdef92b5baa5173f6516ac4d1de Author: lostystyg Date: Tue Aug 30 17:51:10 2022 +0400 Added root tx hash to shortform commit f6fa4a45ca88a8ce0970aaa0dc0950bce1465790 Author: lostystyg Date: Tue Aug 30 17:42:02 2022 +0400 Full history for notifications commit 077f0f26f5b52cf86229d2418cf73d465dbc0b29 Author: lostystyg Date: Thu Aug 25 09:35:42 2022 +0400 Added blocking shorttype commit e2913158f2226f719242e376b8a846ca660ef26b Author: lostystyg Date: Thu Aug 25 09:33:55 2022 +0400 Removed not up to date todo commit 884893775de6aea42350bddcdd93ec42c47c6d04 Author: lostystyg Date: Wed Aug 24 16:55:14 2022 +0400 Removed reposts from activities commit b5631e70c1e54ef4ae60207f2c25f9a72663d458 Merge: e4c102c3 b7b49914 Author: lostystyg Date: Wed Aug 24 16:21:26 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit e4c102c39cc9ebd7cd3bdf38b5c053841c39ca01 Author: lostystyg Date: Wed Aug 24 15:53:24 2022 +0400 Validate filters for events on rpc level commit ac03dcb727512a5ed29450c2a720c1259bcdd158 Author: lostystyg Date: Wed Aug 24 15:49:33 2022 +0400 Validate filters for activities on rpc level commit fcb2fed45b43c3e510be0dfb33504b680b97d016 Author: lostystyg Date: Wed Aug 24 15:49:10 2022 +0400 Removed pocketnetteam from events and activities commit 876e7b574c9ad099fd00721aa92c79561d3eb2b7 Author: lostystyg Date: Wed Aug 24 15:35:47 2022 +0400 Fixed crash if non-valid filters are specified for notifications/activities/events commit 5732263c174be41fb9be7dbc15b48acef6e1e263 Author: lostystyg Date: Mon Aug 22 23:52:32 2022 +0400 Removed todo for money in activities commit 9c7438fb22ddc857876e4cc734fd3885481e9386 Merge: 99c11087 6e530784 Author: lostystyg Date: Mon Aug 22 15:16:13 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 99c11087a786a017b7c1e4039cb94615d6e742c2 Author: lostystyg Date: Sat Aug 20 18:02:14 2022 +0400 Fixed typo in query commit 6057f91580b1e35399f7cfbbbf43e57d2cf6f486 Author: lostystyg Date: Sat Aug 20 17:53:37 2022 +0400 Removed commented out queries for notifications commit 35375ed1d01fa436ea83a65f910fdd746a8e1e5b Author: lostystyg Date: Sat Aug 20 16:39:23 2022 +0400 Validating filters for getnotificationssummary commit f1be1700c842a7cd1960665cbf969f97b4fe4892 Author: lostystyg Date: Sat Aug 20 16:38:13 2022 +0400 Optimization and fixed for notifications summary queries commit 1d371a0870f3053d77cf65df7c6a537370ede685 Author: lostystyg Date: Sat Aug 20 16:36:29 2022 +0400 Allow to specify union separator commit fcf526c45eb12f853f4da331398b9cf0dbfb6536 Merge: 46edf275 9df85fb7 Author: lostystyg Date: Fri Aug 19 19:26:37 2022 +0400 Merge remote-tracking branch 'origin/fixes/multiplelocks' into feature/events commit 46edf275c6f5e113be1209bca42b3ecf6962cad7 Author: lostystyg Date: Wed Aug 17 18:09:35 2022 +0400 Notifications summary commit 29164ac17d0da9ad5f8ead8f6d87fa8a9bdf30a3 Author: lostystyg Date: Mon Aug 15 11:22:23 2022 +0400 Fixed help for getnotifications commit c26ddf05be536577ca8334fbd57737a848b74805 Merge: 3a49aa58 1bbe483a Author: lostystyg Date: Fri Aug 12 14:01:39 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 3a49aa58477b3e5cac571a83eedc95b57106bbaa Merge: 5365be10 8a1b0af6 Author: lostystyg Date: Thu Aug 11 16:27:31 2022 +0400 Merge remote-tracking branch 'origin/0.21' into feature/events commit 5365be10f9f6df46bf973c15b03e1915062ac75e Author: lostystyg Date: Thu Aug 11 14:52:19 2022 +0400 Correct ordering by original txs in activities commit 3339a738328bbdfeb7517254f017a85a693ddaac Author: lostystyg Date: Thu Aug 11 14:51:32 2022 +0400 Removed unnecessary todos commit 1b256cd1fb3b46266b946dca2b2f3ea7da5bb92a Author: lostystyg Date: Thu Aug 11 14:49:12 2022 +0400 Explicitly set index for account joins in activities commit 3ae1ff87786b593bcd6bdc5652f26bb066d50a0a Author: lostystyg Date: Wed Aug 10 11:30:05 2022 +0400 Fixed address positioning in sql query for activities in ContentScore and CommentScore commit fa8543b5c97ee93b84e997b74336aa55d961fbe8 Merge: a433e3ac cc77fdcb Author: lostystyg Date: Wed Aug 10 10:21:20 2022 +0400 Merge branch '0.21' into feature/events commit a433e3ac5bb2dca719697a913e14594c5f46e2d8 Author: lostystyg Date: Mon Aug 8 10:55:52 2022 +0400 Removed orig height from activities because it breaks pagination commit 67febbef23c006f91886b92bb84e88e6d10fe448 Author: lostystyg Date: Fri Jul 22 10:36:48 2022 +0300 Fixed referals for events commit 9845755c09e0e98380dd4a020db8a08e2e551545 Author: lostystyg Date: Fri Jul 22 10:11:06 2022 +0300 Orig height for activities commit eb5c9e6621d4cd35c82af7a13eaa14cb5a0f8a90 Merge: d60cfd32 c6fa67b4 Author: lostystyg Date: Fri Jul 22 09:03:43 2022 +0300 Merge branch '0.21' into feature/events commit d60cfd32e626356ae728db6f51cb3bb36148ab94 Author: lostystyg Date: Wed Jul 20 18:16:05 2022 +0300 A bit cosmetics for events commit 86e5df5a081973a2b6fd9aa546f12d8033373b33 Author: lostystyg Date: Wed Jul 20 18:01:43 2022 +0300 Full comment text in description for events and activities commit fabcc4e520227c4367a39bf0882097201acd155f Author: lostystyg Date: Wed Jul 20 15:30:28 2022 +0300 Inner join instead of cross for repost in activities commit f782b68e000f9ded107f962e8b82f2e986a828bc Author: lostystyg Date: Wed Jul 20 15:26:48 2022 +0300 Fixed repost queries for activities and events commit 7e865aa4b8a31df75f685bedd7cf0bd6973ffa5c Author: lostystyg Date: Wed Jul 20 14:56:19 2022 +0300 Fixed subscriber in activities commit c01a27472ce995c4d80da691f3ca7b3fef8e2c87 Author: lostystyg Date: Tue Jul 19 18:55:36 2022 +0300 Optimizing activity queries commit 91d85294992c2db69c6def5840b324ecdf2bedf9 Author: lostystyg Date: Mon Jul 18 16:36:03 2022 +0300 Optimizing pocketnetteam notifications commit c137b10912886fffb8f9992990873d77878b69d6 Author: lostystyg Date: Mon Jul 18 16:26:56 2022 +0300 Fixed binds for notifications commit e265c7ff37d4531133e2e792c84b444dd79349ed Author: Andy Oknen Date: Mon Jul 18 13:17:59 2022 +0300 Optimize reposts commit dadabe0f0d15f67e74157652dfab24f16ae5441e Author: Andy Oknen Date: Mon Jul 18 13:12:50 2022 +0300 Fix private content from subscribers (not reposts) commit 8c423e45e86fe237a55873828a574f7885faf73c Author: Andy Oknen Date: Mon Jul 18 13:09:11 2022 +0300 Optimize reposts query commit 814a958f101c6c3f924f6db0977d45294662f197 Author: Andy Oknen Date: Mon Jul 18 12:51:01 2022 +0300 Fix incoming money commit 1d0d17e2a8b5491b421e71f0df2547e08468804f Author: lostystyg Date: Mon Jul 18 12:32:41 2022 +0300 getnotification better todos and fixed index commit e3f474ba52e4a1d234ed1f3910014519f99ac0da Author: lostystyg Date: Fri Jul 15 18:02:37 2022 +0300 Added optional related content (in case of reposts) for pocketnetteam posts and private content for notifications commit 427d320494f6390b921ef26e85d83b67f7a5a7aa Author: lostystyg Date: Fri Jul 15 18:01:45 2022 +0300 Fixed reposts for notifications commit 5c261246ad1117d5c393f6c90511a8dc20bd83a9 Author: lostystyg Date: Fri Jul 15 18:01:06 2022 +0300 Moved pocketnetteam posts for notifications to a specific key in answer commit 5e8b8066d31046beccd717bd6cdcb45357259a60 Author: lostystyg Date: Wed Jul 13 18:11:33 2022 +0300 Fixed var name for events contentscore commit 39b478d611fe69437c45c33535fe9e01be8904aa Author: lostystyg Date: Wed Jul 13 18:10:31 2022 +0300 Ignoring empty avatar for short form account commit 848abcae88f1d0b1d922ed9be7a37c9ac820368f Author: lostystyg Date: Wed Jul 13 13:55:24 2022 +0300 Fixed typo in contentscore for activities commit aaac24ae58a9b176beee95f31dfb425281d26d01 Author: lostystyg Date: Wed Jul 13 13:54:54 2022 +0300 Fixed content description for contentscore in activities commit 5d7e566222d686212ba1d475e5581df78a805ba2 Author: lostystyg Date: Tue Jul 12 11:48:56 2022 +0300 Inner join instead of cross for activities and events commit 5bb78a6f327bcaed0cf07e229613b0d236677bcc Author: lostystyg Date: Tue Jul 12 11:22:39 2022 +0300 Updated activities query commit d3c243d4fce004f2da5fab1a83dd587f472cfb18 Author: lostystyg Date: Fri Jul 8 17:31:35 2022 +0300 Comment score activity commit 0a936ade276adea029a29aa26c645cf7f4c997a8 Author: lostystyg Date: Fri Jul 8 17:22:20 2022 +0300 Subscriber activity commit b5d0c401eb859478bdea99f883523ccb828add98 Author: lostystyg Date: Fri Jul 8 17:14:00 2022 +0300 Added comments for activities commit 638c874a0287ebd69aecbca5b675dcb24d1f7669 Author: lostystyg Date: Fri Jul 8 17:13:39 2022 +0300 Fixed answers request for activities commit f3a202681561a3426be3c37748e353907941b50f Author: lostystyg Date: Fri Jul 8 16:36:07 2022 +0300 Base activities rpc request commit 3665c8076186734a16103f1feda707d9bac0e373 Author: lostystyg Date: Fri Jul 8 14:59:17 2022 +0300 Renamed notifications rpc commit d560b5ad7b34847e8644daf7dc09cc2ef4e45927 Author: lostystyg Date: Wed Jul 6 16:18:08 2022 +0300 Fixed acc's rep for getevents commit 071f6ed8d6e7c0f1ff8ad7777675c64b83aa6c21 Author: lostystyg Date: Wed Jul 6 16:17:48 2022 +0300 Ignore badge fort short account commit 1576c8dc6fb2436f030a5f9b79ddd9db3fe843f4 Author: lostystyg Date: Wed Jul 6 15:50:37 2022 +0300 Only orig entries for notifications + some optimizations commit 60e0489fb1976fe6801ceefbaf72370c913d64d5 Author: lostystyg Date: Tue Jul 5 15:44:20 2022 +0300 Updated getnotifications rpc description commit 5e1740fb58b36c0b36b2f99b1b86d9d4bcbcd729 Author: lostystyg Date: Tue Jul 5 15:38:25 2022 +0300 Updated getevents rpc description commit a66588336365912e73e61f5921f430faf085f6b4 Merge: 6828322d 9b8e4bd6 Author: lostystyg Date: Tue Jul 5 15:11:55 2022 +0300 Merge branch '0.21' into feature/events commit 6828322d0616f5c6c9c846e5558a50eaaa4561f1 Author: lostystyg Date: Mon Jul 4 20:34:34 2022 +0300 Money notification commit b227a1cdc0888f532aaec1f86dbe544909e2c83b Author: lostystyg Date: Mon Jul 4 19:41:35 2022 +0300 Extracted common bind for notifications commit ef325659593eaf1f8faeec91fc405099024c9766 Merge: 16a3455f c0f6636c Author: lostystyg Date: Fri Jul 1 19:34:12 2022 +0300 Merge branch '0.21' into feature/events commit 16a3455f20d79b3028db961c280da0e75cea68e3 Author: lostystyg Date: Fri Jul 1 19:14:10 2022 +0300 Notifications commit 9c8a9b3f0d2d0c47c8a6ebd9de34b3fa576c9320 Author: lostystyg Date: Fri Jul 1 19:14:00 2022 +0300 Fixed ShortAccount commit 061a7ab966fafc41644034bf38a259f47bab9f10 Author: lostystyg Date: Wed Jun 29 17:17:24 2022 +0300 A bit generalization in processing filters for events commit b9f3b6a95832ac38782d9003ab4d8f4ad1af990a Author: lostystyg Date: Wed Jun 29 15:38:07 2022 +0300 Restructured events commit b8f37cbf82b986962ec85674d8859ad150567a9c Merge: f862108d 8465afed Author: lostystyg Date: Tue Jun 28 14:35:03 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit f862108dd6ca23059c62cad7b227b4d032e41d9c Merge: 8090d0e8 4429a24f Author: lostystyg Date: Mon Jun 27 13:37:20 2022 +0300 Merge branch '0.21' into feature/events commit 8090d0e8464d9b538c0617cab97cb2c08ac11411 Merge: 21b3c715 5c9755ac Author: lostystyg Date: Mon Jun 27 12:39:57 2022 +0300 Merge branch 'minor_fixes' into feature/events commit 21b3c715ae8ef56cc276e62975bb1a727cfb2cde Merge: 78eb6155 8c9006b4 Author: lostystyg Date: Mon Jun 27 12:39:51 2022 +0300 Merge branch '0.21' into feature/events commit 5c9755ac27adf6801e7936d8fefb218494fbc6a4 Author: lostystyg Date: Fri Jun 24 19:09:19 2022 +0300 Some minor fixes commit 78eb6155d9626dea1de3635f0e1484c643a27af9 Merge: 3207e0fc 97cf205e Author: lostystyg Date: Thu Jun 23 19:09:06 2022 +0300 Merge branch '0.21' into feature/events commit 3207e0fc601d9e099cb0181a1fd4dc784672001d Merge: 156ed36a 67a8917f Author: lostystyg Date: Mon Jun 13 16:15:56 2022 +0300 Merge branch '0.21' into feature/events commit 156ed36a5d4155c1b619a17c484c8587b23bb459 Author: lostystyg Date: Fri Jun 10 16:03:17 2022 +0300 Answer fixes for events commit 854e6f5b9ccba90961633409cbbcd7335857e50a Author: lostystyg Date: Fri Jun 10 14:58:52 2022 +0300 Donate value for comment event commit 576fed8fed67233522eea657f4801aa4519b6351 Author: lostystyg Date: Fri Jun 10 13:50:56 2022 +0300 Fixed events height commit 337c1efcc064e68aee3235d944c19da43b465169 Author: lostystyg Date: Fri Jun 10 13:38:03 2022 +0300 Disabled hight border in related content for events commit 7b2c630c686225e3ca28c40c3d349cc3eb295c48 Author: lostystyg Date: Fri Jun 10 13:27:55 2022 +0300 Events queries formatting commit e4f3666e6ff1aabb65efcc17ace03652209353df Author: lostystyg Date: Fri Jun 10 13:15:34 2022 +0300 Comment answer events fulfilled with data commit 775c8d454364df3d8775b78b891e4810b5fd959b Author: Andy Oknen Date: Fri Jun 10 12:14:10 2022 +0300 index comment answer commit 1b5a4966f75358c3a0140267a2e2a342b73ee755 Author: Andy Oknen Date: Fri Jun 10 11:30:03 2022 +0300 Add height limit for answer comments commit 6d0985262639ec83784ec1df4a9f74b96a5b1060 Author: Andy Oknen Date: Fri Jun 10 11:01:04 2022 +0300 comment commit 7805b8e8f7c600c471126e7304bf28fb380ad9aa Author: Andy Oknen Date: Fri Jun 10 10:54:36 2022 +0300 Sql fixes commit 011f94f29438ad36cb423a2faf6dc4686905902c Author: Andy Oknen Date: Fri Jun 10 09:43:51 2022 +0300 Fix sql typo commit a62fd177da5dfb00260cd13db1572b0824e21742 Author: lostystyg Date: Fri Jun 10 09:05:43 2022 +0300 Fixed select ordering in events commit af47ba0b7bb84185fc78c18c178720f8254281e8 Author: Andy Oknen Date: Fri Jun 10 08:50:18 2022 +0300 Fix comment answers sql index commit c97d7f55ddea43ffcde4b0c591086b8ddb6102b3 Author: lostystyg Date: Mon Jun 6 16:00:19 2022 +0300 Fixed description for scores events commit 134f3095dac5169d58a0213a795002d347c33769 Author: lostystyg Date: Mon Jun 6 15:35:51 2022 +0300 Throwing in case of event reconstructor error commit 0c3319a6878381b2bc528f9a24d8e7e491ce4dff Author: Andy Oknen Date: Mon May 23 14:11:21 2022 +0300 Downgrade likers count for testnet commit 367fa1a7a38cbe3f31ac83c3c6afef57ff1229df Author: Andy Oknen Date: Fri Apr 22 10:36:33 2022 +0300 Formatting commit 0421fbf7bf4af46fbb216517eb6f8867ca39f0a5 Author: lostystyg Date: Mon Jun 6 12:47:01 2022 +0300 Optimizing event queries commit aff9e13fece8167e8f7352c3d13206dbccde94b0 Author: lostystyg Date: Mon Jun 6 12:25:58 2022 +0300 Events fixes commit 423d4f9f91b61283e6878b408fc92ae8120ca467 Merge: 7127a3eb 039f41fb Author: lostystyg Date: Fri Jun 3 00:34:41 2022 +0300 Merge remote-tracking branch 'origin/0.21' into feature/events commit 7127a3ebd2bfff8f469afa7e5f980d5c41ae5ff0 Author: lostystyg Date: Fri Jun 3 00:34:12 2022 +0300 Short forms for events commit b8f13088d20cceb8fc67229bffb8154a00c08a20 Author: lostystyg Date: Fri Jun 3 00:34:02 2022 +0300 Updated short forms commit 03c0bd4a9c52a89d276ca9da219a9a323cb41a8c Author: lostystyg Date: Tue May 31 01:01:20 2022 +0300 ShortTxType for short forms commit dfd80a5a62d32e055cbaeabdf089bc4b1e0dbb4d Author: lostystyg Date: Mon May 30 22:52:28 2022 +0300 Added short forms commit 0b2aca0a697fd47cd0b4aee4264acf99aa57f86d Author: lostystyg Date: Mon May 30 15:26:51 2022 +0300 Raw sql query to get all events at height for each account commit 78681c897118244d758fc40732685ad9ba19c524 Author: lostystyg Date: Fri May 6 17:31:21 2022 +0300 Forgotten finalizing stmt commit 8d23c2e6e401f9a41c41d7a6236be2dc1785c19e Author: lostystyg Date: Fri May 6 17:01:01 2022 +0300 Updated args description for getevents commit 4030e741e98038f7297cccae706ba072beb992c2 Author: lostystyg Date: Fri May 6 16:57:43 2022 +0300 Events for single address commit b7ec0f7f40237ac2a6e12f3394163ba1a05a8c98 Author: lostystyg Date: Fri May 6 16:42:10 2022 +0300 constant depth for events commit 1ae34c266e55cdae51aa5df95d28cae91d5385ee Author: lostystyg Date: Fri May 6 16:40:43 2022 +0300 privatecontent for events commit 086a1fa52778907c63eab88d9e691b62edff5246 Author: lostystyg Date: Fri May 6 16:34:57 2022 +0300 Fixed binding for events commit d77c6b6cf4dda626454170d466345fadcf6b12f9 Author: lostystyg Date: Fri May 6 13:37:39 2022 +0300 Fixed filtering for events commit 19591f2421a9e7d9579fe6034f82314ccaaf4562 Author: lostystyg Date: Thu May 5 23:15:02 2022 +0300 Updated events commit 244a198523d5efe7f9c251e7ccd8111dd26eae0c Author: lostystyg Date: Wed May 4 17:04:33 2022 +0300 Fixed filtering for events commit 3deae2ea8a8dded1f50d3ec7ee9bda2616667e90 Author: lostystyg Date: Wed May 4 16:09:02 2022 +0300 FIlters, height and blocknum for events request commit 2600f314343ec9ce45acbd46774e1f2e4924e6a4 Author: lostystyg Date: Sat Apr 30 14:41:04 2022 +0300 Sorting events by height outside of sqlite commit 7f3d953ecb6c01fdf2e5fb6f1cf2d8cc424098a7 Author: lostystyg Date: Sat Apr 30 00:42:26 2022 +0300 Fixed events rpc description commit 192ad0cab7f3639824fe2c9ed4a3862941c89b2e Author: lostystyg Date: Sat Apr 30 00:41:11 2022 +0300 Events optimization commit 7a51e15cb185f07536ca713eebafd0e5c06111dc Author: lostystyg Date: Mon Apr 25 18:35:32 2022 +0300 Better indexing content from private subscribers event commit 3d8e46bfd1b13af691c876d8c82caf77f6035411 Author: lostystyg Date: Mon Apr 25 18:30:38 2022 +0300 Do not check for last for boost events commit dbea23e6036b2cd141552c408a149562351618cd Merge: af71bdf4 b0497826 Author: lostystyg Date: Mon Apr 25 18:20:24 2022 +0300 Merge remote-tracking branch 'origin/0.21.todo' into feature/events commit af71bdf4fdaaffe602ef6fa70efa63ef35ec5c63 Author: lostystyg Date: Mon Apr 25 18:17:09 2022 +0300 Base events logic commit c0e9504a610807a759cffbd239dd9bd2852ad805 Author: lostystyg Date: Mon Apr 18 17:23:50 2022 +0300 Method to get POCKETNET_TEAM address commit 9722326760ef90af0ccb57bbacc5c5c51d76f7d6 Author: lostystyg Date: Mon Apr 18 17:22:46 2022 +0300 Using network id instead of string for getting pocketnet developers --- src/pocketdb/helpers/ShortFormHelper.cpp | 303 +++++++- src/pocketdb/helpers/ShortFormHelper.h | 96 ++- .../models/shortform/ShortAccount.cpp | 16 +- src/pocketdb/models/shortform/ShortAccount.h | 2 +- src/pocketdb/models/shortform/ShortForm.cpp | 6 +- src/pocketdb/models/shortform/ShortForm.h | 2 +- src/pocketdb/models/shortform/ShortTxData.cpp | 10 + src/pocketdb/models/shortform/ShortTxData.h | 6 + .../models/shortform/ShortTxOutput.cpp | 5 + src/pocketdb/models/shortform/ShortTxOutput.h | 5 + .../repositories/ConsensusRepository.cpp | 66 ++ .../repositories/web/NotifierRepository.cpp | 77 +- .../repositories/web/NotifierRepository.h | 2 +- .../repositories/web/WebRpcRepository.cpp | 657 +++++++----------- .../repositories/web/WebRpcRepository.h | 2 - src/staker.cpp | 2 +- src/websocket/notifyprocessor.cpp | 35 +- 17 files changed, 825 insertions(+), 467 deletions(-) diff --git a/src/pocketdb/helpers/ShortFormHelper.cpp b/src/pocketdb/helpers/ShortFormHelper.cpp index 84e1b67ca..9c663dce4 100644 --- a/src/pocketdb/helpers/ShortFormHelper.cpp +++ b/src/pocketdb/helpers/ShortFormHelper.cpp @@ -109,4 +109,305 @@ PocketDb::ShortTxType PocketHelpers::ShortTxTypeConvertor::strToType(const std:: return type->first; } return PocketDb::ShortTxType::NotSet; -} \ No newline at end of file +} + +std::optional> _parseOutputs(const std::string& jsonStr) +{ + UniValue json (UniValue::VOBJ); + if (!json.read(jsonStr) || !json.isArray()) return std::nullopt; + std::vector res; + res.reserve(json.size()); + for (int i = 0; i < json.size(); i++) { + const auto& elem = json[i]; + PocketDb::ShortTxOutput output; + + if (elem.exists("TxHash") && elem["TxHash"].isStr()) output.SetTxHash(elem["TxHash"].get_str()); + if (elem.exists("Value") && elem["Value"].isNum()) output.SetValue(elem["Value"].get_int64()); + if (elem.exists("SpentTxHash") && elem["SpentTxHash"].isStr()) output.SetSpentTxHash(elem["SpentTxHash"].get_str()); + if (elem.exists("AddressHash") && elem["AddressHash"].isStr()) output.SetAddressHash(elem["AddressHash"].get_str()); + if (elem.exists("Number") && elem["Number"].isNum()) output.SetNumber(elem["Number"].get_int()); + if (elem.exists("ScriptPubKey") && elem["ScriptPubKey"].isStr()) output.SetScriptPubKey(elem["ScriptPubKey"].get_str()); + if (elem.exists("Account") && elem["Account"].isStr()) { + const auto& accJson = elem["Account"]; + PocketDb::ShortAccount accData; + if (accJson.exists("Lang") && accJson["Lang"].isStr()) accData.SetLang(accJson["Lang"].get_str()); + if (accJson.exists("Name") && accJson["Name"].isStr()) accData.SetName(accJson["Name"].get_str()); + if (accJson.exists("Avatar") && accJson["Avatar"].isStr()) accData.SetAvatar(accJson["Avatar"].get_str()); + if (accJson.exists("Rep") && accJson["Rep"].isNum()) accData.SetReputation(accJson["Rep"].get_int64()); + output.SetAccount(accData); + } + + res.emplace_back(std::move(output)); + } + + return res; +} + +std::optional>>> _processMultipleAddresses(const std::string& jsonStr) +{ + UniValue json; + if (!json.read(jsonStr) || !json.isArray() || json.size() <= 0) return std::nullopt; + + std::vector>> multipleAddresses; + for (int i = 0; i < json.size(); i++) { + const auto& entry = json[i]; + if (!entry.isObject() || !entry.exists("address") || !entry["address"].isStr()) { + continue; + } + + auto address = entry["address"].get_str(); + std::optional accountData; + if (entry.exists("account")) { + const auto& account = entry["account"]; + if (account["name"].isStr()) { + PocketDb::ShortAccount accData; + accData.SetName(account["name"].get_str()); + if (account["avatar"].isStr()) accData.SetAvatar(account["avatar"].get_str()); + if (account["badge"].isStr()) accData.SetBadge(account["badge"].get_str()); + if (account["reputation"].isNull()) accData.SetReputation(account["reputation"].get_int64()); + accountData = std::move(accData); + } + } + + multipleAddresses.emplace_back(std::make_pair(std::move(address), std::move(accountData))); + } + + return multipleAddresses; +} + +bool PocketHelpers::NotificationsResult::HasData(const int64_t& blocknum) +{ + return m_txArrIndicies.find(blocknum) != m_txArrIndicies.end(); +} + +void PocketHelpers::NotificationsResult::InsertData(const PocketDb::ShortForm& shortForm) +{ + if (HasData(*shortForm.GetTxData().GetBlockNum())) return; + m_txArrIndicies.insert({*shortForm.GetTxData().GetBlockNum(), m_data.size()}); + m_data.emplace_back(shortForm.Serialize(false)); +} + +void PocketHelpers::NotificationsResult::InsertNotifiers(const int64_t& blocknum, PocketDb::ShortTxType contextType, std::map> addresses) +{ + for (const auto& address: addresses) { + auto& notifierEntry = m_notifiers[address.first]; + notifierEntry.notifications[contextType].emplace_back(m_txArrIndicies.at(blocknum)); + if (!notifierEntry.account) + notifierEntry.account = address.second; + } +} + +UniValue PocketHelpers::NotificationsResult::Serialize() const +{ + UniValue notifiersUni (UniValue::VOBJ); + notifiersUni.reserveKVSize(m_notifiers.size()); + + for (const auto& notifier: m_notifiers) { + const auto& address = notifier.first; + const auto& notifierEntry = notifier.second; + + UniValue notifierData (UniValue::VOBJ); + notifierData.reserveKVSize(notifierEntry.notifications.size()); + for (const auto& contextTypeIndicies: notifierEntry.notifications) { + UniValue indicies (UniValue::VARR); + indicies.push_backV(contextTypeIndicies.second); + notifierData.pushKV(PocketHelpers::ShortTxTypeConvertor::toString(contextTypeIndicies.first), indicies, false); + } + + UniValue notifierUniObj (UniValue::VOBJ); + if (const auto& accData = notifierEntry.account; accData.has_value()) { + notifierUniObj.pushKV("i", accData->Serialize(), false); + } + notifierUniObj.pushKV("e", std::move(notifierData), false); + + notifiersUni.pushKV(address, notifierUniObj, false); + } + + UniValue data (UniValue::VARR); + data.push_backV(m_data); + + UniValue res (UniValue::VOBJ); + res.pushKV("data", data, false); + res.pushKV("notifiers", notifiersUni,false); + return res; +} + +void PocketHelpers::ShortFormParser::Reset(const int& startIndex) +{ + m_startIndex = startIndex; +} + +PocketDb::ShortForm PocketHelpers::ShortFormParser::ParseFull(sqlite3_stmt* stmt) +{ + int index = m_startIndex; + auto [ok, type] = TryGetColumnString(stmt, index++); + if (!ok) { + throw std::runtime_error("Missing row type"); + } + + auto txData = ProcessTxData(stmt, index); + if (!txData) { + throw std::runtime_error("Missing required fields for tx data in a row"); + } + + auto relatedContent = ProcessTxData(stmt, index); + + return {PocketHelpers::ShortTxTypeConvertor::strToType(type), *txData, relatedContent}; +} + +int64_t PocketHelpers::ShortFormParser::ParseBlockNum(sqlite3_stmt* stmt) +{ + auto [ok, val] = TryGetColumnInt64(stmt, m_startIndex+5); + if (!ok) { + throw std::runtime_error("Failed to extract blocknum from stmt"); + } + + return val; +} + +PocketDb::ShortTxType PocketHelpers::ShortFormParser::ParseType(sqlite3_stmt* stmt) +{ + auto [ok, val] = TryGetColumnString(stmt, m_startIndex); + if (!ok) { + throw std::runtime_error("Failed to extract short tx type"); + } + + auto type = PocketHelpers::ShortTxTypeConvertor::strToType(val); + if (type == PocketDb::ShortTxType::NotSet) { + throw std::runtime_error("Failed to parse extracted short tx type"); + } + + return type; +} + +std::string PocketHelpers::ShortFormParser::ParseHash(sqlite3_stmt* stmt) +{ + auto [ok, hash] = TryGetColumnString(stmt, m_startIndex+1); + if (!ok) { + throw std::runtime_error("Failed to extract tx hash from stmt"); + } + + return hash; +} + +std::optional> PocketHelpers::ShortFormParser::ParseOutputs(sqlite3_stmt* stmt) +{ + auto [ok, str] = TryGetColumnString(stmt, m_startIndex + 11); + if (ok) { + return _parseOutputs(str); + } + return std::nullopt; +} + +std::optional PocketHelpers::ShortFormParser::ParseAccount(sqlite3_stmt* stmt, const int& index) +{ + auto [ok1, lang] = TryGetColumnString(stmt, index); + auto [ok2, name] = TryGetColumnString(stmt, index+1); + auto [ok3, avatar] = TryGetColumnString(stmt, index+2); + auto [ok4, reputation] = TryGetColumnInt64(stmt, index+3); + if (ok2 && ok4) { // TODO (losty): can there be no avatar? + auto acc = PocketDb::ShortAccount(name, avatar, reputation); + if (ok1) acc.SetLang(lang); + return acc; + } + return std::nullopt; +} + +std::optional PocketHelpers::ShortFormParser::ProcessTxData(sqlite3_stmt* stmt, int& index) +{ + const auto i = index; + + static const auto stmtOffset = 19; + index += stmtOffset; + + auto [ok1, hash] = TryGetColumnString(stmt, i); + auto [ok2, txType] = TryGetColumnInt(stmt, i+1); + + if (ok1 && ok2) { + PocketDb::ShortTxData txData(hash, (PocketTx::TxType)txType); + if (auto [ok, val] = TryGetColumnString(stmt, i+2); ok) txData.SetAddress(val); + if (auto [ok, val] = TryGetColumnInt64(stmt, i+3); ok) txData.SetHeight(val); + if (auto [ok, val] = TryGetColumnInt64(stmt, i+4); ok) txData.SetBlockNum(val); + if (auto [ok, val] = TryGetColumnInt64(stmt, i+5); ok) txData.SetTime(val); + if (auto [ok, val] = TryGetColumnString(stmt, i+6); ok) txData.SetRootTxHash(val); + if (auto [ok, val] = TryGetColumnString(stmt, i+7); ok) txData.SetPostHash(val); + if (auto [ok, val] = TryGetColumnInt64(stmt, i+8); ok) txData.SetVal(val); + if (auto [ok, val] = TryGetColumnString(stmt, i+9); ok) txData.SetInputs(_parseOutputs(val)); + if (auto [ok, val] = TryGetColumnString(stmt, i+10); ok) txData.SetOutputs(_parseOutputs(val)); + if (auto [ok, val] = TryGetColumnString(stmt, i+11); ok) txData.SetDescription(val); + if (auto [ok, val] = TryGetColumnString(stmt, i+12); ok) txData.SetCommentParentId(val); + if (auto [ok, val] = TryGetColumnString(stmt, i+13); ok) txData.SetCommentAnswerId(val); + txData.SetAccount(ParseAccount(stmt, i+14)); + if (auto [ok, val] = TryGetColumnString(stmt, i+18); ok) txData.SetMultipleAddresses(_processMultipleAddresses(val)); + return txData; + } + + return std::nullopt; +} + +PocketHelpers::EventsReconstructor::EventsReconstructor() +{ + m_parser.Reset(0); +} + +void PocketHelpers::EventsReconstructor::FeedRow(sqlite3_stmt* stmt) +{ + m_result.emplace_back(std::move(m_parser.ParseFull(stmt))); +} + +std::vector PocketHelpers::EventsReconstructor::GetResult() const +{ + return m_result; +} + +PocketHelpers::NotificationsReconstructor::NotificationsReconstructor() +{ + m_parser.Reset(5); +} + +void PocketHelpers::NotificationsReconstructor::FeedRow(sqlite3_stmt* stmt) +{ + // Notifiers data for current row context. Possible more than one notifier for the same context + std::map> notifiers; + // Collecting addresses and accounts for notifiers. Required data can be in 2 places: + // - First column in query + // - Outputs (e.x. for money) + // TODO (losty): generalize collecting account data because there could be more variants in the future + auto [ok, addressOne] = TryGetColumnString(stmt, 0); + if (ok) { + auto pulp = m_parser.ParseAccount(stmt, 1); + notifiers.insert(std::move(std::make_pair(std::move(addressOne), std::move(pulp)))); + } else { + if (auto outputs = m_parser.ParseOutputs(stmt); outputs) { + for (const auto& output: *outputs) { + if (output.GetAddressHash() && !output.GetAddressHash()->empty()) { + notifiers.insert({*output.GetAddressHash(), output.GetAccount()}); + } + } + } + } + if (notifiers.empty()) throw std::runtime_error("Missing address of notifier"); + + auto blockNum = m_parser.ParseBlockNum(stmt); // blocknum is a unique key of tx because we are looking for txs in a single block + // Do not perform parsing sql if we already has this tx + if (!m_notifications.HasData(blockNum)) { + m_notifications.InsertData(m_parser.ParseFull(stmt)); + } + m_notifications.InsertNotifiers(blockNum, m_parser.ParseType(stmt), std::move(notifiers)); +} + +PocketHelpers::NotificationsResult PocketHelpers::NotificationsReconstructor::GetResult() const +{ + return m_notifications; +} + +void PocketHelpers::NotificationSummaryReconstructor::FeedRow(sqlite3_stmt* stmt) +{ + auto [ok1, typeStr] = TryGetColumnString(stmt, 0); + auto [ok2, address] = TryGetColumnString(stmt, 1); + if (!ok1 || !ok2) return; + + if (auto type = PocketHelpers::ShortTxTypeConvertor::strToType(typeStr); type != PocketDb::ShortTxType::NotSet) { + m_result[address][type]++; + } +} diff --git a/src/pocketdb/helpers/ShortFormHelper.h b/src/pocketdb/helpers/ShortFormHelper.h index a00ac3a2f..8f6bd72a5 100644 --- a/src/pocketdb/helpers/ShortFormHelper.h +++ b/src/pocketdb/helpers/ShortFormHelper.h @@ -5,9 +5,15 @@ #ifndef POCKETDB_SHORTFORMHELPER_H #define POCKETDB_SHORTFORMHELPER_H -#include "pocketdb/models/shortform/ShortTxType.h" +#include "pocketdb/models/shortform/ShortForm.h" +#include "pocketdb/repositories/BaseRepository.h" + +#include "univalue.h" +#include "sqlite3.h" #include +#include +#include #include namespace PocketHelpers @@ -62,6 +68,92 @@ namespace PocketHelpers */ std::function binding; }; + + struct NotifierEntry + { + std::optional account; + std::map> notifications; + }; + + class NotificationsResult + { + public: + bool HasData(const int64_t& blocknum); + + void InsertData(const PocketDb::ShortForm& shortForm); + + void InsertNotifiers(const int64_t& blocknum, PocketDb::ShortTxType contextType, std::map> addresses); + + UniValue Serialize() const; + + private: + std::map m_notifiers; + std::map m_txArrIndicies; + std::vector m_data; + }; + + class ShortFormParser : public PocketDb::RowAccessor + { + public: + void Reset(const int& startIndex); + + PocketDb::ShortForm ParseFull(sqlite3_stmt* stmt); + + int64_t ParseBlockNum(sqlite3_stmt* stmt); + + PocketDb::ShortTxType ParseType(sqlite3_stmt* stmt); + + std::string ParseHash(sqlite3_stmt* stmt); + + std::optional> ParseOutputs(sqlite3_stmt* stmt); + + std::optional ParseAccount(sqlite3_stmt* stmt, const int& index); + + protected: + std::optional ProcessTxData(sqlite3_stmt* stmt, int& index); + + private: + int m_startIndex = 0; + }; + + class EventsReconstructor : public PocketDb::RowAccessor + { + public: + EventsReconstructor(); + + void FeedRow(sqlite3_stmt* stmt); + + std::vector GetResult() const; + private: + ShortFormParser m_parser; + std::vector m_result; + }; + + class NotificationsReconstructor : public PocketDb::RowAccessor + { + public: + NotificationsReconstructor(); + + void FeedRow(sqlite3_stmt* stmt); + + NotificationsResult GetResult() const; + private: + ShortFormParser m_parser; + NotificationsResult m_notifications; + }; + + class NotificationSummaryReconstructor : public PocketDb::RowAccessor + { + public: + void FeedRow(sqlite3_stmt* stmt); + + auto GetResult() const + { + return m_result; + } + private: + std::map> m_result; + }; } -#endif // POCKETDB_SHORTFORMHELPER_H \ No newline at end of file +#endif // POCKETDB_SHORTFORMHELPER_H diff --git a/src/pocketdb/models/shortform/ShortAccount.cpp b/src/pocketdb/models/shortform/ShortAccount.cpp index d0697decd..bbec57e24 100644 --- a/src/pocketdb/models/shortform/ShortAccount.cpp +++ b/src/pocketdb/models/shortform/ShortAccount.cpp @@ -6,22 +6,22 @@ #include "pocketdb/models/shortform/ShortAccount.h" -PocketDb::ShortAccount::ShortAccount(std::string name, std::string avatar, std::string badge, int64_t reputation) +PocketDb::ShortAccount::ShortAccount(std::string name, std::string avatar, int64_t reputation, std::optional lang) : m_name(std::move(name)), m_avatar(std::move(avatar)), - m_badge(std::move(badge)), + m_lang(std::move(lang)), m_reputation(reputation) {} UniValue PocketDb::ShortAccount::Serialize() const { UniValue data(UniValue::VOBJ); - - data.pushKV("name", m_name); - data.pushKV("avatar", m_avatar); - data.pushKV("badge", m_badge); - data.pushKV("reputation", m_reputation); - if (m_lang) data.pushKV("lang", *m_lang); + data.reserveKVSize(5); + data.pushKV("n", m_name, false); + data.pushKV("a", m_avatar, false); + data.pushKV("b", m_badge, false); + data.pushKV("r", m_reputation, false); + if (m_lang) data.pushKV("l", *m_lang, false); return data; } diff --git a/src/pocketdb/models/shortform/ShortAccount.h b/src/pocketdb/models/shortform/ShortAccount.h index 78ac5f863..cfd97cb8b 100644 --- a/src/pocketdb/models/shortform/ShortAccount.h +++ b/src/pocketdb/models/shortform/ShortAccount.h @@ -15,7 +15,7 @@ namespace PocketDb class ShortAccount { public: - ShortAccount(std::string name, std::string avatar, std::string badge, int64_t reputation); + ShortAccount(std::string name, std::string avatar, int64_t reputation, std::optional lang = std::nullopt); ShortAccount() = default; UniValue Serialize() const; diff --git a/src/pocketdb/models/shortform/ShortForm.cpp b/src/pocketdb/models/shortform/ShortForm.cpp index 0d58e8b46..22b40e04f 100644 --- a/src/pocketdb/models/shortform/ShortForm.cpp +++ b/src/pocketdb/models/shortform/ShortForm.cpp @@ -2,8 +2,6 @@ // Distributed under the Apache 2.0 software license, see the accompanying // https://www.apache.org/licenses/LICENSE-2.0 -#include "pocketdb/models/shortform/ShortForm.h" - #include "pocketdb/helpers/ShortFormHelper.h" PocketDb::ShortForm::ShortForm(PocketDb::ShortTxType type, ShortTxData txData, std::optional relatedContent) @@ -12,10 +10,10 @@ PocketDb::ShortForm::ShortForm(PocketDb::ShortTxType type, ShortTxData txData, s m_relatedContent(std::move(relatedContent)) {} -UniValue PocketDb::ShortForm::Serialize() const +UniValue PocketDb::ShortForm::Serialize(bool includeType) const { auto data = m_txData.Serialize(); - data.pushKV("type", PocketHelpers::ShortTxTypeConvertor::toString(m_type)); + if (includeType && m_type != ShortTxType::NotSet) data.pushKV("type", PocketHelpers::ShortTxTypeConvertor::toString(m_type)); if (m_relatedContent) data.pushKV("relatedContent", m_relatedContent->Serialize()); return data; diff --git a/src/pocketdb/models/shortform/ShortForm.h b/src/pocketdb/models/shortform/ShortForm.h index 338d04039..af3c547f5 100644 --- a/src/pocketdb/models/shortform/ShortForm.h +++ b/src/pocketdb/models/shortform/ShortForm.h @@ -17,7 +17,7 @@ namespace PocketDb public: ShortForm(PocketDb::ShortTxType type, ShortTxData txData, std::optional relatedContent); - UniValue Serialize() const; + UniValue Serialize(bool includeType = true) const; PocketDb::ShortTxType GetType() const; const ShortTxData& GetTxData() const; diff --git a/src/pocketdb/models/shortform/ShortTxData.cpp b/src/pocketdb/models/shortform/ShortTxData.cpp index c449e2710..358c0e0bb 100644 --- a/src/pocketdb/models/shortform/ShortTxData.cpp +++ b/src/pocketdb/models/shortform/ShortTxData.cpp @@ -40,6 +40,7 @@ UniValue PocketDb::ShortTxData::Serialize() const data.pushKV("txType", (int)m_txType); if (m_height) data.pushKV("height", m_height.value()); if (m_blockNum) data.pushKV("blockNum", m_blockNum.value()); + if (m_time) data.pushKV("time", *m_time); if (m_address) data.pushKV("address", m_address.value()); if (m_account) data.pushKV("account", m_account->Serialize()); if (m_val) data.pushKV("val", m_val.value()); @@ -47,6 +48,7 @@ UniValue PocketDb::ShortTxData::Serialize() const if (m_commentParentId) data.pushKV("commentParentId", m_commentParentId.value()); if (m_commentAnswerId) data.pushKV("commentAnswerId", m_commentAnswerId.value()); if (m_rootTxHash) data.pushKV("rootTxHash", *m_rootTxHash); + if (m_postHash) data.pushKV("postHash", *m_postHash); if (m_inputs) { UniValue inputs (UniValue::VARR); std::vector tmp; @@ -93,6 +95,10 @@ const std::optional& PocketDb::ShortTxData::GetBlockNum() const { retur void PocketDb::ShortTxData::SetBlockNum(const std::optional& blockNum) { m_blockNum = blockNum; } +const std::optional& PocketDb::ShortTxData::GetTime() const { return m_time; } + +void PocketDb::ShortTxData::SetTime(const std::optional& time) { m_time = time; } + const std::optional& PocketDb::ShortTxData::GetAccount() const { return m_account; } void PocketDb::ShortTxData::SetAccount(const std::optional& account) { m_account = account; } @@ -117,6 +123,10 @@ void PocketDb::ShortTxData::SetRootTxHash(const std::optional& root const std::optional& PocketDb::ShortTxData::GetRootTxHash() const { return m_rootTxHash; } +void PocketDb::ShortTxData::SetPostHash(const std::optional& postHash) { m_postHash = postHash; } + +const std::optional& PocketDb::ShortTxData::GetPostHash() const { return m_postHash; } + void PocketDb::ShortTxData::SetMultipleAddresses(const std::optional>>>& multipleAddresses) { m_multipleAddresses = multipleAddresses; } const std::optional>>>& PocketDb::ShortTxData::GetMultipleAddresses() { return m_multipleAddresses; } diff --git a/src/pocketdb/models/shortform/ShortTxData.h b/src/pocketdb/models/shortform/ShortTxData.h index 5f3b9a40a..3802c1f88 100644 --- a/src/pocketdb/models/shortform/ShortTxData.h +++ b/src/pocketdb/models/shortform/ShortTxData.h @@ -39,6 +39,8 @@ namespace PocketDb void SetHeight(const std::optional& height); const std::optional& GetBlockNum() const; void SetBlockNum(const std::optional& height); + const std::optional& GetTime() const; + void SetTime(const std::optional& time); const std::optional& GetAccount() const; void SetAccount(const std::optional& account); const std::optional& GetVal() const; @@ -51,6 +53,8 @@ namespace PocketDb const std::optional& GetCommentAnswerId() const; void SetRootTxHash(const std::optional& rootTxHash); const std::optional& GetRootTxHash() const; + void SetPostHash(const std::optional& postHash); + const std::optional& GetPostHash() const; void SetMultipleAddresses(const std::optional>>>& multipleAddresses); const std::optional>>>& GetMultipleAddresses(); void SetOutputs(const std::optional>& outputs); @@ -64,6 +68,7 @@ namespace PocketDb std::optional m_address; // Creator of tx. // This field is optional if we are requesting a lot of txs for one address and want to not duplicate meaningless data std::optional m_height; // This field is optional if we are requesting a lot of txs for one height and want to not duplicate meaningless data std::optional m_blockNum; // TODO (losty): probably some filters for these fields + std::optional m_time; std::optional m_account; // Account data associated with address std::optional>>> m_multipleAddresses; std::optional m_val; @@ -71,6 +76,7 @@ namespace PocketDb std::optional> m_outputs; std::optional m_description; // Short description of content, e.x. first lines of post's text std::optional m_rootTxHash; + std::optional m_postHash; // Special-case fields for comments std::optional m_commentParentId; diff --git a/src/pocketdb/models/shortform/ShortTxOutput.cpp b/src/pocketdb/models/shortform/ShortTxOutput.cpp index 72bc9f9d4..7453dd1d5 100644 --- a/src/pocketdb/models/shortform/ShortTxOutput.cpp +++ b/src/pocketdb/models/shortform/ShortTxOutput.cpp @@ -15,6 +15,7 @@ UniValue PocketDb::ShortTxOutput::Serialize() const if (m_number) data.pushKV("number", *m_number); if (m_value) data.pushKV("value", *m_value); if (m_scriptPubKey) data.pushKV("scriptpubkey", *m_scriptPubKey); + // TODO (losty): account? return data; } @@ -43,3 +44,7 @@ void PocketDb::ShortTxOutput::SetValue(const std::optional& value) { m_ const std::optional& PocketDb::ShortTxOutput::GetValue() const { return m_value; } +void PocketDb::ShortTxOutput::SetAccount(const std::optional& account) { m_account = account; } + +const std::optional& PocketDb::ShortTxOutput::GetAccount() const { return m_account; } + diff --git a/src/pocketdb/models/shortform/ShortTxOutput.h b/src/pocketdb/models/shortform/ShortTxOutput.h index ea1d6d3be..23ed19c7e 100644 --- a/src/pocketdb/models/shortform/ShortTxOutput.h +++ b/src/pocketdb/models/shortform/ShortTxOutput.h @@ -5,6 +5,8 @@ #ifndef POCKETDB_SHORTTXOUTPUT_H #define POCKETDB_SHORTTXOUTPUT_H +#include "pocketdb/models/shortform/ShortAccount.h" + #include "univalue.h" #include @@ -30,6 +32,8 @@ namespace PocketDb const std::optional& GetcriptPubKey() const; void SetValue(const std::optional& value); const std::optional& GetValue() const; + void SetAccount(const std::optional& account); + const std::optional& GetAccount() const; private: std::optional m_txHash; @@ -38,6 +42,7 @@ namespace PocketDb std::optional m_addressHash; std::optional m_scriptPubKey; std::optional m_value; + std::optional m_account; // Account data related to addressHash }; } diff --git a/src/pocketdb/repositories/ConsensusRepository.cpp b/src/pocketdb/repositories/ConsensusRepository.cpp index e0590ca54..e278444bf 100644 --- a/src/pocketdb/repositories/ConsensusRepository.cpp +++ b/src/pocketdb/repositories/ConsensusRepository.cpp @@ -652,6 +652,72 @@ namespace PocketDb return result; } + bool ConsensusRepository::ExistsInMempool(const string& string1, const vector& types) + { + assert(string1 != ""); + bool result = false; + + string sql = R"sql( + select 1 + from Transactions indexed by Transactions_Type_String1_Height_Time_Int1 + where Type in ( )sql" + join(vector(types.size(), "?"), ",") + R"sql( ) + and String1 = ? + and Height is null + limit 1 + )sql"; + + TryTransactionStep(__func__, [&]() + { + auto stmt = SetupSqlStatement(sql); + + int i = 1; + for (const auto& type: types) + TryBindStatementInt(stmt, i++, type); + TryBindStatementText(stmt, i++, string1); + + if (sqlite3_step(*stmt) == SQLITE_ROW) + result = true; + + FinalizeSqlStatement(*stmt); + }); + + return result; + } + + bool ConsensusRepository::ExistsInMempool(const string& string1, const string& string2, const vector& types) + { + assert(string1 != ""); + assert(string2 != ""); + bool result = false; + + string sql = R"sql( + select 1 + from Transactions indexed by Transactions_Type_String1_String2_Height + where Type in ( )sql" + join(vector(types.size(), "?"), ",") + R"sql( ) + and String1 = ? + and String2 = ? + and Height is null + )sql"; + + TryTransactionStep(__func__, [&]() + { + auto stmt = SetupSqlStatement(sql); + + int i = 1; + for (const auto& type: types) + TryBindStatementInt(stmt, i++, type); + TryBindStatementText(stmt, i++, string1); + TryBindStatementText(stmt, i++, string2); + + if (sqlite3_step(*stmt) == SQLITE_ROW) + result = true; + + FinalizeSqlStatement(*stmt); + }); + + return result; + } + bool ConsensusRepository::ExistsNotDeleted(const string& txHash, const string& address, const vector& types) { bool result = false; diff --git a/src/pocketdb/repositories/web/NotifierRepository.cpp b/src/pocketdb/repositories/web/NotifierRepository.cpp index 8da83cc8e..7ece5578b 100644 --- a/src/pocketdb/repositories/web/NotifierRepository.cpp +++ b/src/pocketdb/repositories/web/NotifierRepository.cpp @@ -235,44 +235,45 @@ namespace PocketDb return result; } - UniValue NotifierRepository::GetUserReferrerAddress(const string &userHash) - { - UniValue result(UniValue::VOBJ); - - string sql = R"sql( - select - r.String2 as referrerAddress, - p.String2 as referralName, - p.String3 as referralAvatar - from Transactions r - join Transactions u indexed by Transactions_Type_Last_String1_Height_Id on u.String1 = r.String1 - join Payload p on p.TxHash = u.Hash - where r.Type in (100) - and r.String2 is not null - and r.Hash = ? - and u.Type in (100) - and u.Last=1 - and u.Height is not null - )sql"; - - TryTransactionStep(__func__, [&]() - { - auto stmt = SetupSqlStatement(sql); - - TryBindStatementText(stmt, 1, userHash); - - if (sqlite3_step(*stmt) == SQLITE_ROW) - { - if (auto[ok, value] = TryGetColumnString(*stmt, 0); ok) result.pushKV("referrerAddress", value); - if (auto[ok, value] = TryGetColumnString(*stmt, 1); ok) result.pushKV("referralName", value); - if (auto[ok, value] = TryGetColumnString(*stmt, 2); ok) result.pushKV("referralAvatar", value); - } - - FinalizeSqlStatement(*stmt); - }); - - return result; - } + // Not used. Not planned yet. Invalid request. +// UniValue NotifierRepository::GetUserReferrerAddress(const string &userHash) +// { +// UniValue result(UniValue::VOBJ); +// +// string sql = R"sql( +// select +// r.String2 as referrerAddress, +// p.String2 as referralName, +// p.String3 as referralAvatar +// from Transactions r +// join Transactions u indexed by Transactions_Type_Last_String1_Height_Id on u.String1 = r.String1 +// join Payload p on p.TxHash = u.Hash +// where r.Type in (100) +// and r.String2 is not null +// and r.Hash = ? +// and u.Type in (100) +// and u.Last=1 +// and u.Height is not null +// )sql"; +// +// TryTransactionStep(__func__, [&]() +// { +// auto stmt = SetupSqlStatement(sql); +// +// TryBindStatementText(stmt, 1, userHash); +// +// if (sqlite3_step(*stmt) == SQLITE_ROW) +// { +// if (auto[ok, value] = TryGetColumnString(*stmt, 0); ok) result.pushKV("referrerAddress", value); +// if (auto[ok, value] = TryGetColumnString(*stmt, 1); ok) result.pushKV("referralName", value); +// if (auto[ok, value] = TryGetColumnString(*stmt, 2); ok) result.pushKV("referralAvatar", value); +// } +// +// FinalizeSqlStatement(*stmt); +// }); +// +// return result; +// } UniValue NotifierRepository::GetPostInfoAddressByScore(const string &postScoreHash) { diff --git a/src/pocketdb/repositories/web/NotifierRepository.h b/src/pocketdb/repositories/web/NotifierRepository.h index 2f8c19bff..4ea76da71 100644 --- a/src/pocketdb/repositories/web/NotifierRepository.h +++ b/src/pocketdb/repositories/web/NotifierRepository.h @@ -23,7 +23,7 @@ namespace PocketDb UniValue GetBoostInfo(const string& boostHash); UniValue GetOriginalPostAddressByRepost(const string& repostHash); UniValue GetPrivateSubscribeAddressesByAddressTo(const string& addressTo); - UniValue GetUserReferrerAddress(const string& userHash); +// UniValue GetUserReferrerAddress(const string& userHash); // Not used. Not planned yet. Invalid request. UniValue GetPostInfoAddressByScore(const string& postScoreHash); UniValue GetSubscribeAddressTo(const string& subscribeHash); UniValue GetCommentInfoAddressByScore(const string& commentScoreHash); diff --git a/src/pocketdb/repositories/web/WebRpcRepository.cpp b/src/pocketdb/repositories/web/WebRpcRepository.cpp index 50147b5ba..9cd991fb2 100644 --- a/src/pocketdb/repositories/web/WebRpcRepository.cpp +++ b/src/pocketdb/repositories/web/WebRpcRepository.cpp @@ -10,312 +10,6 @@ namespace PocketDb { - class NotificationsResult - { - public: - bool HasData(const std::string& hash) - { - return m_data.find(hash) != m_data.end(); - } - - void InsertData(const PocketDb::ShortForm& shortForm) - { - m_data.insert({shortForm.GetTxData().GetHash(), shortForm}); - } - - void InsertNotifiers(const std::string& hash, std::set addresses) - { - for (const auto& address: addresses) { - m_notifiers[address].insert(hash); - } - } - - std::set GetNotifiersAddresses() const - { - std::set res; - for (const auto& notifierEntry: m_notifiers) { - res.insert(notifierEntry.first); - } - - return res; - } - - UniValue Serialize(const std::map accsData) const - { - std::map> hashToIndexMap; - UniValue data (UniValue::VARR); - std::vector tmp; - tmp.reserve(m_data.size()); - for (const auto& shortForm: m_data) { - hashToIndexMap.insert({shortForm.first, {shortForm.second.GetType(), tmp.size()}}); - tmp.emplace_back(shortForm.second.Serialize()); - } - data.push_backV(tmp); - - UniValue notifiers (UniValue::VOBJ); - notifiers.reserveKVSize(m_notifiers.size()); - for (const auto& notifiersEntry: m_notifiers) { - std::map> txIndicies; - for (const auto& txHash: notifiersEntry.second) { - const auto& txEntry = hashToIndexMap.at(txHash); - txIndicies[txEntry.first].emplace_back(txEntry.second); - } - UniValue e (UniValue::VOBJ); - for (const auto& lol: txIndicies) { - UniValue indicies (UniValue::VARR); - indicies.push_backV(lol.second); - e.pushKV(PocketHelpers::ShortTxTypeConvertor::toString(lol.first), indicies, false); - } - UniValue notifier (UniValue::VOBJ); - notifier.pushKV("e", e); - if (auto acc = accsData.find(notifiersEntry.first); acc != accsData.end()) { - notifier.pushKV("i", acc->second.Serialize()); - } - notifiers.pushKV(notifiersEntry.first, notifier, false); - } - - UniValue result (UniValue::VOBJ); - result.pushKV("data", data); - result.pushKV("notifiers", notifiers); - - return result; - } - - private: - std::map m_data; - std::map> m_notifiers; - }; - - class ShortFormParser : public RowAccessor - { - public: - void Reset(const int& startIndex) - { - m_startIndex = startIndex; - } - - PocketDb::ShortForm ParseFull(sqlite3_stmt* stmt) - { - int index = m_startIndex; - auto [ok, type] = TryGetColumnString(stmt, index++); - if (!ok) { - throw std::runtime_error("Missing row type"); - } - - auto txData = ProcessTxData(stmt, index); - if (!txData) { - throw std::runtime_error("Missing required fields for tx data in a row"); - } - - auto relatedContent = ProcessTxData(stmt, index); - - return {PocketHelpers::ShortTxTypeConvertor::strToType(type), *txData, relatedContent}; - } - - std::string ParseHash(sqlite3_stmt* stmt) - { - auto [ok, hash] = TryGetColumnString(stmt, m_startIndex+1); - if (!ok) { - throw std::runtime_error("Failed to extract tx hash from stmt"); - } - - return hash; - } - - std::optional> ParseOutputs(sqlite3_stmt* stmt) - { - auto [ok, str] = TryGetColumnString(stmt, m_startIndex + 9); - if (ok) { - return _parseOutputs(str); - } - return std::nullopt; - } - - protected: - std::optional ProcessTxData(sqlite3_stmt* stmt, int& index) - { - const auto i = index; - - static const auto stmtOffset = 17; - index += stmtOffset; - - auto [ok1, hash] = TryGetColumnString(stmt, i); - auto [ok2, txType] = TryGetColumnInt(stmt, i+1); - - if (ok1 && ok2) { - ShortTxData txData(hash, (PocketTx::TxType)txType); - if (auto [ok, val] = TryGetColumnString(stmt, i+2); ok) txData.SetAddress(val); - if (auto [ok, val] = TryGetColumnInt64(stmt, i+3); ok) txData.SetHeight(val); - if (auto [ok, val] = TryGetColumnInt64(stmt, i+4); ok) txData.SetBlockNum(val); - if (auto [ok, val] = TryGetColumnString(stmt, i+5); ok) txData.SetRootTxHash(val); - if (auto [ok, val] = TryGetColumnInt64(stmt, i+6); ok) txData.SetVal(val); - if (auto [ok, val] = TryGetColumnString(stmt, i+7); ok) txData.SetInputs(_parseOutputs(val)); - if (auto [ok, val] = TryGetColumnString(stmt, i+8); ok) txData.SetOutputs(_parseOutputs(val)); - if (auto [ok, val] = TryGetColumnString(stmt, i+9); ok) txData.SetDescription(val); - if (auto [ok, val] = TryGetColumnString(stmt, i+10); ok) txData.SetCommentParentId(val); - if (auto [ok, val] = TryGetColumnString(stmt, i+11); ok) txData.SetCommentAnswerId(val); - txData.SetAccount(_processAccount(stmt, i+12)); - if (auto [ok, val] = TryGetColumnString(stmt, i+16); ok) txData.SetMultipleAddresses(_processMultipleAddresses(val)); - return txData; - } - - return std::nullopt; - } - - std::optional _processAccount(sqlite3_stmt* stmt, const int& index) - { - auto [ok1, name] = TryGetColumnString(stmt, index); - auto [ok2, avatar] = TryGetColumnString(stmt, index+1); - auto [ok3, badge] = TryGetColumnString(stmt, index+2); - auto [ok4, reputation] = TryGetColumnInt64(stmt, index+3); - if (ok1 && ok4) { // TODO (losty): can there be no avatar? - return ShortAccount(name, avatar, badge, reputation); - } - return std::nullopt; - } - - std::optional> _parseOutputs(const std::string& jsonStr) - { - UniValue json (UniValue::VOBJ); - if (!json.read(jsonStr) || !json.isArray()) return std::nullopt; - std::vector res; - res.reserve(json.size()); - for (int i = 0; i < json.size(); i++) { - const auto& elem = json[i]; - ShortTxOutput output; - - if (elem.exists("TxHash") && elem["TxHash"].isStr()) output.SetTxHash(elem["TxHash"].get_str()); - if (elem.exists("Value") && elem["Value"].isNum()) output.SetValue(elem["Value"].get_int64()); - if (elem.exists("SpentTxHash") && elem["SpentTxHash"].isStr()) output.SetSpentTxHash(elem["SpentTxHash"].get_str()); - if (elem.exists("AddressHash") && elem["AddressHash"].isStr()) output.SetAddressHash(elem["AddressHash"].get_str()); - if (elem.exists("Number") && elem["Number"].isNum()) output.SetNumber(elem["Number"].get_int()); - if (elem.exists("ScriptPubKey") && elem["ScriptPubKey"].isStr()) output.SetScriptPubKey(elem["ScriptPubKey"].get_str()); - - res.emplace_back(std::move(output)); - } - - return res; - } - - std::optional>>> _processMultipleAddresses(const std::string& jsonStr) - { - UniValue json; - if (!json.read(jsonStr) || !json.isArray() || json.size() <= 0) return std::nullopt; - - std::vector>> multipleAddresses; - for (int i = 0; i < json.size(); i++) { - const auto& entry = json[i]; - if (!entry.isObject() || !entry.exists("address") || !entry["address"].isStr()) { - continue; - } - - auto address = entry["address"].get_str(); - std::optional accountData; - if (entry.exists("account")) { - const auto& account = entry["account"]; - if (account["name"].isStr()) { - ShortAccount accData; - accData.SetName(account["name"].get_str()); - if (account["avatar"].isStr()) accData.SetAvatar(account["avatar"].get_str()); - if (account["badge"].isStr()) accData.SetBadge(account["badge"].get_str()); - if (account["reputation"].isNull()) accData.SetReputation(account["reputation"].get_int64()); - accountData = std::move(accData); - } - } - - multipleAddresses.emplace_back(std::make_pair(std::move(address), std::move(accountData))); - } - - return multipleAddresses; - } - - private: - int m_startIndex = 0; - }; - - class EventsReconstructor : public RowAccessor - { - public: - EventsReconstructor() - { - m_parser.Reset(0); - } - void FeedRow(sqlite3_stmt* stmt) - { - m_result.emplace_back(std::move(m_parser.ParseFull(stmt))); - } - - std::vector GetResult() const - { - return m_result; - } - private: - ShortFormParser m_parser; - std::vector m_result; - }; - - class NotificationsReconstructor : public RowAccessor - { - public: - NotificationsReconstructor() { - m_parser.Reset(1); - } - - void FeedRow(sqlite3_stmt* stmt) - { - std::set notifiers; - auto [ok, addressOne] = TryGetColumnString(stmt, 0); - if (ok) { - notifiers.insert(addressOne); - } else { - if (auto outputs = m_parser.ParseOutputs(stmt); outputs) { - for (const auto& output: *outputs) { - if (output.GetAddressHash() && !output.GetAddressHash()->empty()) { - notifiers.insert(*output.GetAddressHash()); - } - } - } - } - if (notifiers.empty()) throw std::runtime_error("Missing address of notifier"); - - auto txHash = m_parser.ParseHash(stmt); - if (!m_notifications.HasData(txHash)) { - m_notifications.InsertData(m_parser.ParseFull(stmt)); - } - m_notifications.InsertNotifiers(txHash, notifiers); - } - NotificationsResult GetResult() const - { - return m_notifications; - } - private: - ShortFormParser m_parser; - NotificationsResult m_notifications; - }; - - class NotificationSummaryReconstructor : public RowAccessor - { - public: - void FeedRow(sqlite3_stmt* stmt) - { - auto [ok1, typeStr] = TryGetColumnString(stmt, 0); - auto [ok2, address] = TryGetColumnString(stmt, 1); - if (!ok1 || !ok2) return; - - if (auto type = PocketHelpers::ShortTxTypeConvertor::strToType(typeStr); type != ShortTxType::NotSet) { - m_result[address][type]++; - } - } - - auto GetResult() const - { - return m_result; - } - private: - std::map> m_result; - }; - - void WebRpcRepository::Init() {} void WebRpcRepository::Destroy() {} @@ -4990,7 +4684,6 @@ namespace PocketDb const int64_t& blockNumMax; } queryParams{address, heightMax, heightMin, blockNumMax}; - static const std::map&, QueryParams>> selects = { { ShortTxType::Answer, { R"sql( -- My answers to other's comments @@ -5001,7 +4694,9 @@ namespace PocketDb null, a.Height as Height, a.BlockNum as BlockNum, + a.Time, a.String2, + a.String3, null, null, null, @@ -5018,8 +4713,10 @@ namespace PocketDb c.String1, c.Height, c.BlockNum, + c.Time, c.String2, null, + null, ( select json_group_array(json_object( 'Value', Value, @@ -5044,9 +4741,9 @@ namespace PocketDb pc.String1, c.String4, c.String5, + null, -- Badge pca.String2, pca.String3, - null, -- Badge ifnull(rca.Value,0), null @@ -5104,7 +4801,9 @@ namespace PocketDb null, c.Height as Height, c.BlockNum as BlockNum, + c.Time, c.String2, + c.String3, null, ( select json_group_array(json_object( @@ -5140,16 +4839,18 @@ namespace PocketDb p.String1, p.Height, p.BlockNum, + p.Time, p.String2, null, null, null, + null, pp.String2, null, null, + null, pap.String2, pap.String3, - null, ifnull(rap.Value, 0), null @@ -5159,6 +4860,8 @@ namespace PocketDb on c.Type in (204, 205, 206) and c.String3 = p.String2 and c.String1 != p.String1 + and c.String4 is null + and c.String5 is null and c.Height > ? and (c.Height < ? or (c.Height = ? and c.BlockNum < ?)) and c.String1 = ? @@ -5210,6 +4913,8 @@ namespace PocketDb null, subs.Height as Height, subs.BlockNum as BlockNum, + subs.Time, + null, null, null, null, @@ -5227,6 +4932,9 @@ namespace PocketDb u.String1, u.Height, u.BlockNum, + u.Time, + null, + null, null, null, null, @@ -5236,7 +4944,6 @@ namespace PocketDb null, pu.String2, pu.String3, - null, ifnull(ru.Value,0), null @@ -5281,6 +4988,8 @@ namespace PocketDb null, s.Height as Height, s.BlockNum as BlockNum, + s.Time, + null, null, s.Int1, null, @@ -5298,7 +5007,9 @@ namespace PocketDb c.String1, c.Height, c.BlockNum, + c.Time, c.String2, + c.String3, null, ( select json_group_array(json_object( @@ -5324,9 +5035,9 @@ namespace PocketDb pc.String1, c.String4, c.String5, + null, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null @@ -5381,6 +5092,8 @@ namespace PocketDb null, s.Height as Height, s.BlockNum as BlockNum, + s.Time, + null, null, s.Int1, null, @@ -5398,16 +5111,18 @@ namespace PocketDb c.String1, c.Height, c.BlockNum, + c.Time, c.String2, null, null, null, + null, pc.String2, null, null, + null, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null @@ -5462,6 +5177,8 @@ namespace PocketDb null, tBoost.Height as Height, tBoost.BlockNum as BlockNum, + tBoost.Time, + null, null, null, ( @@ -5498,16 +5215,18 @@ namespace PocketDb tContent.String1, tContent.Height, tContent.BlockNum, + tContent.Time, tContent.String2, null, null, null, + null, pContent.String2, null, null, + null, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null @@ -5562,6 +5281,9 @@ namespace PocketDb ac.String1, b.Height as Height, b.BlockNum as BlockNum, + b.Time, + null, + null, null, null, null, @@ -5571,7 +5293,6 @@ namespace PocketDb null, pac.String2, pac.String3, - null, ifnull(rac.Value,0), ( select json_group_array( @@ -5615,6 +5336,8 @@ namespace PocketDb null, null, null, + null, + null, null from Transactions b indexed by Transactions_Type_String1_Height_Time_Int1 @@ -5682,64 +5405,6 @@ namespace PocketDb return reconstructor.GetResult(); } - std::map WebRpcRepository::GetShortAccountsForAddresses(const std::set& addresses) - { - auto sql = R"sql( - select - ac.String1, - p.String1, - p.String2, - p.String3, - ifnull(r.Value,0) - - from Transactions ac - - left join Payload p - on p.TxHash = ac.Hash - - left join Ratings r indexed by Ratings_Type_Id_Last_Height - on r.Type = 0 - and r.Id = ac.Id - and r.Last = 1 - - where ac.String1 in ( )sql" + join(vector(addresses.size(), "?"), ",") + R"sql( ) - and ac.Type = 100 - and ac.Last = 1 - )sql"; - - std::map res; - TryTransactionStep(__func__, [&]() - { - auto stmt = SetupSqlStatement(sql); - int i = 1; - - for (const auto& address: addresses) { - TryBindStatementText(stmt, i, address); - i++; - } - - while (sqlite3_step(*stmt) == SQLITE_ROW) - { - std::string address; - if (auto [ok, val] = TryGetColumnString(*stmt, 0); ok) - address = val; - else - continue; // TODO (losty): error - - ShortAccount acc; - if (auto [ok, val] = TryGetColumnString(*stmt, 1); ok) acc.SetLang(val); - if (auto [ok, val] = TryGetColumnString(*stmt, 2); ok) acc.SetName(val); - if (auto [ok, val] = TryGetColumnString(*stmt, 3); ok) acc.SetAvatar(val); - if (auto [ok, val] = TryGetColumnInt64(*stmt, 4); ok) acc.SetReputation(val); - res.insert({address, acc}); - } - - FinalizeSqlStatement(*stmt); - }); - - return res; - } - UniValue WebRpcRepository::GetNotifications(int64_t height, const std::set& filters) { struct QueryParams { @@ -5759,13 +5424,19 @@ namespace PocketDb ShortTxType::Money, { R"sql( -- Incoming money select - null, -- Will be filled + null, -- Will be filled + null, + null, + null, + null, (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Money) + R"sql(')TP, t.Hash, t.Type, null, t.Height as Height, t.BlockNum as BlockNum, + t.Time, + null, null, null, ( @@ -5780,11 +5451,27 @@ namespace PocketDb ), ( select json_group_array(json_object( - 'Value', Value, - 'AddressHash', AddressHash, - 'ScriptPubKey', ScriptPubKey - )) + 'Value', o.Value, + 'AddressHash', o.AddressHash, + 'ScriptPubKey', o.ScriptPubKey, + 'Account', json_object( + 'Lang', pna.String1, + 'Name', pna.String2, + 'Avatar', pna.String3, + 'Rep', ifnull(rna.Value,0) + ) + )) from TxOutputs o + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = o.AddressHash + left join Payload pna + on pna.TxHash = na.Hash + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 where o.TxHash = t.Hash and o.TxHeight = t.Height order by o.Number @@ -5803,12 +5490,18 @@ namespace PocketDb -- referals select t.String2, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Referal) + R"sql(')TP, t.Hash, t.Type, t.String1, t.Height as Height, t.BlockNum as BlockNum, + t.Time, + null, null, null, null, @@ -5816,9 +5509,9 @@ namespace PocketDb null, null, null, + p.String1, p.String2, p.String3, - null, ifnull(r.Value,0) -- TODO (losty): do we need rating if referal is always a new user? from Transactions t indexed by Transactions_Height_Type @@ -5831,6 +5524,19 @@ namespace PocketDb and r.Id = t.Id and r.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = t.String2 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where t.Type = 100 and t.String2 is not null and t.Height = ? @@ -5844,22 +5550,28 @@ namespace PocketDb -- Comment answers select c.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Answer) + R"sql(')TP, a.Hash, a.Type, a.String1, a.Height as Height, a.BlockNum as BlockNum, + a.Time, a.String2, + a.String3, null, null, null, pa.String1, a.String4, a.String5, + paa.String1, paa.String2, paa.String3, - null, ifnull(ra.Value,0), null, post.Hash, @@ -5867,16 +5579,18 @@ namespace PocketDb post.String1, post.Height, post.BlockNum, + post.Time, post.String2, null, null, null, null, null, + null, ppost.String2, + papost.String1, papost.String2, papost.String3, - null, ifnull(rapost.Value,0) from Transactions a indexed by Transactions_Height_Type -- Other answers @@ -5926,6 +5640,19 @@ namespace PocketDb and ra.Id = aa.Id and ra.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = c.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where a.Type = 204 -- only orig and a.Height = ? )sql", @@ -5937,13 +5664,19 @@ namespace PocketDb -- Comments for my content select p.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Comment) + R"sql(')TP, c.Hash, c.Type, c.String1, c.Height as Height, c.BlockNum as BlockNum, + c.Time, c.String2, + c.String3, null, ( select json_group_array(json_object( @@ -5969,9 +5702,9 @@ namespace PocketDb pc.String1, null, null, + pac.String1, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null, p.Hash, @@ -5979,10 +5712,12 @@ namespace PocketDb null, p.Height, p.BlockNum, + p.Time, p.String2, null, null, null, + null, pp.String2 from Transactions c indexed by Transactions_Height_Type @@ -6014,7 +5749,22 @@ namespace PocketDb left join Payload pp on pp.TxHash = p.Hash + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = p.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where c.Type = 204 -- only orig + and c.String4 is null + and c.String5 is null and c.Height = ? )sql", heightBinder @@ -6025,12 +5775,17 @@ namespace PocketDb -- Subscribers select subs.String2, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Subscriber) + R"sql(')TP, subs.Hash, subs.Type, subs.String1, subs.Height as Height, subs.BlockNum as BlockNum, + subs.Time, null, null, null, @@ -6038,9 +5793,10 @@ namespace PocketDb null, null, null, + null, + pu.String1, pu.String2, pu.String3, - null, ifnull(ru.Value,0) from Transactions subs indexed by Transactions_Height_Type @@ -6059,6 +5815,19 @@ namespace PocketDb and ru.Id = u.Id and ru.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = subs.String2 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where subs.Type in (302, 303) -- Ignoring unsubscribers? and subs.Height = ? )sql", @@ -6070,12 +5839,18 @@ namespace PocketDb -- Comment scores select c.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::CommentScore) + R"sql(')TP, s.Hash, s.Type, s.String1, s.Height as Height, s.BlockNum as BlockNum, + s.Time, + null, null, s.Int1, null, @@ -6083,9 +5858,9 @@ namespace PocketDb null, null, null, + pacs.String1, pacs.String2, pacs.String3, - null, ifnull(racs.Value,0), null, c.Hash, @@ -6094,6 +5869,7 @@ namespace PocketDb c.Height, -- TODO (losty): original? c.BlockNum, c.String2, + c.String3, null, null, null, @@ -6126,6 +5902,19 @@ namespace PocketDb and racs.Id = acs.Id and racs.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = c.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where s.Type = 301 and s.Height = ? )sql", @@ -6137,12 +5926,18 @@ namespace PocketDb -- Content scores select c.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::ContentScore) + R"sql(')TP, s.Hash, s.Type, s.String1, s.Height as Height, s.BlockNum as BlockNum, + s.Time, + null, null, s.Int1, null, @@ -6150,9 +5945,9 @@ namespace PocketDb null, null, null, + pacs.String1, pacs.String2, pacs.String3, - null, ifnull(racs.Value,0), null, c.Hash, @@ -6160,10 +5955,12 @@ namespace PocketDb null, c.Height, -- TODO (losty): original? c.BlockNum, + c.Time, c.String2, null, null, null, + null, ps.String2 from Transactions s indexed by Transactions_Height_Type @@ -6191,6 +5988,19 @@ namespace PocketDb and racs.Id = acs.Id and racs.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = c.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where s.Type = 300 and s.Height = ? )sql", @@ -6202,22 +6012,28 @@ namespace PocketDb -- Content from private subscribers select subs.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::PrivateContent) + R"sql(')TP, c.Hash, c.Type, c.String1, c.Height as Height, c.BlockNum as BlockNum, + c.Time, c.String2, null, null, null, + null, p.String2, null, null, + pac.String1, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null, r.Hash, @@ -6225,10 +6041,12 @@ namespace PocketDb r.String1, r.Height, r.BlockNum, + r.Time, r.String2, null, null, null, + null, pr.String2 from Transactions c indexed by Transactions_Height_Type -- content for private subscribers @@ -6239,7 +6057,7 @@ namespace PocketDb and subs.String2 = c.String1 and subs.Height > 0 - left join Transactions r -- related content - possible reposts + left join Transactions r indexed by Transactions_Type_Last_String2_Height -- related content - possible reposts on r.String2 = c.String3 and r.Type in (200,201,202) and r.Last = 1 @@ -6264,6 +6082,19 @@ namespace PocketDb and rac.Id = ac.Id and rac.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = subs.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where c.Type in (200,201,202) and c.Hash = c.String2 -- only orig and c.Height = ? @@ -6276,14 +6107,20 @@ namespace PocketDb -- Boosts for my content select tContent.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Boost) + R"sql(')TP, tBoost.Hash, tboost.Type, tBoost.String1, tBoost.Height as Height, tBoost.BlockNum as BlockNum, + tBoost.Time, tBoost.String2, null, + null, ( select json_group_array(json_object( 'Value', Value, @@ -6308,9 +6145,9 @@ namespace PocketDb null, null, null, + pac.String1, pac.String2, pac.String3, - null, ifnull(rac.Value,0), null, tContent.Hash, @@ -6318,10 +6155,12 @@ namespace PocketDb null, tContent.Height, tContent.BlockNum, + tContent.Time, tContent.String2, null, null, null, + null, pContent.String2 from Transactions tBoost indexed by Transactions_Type_Last_Height_Id @@ -6349,6 +6188,19 @@ namespace PocketDb and rac.Id = ac.Id and rac.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = tContent.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where tBoost.Type in (208) and tBoost.Last in (0,1) and tBoost.Height = ? @@ -6361,22 +6213,28 @@ namespace PocketDb -- Reposts select p.String1, + pna.String1, + pna.String2, + pna.String3, + ifnull(rna.Value,0), (')sql" + ShortTxTypeConvertor::toString(ShortTxType::Repost) + R"sql(')TP, r.Hash, r.Type, r.String1, r.Height as Height, r.BlockNum as BlockNum, + r.Time, r.String2, null, null, null, + null, pr.String2, null, null, + par.String1, par.String2, par.String3, - null, ifnull(rar.Value,0), null, p.Hash, @@ -6384,10 +6242,12 @@ namespace PocketDb null, p.Height, p.BlockNum, + p.Time, p.String2, null, null, null, + null, pp.String2 from Transactions r @@ -6418,6 +6278,19 @@ namespace PocketDb and rar.Id = ar.Id and rar.Last = 1 + left join Transactions na indexed by Transactions_Type_Last_String1_String2_Height + on na.Type = 100 + and na.Last = 1 + and na.String1 = p.String1 + + left join Payload pna + on pna.TxHash = na.Hash + + left join Ratings rna indexed by Ratings_Type_Id_Last_Height + on rna.Type = 0 + and rna.Id = na.Id + and rna.Last = 1 + where r.Type in (200,201,202) and r.Hash = r.String2 -- Only orig and r.Height = ? @@ -6447,10 +6320,8 @@ namespace PocketDb }); } } - auto notificationResult = reconstructor.GetResult(); - auto accsData = GetShortAccountsForAddresses(notificationResult.GetNotifiersAddresses()); - return notificationResult.Serialize(accsData); + return notificationResult.Serialize(); } std::vector WebRpcRepository::GetEventsForAddresses(const std::string& address, int64_t heightMax, int64_t heightMin, int64_t blockNumMax, const std::set& filters) @@ -6685,6 +6556,8 @@ namespace PocketDb and c.String3 = p.String2 and c.String1 != p.String1 and c.Hash = c.String2 + and c.String4 is null + and c.String5 is null and c.Height > ? and (c.Height < ? or (c.Height = ? and c.BlockNum < ?)) @@ -7211,6 +7084,8 @@ namespace PocketDb where c.Type = 204 -- only orig and c.Last in (0,1) + and c.String4 is null + and c.String5 is null and c.Height between ? and ? )sql", [this](std::shared_ptr& stmt, int& i, QueryParams const& queryParams){ diff --git a/src/pocketdb/repositories/web/WebRpcRepository.h b/src/pocketdb/repositories/web/WebRpcRepository.h index f0b9c0c50..629a201a8 100644 --- a/src/pocketdb/repositories/web/WebRpcRepository.h +++ b/src/pocketdb/repositories/web/WebRpcRepository.h @@ -172,8 +172,6 @@ namespace PocketDb */ UniValue GetNotifications(int64_t height, const std::set& filters); - std::map GetShortAccountsForAddresses(const std::set& addresses); - /** * Get all activities (posts, comments, etc) created by address * diff --git a/src/staker.cpp b/src/staker.cpp index 2852dea2f..be21a61ce 100644 --- a/src/staker.cpp +++ b/src/staker.cpp @@ -136,7 +136,7 @@ void Staker::worker(const util::Ref& context, CChainParams const& chainparams, s continue; } - while (wallet->IsLocked()) + while (wallet->IsLocked() && !ShutdownRequested()) { nLastCoinStakeSearchInterval = 0; m_interrupt.sleep_for(std::chrono::milliseconds{1000}); diff --git a/src/websocket/notifyprocessor.cpp b/src/websocket/notifyprocessor.cpp index 9f48f896c..18f069e92 100644 --- a/src/websocket/notifyprocessor.cpp +++ b/src/websocket/notifyprocessor.cpp @@ -236,23 +236,24 @@ void NotifyBlockProcessor::Process(std::pair entry) PrepareWSMessage(messages, "event", response["contentAddress"].get_str(), txid, txtime, cFields); } } - else if (optype == "userInfo") - { - auto response = notifierRepoInst->GetUserReferrerAddress(txid); - if (response.exists("referrerAddress")) - { - custom_fields cFields - { - {"mesType", optype}, - {"addrFrom", addr.first}, - {"nameFrom", response["referralName"].get_str()} - }; - if (response.exists("referralAvatar")) - cFields.emplace("avatarFrom",response["referralAvatar"].get_str()); - - PrepareWSMessage(messages, "event", response["referrerAddress"].get_str(), txid, txtime, cFields); - } - } + // Not used. Not planned yet. Invalid request. +// else if (optype == "userInfo") +// { +// auto response = notifierRepoInst->GetUserReferrerAddress(txid); +// if (response.exists("referrerAddress")) +// { +// custom_fields cFields +// { +// {"mesType", optype}, +// {"addrFrom", addr.first}, +// {"nameFrom", response["referralName"].get_str()} +// }; +// if (response.exists("referralAvatar")) +// cFields.emplace("avatarFrom",response["referralAvatar"].get_str()); +// +// PrepareWSMessage(messages, "event", response["referrerAddress"].get_str(), txid, txtime, cFields); +// } +// } else if (optype == "upvoteShare") { auto response = notifierRepoInst->GetPostInfoAddressByScore(txid);