Skip to content

Commit

Permalink
Merge pull request #958 from qtumproject/neil/update-chain-data
Browse files Browse the repository at this point in the history
Neil/update chain data
  • Loading branch information
qtum-neil authored Nov 24, 2021
2 parents e4e704a + 7296049 commit bf6f871
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AC_PREREQ([2.69])
define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 20)
define(_CLIENT_VERSION_REVISION, 3)
define(_CLIENT_VERSION_REVISION, 4)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down Expand Up @@ -1360,7 +1360,7 @@ fi
# These packages don't provide pkgconfig config files across all
# platforms, so we use older autoconf detection mechanisms:
AC_CHECK_HEADER([gmp.h],,AC_MSG_ERROR(libgmp headers missing))
AC_CHECK_LIB([gmp],[[__gmpn_sub_n]],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)])
AC_CHECK_LIB([gmp],[__gmpn_sub_n],GMP_LIBS=-lgmp, [AC_MSG_ERROR(libgmp missing)])

AC_CHECK_HEADER([gmpxx.h],,AC_MSG_ERROR(libgmpxx headers missing))
AC_CHECK_LIB([gmpxx],[main],GMPXX_LIBS=-lgmpxx, [AC_MSG_ERROR(libgmpxx missing)])
Expand Down
26 changes: 13 additions & 13 deletions doc/hardware-wallet.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
HARDWARE WALLET
====================

## Tools for hardware device
## Tools for hardware device support

Using the [NanoS Loader](https://github.com/qtumproject/qtum-ledger-loader/releases) can be installed the NanoS Wallet and NanoS Stake application.
Use [Ledger Nano S Loader](https://github.com/qtumproject/qtum-ledger-loader/releases) to install the Ledger Nano S Wallet and Ledger Nano S Stake application.

Using the [HWI](https://github.com/qtumproject/HWI) for command line interaction with the Hardware Wallet, for installation instructions check the [HWI](https://github.com/qtumproject/HWI) repository.
Use [HWI](https://github.com/qtumproject/HWI) for command line interaction with the Hardware Wallet.

## Graphical interface for hardware device

`qtum-qt` provide the hardware interface for working with Hardware Device like Ledger.
`qtum-qt` provides an interface for interacting with hardware wallet devices.

Set the HWI tool path using the the menu `Settings -> Option -> Main -> HWI Tool Path` and restart the `qtum-qt`, the tool is needed for hardware interaction.
Set the HWI tool path using the the menu `Settings -> Option -> Main -> HWI Tool Path` and restart `qtum-qt`, the tool is needed for hardware wallet interaction.

Using the menu `File -> Create Wallet... -> Use a hardware device` for creating hardware wallet. The ledger need to be connected and the wallet application started.
Use the menu `File -> Create Wallet... -> Use a hardware device` for creating hardware wallet. The hardware wallet needs to be connected and the wallet application started.

Using the hardware wallet to send/receive coins. For sending coins the ledger need to be connected and the transaction confirmed on it.
Use hardware wallets to send/receive coins.

Ledger NanoS has support for smart contracts using the wallet application that can be installed with [NanoS Loader](https://github.com/qtumproject/qtum-ledger-loader/releases), the coins can be delegated to a staker for offline staking.
Ledger Nano S has support for smart contracts using the wallet application that can be installed with [Ledger Nano S Loader](https://github.com/qtumproject/qtum-ledger-loader/releases), it also supports delegation to a staker for offline staking.

## Graphical interface for hardware device staking

Ledger NanoS has support for staking using the staking application that can be installed with [NanoS Loader](https://github.com/qtumproject/qtum-ledger-loader/releases).
Start `qtum-qt`, open the hardware wallet, click the staking button from the navigation bar and select the ledger from the list.
The staking will be active until the application is closed and will not be automatically started when `qtum-qt` is started.
Ledger Nano S has support for staking using the staking application that can be installed with [Ledger Nano S Loader](https://github.com/qtumproject/qtum-ledger-loader/releases).

Using the menu `Settings -> Option -> Main -> Select Ledger device for staking` to select ledger for staking that the `qtum-qt` will automatically connect when started.

The staking will be active until the application is closed and will be automatically started when `qtum-qt` is started and the staking wallet is loaded.

## Command line interface for hardware device staking

`qtumd -hwitoolpath=<HWI Tool Path> -stakerledgerid=<Ledger device for staking> -wallet <Hardware wallet>`

`<HWI Tool Path>` is the location where the HWI is installed. In GUI, the value in menu `Settings -> Option -> Main -> HWI Tool Path`.

`<Ledger device for staking>` is the ledger fingerprint that will be used for staking. In GUI, the value in menu `Settings -> Option -> Main -> Select Ledger device for staking`.
`<Ledger device for staking>` is the ledger fingerprint that will be used for staking. In GUI, the value in menu `Settings -> Option -> Main -> Select Ledger device for staking`. you can also get the fingerprint for the device by running `./hwi.py enumerate` from the command line in the HWI folder.

`<Hardware wallet>` is the name of the hardware wallet.
`<Hardware wallet>` is the name of the hardware device wallet that was created.

30 changes: 16 additions & 14 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ class CMainParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000002621183875d3ed75577"); // qtum
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000002ee39fbaf66506e5c57"); // qtum

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x02caf7a26b995e5054462715a4d31e1a7ff220c53fead7c06de720ac54510433"); // 888000
consensus.defaultAssumeValid = uint256S("0x8ef924fb7d2a28e0420c8731fb34301c204d15fe8d1e68461e5ebe959df011f2"); // 1405000

/**
* The message start string is designed to be unlikely to occur in normal data.
Expand All @@ -124,7 +124,7 @@ class CMainParams : public CChainParams {
pchMessageStart[3] = 0xd3;
nDefaultPort = 3888;
nPruneAfterHeight = 100000;
m_assumed_blockchain_size = 8;
m_assumed_blockchain_size = 14;
m_assumed_chain_state_size = 1;

genesis = CreateGenesisBlock(1504695029, 8026361, 0x1f00ffff, 1, 50 * COIN);
Expand Down Expand Up @@ -172,15 +172,16 @@ class CMainParams : public CChainParams {
{ 498000, uint256S("497f28fd4b1dadc9ff6dd2ac771483acfd16e4c4664eb45d0a6008dc33811418")},
{ 708000, uint256S("23c66194def65cfea20d32a71f23807a93a0b207b3d7251246e2c351204fe9d3")},
{ 888000, uint256S("02caf7a26b995e5054462715a4d31e1a7ff220c53fead7c06de720ac54510433")},
{ 1405000, uint256S("8ef924fb7d2a28e0420c8731fb34301c204d15fe8d1e68461e5ebe959df011f2")},
}
};

chainTxData = ChainTxData{
// Data as of block 76b1e67fcff0fcfd078d499c65494cee4319f256da09f5fdefa574433f7d4e3c (height 709065)
1602362976, // * UNIX timestamp of last known number of transactions
4340534, // * total number of transactions between genesis and that timestamp
// Data as of block 87ee4ec601b335d411e01378936e21044b1a47a3d989feaaaed0e8eaa2929e4b (height 1407838)
1637774408, // * UNIX timestamp of last known number of transactions
6434923, // * total number of transactions between genesis and that timestamp
// (the tx=... number in the SetBestChain debug.log lines)
0.02433574394826639 // * estimated number of transactions per second after that timestamp
0.0842613440826197 // * estimated number of transactions per second after that timestamp
};

consensus.nBlocktimeDownscaleFactor = 4;
Expand Down Expand Up @@ -249,18 +250,18 @@ class CTestNetParams : public CChainParams {
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000b17fc0aa1093c32edb"); // qtum
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000f64ad2ae9a92bd2de8"); // qtum

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x6bb6312088d81ca5484460b3466c66c01ff7d1cd4ef91e1dc9555a15b51d025d"); // 944000
consensus.defaultAssumeValid = uint256S("0xaff1f9c768e83f90d10a55306993e9042b5740251abc1afdde1429d09e95fa66"); // 1405000

pchMessageStart[0] = 0x0d;
pchMessageStart[1] = 0x22;
pchMessageStart[2] = 0x15;
pchMessageStart[3] = 0x06;
nDefaultPort = 13888;
nPruneAfterHeight = 1000;
m_assumed_blockchain_size = 4;
m_assumed_blockchain_size = 6;
m_assumed_chain_state_size = 1;

genesis = CreateGenesisBlock(1504695029, 7349697, 0x1f00ffff, 1, 50 * COIN);
Expand Down Expand Up @@ -301,14 +302,15 @@ class CTestNetParams : public CChainParams {
{491300, uint256S("75a7db2865423d3af5f0dfd70cfef6053b91f3c018c4b28a4e28c09a8c011e78")},
{690000, uint256S("89b010b5333fa9d22c7fcf157c7eeaee1ccfe80c435390243b3d782a1fc1eff7")},
{944000, uint256S("6bb6312088d81ca5484460b3466c66c01ff7d1cd4ef91e1dc9555a15b51d025d")},
{1405000, uint256S("aff1f9c768e83f90d10a55306993e9042b5740251abc1afdde1429d09e95fa66")},
}
};

chainTxData = ChainTxData{
// Data as of block 8947ec20d2e17bb48365d50833d6967115ceb2358b13edf99b5624da3f156f37 (height 694595)
1602363600,
1505398,
0.016913121136215
// Data as of block eac806357d6afadecc7fcbc79256e51b170187bbe4497c5192b023bd0b422a48 (height 1457136)
1637778400,
3068076,
0.06376731417354913
};

consensus.nBlocktimeDownscaleFactor = 4;
Expand Down
2 changes: 1 addition & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ void BitcoinGUI::updateStakingIcon()
else if (walletModel->wallet().isLocked())
labelStakingIcon->setToolTip(tr("Not staking because wallet is locked"));
else if(walletModel->hasLedgerProblem())
labelStakingIcon->setToolTip(tr("Not staking because the ledger fail to connect"));
labelStakingIcon->setToolTip(tr("Not staking because the ledger device failed to connect"));
else
labelStakingIcon->setToolTip(tr("Not staking"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/qt/superstakeritemwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void SuperStakerItemWidget::updateLogo()
else if (m_model->wallet().isLocked())
ui->superStakerLogo->setToolTip(tr("Not staking because wallet is locked"));
else if(m_model->hasLedgerProblem())
ui->superStakerLogo->setToolTip(tr("Not staking because the ledger fail to connect"));
ui->superStakerLogo->setToolTip(tr("Not staking because the ledger device failed to connect"));
else
ui->superStakerLogo->setToolTip(tr("Not staking"));
}
Expand Down

0 comments on commit bf6f871

Please sign in to comment.