Merge branch 'duke' into danger

This commit is contained in:
Duke Leto
2019-12-08 20:39:50 -05:00
11 changed files with 235 additions and 85 deletions

56
contrib/checkpoints.pl Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/perl
# Copyright 2019 The Hush developers
# Released under the GPLv3
use warnings;
use strict;
# Generate checkpoint data for use in src/main.cpp
# TODO: update when blocktime changes to 75s
my $perday = 576;
my $hush = "./src/hush-cli";
my $gethash = "$hush getblockhash";
my $stride = shift || 1000;
my $count = 0;
my $blocks = qx{$hush getblockcount};
my $prev = $blocks - $perday;
my $last = 0;
my $now = time();
chomp($blocks);
print "// Generated at $now via hush3 contrib/checkpoints.pl by Duke Leto\n";
while (1) {
$count++;
my $block = $stride*$count;
if ($block > $blocks) {
$last = $stride*($count-1);
#print "last checkpointed block=$last\n";
last;
}
my $blockhash = qx{$gethash $block};
chomp $blockhash;
print qq{($block, uint256S("0x$blockhash"))\n};
}
my $time = qx{$hush getblock $last |grep time|cut -d: -f2| sed 's/,//g'};
chomp($time);
# TODO: This is Linux-only
my $line1 = qx{grep --text height=$prev ~/.komodo/HUSH3/debug.log};
my $line2 = qx{grep --text height=$blocks ~/.komodo/HUSH3/debug.log};
my $txs_per_day = 2 * $perday; # default estimate is 2 txs per block, on average
my $total_txs = 0;
#print "line1: $line1\n";
#print "line2: $line2\n";
# This will calculate the number of txs in the previous day to the last checkpointed block
if ($line1 =~ m/tx=(\d+)/) {
my $tx1 = $1; # number of txs in the block 1 day ago
#print "prevblock has $tx1 txs\n";
if ($line2 =~ m/tx=(\d+)/) {
$total_txs = $1;
# TODO: average of last N days might be better
$txs_per_day = $total_txs - $tx1;
}
}
print "(int64_t) $time, // time of last checkpointed block\n";
print "(int64_t) $total_txs, // total txs\n";
print "(double) $txs_per_day, // txs in the last day before block $blocks\n";

View File

@@ -11,7 +11,7 @@ KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx}
[ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1 [ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1
# The autodetected version git tag can screw up manpage output a little bit # The autodetected version git tag can screw up manpage output a little bit
KMDVER="v3.2.1" KMDVER="v3.2.2"
# Create a footer file with copyright content. # Create a footer file with copyright content.
# This gets autodetected fine for komodod if --version-string is not set, # This gets autodetected fine for komodod if --version-string is not set,

View File

@@ -18,7 +18,7 @@ $(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared $(package)_config_opts=--enable-cxx --disable-shared
else else
$(package)_version=6.1.1 $(package)_version=6.1.1
$(package)_download_path=https://supernetorg.bintray.com/misc $(package)_download_path=https://github.com/MyHush/libgmp/releases/download/v6.1.1
$(package)_file_name=gmp-$($(package)_version).tar.bz2 $(package)_file_name=gmp-$($(package)_version).tar.bz2
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6 $(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
$(package)_dependencies= $(package)_dependencies=

View File

@@ -1,6 +1,6 @@
package=libsodium package=libsodium
$(package)_version=1.0.15 $(package)_version=1.0.15
$(package)_download_path=https://download.libsodium.org/libsodium/releases/old/unsupported $(package)_download_path=https://github.com/jedisct1/libsodium/releases/download/1.0.15
$(package)_file_name=$(package)-$($(package)_version).tar.gz $(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4 $(package)_sha256_hash=fb6a9e879a2f674592e4328c5d9f79f082405ee4bb05cb6e679b90afe9e178f4
$(package)_dependencies= $(package)_dependencies=

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
.TH KOMODO-CLI "1" "November 2019" "komodo-cli v3.2.1" "User Commands" .TH KOMODO-CLI "1" "November 2019" "komodo-cli v3.2.1" "User Commands"
.SH NAME .SH NAME
komodo-cli \- manual page for komodo-cli v3.2.1 komodo-cli \- manual page for komodo-cli v3.2.2
.SH DESCRIPTION .SH DESCRIPTION
Komodo RPC client version v3.2.1\-7965ffc29\-dirty Komodo RPC client version v3.2.1\-7965ffc29\-dirty
.PP .PP

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
.TH KOMODO-TX "1" "November 2019" "komodo-tx v3.2.1" "User Commands" .TH KOMODO-TX "1" "November 2019" "komodo-tx v3.2.1" "User Commands"
.SH NAME .SH NAME
komodo-tx \- manual page for komodo-tx v3.2.1 komodo-tx \- manual page for komodo-tx v3.2.2
.SH DESCRIPTION .SH DESCRIPTION
Hush komodo\-tx utility version v3.2.1\-7965ffc29\-dirty Hush komodo\-tx utility version v3.2.1\-7965ffc29\-dirty
.SS "Usage:" .SS "Usage:"

View File

@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
.TH KOMODOD "1" "November 2019" "komodod v3.2.1" "User Commands" .TH KOMODOD "1" "November 2019" "komodod v3.2.1" "User Commands"
.SH NAME .SH NAME
komodod \- manual page for komodod v3.2.1 komodod \- manual page for komodod v3.2.2
.SH DESCRIPTION .SH DESCRIPTION
Hush Daemon version v3.2.1\-7965ffc29\-dirty Hush Daemon version v3.2.1\-7965ffc29\-dirty
.PP .PP

View File

@@ -597,18 +597,152 @@ void *chainparams_commandline()
pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = ASSETCHAINS_SAPLING; pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_SAPLING].nActivationHeight = ASSETCHAINS_SAPLING;
pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = ASSETCHAINS_OVERWINTER; pCurrentParams->consensus.vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight = ASSETCHAINS_OVERWINTER;
// Generated at 1575831755 via hush3 contrib/checkpoints.pl by Duke Leto
checkpointData = //(Checkpoints::CCheckpointData) checkpointData = //(Checkpoints::CCheckpointData)
{ {
boost::assign::map_list_of boost::assign::map_list_of
(0, pCurrentParams->consensus.hashGenesisBlock), (0, pCurrentParams->consensus.hashGenesisBlock)
(int64_t)1231006505, (1000, uint256S("0x0000001893130f005d2e90fcdf40057ae06390bd0490740aae2843e62aeb7bc2"))
(int64_t)1, (2000, uint256S("0x00000003003e6c8fa176ef293d1322514778343601fa21dfdb0c9aacef189576"))
(double)2777 // * estimated number of transactions per day after checkpoint (3000, uint256S("0x00000005c1419d252bc59d77c06e07aad61702c8b3e76d2070577a18159ab59d"))
// total number of tx / (checkpoint block height / (24 * 24)) (4000, uint256S("0x00000008bc4094ea475a871302361ffdc6bfd63ded049d172c8dad01ed67fd3c"))
(5000, uint256S("0x000000018f8543066baa9c5f83e981749da4cb625fad02c187b4a9c4693ebd60"))
(6000, uint256S("0x0000000567191591911b33b852e4b87de119df2c773bc800b5a3655be18eb98e"))
(7000, uint256S("0x000000082e7b000480d0317d9115f0d0737e78fa2381a2d6456f598bf83fe2f0"))
(8000, uint256S("0x0000000415226fff123cd868e255a23d72e204d61bb405fb9dde0810e7721ebf"))
(9000, uint256S("0x00000000bd26f7b8d6d80230aad06c0cd590758176b8558da7dfc14161a23ab7"))
(10000, uint256S("0x00000002d177d1cbfeaf7c27a2a32766ea9063d222cbcc7623dc08355b07a3ad"))
(11000, uint256S("0x0000000284bcffa3bef4097178a94b6b9a788261981253cb8cd6db6b47634732"))
(12000, uint256S("0x000000006cf15fdb94253a9389d95ef607c3484c635fe0c8a1f1ec1e5a1c6865"))
(13000, uint256S("0x00000001cdc66e08f7f13c775aa1220a801a33df90edba7bbcffac8d06181207"))
(14000, uint256S("0x0000000443e432c7dbf0707a12c5671dd1ca606f962368a847bbcff2f5fc2135"))
(15000, uint256S("0x000000008dbfbd5d5e27d819bf2989c5658c3494608bfa1320ad0b090660cd44"))
(16000, uint256S("0x00000003c6a59e5b10e1a1c6bef08dee4d33d1841156bf97e26c3e4df789b128"))
(17000, uint256S("0x00000001debe3734ef4b6aacedde4a6b04cd1c60d4cf37b9f4689f2225ff7c24"))
(18000, uint256S("0x00000002e37eccfa7bacd9c201468c754cbef50be9411e3f907891755eef4c6d"))
(19000, uint256S("0x000000044636331c0277abb5592529cae1303d2bd43981a8382b4cc152a8d024"))
(20000, uint256S("0x00000000a7840e1fccedb13672804e94fcaa87c0360ee4f7353a6b93e5a59da8"))
(21000, uint256S("0x00000003a89b17d0cd489045ad62531c4211ee17c3609ed3e4291a067636d526"))
(22000, uint256S("0x0000000352a7a25b3fe5f1a32a2c42260d32345487b92b6e520eecec0ee6aca4"))
(23000, uint256S("0x00000002c1fdc5cc1211b7adff3b7e755059638fd98bd9da1cdd86bd9a0af1fd"))
(24000, uint256S("0x0000000603a6190bbfdcdc5da9645d069aebd7a0b29607077470089c7b4a1188"))
(25000, uint256S("0x0000000519d6ab6ca9c705ebafa9946bce34934709621bc22227567e90608667"))
(26000, uint256S("0x0000000146e7314e2ebb2bfc10b9fe0fdd744734910a3971bbc4e970fe2c4cb9"))
(27000, uint256S("0x000000047060e4173b4edd6374c3580580981dea20d0b49ea15c9fdfa97ba104"))
(28000, uint256S("0x000000065eea521cccf6b1f99e1a77683717d02ddaed654a4c85d717e1e8c957"))
(29000, uint256S("0x00000001ecdbcd195e04f792721262dc79bb070e73b6606b389825b5ae8e4791"))
(30000, uint256S("0x0000000240de901e9e70d2db5badf62886ab0e8c442107d571bc04b3bdd43052"))
(31000, uint256S("0x00000002d39f4f3504660e13e956c12aa3411a0ba392b3797d95f15e8fbd1958"))
(32000, uint256S("0x0000000130cd781ed559d553f35a6bc99ed252aadd92b2a461bd332ca2d69a96"))
(33000, uint256S("0x000000035ad950b0e78bbaf19f7a97865f29edd600e7aee4a3fce2e42db29d38"))
(34000, uint256S("0x00000004f33b5ff97c128bfbef656aa10341e2606f54e198d5280016d2578eca"))
(35000, uint256S("0x00000000ad1ef91eb70011a94646c148f1b8949b464a0de82adf1ba1ce6175a5"))
(36000, uint256S("0x00000003b1450e1cf9f4e5f53534777b24039fcde81ec7ac1c2ea754a26fcd78"))
(37000, uint256S("0x0000000337c4407954be01dcaf75a660e4b5b69e9e923bd62e74b0e44f01d9df"))
(38000, uint256S("0x00000002b5d6f83f8d2ef7d88c3cdff1e444882819a70a7c7281d1d92f81bc9a"))
(39000, uint256S("0x00000001a1eb6a530b065c873f65219de3282c4f386ba68bc2a0b88dc2b4c5cd"))
(40000, uint256S("0x000000013b65e22d0bb6a9103dc71da5a1b7fa2acbc1c7d7a4d8f7730c37d4ab"))
(41000, uint256S("0x000000027dbc2315769690cf93c79c54e0591c808d83decb66302492f0f79f1c"))
(42000, uint256S("0x00000000ca09a12162a92b9ecbf6bf00a2bb822a77dd142df26d81db95c21bed"))
(43000, uint256S("0x000000050c4c80b9e53b960a638bd231c193a383f0df162c720e4594ba427a4b"))
(44000, uint256S("0x00000000f42d6c43703dbb47847298cedcbef8a27018baed8f4a217e7d5d823c"))
(45000, uint256S("0x00000004da449923c218bd3e69745ebafca41c32e0c81ab6b485ae6c4c80df18"))
(46000, uint256S("0x00000006e4bdf2707158e266d2d54294b20063c0f1723abed97fafe7ecf4b2de"))
(47000, uint256S("0x0000000015d099357b0c8cbc24d8e2bd18e5e47eabe6ff89c09c9837bb071cd8"))
(48000, uint256S("0x00000009c9ddaffefc5d5c78a6f89b872fdd732c16a5311debed6b92255f340b"))
(49000, uint256S("0x00000008447d907ddc1d87df0ea235636baaaf34bc1000620e8173f1d8f7758c"))
(50000, uint256S("0x000000027470e84cd195242f199b90fde40b70f80fac7a7080b1517c95cf56c6"))
(51000, uint256S("0x000000015190913dec8a508bc219b0a0a1587b50acb23b48343010015cb5ec69"))
(52000, uint256S("0x000000071608ad395dc31dc3011d5cad7f7a7296e34490a1e9e2dcf060bcc649"))
(53000, uint256S("0x0000000608fa8a454c3c0e5e06bf091c4cfa131e7b91eb6622087cfc3fa4c149"))
(54000, uint256S("0x0000000455eac130c205512cc0bffaa3ecb2d393cbf0d9e943c3d5911ea06a4b"))
(55000, uint256S("0x00000000a20b276ed95b261a51681fb2d0d58e528cc8cd2e5fb7fdeb732b1861"))
(56000, uint256S("0x000000016057dfbf2fc59650b63b7c2dc2379af75cf00c0ee3f3835e992ec11e"))
(57000, uint256S("0x00000003a1eff8b5160655111ff1c0f1426b2b879c1f6fd761332b82c8640c67"))
(58000, uint256S("0x00000001b0ac789061a277b553de1aae373533f5b6b1330326744ac7087c87c9"))
(59000, uint256S("0x0000000a0dee07bdf593a68e5463cb5553f9bce3367a39d88f07ea43709eba87"))
(60000, uint256S("0x000000060382850eadef184b67f38c0b2de27157296f3d9d8e2b7b70b1f76127"))
(61000, uint256S("0x0000000492a93fd6c9eb080f3398517b39c8eaf835440d2571e515f76a931bf2"))
(62000, uint256S("0x00000005ee0b8f7fcae8e6b17b12ab66f17cf34697182afc29d863d9844a84a9"))
(63000, uint256S("0x000000045842b1c05c7e9a1a887e9a6ecdcaea2f4e03b9476031ed609ace91d2"))
(64000, uint256S("0x00000004259921159c0714b90b1950fbae7eee2a14687dcfc57ab22b39c8123c"))
(65000, uint256S("0x0000000618eb1c909301585f6b8f17ee6d09da97c580fe70d59babcd7864b556"))
(66000, uint256S("0x000000049c85139efb1694525b5cf864a6021e49a412aaea9ff2b2b6ee04e1ca"))
(67000, uint256S("0x0000000141358b3ae2c4ab2a384f963f4fdc925060c42de5578aec82c1de3189"))
(68000, uint256S("0x0000000405b0273ba96d1e83e27e50ecf5f123c2e3e05b56524cc2cd79ea18e7"))
(69000, uint256S("0x0000000764c8a434a1583b2578155a18720bbad67cc2c06e2fb013e872b1b10e"))
(70000, uint256S("0x00000006d11cf168399c719b2bb036eadd09e740c98764d82adf75f5a800e90d"))
(71000, uint256S("0x00000002339c3cf62fc4716899a0e341969d85146dcb98854607332f81e5f258"))
(72000, uint256S("0x000000055e39f9cd963bac08c9c10ab982491d50b66486099675b015016dad7a"))
(73000, uint256S("0x0000000766261dbd9e48a0d544d012f57ab7890a761d893851b63e0e5b5e47dc"))
(74000, uint256S("0x000000058bd8080674ffb086704fbfde45e91172d0784416ed5356d20bd60fd7"))
(75000, uint256S("0x00000007abb9cb521244c988f0ace53bf230bdf9c9db75d0102472a721c6b038"))
(76000, uint256S("0x000000071789d7ecf5e8c7e1a982e119d0b9d6748cb01426a5b8fff77a54f76b"))
(77000, uint256S("0x00000007364be847b08481f87bbe4db69a79f5c4388e3c898ea140011a121ca7"))
(78000, uint256S("0x000000031b7afd1aa244d78056606bf718cb96cb1fe1656070d37ed9d4031ebf"))
(79000, uint256S("0x00000003125d8e62fa215c1797229d271db705299f43e1db85edb7ac68349127"))
(80000, uint256S("0x000000031c23c3a1828b3a432ab27c6b34a93741f5711507abeb34a822ba5311"))
(81000, uint256S("0x0000000212aab2361322e29a1037b82624fc2acdb61dd457ae25e4dffca14b42"))
(82000, uint256S("0x00000003140442a0d3b5ba57d2e51ed4a2ec39fb6ee8c9e2d70d530f46843f57"))
(83000, uint256S("0x0000000404e963d87db2ccd709377d5fd8b28c67c51ffcace62290844b895ba0"))
(84000, uint256S("0x00000003076c29391d9a5910e287d5319f4bf29f92eb309a8dd72cbf98847102"))
(85000, uint256S("0x00000006fc5823857bdd44f89f4a97838a9f735c7bdf81bd89f50110dc16fbab"))
(86000, uint256S("0x00000002247705c4f02ab4a672686dadba9de55fcf71433388a4250af6d1154d"))
(87000, uint256S("0x00000000302718129c873c0ba6e571512ab5c4216e0d978ed3ef1d4dccddbb26"))
(88000, uint256S("0x00000002129732e7d8d99d78eef4ed3318cdbd73883d88e7c2b9534d11284486"))
(89000, uint256S("0x00000001513759a2e2b6e6c30ee8db631957511adcefa518ad31e0b1ec4e789d"))
(90000, uint256S("0x00000003e62dcb81fe33178e2dc45c70ca04733542179ac5d93bceb7c456f365"))
(91000, uint256S("0x00000000674963dd8d6d7dab67d1df8c6e9455cef55014aa15082722f9d7f115"))
(92000, uint256S("0x00000004f4e1151df0905baf82bd29ece0fc7db8d96a2ae6c0efad0e0e68e55e"))
(93000, uint256S("0x00000002876b9eb7b41e025d55d7dd740b5dc811eae0909169081e705c61b6b5"))
(94000, uint256S("0x00000001efdcd19bf060a424cd0cef2d04f0d206fae21a72a57b4cc8d1019421"))
(95000, uint256S("0x00000002a22cae35b32e31ffbe55d2d56ef04f010aebd19f1536b7582c1ea4d9"))
(96000, uint256S("0x0000000433d2385e8260c26dabec1c5f7376ed63b478c5d94bc15ee521a86ee3"))
(97000, uint256S("0x00000003112c73fd4cf10604e1a44b7acd698e196cbe16e63abdcd34008f4b36"))
(98000, uint256S("0x0000000179fb7ea8e68c54de5d09e531b5cbbfe7f5d128f3f93f55576673ddc7"))
(99000, uint256S("0x00000002e8e3a9f26154b941837d42ad62ea153d75be61a13c04e2249a781243"))
(100000, uint256S("0x00000001bc1c40d120bf2df1654f3fb5e4d28d4ff292d05667cf5610042c794a"))
(101000, uint256S("0x00000003a52ec72d58bdb88096334a29eddb17fd454a7c15aba815358f3b4285"))
(102000, uint256S("0x00000002a602644eb8765aab158112307f25bc6e8f82c1220be08642be6d12ca"))
(103000, uint256S("0x000000044a6a0aca758af879fee5bbbfc4ac75287f63cc91ad26bc921d3c44ac"))
(104000, uint256S("0x000000013fe4abb66862573821938d8e203da577e8c15055249a5fc4d6ca28f6"))
(105000, uint256S("0x0000000175182a7f9c46aaae8723a664168af4be37c5d73e8f773df6b67a458b"))
(106000, uint256S("0x000000005426bdc52efa996e5bd44f0d5f075fdd865063a1c5c341f4b37aa8d7"))
(107000, uint256S("0x000000026ce5ee0c6f81786838f502ab3ac4b52371716b3956bb58f91fe2a79e"))
(108000, uint256S("0x000000042a0f660df6ef24e237b4010749b7cc7ba402fe7f6af98643df62cb0b"))
(109000, uint256S("0x000000020debe96d90bc1d317036404c4518309e93c45303f86bdef7fac213df"))
(110000, uint256S("0x000000030ba3cdbb85d5028379dfe50fbf28c04f8add3300814c2f649ec53594"))
(111000, uint256S("0x000000030d9aa7e30990157616d54e5c32a26a0fbb5db1a7fde7e192bb2bd992"))
(112000, uint256S("0x00000003885472c246e7f5cc5c9982ce0d1ed292ff0b09451c272f201ff1bd3a"))
(113000, uint256S("0x000000027d6d7f782a510fa9b2a41f8f1a713fa4ff12906e453ba59af911cbfc"))
(114000, uint256S("0x000000046020cd15a3803db747ec6811bee5703c9b67b54185d8fae23f7617cf"))
(115000, uint256S("0x000000019fd1a317c649c83c6b2a3f6bca7e82fac2fc89ce69de4b6d5715050b"))
(116000, uint256S("0x00000002cad5e312f8553c3ca053f3588d53561722ce3bf20d55eb4654707668"))
(117000, uint256S("0x0000000339f55a289fabf4881ab5d89739779bc0e1ab5650830b4fec8870d183"))
(118000, uint256S("0x000000027bc70600ad7355ee66e6ca0b9d2fd24b7778014bb464a7bbc37627de"))
(119000, uint256S("0x00000001ddca829e3480f45ec3f7291fe9d611dd4600c047516729052a881058"))
(120000, uint256S("0x0000000217decb42c4ea26cbee700e728a558ae648393b8014f035566ef2a456"))
(121000, uint256S("0x00000000f2798338531f5a39201960a80ec28203cdd5dcd27718f6a7fd6723bf"))
(122000, uint256S("0x00000001204dfcde9f95ef04a25f54553329a48fe34078e213d93199dfe0c26b"))
(123000, uint256S("0x0000000220091729c30ec5a296a5218e0500bff2dfe10a5d9e5ceca2ea39482b"))
(124000, uint256S("0x00000002415360bf949d8e96362ce7b0aada6adbcfb73aba536fa7a329fec49f"))
(125000, uint256S("0x000000002aeab45f5e399d027976c49f4c7732ddbb78d7dc729fb226346ea3f1"))
(126000, uint256S("0x0000000067f239b6b78180145dc4ccbda1c71d506201f807912ddc170683808d"))
(127000, uint256S("0x00000001962a64e4e5a9e9c6cc286e2bcf155734c24f2c9481128e37ac6d9712"))
(128000, uint256S("0x000000011dfac6f7447ae6de5002dd3bf5ddc94faadb706f45e0b4724257dfe5"))
(129000, uint256S("0x0000000014f4aa454784a182645fa425834f8f9464abea319ea0afe5d3ccd91a"))
(130000, uint256S("0x000000001c4a5aa11e6c142931463fcf7a9f5b9fb41061d26c18ff1860431881"))
(131000, uint256S("0x000000003c44e490a60f7aa1941835277230706cfbf58dc8113610cc9c3582eb"))
(132000, uint256S("0x0000000041bef6adaff29263986224bd5a2999e2aec38aa07b52fa67eed1402f"))
(133000, uint256S("0x0000000162eb0ea1633481197a8ddc3743ff32ce2e8ecc249f9a8e9912459e05"))
(134000, uint256S("0x00000002a34611317b4b1d8bc8640282ffb7d7c86fc858af7e0abb0bca6b720d"))
(135000, uint256S("0x000000025f9502fc7474d62a0a23417cc5b77f3a049260e65b5b810d71074743"))
(136000, uint256S("0x00000000af2a19997fde28b70235070f627f3b5900a9ee13c927529a11110bc6")),
(int64_t) 1575741799, // time of last checkpointed block
(int64_t) 274689, // total txs
(double) 1065 // txs in the last day before block 136590
}; };
} } else {
else
{
checkpointData = //(Checkpoints::CCheckpointData) checkpointData = //(Checkpoints::CCheckpointData)
{ {
boost::assign::map_list_of boost::assign::map_list_of

View File

@@ -1669,33 +1669,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fReindex = GetBoolArg("-reindex", false); fReindex = GetBoolArg("-reindex", false);
// Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/
boost::filesystem::path blocksDir = GetDataDir() / "blocks";
if (!boost::filesystem::exists(blocksDir))
{
boost::filesystem::create_directories(blocksDir);
bool linked = false;
for (unsigned int i = 1; i < 10000; i++) {
boost::filesystem::path source = GetDataDir() / strprintf("blk%04u.dat", i);
if (!boost::filesystem::exists(source)) break;
boost::filesystem::path dest = blocksDir / strprintf("blk%05u.dat", i-1);
try {
boost::filesystem::create_hard_link(source, dest);
LogPrintf("Hardlinked %s -> %s\n", source.string(), dest.string());
linked = true;
} catch (const boost::filesystem::filesystem_error& e) {
// Note: hardlink creation failing is not a disaster, it just means
// blocks will get re-downloaded from peers.
LogPrintf("Error hardlinking blk%04u.dat: %s\n", i, e.what());
break;
}
}
if (linked)
{
fReindex = true;
}
}
// block tree db settings // block tree db settings
int dbMaxOpenFiles = GetArg("-dbmaxopenfiles", DEFAULT_DB_MAX_OPEN_FILES); int dbMaxOpenFiles = GetArg("-dbmaxopenfiles", DEFAULT_DB_MAX_OPEN_FILES);
bool dbCompression = GetBoolArg("-dbcompression", DEFAULT_DB_COMPRESSION); bool dbCompression = GetBoolArg("-dbcompression", DEFAULT_DB_COMPRESSION);

View File

@@ -1665,6 +1665,7 @@ void NetworkUpgradeDescPushBack(
UniValue getblockchaininfo(const UniValue& params, bool fHelp) UniValue getblockchaininfo(const UniValue& params, bool fHelp)
{ {
uint256 notarized_hash,notarized_desttxid; int32_t prevMoMheight,notarized_height,longestchain,kmdnotarized_height,txid_height;
if (fHelp || params.size() != 0) if (fHelp || params.size() != 0)
throw runtime_error( throw runtime_error(
"getblockchaininfo\n" "getblockchaininfo\n"
@@ -1678,6 +1679,8 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
" \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n" " \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n"
" \"bestblockhash\": \"...\", (string) the hash of the currently best block\n" " \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n" " \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
" \"longestchain\": xxxxxx, (numeric) the longest high of the chain\n"
" \"notarized\": xxxxxx, (numeric) last notarized Block\n"
" \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n" " \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n"
" \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n" " \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n"
" \"commitments\": xxxxxx, (numeric) the current number of note commitments in the commitment tree\n" " \"commitments\": xxxxxx, (numeric) the current number of note commitments in the commitment tree\n"
@@ -1720,10 +1723,13 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
int32_t longestchain = KOMODO_LONGESTCHAIN;//komodo_longestchain(); int32_t longestchain = KOMODO_LONGESTCHAIN;//komodo_longestchain();
progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0; progress = (longestchain > 0 ) ? (double) chainActive.Height() / longestchain : 1.0;
} }
notarized_height = komodo_notarized_height(&prevMoMheight,&notarized_hash,&notarized_desttxid);
UniValue obj(UniValue::VOBJ); UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("chain", Params().NetworkIDString())); obj.push_back(Pair("chain", Params().NetworkIDString()));
obj.push_back(Pair("blocks", (int)chainActive.Height())); obj.push_back(Pair("blocks", (int)chainActive.Height()));
obj.push_back(Pair("synced", KOMODO_INSYNC!=0)); obj.push_back(Pair("synced", KOMODO_INSYNC!=0));
obj.push_back(Pair("longestchain", KOMODO_LONGESTCHAIN));
obj.push_back(Pair("notarized", notarized_height));
obj.push_back(Pair("headers", pindexBestHeader ? pindexBestHeader->GetHeight() : -1)); obj.push_back(Pair("headers", pindexBestHeader ? pindexBestHeader->GetHeight() : -1));
obj.push_back(Pair("bestblockhash", chainActive.LastTip()->GetBlockHash().GetHex())); obj.push_back(Pair("bestblockhash", chainActive.LastTip()->GetBlockHash().GetHex()));
obj.push_back(Pair("difficulty", (double)GetNetworkDifficulty())); obj.push_back(Pair("difficulty", (double)GetNetworkDifficulty()));

View File

@@ -7960,7 +7960,6 @@ UniValue heirfund(const UniValue& params, bool fHelp)
{ {
UniValue result(UniValue::VOBJ); UniValue result(UniValue::VOBJ);
uint256 tokenid = zeroid; uint256 tokenid = zeroid;
int64_t txfee;
int64_t amount; int64_t amount;
int64_t inactivitytime; int64_t inactivitytime;
std::string hex; std::string hex;
@@ -7970,51 +7969,47 @@ UniValue heirfund(const UniValue& params, bool fHelp)
if (!EnsureWalletIsAvailable(fHelp)) if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue; return NullUniValue;
if (fHelp || params.size() != 6 && params.size() != 7) if (fHelp || params.size() != 5 && params.size() != 6)
throw runtime_error("heirfund txfee funds heirname heirpubkey inactivitytime memo [tokenid]\n"); throw runtime_error("heirfund funds heirname heirpubkey inactivitytime memo [tokenid]\n");
if (ensure_CCrequirements(EVAL_HEIR) < 0) if (ensure_CCrequirements(EVAL_HEIR) < 0)
throw runtime_error(CC_REQUIREMENTS_MSG); throw runtime_error(CC_REQUIREMENTS_MSG);
const CKeyStore& keystore = *pwalletMain; const CKeyStore& keystore = *pwalletMain;
LOCK2(cs_main, pwalletMain->cs_wallet); LOCK2(cs_main, pwalletMain->cs_wallet);
txfee = atoll(params[0].get_str().c_str()); if (params.size() == 6) // tokens in satoshis:
if (txfee < 0) { amount = atoll(params[0].get_str().c_str());
result.push_back(Pair("result", "error")); else { // coins:
result.push_back(Pair("error", "incorrect txfee")); amount = 0;
return result; if (!ParseFixedPoint(params[0].get_str(), 8, &amount)) // using ParseFixedPoint instead atof to avoid small round errors
} amount = -1; // set error
}
if(params.size() == 7) // tokens in satoshis:
amount = atoll(params[1].get_str().c_str());
else // coins:
amount = atof(params[1].get_str().c_str()) * COIN;
if (amount <= 0) { if (amount <= 0) {
result.push_back(Pair("result", "error")); result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "incorrect amount")); result.push_back(Pair("error", "incorrect amount"));
return result; return result;
} }
name = params[2].get_str(); name = params[1].get_str();
pubkey = ParseHex(params[3].get_str().c_str()); pubkey = ParseHex(params[2].get_str().c_str());
if (!pubkey2pk(pubkey).IsValid()) { if (!pubkey2pk(pubkey).IsValid()) {
result.push_back(Pair("result", "error")); result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "incorrect pubkey")); result.push_back(Pair("error", "incorrect pubkey"));
return result; return result;
} }
inactivitytime = atoll(params[4].get_str().c_str()); inactivitytime = atoll(params[3].get_str().c_str());
if (inactivitytime <= 0) { if (inactivitytime <= 0) {
result.push_back(Pair("result", "error")); result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "incorrect inactivity time")); result.push_back(Pair("error", "incorrect inactivity time"));
return result; return result;
} }
memo = params[5].get_str(); memo = params[4].get_str();
if (params.size() == 7) { if (params.size() == 6) {
tokenid = Parseuint256((char*)params[6].get_str().c_str()); tokenid = Parseuint256((char*)params[5].get_str().c_str());
if (tokenid == zeroid) { if (tokenid == zeroid) {
result.push_back(Pair("result", "error")); result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "incorrect tokenid")); result.push_back(Pair("error", "incorrect tokenid"));
@@ -8023,9 +8018,9 @@ UniValue heirfund(const UniValue& params, bool fHelp)
} }
if( tokenid == zeroid ) if( tokenid == zeroid )
result = HeirFundCoinCaller(txfee, amount, name, pubkey2pk(pubkey), inactivitytime, memo); result = HeirFundCoinCaller(0, amount, name, pubkey2pk(pubkey), inactivitytime, memo);
else else
result = HeirFundTokenCaller(txfee, amount, name, pubkey2pk(pubkey), inactivitytime, memo, tokenid); result = HeirFundTokenCaller(0, amount, name, pubkey2pk(pubkey), inactivitytime, memo, tokenid);
return result; return result;
} }
@@ -8034,7 +8029,6 @@ UniValue heiradd(const UniValue& params, bool fHelp)
{ {
UniValue result; UniValue result;
uint256 fundingtxid; uint256 fundingtxid;
int64_t txfee;
int64_t amount; int64_t amount;
int64_t inactivitytime; int64_t inactivitytime;
std::string hex; std::string hex;
@@ -8044,24 +8038,18 @@ UniValue heiradd(const UniValue& params, bool fHelp)
if (!EnsureWalletIsAvailable(fHelp)) if (!EnsureWalletIsAvailable(fHelp))
return NullUniValue; return NullUniValue;
if (fHelp || params.size() != 3) if (fHelp || params.size() != 2)
throw runtime_error("heiradd txfee funds fundingtxid\n"); throw runtime_error("heiradd funds fundingtxid\n");
if (ensure_CCrequirements(EVAL_HEIR) < 0) if (ensure_CCrequirements(EVAL_HEIR) < 0)
throw runtime_error(CC_REQUIREMENTS_MSG); throw runtime_error(CC_REQUIREMENTS_MSG);
const CKeyStore& keystore = *pwalletMain; const CKeyStore& keystore = *pwalletMain;
LOCK2(cs_main, pwalletMain->cs_wallet); LOCK2(cs_main, pwalletMain->cs_wallet);
txfee = atoll(params[0].get_str().c_str()); std::string strAmount = params[0].get_str();
if (txfee < 0) { fundingtxid = Parseuint256((char*)params[1].get_str().c_str());
result.push_back(Pair("result", "error"));
result.push_back(Pair("error", "incorrect txfee"));
return result;
}
fundingtxid = Parseuint256((char*)params[2].get_str().c_str()); result = HeirAddCaller(fundingtxid, 0, strAmount);
result = HeirAddCaller(fundingtxid, txfee, params[1].get_str());
return result; return result;
} }
@@ -8086,16 +8074,9 @@ UniValue heirclaim(const UniValue& params, bool fHelp)
const CKeyStore& keystore = *pwalletMain; const CKeyStore& keystore = *pwalletMain;
LOCK2(cs_main, pwalletMain->cs_wallet); LOCK2(cs_main, pwalletMain->cs_wallet);
txfee = atoll(params[0].get_str().c_str()); std::string strAmount = params[0].get_str();
if (txfee < 0) { fundingtxid = Parseuint256((char*)params[1].get_str().c_str());
result.push_back(Pair("result", "error")); result = HeirClaimCaller(fundingtxid, 0, strAmount);
result.push_back(Pair("error", "incorrect txfee"));
return result;
}
fundingtxid = Parseuint256((char*)params[2].get_str().c_str());
result = HeirClaimCaller(fundingtxid, txfee, params[1].get_str());
return result; return result;
} }