{"id":341,"date":"2022-02-16T12:32:12","date_gmt":"2022-02-16T17:32:12","guid":{"rendered":"https:\/\/www.jmjatlanta.com\/?p=341"},"modified":"2022-06-14T15:26:34","modified_gmt":"2022-06-14T20:26:34","slug":"komodo-hardfork-history","status":"publish","type":"post","link":"https:\/\/www.jmjatlanta.com\/index.php\/2022\/02\/16\/komodo-hardfork-history\/","title":{"rendered":"Komodo Hardfork History"},"content":{"rendered":"\n<p>This post is mainly for me to keep track of which hardforks did what.<\/p>\n\n\n\n<p>The main hardforks in Komodo are for the election of notaries. But there are other purposes. I will add to the list as I learn more. Eventually these should be documented within the code (comments near the declaration of a #define or something).<\/p>\n\n\n\n<p>Note that the KMD chain hardforks are normally based on chain height. Asset chains are normally based on time. Hence season hardforks have both.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>nStakedDecemberHardforkTimestamp &#8211; December 2019<ul><li>Modifies block header to include segid if it is a staked chain (chain.h)<\/li><li>Many areas use komodo_newStakerActive(), which uses this hardfork<\/li><\/ul><\/li><li>nDecemberHardforkHeight &#8211; December 2019<ul><li>Many areas use komodo_hardfork_active() which uses this hardfork and the above<\/li><li>Disable the nExtraNonce in the miner (miner.cpp)<\/li><li>Add merkle root check in CheckBlock() for notaries (main.cpp)<\/li><\/ul><\/li><li>nS4Timestamp \/ nS4HardforkHeight  &#8211; 2020-06-14 Season 4<ul><li>Only for notary list<\/li><\/ul><\/li><li>nS5Timestamp 2021-06-14 Season 5<ul><li>ExtractDestination fix (see komodo_is_vSolutionsFixActive() in komodo_utils.cpp)<\/li><li>Notary list updated<\/li><\/ul><\/li><li>nS5HardforkHeight 2021-06-14 Season 5<ul><li>Add merkle root check in CheckBlock() for everyone (main.cpp)<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Many areas have hardfork changes without much detail. Here are some heights found by searching the code base for &#8220;height >&#8221;:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>792000 does some finagling with notaries on asett chains in komodo_checkPOW (komodo_bitcoind.cpp). See also CheckProofOfWork() in pow.cpp and komodo_is_special() in komodo_bitcoind.cpp.<\/li><li>186233 komodo_eligiblenotary() (komodo_bitcoind.cpp)<\/li><li>82000 komodo_is_special() (komodo_bitcoind.cpp)<\/li><li>792000 komdo_is_special() and komodo_checkPOW()<\/li><li>807000 komodo_is_special()<\/li><li>34000 komodo_is_special()<\/li><li>limit is set to different values based on being under 79693 or 82000 in komodo_is_special()<\/li><li>225000 komodo_is_special()<\/li><li>246748 komodo_validate_interest() starts to work (komodo_bitcoind.cpp)<\/li><li>225000 komodo_commission() (komodo_bitcoind.cpp)<\/li><li>10 komodo_adaptivepow_target() (komodo_bitcoind.cpp)<\/li><li>100 (KOMODO_EARLYTXID_HEIGHT) komodo_commission() (komodo_bitcoind.cpp)<\/li><li>2 PoS check in komodo_checkPOW() and komodo_check_deposit()<\/li><li>100 komodo_checkPOW() (komodo_bitcoind.cpp)<\/li><li>236000 komodo_gateway_deposits() (komodo_gateway.cpp)<\/li><li>1 komodo_check_deposit() (komodo_gateway.cpp) (a few places)<\/li><li>800000 komodo_check_deposit() (komodo_gateway.cpp)<\/li><li>814000 (KOMODO_NOTARIES_HEIGHT1) fee stealing check in komodo_check_deposit() as well as another check a little below.<\/li><li>1000000 komodo_check_deposit() (2 places in that method)<\/li><li>195000 komodo_operturn() (komodo_gateway.cpp)<\/li><li>225000 komodo_opreturn() (komodo_gateway.cpp)<\/li><li>238000 komodo_operturn()<\/li><li>214700 komodo_opreturn()<\/li><\/ul>\n\n\n\n<p>I need to continue searching for &#8220;height >&#8221; in komodo_interest.cpp, komodo_kv.cpp, komodo_notary.cpp, komodo_nSPV_superlite.h, komodo_nSPV_wallet.h, komodo_pax.cpp, komodo.cpp, main.cpp, metrics.cpp, miner.cpp, net.cpp, pow.cpp, rogue_rpc.cpp, cc\/soduko.cpp as well as more searches like &#8220;height &lt;&#8221; and &#8220;height =&#8221; to catch more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is mainly for me to keep track of which hardforks did what. The main hardforks in Komodo are for the election of notaries. But there are other purposes. I will add to the list as I learn more. Eventually these should be documented within the code (comments near the declaration of a #define [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,14],"tags":[],"class_list":["post-341","post","type-post","status-publish","format-standard","hentry","category-komodo","category-software-development"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":4,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/posts\/341\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jmjatlanta.com\/index.php\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}