diff --git a/configure.ac b/configure.ac index 859977d9aa..b04d0380dd 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ([2.69]) define(_CLIENT_VERSION_MAJOR, 1) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_REVISION, 1) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 1) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2021) diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 365bec0538..daa3e30f18 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -86,12 +86,9 @@ $(package)_config_opts += -no-feature-concurrent $(package)_config_opts += -no-feature-dial $(package)_config_opts += -no-feature-fontcombobox $(package)_config_opts += -no-feature-ftp -$(package)_config_opts += -no-feature-http $(package)_config_opts += -no-feature-image_heuristic_mask $(package)_config_opts += -no-feature-keysequenceedit $(package)_config_opts += -no-feature-lcdnumber -$(package)_config_opts += -no-feature-networkdiskcache -$(package)_config_opts += -no-feature-networkproxy $(package)_config_opts += -no-feature-pdf $(package)_config_opts += -no-feature-printdialog $(package)_config_opts += -no-feature-printer @@ -99,7 +96,6 @@ $(package)_config_opts += -no-feature-printpreviewdialog $(package)_config_opts += -no-feature-printpreviewwidget $(package)_config_opts += -no-feature-regularexpression $(package)_config_opts += -no-feature-sessionmanager -$(package)_config_opts += -no-feature-socks5 $(package)_config_opts += -no-feature-sql $(package)_config_opts += -no-feature-statemachine $(package)_config_opts += -no-feature-syntaxhighlighter diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 188899475d..f11a51d6eb 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -161,14 +161,14 @@ class CMainParams : public CChainParams { // This is fine at runtime as we'll fall back to using them as an addrfetch if they don't support the // service bits we want, but we should get them updated to support all service bits wanted by any // release ASAP to avoid it where possible. - vSeeds.emplace_back("seed01.electraprotocol.network"); - vSeeds.emplace_back("seed02.electraprotocol.network"); - vSeeds.emplace_back("seed03.electraprotocol.network"); - vSeeds.emplace_back("seed04.electraprotocol.network"); - vSeeds.emplace_back("seed05.electraprotocol.network"); - vSeeds.emplace_back("seed06.electraprotocol.network"); - vSeeds.emplace_back("seed07.electraprotocol.network"); - vSeeds.emplace_back("seed08.electraprotocol.network"); + vSeeds.emplace_back("seed01.electraprotocol.eu"); + vSeeds.emplace_back("seed02.electraprotocol.eu"); + vSeeds.emplace_back("seed03.electraprotocol.eu"); + vSeeds.emplace_back("seed04.electraprotocol.eu"); + vSeeds.emplace_back("seed05.electraprotocol.eu"); + vSeeds.emplace_back("seed06.electraprotocol.eu"); + vSeeds.emplace_back("seed07.electraprotocol.eu"); + vSeeds.emplace_back("seed08.electraprotocol.eu"); base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,55); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,137); @@ -275,14 +275,14 @@ class CTestNetParams : public CChainParams { vFixedSeeds.clear(); vSeeds.clear(); // nodes with support for servicebits filtering should be at the top - vSeeds.emplace_back("seed01.electraprotocol.network"); - vSeeds.emplace_back("seed02.electraprotocol.network"); - vSeeds.emplace_back("seed03.electraprotocol.network"); - vSeeds.emplace_back("seed04.electraprotocol.network"); - vSeeds.emplace_back("seed05.electraprotocol.network"); - vSeeds.emplace_back("seed06.electraprotocol.network"); - vSeeds.emplace_back("seed07.electraprotocol.network"); - vSeeds.emplace_back("seed08.electraprotocol.network"); + vSeeds.emplace_back("seed01.electraprotocol.eu"); + vSeeds.emplace_back("seed02.electraprotocol.eu"); + vSeeds.emplace_back("seed03.electraprotocol.eu"); + vSeeds.emplace_back("seed04.electraprotocol.eu"); + vSeeds.emplace_back("seed05.electraprotocol.eu"); + vSeeds.emplace_back("seed06.electraprotocol.eu"); + vSeeds.emplace_back("seed07.electraprotocol.eu"); + vSeeds.emplace_back("seed08.electraprotocol.eu"); base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,141); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,19); @@ -325,14 +325,14 @@ class SigNetParams : public CChainParams { if (!args.IsArgSet("-signetchallenge")) { bin = ParseHex("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae"); - vSeeds.emplace_back("seed01.electraprotocol.network"); - vSeeds.emplace_back("seed02.electraprotocol.network"); - vSeeds.emplace_back("seed03.electraprotocol.network"); - vSeeds.emplace_back("seed04.electraprotocol.network"); - vSeeds.emplace_back("seed05.electraprotocol.network"); - vSeeds.emplace_back("seed06.electraprotocol.network"); - vSeeds.emplace_back("seed07.electraprotocol.network"); - vSeeds.emplace_back("seed08.electraprotocol.network"); + vSeeds.emplace_back("seed01.electraprotocol.eu"); + vSeeds.emplace_back("seed02.electraprotocol.eu"); + vSeeds.emplace_back("seed03.electraprotocol.eu"); + vSeeds.emplace_back("seed04.electraprotocol.eu"); + vSeeds.emplace_back("seed05.electraprotocol.eu"); + vSeeds.emplace_back("seed06.electraprotocol.eu"); + vSeeds.emplace_back("seed07.electraprotocol.eu"); + vSeeds.emplace_back("seed08.electraprotocol.eu"); //vSeeds.emplace_back("v7ajjeirttkbnt32wpy3c6w3emwnfr3fkla7hpxcfokr3ysd3kqtzmqd.onion:38333"); consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000000000000"); diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp index 6506d4f02a..7f0f4072b9 100644 --- a/src/qt/utilitydialog.cpp +++ b/src/qt/utilitydialog.cpp @@ -171,9 +171,9 @@ UpdateWalletDialog::~UpdateWalletDialog() void UpdateWalletDialog::checkForUpdate() { - const QString VERSION_URL = "https://raw.githubusercontent.com/ElectraProtocol/xep-ecosystem-versions/main/XEP-Core/latestversion.json"; + const QUrl strVerUrl = QUrl("http://electraprotocol.eu/getlatestversion"); - const QNetworkRequest request(VERSION_URL); + const QNetworkRequest request(strVerUrl); reply = manager->get(request); } @@ -183,40 +183,42 @@ void UpdateWalletDialog::gotReply() const QByteArray response_data = reply->readAll(); delete reply; const QJsonDocument jsonAnswer = QJsonDocument::fromJson(response_data); - const QJsonObject &responseObject = jsonAnswer.object(); - - const QString strVerMajor = "version_major"; - const QString strVerMinor = "version_minor"; - const QString strVerRev = "version_revision"; - const QString strVerBuild = "version_build"; - const QString strVerRC = "version_rc"; - const QString strMandatory = "mandatory"; - const QString strLastMandatory = "lastmandatory"; - - if (responseObject.size() == 7 && responseObject[strVerMajor].isDouble() && responseObject[strVerMinor].isDouble() && - responseObject[strVerRev].isDouble() && responseObject[strVerBuild].isDouble() && responseObject[strVerRC].isDouble() && - responseObject[strMandatory].isBool() && responseObject[strLastMandatory].isObject()) { - const QJsonObject &lastMandatory = responseObject[strLastMandatory].toObject(); - if (lastMandatory.size() == 5 && lastMandatory[strVerMajor].isDouble() && lastMandatory[strVerMinor].isDouble() && - lastMandatory[strVerRev].isDouble() && lastMandatory[strVerBuild].isDouble() && lastMandatory[strVerRC].isDouble()) { - bool outdated = true; - mandatoryUpdate = true; - - newVersionMajor = responseObject[strVerMajor].toInt(); - newVersionMinor = responseObject[strVerMinor].toInt(); - newVersionRevision = responseObject[strVerRev].toInt(); - newVersionBuild = responseObject[strVerBuild].toInt(); - newVersionRC = responseObject[strVerRC].toInt(); - if (lastMandatory[strVerMajor].toInt() <= CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt() <= CLIENT_VERSION_MINOR && lastMandatory[strVerRev].toInt() <= CLIENT_VERSION_REVISION && lastMandatory[strVerBuild].toInt() <= CLIENT_VERSION_BUILD) { - mandatoryUpdate = responseObject[strMandatory].toBool(); - if (newVersionMajor <= CLIENT_VERSION_MAJOR && newVersionMinor <= CLIENT_VERSION_MINOR && newVersionRevision <= CLIENT_VERSION_REVISION && newVersionBuild <= CLIENT_VERSION_BUILD) { - outdated = false; + if (jsonAnswer.isObject()) { + const QJsonObject &responseObject = jsonAnswer.object(); + + const QString strVerMajor = "version_major"; + const QString strVerMinor = "version_minor"; + const QString strVerRev = "version_revision"; + const QString strVerBuild = "version_build"; + const QString strVerRC = "version_rc"; + const QString strMandatory = "mandatory"; + const QString strLastMandatory = "lastmandatory"; + + if (responseObject.size() == 7 && responseObject[strVerMajor].isDouble() && responseObject[strVerMinor].isDouble() && + responseObject[strVerRev].isDouble() && responseObject[strVerBuild].isDouble() && responseObject[strVerRC].isDouble() && + responseObject[strMandatory].isBool() && responseObject[strLastMandatory].isObject()) { + const QJsonObject &lastMandatory = responseObject[strLastMandatory].toObject(); + if (lastMandatory.size() == 5 && lastMandatory[strVerMajor].isDouble() && lastMandatory[strVerMinor].isDouble() && + lastMandatory[strVerRev].isDouble() && lastMandatory[strVerBuild].isDouble() && lastMandatory[strVerRC].isDouble()) { + bool outdated = true; + mandatoryUpdate = true; + + newVersionMajor = responseObject[strVerMajor].toInt(); + newVersionMinor = responseObject[strVerMinor].toInt(); + newVersionRevision = responseObject[strVerRev].toInt(); + newVersionBuild = responseObject[strVerBuild].toInt(); + newVersionRC = responseObject[strVerRC].toInt(); + if (lastMandatory[strVerMajor].toInt() <= CLIENT_VERSION_MAJOR && lastMandatory[strVerMinor].toInt() <= CLIENT_VERSION_MINOR && lastMandatory[strVerRev].toInt() <= CLIENT_VERSION_REVISION && lastMandatory[strVerBuild].toInt() <= CLIENT_VERSION_BUILD) { + mandatoryUpdate = responseObject[strMandatory].toBool(); + if (newVersionMajor <= CLIENT_VERSION_MAJOR && newVersionMinor <= CLIENT_VERSION_MINOR && newVersionRevision <= CLIENT_VERSION_REVISION && newVersionBuild <= CLIENT_VERSION_BUILD) { + outdated = false; + } } - } - if (outdated) { - ui->aboutMessage->setText(getUpdateString()); - exec(); + if (outdated) { + ui->aboutMessage->setText(getUpdateString()); + exec(); + } } } } diff --git a/src/validation.cpp b/src/validation.cpp index aeaaecf103..aa07c2fbf0 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -5751,7 +5751,7 @@ bool CheckBlockSignature(const CBlock& block) if ((pubkeyStart + CPubKey::COMPRESSED_SIZE) > txin.scriptSig.size() || txin.scriptSig[pubkeyStart-1] < CPubKey::COMPRESSED_SIZE) // last pushdata must be large enough to at least hold a compressed pubkey return error("%s : p2pkh txin.scriptSig.size() = %u is too small", __func__, txin.scriptSig.size()); pubkey = CPubKey(txin.scriptSig.begin()+pubkeyStart, txin.scriptSig.end()); - } else if (cbtxin.scriptSig.size() > CPubKey::COMPRESSED_SIZE) { // check for pubkey in coinbase + } else if (cbtxin.scriptSig.size() > CPubKey::COMPRESSED_SIZE && cbtxin.scriptSig[cbtxin.scriptSig.size()-CPubKey::COMPRESSED_SIZE-1] == CPubKey::COMPRESSED_SIZE) { // check for pubkey in coinbase //std::vector vchPubKey(cbtxin.scriptSig.end()-CPubKey::COMPRESSED_SIZE, cbtxin.scriptSig.end()); //LogPrintf("%s : coinbase cbtxin.scriptSig = %s\n", __func__, HexStr(cbtxin.scriptSig)); //LogPrintf("%s : cbtxin.scriptSig.size() = %u, vchPubKey = %s\n", __func__, cbtxin.scriptSig.size(), HexStr(vchPubKey));