From 5216f6bea001681196497ea2dddef37822b70fcf Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Thu, 7 Mar 2024 19:21:19 +0100 Subject: [PATCH 1/7] allow -ac_private for the ZOMBIE test chain Better solution for the issues mentioned in https://github.com/KomodoPlatform/komodo/pull/589 . --- src/komodo_utils.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/komodo_utils.cpp b/src/komodo_utils.cpp index 5f1915f4fa1..f79504568d9 100644 --- a/src/komodo_utils.cpp +++ b/src/komodo_utils.cpp @@ -1552,16 +1552,25 @@ void komodo_args(char *argv0) if ( !chainName.isKMD() ) { BITCOIND_RPCPORT = GetArg("-rpcport", ASSETCHAINS_RPCPORT); + //fprintf(stderr,"(%s) port.%u chain params initialized\n",chainName.symbol().c_str(),BITCOIND_RPCPORT); if ( chainName.isSymbol("PIRATE") && ASSETCHAINS_HALVING[0] == 77777 ) { ASSETCHAINS_HALVING[0] *= 5; fprintf(stderr,"PIRATE halving changed to %d %.1f days ASSETCHAINS_LASTERA.%llu\n",(int32_t)ASSETCHAINS_HALVING[0],(double)ASSETCHAINS_HALVING[0]/1440,(long long)ASSETCHAINS_LASTERA); } - else if ( ASSETCHAINS_PRIVATE != 0 ) + + // Chains for which the use of "-ac_private" is permitted. + const std::set allowedPrivateOnly = {"PIRATE", "ZOMBIE"}; + + if ( ASSETCHAINS_PRIVATE != 0 && allowedPrivateOnly.count(chainName.ToString()) == 0) { - fprintf(stderr,"-ac_private for a non-PIRATE chain is not supported. The only reason to have an -ac_private chain is for total privacy and that is best achieved with the largest anon set. PIRATE has that and it is recommended to just use PIRATE\n"); + fprintf(stderr, "-ac_private for a non-PIRATE chain is not supported.\n" + "The only reason to have an -ac_private chain is for total\n" + "privacy and that is best achieved with the largest anon set.\n" + "PIRATE has that and it is recommended to just use PIRATE\n"); StartShutdown(); + throw std::invalid_argument("-ac_private for a non-PIRATE chain is not supported."); } // Set cc enables for all existing ac_cc chains here. if ( chainName.isSymbol("AXO") ) From 4783c0b06e053cd203263472ef4dfc8a812243c4 Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 8 Aug 2024 17:45:25 +0800 Subject: [PATCH 2/7] add season 8 pubkeys --- src/komodo_hardfork.cpp | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index 14d4818ec96..11d3baa7893 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -550,5 +550,69 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"dragonhound_EU", "0286d7af8583e18127bd1f45730916b4f48ae3e0c90181b2745174b91b76c6e28b"}, {"dragonhound_NA", "0306476ea5fb67aec667172a9bb30646dbff195b84c30ac958175af9b475987802"}, {"dragonhound_DEV", "02f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdaf"} + }, + { + {"alright_DEV", "028548847b3bbccff37c9b47bc4154183304902773d514b792ec2adc91e600e3b9"}, // 0 + {"alien_AR", "03a40091ce1e7aa9863d9ad0c27f67b7d18bb47612438570ce344cd1782937c575"}, + {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd"}, + {"alien_NA", "03bea1ac333b95c8669ec091907ea8713cae26f74b9e886e13593400e21c4d30a8"}, + {"alien_SH", "03911a60395801082194b6834244fa78a3c30ff3e888667498e157b4aa80b0a65f"}, + {"alienx_EU", "026afe5b112d1b39e0edafd5e051e261a676104460581f3673f26ceff7f1e6c56c"}, + {"alienx_NA", "02f0b3ef87629509441b1ae95f28108f258a81910e483b90e0496205e24e7069b8"}, + {"artist_SH", "023f9632eb3dc7fd1cfd700bb58de2da51bfa5898838586f49afdd145bddac16b6"}, + {"batman_EU", "0358441eca9d8d24cd756fb3308fd7c9d60fe2b5af702ce5c9c1429cbea7a4c284"}, + {"blackice_AR", "02bbc5518d27918d77c46b4e3ad0b9df936df520646527ab4c2f206544a2b03967"}, + {"blackice_EU", "02340bf4749a392865b0ddaf37e652195e740c7538aeac87f7a51b8bf2dcdc24ac"}, // 10 + {"blackice_NA", "035baa12331ad6c284d5f1b76527c1d6c5eb15a74b9ba369e5d46aefcc9c120938"}, + {"blackice_SH", "02c275d12560b2c8238b8a10a8fc8da891784eb7b2ff5d3310ebcb666e47579571"}, + {"blackice2_AR", "03d224790d17b881db560759cc9cc73fe5c865136a88af471ea156b7eb6d88ce32"}, + {"ca333_EU", "030a18ffa85e2928ed37b2e30dbeb9bfb30b21fb15c5c4bcbd61d26b945e398e2b"}, + {"chmex_AR", "036c856ea778ea105b93c0be187004d4e51161eda32888aa307b8f72d490884005"}, + {"chmex_EU", "025b7209ba37df8d9695a23ea706ea2594863ab09055ca6bf485855937f3321d1d"}, + {"chmex_NA", "030c2528c29d5328243c910277e3d74aa77c9b4e145308007d2b11550731591dbe"}, + {"chmex_SH", "02698305eb3c27a2c724efd2152f9250739355116f201656c34b83aac2d3aebd19"}, + {"chmexvet_SH", "02d27ed1cddfbaff9e47865e7df0165457e8f075f70bbea8c0498598ccf494555d"}, + {"cipi_AR", "033ae024cdb748e083406a2e20037017a1292079ad6a8161ae5b43f398724fea74"}, // 20 + {"cipi_EU", "03d6e1f3a693b5d69049791005d7cb64c259a1ad85833f5a9c545d4fee29905009"}, + {"cipi_NA", "036cc1d7476e4260601927be0fc8b748ae68d8fec8f5c498f71569a01bd92046c5"}, // 10 + {"dimxy_AR", "02689d0b77b1e8e8c93a102d8b689fd08179164d70e2dd585543c3896a0916e6a1"}, + {"dragonhound_AR", "030a72f1a15f67624aea55743c5b777bdd55362596add77b544ee2e582bdebf0c7"}, + {"dragonhound_EU", "0286d7af8583e18127bd1f45730916b4f48ae3e0c90181b2745174b91b76c6e28b"}, + {"dragonhound_NA", "0306476ea5fb67aec667172a9bb30646dbff195b84c30ac958175af9b475987802"}, + {"dragonhound_SH", "02fe8e5a64979bc8e55b24e121182d2f1948e00a050c77407edbfc9cc8c012d679"}, + {"fediakash_AR", "027dfe5403f8870fb0e1b94a2b4204373b31ea73179ba500a88dd56d22855cd03b"}, // 30 + {"fediakash_NA", "024b31751c90dd9bd31e9a419be54d6f6cb7f4a85ea475359852ab645124010290"}, + {"francois_SH", "02fdbb8fdfa4b859e1a21c30824f8c04e15c8886b1e1cab5d9d0bd89c353eb9710"}, + {"gcharang_AR", "030de3d833ba049da08231ca6b622c77c7f96b26269963291d9604706bb94031a5"}, + {"gcharang_SH", "02cb445948bf0d89f8d61102e12a5ee6e98be61ac7c2cb9ba435219ea9db967117"}, + {"gcharang2_SH", "02567b688c180212df97b65273e70512f5f1f5edd20eb5fb85c7efa2a510e363d7"}, + {"kmdude_SH", "02116774b25226d0b99f70a24f55c5ce17a7af6d3522071369c233157ecb27b82a"}, + {"marmarachain_AR", "0335ab9e59d602df5580b964b6451d02cd9cc243ddf01b065db84375488df9f53c"}, + {"marmarachain_EU", "0234e40800500370d43979586ee2cec2e777a0368d10c682e78bca30fd1630c18d"}, + {"mcrypt_NA", "03ccaa74304165e0d66968c3f714942a130d67f02db1c2f910a75dfc15c0d3d58f"}, + {"naezith_EU", "038f61a0418deafdb9fa8809a5df0956943f423364022cab578c3fcb158f3dfc55"}, // 40 + {"naezith_NA", "033d9e2e3e51627b4cf9fec2ddbaadfd76a50965d423a2741e5b0db6ab13a057af"}, + {"onuz-ozkan_EU", "03c159a0733fb3d15d0b6e7eb67568343c10891eb6f1e8ab0ae6fbe9e33af17bc0"}, + {"onuz-ozkan_NA", "02be4ac61cf534b0fb98568ec539ee9e34c5104088f94f21cee2945d37d88373da"}, + {"pbca26_NA", "024034ed324e69316d6f6d554168b56828e40334f99d7adfe4ef9248c49d433e12"}, + {"ptyx_SH", "02ac5e2bc7bd5372395eab76c56951f699af617cd4e1fa2926eb7318e9caecd531"}, + {"shamardy_SH", "026d378de09ba51d8f56be52bc8d02f5e20bae843406e23686047b76c72412a7b3"}, + {"smdmitry_AR", "022a2a45979a6631a25e4c96469423de720a2f4c849548957c35a35c91041ee7ac"}, + {"smdmitry2_AR", "026e33b213be94fa7c05c781cb1d2fb381e4c4ef6aad40d6a67f0a8ad573d92efe"}, + {"smdmitry_EU", "02eb3aad81778f8d6f7e5295c44ca224e5c812f5e43fc1e9ce4ebafc23324183c9"}, + {"smdmitry_NA", "020580cbdfc051bdac9e5d05fe9a6b6a15885fbd3989c6662001f2399c6e0d7e4c"}, // 50 + {"smdmitry_SH", "02d01cd6b87cbf5a9795c06968f0d169168c1be0d82cfeb79958b11ae2c30316c1"}, + {"strob_SH", "025ceac4256cef83ca4b110f837a71d70a5a977ecfdf807335e00bc78b560d451a"}, + {"gcharang_DEV", "033b82b5791c65477dd11095cf33332013df6d2bcb7aa06a6dae5f7b22b6959b0b"}, + {"dimxy_DEV", "039a01cd626d5efbe7fd05a59d8e5fced53bacac589192278f9b00ad31654b6956"}, + {"ca333_DEV", "03cf925a2d7d697448c3ac6fff9aff349b80d773b4ce7de22c9ef7e2c8c002bec6"}, + {"qa_DEV", "036f42e1888378068c3a17a53665b0a9db21465571d63ca02eb8d5681afa709074"}, + {"core_DEV", "035509136135ba8e3f5d4733f7a9c160c2e1fefd8dc4658c3d95a5407e8da14749"}, + {"security_DEV", "022450f4f32435372b43dc2b9d5b690114fbe5e5dcbe0c02ab8164698f1a9eda6e"}, + {"tonyl_AR", "0277bbdf6403d1ebaac5a715a9120118e74be0d3bed71a2c8cf5542fb6ca7d2dd7"}, + {"van_EU", "03af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812f"}, // 60 + {"who-biz_AR", "03057d4c00c4e18f72faa4234aada9ad17ecd4bd9455c548edef16b94befa1a087"}, + {"who-biz_NA", "03170d900f6d6a13002255b708f7bd27e55b5c05d1ddbaf8c25a1fc287d9f804ed"}, + {"dragonhound_DEV", "02f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdaf"} } }; From d96668c224a2554a99ec85a7bfadd43989823a5e Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 8 Aug 2024 17:47:21 +0800 Subject: [PATCH 3/7] rm misplaced comment --- src/komodo_hardfork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index 11d3baa7893..daef7900854 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -574,7 +574,7 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"chmexvet_SH", "02d27ed1cddfbaff9e47865e7df0165457e8f075f70bbea8c0498598ccf494555d"}, {"cipi_AR", "033ae024cdb748e083406a2e20037017a1292079ad6a8161ae5b43f398724fea74"}, // 20 {"cipi_EU", "03d6e1f3a693b5d69049791005d7cb64c259a1ad85833f5a9c545d4fee29905009"}, - {"cipi_NA", "036cc1d7476e4260601927be0fc8b748ae68d8fec8f5c498f71569a01bd92046c5"}, // 10 + {"cipi_NA", "036cc1d7476e4260601927be0fc8b748ae68d8fec8f5c498f71569a01bd92046c5"}, {"dimxy_AR", "02689d0b77b1e8e8c93a102d8b689fd08179164d70e2dd585543c3896a0916e6a1"}, {"dragonhound_AR", "030a72f1a15f67624aea55743c5b777bdd55362596add77b544ee2e582bdebf0c7"}, {"dragonhound_EU", "0286d7af8583e18127bd1f45730916b4f48ae3e0c90181b2745174b91b76c6e28b"}, From acca0f9b4f4e3844b009c71f70239d2c55f94a6c Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 8 Aug 2024 17:49:19 +0800 Subject: [PATCH 4/7] fix index comments --- src/komodo_hardfork.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index daef7900854..a8747f98b0f 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -575,6 +575,8 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"cipi_AR", "033ae024cdb748e083406a2e20037017a1292079ad6a8161ae5b43f398724fea74"}, // 20 {"cipi_EU", "03d6e1f3a693b5d69049791005d7cb64c259a1ad85833f5a9c545d4fee29905009"}, {"cipi_NA", "036cc1d7476e4260601927be0fc8b748ae68d8fec8f5c498f71569a01bd92046c5"}, + {"cipi2_NA", "0306531923dbd4517d15e932668b64cbf95cc6c4293e46c8b5825c6543e0f06b15"}, + {"colmapol_EU", "020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40d"}, {"dimxy_AR", "02689d0b77b1e8e8c93a102d8b689fd08179164d70e2dd585543c3896a0916e6a1"}, {"dragonhound_AR", "030a72f1a15f67624aea55743c5b777bdd55362596add77b544ee2e582bdebf0c7"}, {"dragonhound_EU", "0286d7af8583e18127bd1f45730916b4f48ae3e0c90181b2745174b91b76c6e28b"}, From 283d6b40da10bf12a7e0de3ba4a69f948c44bbf7 Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 8 Aug 2024 20:29:30 +0800 Subject: [PATCH 5/7] fix Onur name --- src/komodo_hardfork.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index a8747f98b0f..d6f1e0a451d 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -594,8 +594,8 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"mcrypt_NA", "03ccaa74304165e0d66968c3f714942a130d67f02db1c2f910a75dfc15c0d3d58f"}, {"naezith_EU", "038f61a0418deafdb9fa8809a5df0956943f423364022cab578c3fcb158f3dfc55"}, // 40 {"naezith_NA", "033d9e2e3e51627b4cf9fec2ddbaadfd76a50965d423a2741e5b0db6ab13a057af"}, - {"onuz-ozkan_EU", "03c159a0733fb3d15d0b6e7eb67568343c10891eb6f1e8ab0ae6fbe9e33af17bc0"}, - {"onuz-ozkan_NA", "02be4ac61cf534b0fb98568ec539ee9e34c5104088f94f21cee2945d37d88373da"}, + {"onur-ozkan_EU", "03c159a0733fb3d15d0b6e7eb67568343c10891eb6f1e8ab0ae6fbe9e33af17bc0"}, + {"onur-ozkan_NA", "02be4ac61cf534b0fb98568ec539ee9e34c5104088f94f21cee2945d37d88373da"}, {"pbca26_NA", "024034ed324e69316d6f6d554168b56828e40334f99d7adfe4ef9248c49d433e12"}, {"ptyx_SH", "02ac5e2bc7bd5372395eab76c56951f699af617cd4e1fa2926eb7318e9caecd531"}, {"shamardy_SH", "026d378de09ba51d8f56be52bc8d02f5e20bae843406e23686047b76c72412a7b3"}, From 9fbab363f56eba11db026c2a26681dbe422f8dab Mon Sep 17 00:00:00 2001 From: smk762 Date: Thu, 8 Aug 2024 22:55:15 +0800 Subject: [PATCH 6/7] add season 8 hardfork constants --- src/komodo_hardfork.cpp | 3 +++ src/komodo_hardfork.h | 29 ++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index d6f1e0a451d..632a42ae289 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -15,6 +15,9 @@ const int32_t nS6HardforkHeight = 2963330; // dPoW Season 6, Fri Jun 24 2022 const uint32_t nS7Timestamp = 1688132253; // dPoW Season 7, Fri Jun 30 2023 13:37:33 GMT+0000 const int32_t nS7HardforkHeight = 3484958; // dPoW Season 7, Fri Jun 30 2023 +const uint32_t nS8Timestamp = 1728049053; // dPoW Season 8, Fri Oct 4 2024 13:37:33 GMT+0000 +const int32_t nS8HardforkHeight = 4125988; // dPoW Season 8, Fri Oct 4 2024 (est. via https://github.com/KomodoPlatform/NotaryNodes/blob/master/utils/estimate_hf_block.py) + // Era array of pubkeys. Add extra seasons to bottom as requried, after adding appropriate info above. const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = { diff --git a/src/komodo_hardfork.h b/src/komodo_hardfork.h index 6692c81b121..898ce160367 100644 --- a/src/komodo_hardfork.h +++ b/src/komodo_hardfork.h @@ -1,7 +1,7 @@ #pragma once #include -#define NUM_KMD_SEASONS 8 +#define NUM_KMD_SEASONS 9 #define NUM_KMD_NOTARIES 64 extern const uint32_t nStakedDecemberHardforkTimestamp; //December 2019 hardfork @@ -19,8 +19,31 @@ extern const int32_t nS6HardforkHeight; // dPoW Season 6, Fri Jun 24 2022 extern const uint32_t nS7Timestamp; // dPoW Season 7, Fri Jun 30 2023 13:37:33 GMT+0000 extern const int32_t nS7HardforkHeight; // dPoW Season 7, Fri Jun 30 2023 -static const uint32_t KMD_SEASON_TIMESTAMPS[NUM_KMD_SEASONS] = {1525132800, 1563148800, nStakedDecemberHardforkTimestamp, nS4Timestamp, nS5Timestamp, nS6Timestamp, nS7Timestamp, 1951328000}; -static const int32_t KMD_SEASON_HEIGHTS[NUM_KMD_SEASONS] = {814000, 1444000, nDecemberHardforkHeight, nS4HardforkHeight, nS5HardforkHeight, nS6HardforkHeight, nS7HardforkHeight, 8113400}; +extern const uint32_t nS8Timestamp; // dPoW Season 8, Fri Oct 4 2024 13:37:33 GMT+0000 +extern const int32_t nS8HardforkHeight; // dPoW Season 8, Fri Oct 4 2024 + +static const uint32_t KMD_SEASON_TIMESTAMPS[NUM_KMD_SEASONS] = { + 1525132800, + 1563148800, + nStakedDecemberHardforkTimestamp, + nS4Timestamp, + nS5Timestamp, + nS6Timestamp, + nS7Timestamp, + nS8Timestamp, + 1951328000 +}; +static const int32_t KMD_SEASON_HEIGHTS[NUM_KMD_SEASONS] = { + 814000, + 1444000, + nDecemberHardforkHeight, + nS4HardforkHeight, + nS5HardforkHeight, + nS6HardforkHeight, + nS7HardforkHeight, + nS8HardforkHeight, + 8113400 +}; extern char NOTARYADDRS[64][64]; extern char NOTARY_ADDRESSES[NUM_KMD_SEASONS][64][64]; From 040daa5321dbc7fe3c7e8d473d57e38e0470cbca Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Mon, 12 Aug 2024 20:11:10 +0200 Subject: [PATCH 7/7] add S8 label in notaries_elected --- src/komodo_hardfork.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/komodo_hardfork.cpp b/src/komodo_hardfork.cpp index adf55784d2c..ad53af9fd60 100644 --- a/src/komodo_hardfork.cpp +++ b/src/komodo_hardfork.cpp @@ -559,6 +559,7 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] = {"dragonhound_DEV", "02f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdaf"} }, { + // Season 8 {"alright_DEV", "028548847b3bbccff37c9b47bc4154183304902773d514b792ec2adc91e600e3b9"}, // 0 {"alien_AR", "03a40091ce1e7aa9863d9ad0c27f67b7d18bb47612438570ce344cd1782937c575"}, {"alien_EU", "03bb749e337b9074465fa28e757b5aa92cb1f0fea1a39589bca91a602834d443cd"},