Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Season 8 pubkeys and update hardfork constants #620

Merged
merged 9 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 67 additions & 67 deletions src/komodo_hardfork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ 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 = 1726321053; // dPoW Season 8, Sat Sep 14 2024 13:37:33 GMT+0000
const int32_t nS8HardforkHeight = 4100333; // dPoW Season 8, Sat Sep 14 2024
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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current estimation for height 4125988 is October 1st

cc @DeckerSU @smk762

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should be (re)calculated as late as possible to make it as accurate as possible wrt to recent/anticipated block production rate.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will recalc tonight and include in #623

Copy link

@DeckerSU DeckerSU Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created my own script for these calculations, which you can find here: estimate-blocks.py. According to my calculations, we have the following:

- Average blocks per day: 1370.96
- Minimum blocks per day: 1260
- Maximum blocks per day: 1457
- Current height: 4063104
- Days to future: 45
- Estimated block height at 2024-10-04 13:37:33: 4124797

Based on this, October 4th corresponds to approximately block 4124797 on average. Currently, we have 4125988 hardcoded, which should occur later than 2024-10-04 13:37:33. So, my guess is that 4125988 is okay.


const int32_t nKIP0003Activation = nS8HardforkHeight;

Expand Down Expand Up @@ -559,71 +559,71 @@ const char *notaries_elected[NUM_KMD_SEASONS][NUM_KMD_NOTARIES][2] =
{"dragonhound_DEV", "02f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdaf"}
},
{
// Season 8 (placeholder)
{"nodename_0", "0000000000000000000000000000000000000000000000000000000000000000"}, // 0
{"nodename_1", "0000000000000000000000000000000000000000000000000000000000000001"},
{"nodename_2", "0000000000000000000000000000000000000000000000000000000000000002"},
{"nodename_3", "0000000000000000000000000000000000000000000000000000000000000003"},
{"nodename_4", "0000000000000000000000000000000000000000000000000000000000000004"},
{"nodename_5", "0000000000000000000000000000000000000000000000000000000000000005"},
{"nodename_6", "0000000000000000000000000000000000000000000000000000000000000006"},
{"nodename_7", "0000000000000000000000000000000000000000000000000000000000000007"},
{"nodename_8", "0000000000000000000000000000000000000000000000000000000000000008"},
{"nodename_9", "0000000000000000000000000000000000000000000000000000000000000009"},
{"nodename_10", "0000000000000000000000000000000000000000000000000000000000000010"}, // 10
{"nodename_11", "0000000000000000000000000000000000000000000000000000000000000011"},
{"nodename_12", "0000000000000000000000000000000000000000000000000000000000000012"},
{"nodename_13", "0000000000000000000000000000000000000000000000000000000000000013"},
{"nodename_14", "0000000000000000000000000000000000000000000000000000000000000014"},
{"nodename_15", "0000000000000000000000000000000000000000000000000000000000000015"},
{"nodename_16", "0000000000000000000000000000000000000000000000000000000000000016"},
{"nodename_17", "0000000000000000000000000000000000000000000000000000000000000017"},
{"nodename_18", "0000000000000000000000000000000000000000000000000000000000000018"},
{"nodename_19", "0000000000000000000000000000000000000000000000000000000000000019"},
{"nodename_20", "0000000000000000000000000000000000000000000000000000000000000020"}, // 20
{"nodename_21", "0000000000000000000000000000000000000000000000000000000000000021"},
{"nodename_22", "0000000000000000000000000000000000000000000000000000000000000022"},
{"nodename_23", "0000000000000000000000000000000000000000000000000000000000000023"},
{"nodename_24", "0000000000000000000000000000000000000000000000000000000000000024"},
{"nodename_25", "0000000000000000000000000000000000000000000000000000000000000025"},
{"nodename_26", "0000000000000000000000000000000000000000000000000000000000000026"},
{"nodename_27", "0000000000000000000000000000000000000000000000000000000000000027"},
{"nodename_28", "0000000000000000000000000000000000000000000000000000000000000028"},
{"nodename_29", "0000000000000000000000000000000000000000000000000000000000000029"},
{"nodename_30", "0000000000000000000000000000000000000000000000000000000000000030"}, // 30
{"nodename_31", "0000000000000000000000000000000000000000000000000000000000000031"},
{"nodename_32", "0000000000000000000000000000000000000000000000000000000000000032"},
{"nodename_33", "0000000000000000000000000000000000000000000000000000000000000033"},
{"nodename_34", "0000000000000000000000000000000000000000000000000000000000000034"},
{"nodename_35", "0000000000000000000000000000000000000000000000000000000000000035"},
{"nodename_36", "0000000000000000000000000000000000000000000000000000000000000036"},
{"nodename_37", "0000000000000000000000000000000000000000000000000000000000000037"},
{"nodename_38", "0000000000000000000000000000000000000000000000000000000000000038"},
{"nodename_39", "0000000000000000000000000000000000000000000000000000000000000039"},
{"nodename_40", "0000000000000000000000000000000000000000000000000000000000000040"}, // 40
{"nodename_41", "0000000000000000000000000000000000000000000000000000000000000041"},
{"nodename_42", "0000000000000000000000000000000000000000000000000000000000000042"},
{"nodename_43", "0000000000000000000000000000000000000000000000000000000000000043"},
{"nodename_44", "0000000000000000000000000000000000000000000000000000000000000044"},
{"nodename_45", "0000000000000000000000000000000000000000000000000000000000000045"},
{"nodename_46", "0000000000000000000000000000000000000000000000000000000000000046"},
{"nodename_47", "0000000000000000000000000000000000000000000000000000000000000047"},
{"nodename_48", "0000000000000000000000000000000000000000000000000000000000000048"},
{"nodename_49", "0000000000000000000000000000000000000000000000000000000000000049"},
{"nodename_50", "0000000000000000000000000000000000000000000000000000000000000050"}, // 50
{"nodename_51", "0000000000000000000000000000000000000000000000000000000000000051"},
{"nodename_52", "0000000000000000000000000000000000000000000000000000000000000052"},
{"nodename_53", "0000000000000000000000000000000000000000000000000000000000000053"},
{"nodename_54", "0000000000000000000000000000000000000000000000000000000000000054"},
{"nodename_55", "0000000000000000000000000000000000000000000000000000000000000055"},
{"nodename_56", "0000000000000000000000000000000000000000000000000000000000000056"},
{"nodename_57", "0000000000000000000000000000000000000000000000000000000000000057"},
{"nodename_58", "0000000000000000000000000000000000000000000000000000000000000058"},
{"nodename_59", "0000000000000000000000000000000000000000000000000000000000000059"},
{"nodename_60", "0000000000000000000000000000000000000000000000000000000000000060"}, // 60
{"nodename_61", "0000000000000000000000000000000000000000000000000000000000000061"},
{"nodename_62", "0000000000000000000000000000000000000000000000000000000000000062"},
{"nodename_63", "0000000000000000000000000000000000000000000000000000000000000063"}
// Season 8
{"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"},
{"cipi2_NA", "0306531923dbd4517d15e932668b64cbf95cc6c4293e46c8b5825c6543e0f06b15"},
{"colmapol_EU", "020c63078b5f5d27183de6f2bbae9bfe3fc57e017faf89b7d566bb947a92a2e40d"},
{"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"},
{"onur-ozkan_EU", "03c159a0733fb3d15d0b6e7eb67568343c10891eb6f1e8ab0ae6fbe9e33af17bc0"},
{"onur-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", "03955c7999538cee313bf196a7df59db208c651f6a5a1b0eed94732ba753b4f3f4"},
{"security_DEV", "022450f4f32435372b43dc2b9d5b690114fbe5e5dcbe0c02ab8164698f1a9eda6e"},
{"tonyl_AR", "0277bbdf6403d1ebaac5a715a9120118e74be0d3bed71a2c8cf5542fb6ca7d2dd7"},
{"van_EU", "03af7f8c82f20671ca1978116353839d3e501523e379bfb52b1e05d7816bb5812f"}, // 60
{"who-biz_AR", "03057d4c00c4e18f72faa4234aada9ad17ecd4bd9455c548edef16b94befa1a087"},
{"who-biz_NA", "03170d900f6d6a13002255b708f7bd27e55b5c05d1ddbaf8c25a1fc287d9f804ed"},
{"dragonhound_DEV", "02f9a7b49282885cd03969f1f5478287497bc8edfceee9eac676053c107c5fcdaf"}
}
};

Expand Down
27 changes: 23 additions & 4 deletions src/komodo_hardfork.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,32 @@ 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

extern const uint32_t nS8Timestamp; // dPoW Season 8, Sat Sep 14 2024 13:37:33 GMT+0000
extern const int32_t nS8HardforkHeight; // dPoW Season 8, Sat Sep 14 2024
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

extern const int32_t nKIP0003Activation; // https://github.com/KomodoPlatform/kips/blob/main/kips/kip-0003.mediawiki

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};
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];
Expand Down
13 changes: 11 additions & 2 deletions src/komodo_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,16 +1591,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<std::string> 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") )
Expand Down
Loading