diff --git a/external/unbound/configure_checks.cmake b/external/unbound/configure_checks.cmake index 2acf556d..bdff8bfe 100644 --- a/external/unbound/configure_checks.cmake +++ b/external/unbound/configure_checks.cmake @@ -191,16 +191,17 @@ check_include_file(openssl/err.h HAVE_OPENSSL_ERR_H) check_include_file(openssl/rand.h HAVE_OPENSSL_RAND_H) check_include_file(openssl/ssl.h HAVE_OPENSSL_SSL_H) -set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES + ${OPENSSL_LIBRARIES}) +if (WIN32 AND OPENSSL_VERSION STRGREATER "1.1.0") + set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};ws2_32") +endif() check_symbol_exists(NID_secp384r1 "openssl/evp.h" HAVE_DECL_NID_SECP384R1) check_symbol_exists(NID_X9_62_prime256v1 "openssl/evp.h" HAVE_DECL_NID_X9_62_PRIME256V1) check_symbol_exists(sk_SSL_COMP_pop_free "openssl/ssl.h" HAVE_DECL_SK_SSL_COMP_POP_FREE) check_symbol_exists(SSL_COMP_get_compression_methods "openssl/ssl.h" HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS) -set(CMAKE_REQUIRED_LIBRARIES - ${OPENSSL_LIBRARIES}) - check_function_exists(EVP_MD_CTX_new HAVE_EVP_MD_CTX_NEW) check_function_exists(EVP_sha1 HAVE_EVP_SHA1) check_function_exists(EVP_sha256 HAVE_EVP_SHA256) @@ -210,6 +211,7 @@ check_function_exists(HMAC_Update HAVE_HMAC_UPDATE) check_function_exists(OPENSSL_config HAVE_OPENSSL_CONFIG) check_function_exists(SHA512_Update HAVE_SHA512_UPDATE) +set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_LIBRARIES) set(UNBOUND_CONFIGFILE "${CMAKE_INSTALL_PREFIX}/etc/unbound/unbound.conf" diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 75b51464..89b17fbb 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -632,7 +632,7 @@ namespace cryptonote } else { - on_ac_power = !battery_powered; + on_ac_power = !(bool)battery_powered; } if( m_is_background_mining_started ) diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h index 1b2c3fa5..2a65e940 100644 --- a/src/cryptonote_config.h +++ b/src/cryptonote_config.h @@ -164,6 +164,7 @@ namespace config uint32_t const GENESIS_NONCE = 10000; std::string const GOVERNANCE_WALLET_ADDRESS = "hvxy7YfeE8SdTrCmSqLB59WoQn3ZQun1aLX36X3eb1R7Fb26VuNpc235q4fguGUxfGKerywFPnweu15S8RB8DzTJ8Q4hGJCgvv"; + std::string const GOVERNANCE_WALLET_ADDRESS_MULTI = "hvxy3f2PhAhimkeLf617BsbVn6UTbofVcMzofXGsSNLoMFr2SrSxRJ9f52Am1QLVddKetXPKHoTLbBaLNT1kMU6Q3kYRc3t6pF"; namespace testnet { @@ -179,6 +180,7 @@ namespace config std::string const GENESIS_TX = "013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd0880712101168d0c4ca86fb55a4cf6a36d31431be1c53a3bd7411bb24e8832410289fa6f3b"; uint32_t const GENESIS_NONCE = 10001; - std::string const GOVERNANCE_WALLET_ADDRESS = "hvtaNJ3NX37g5H1cNS77CoRWgLTSkPciY8t2VDYcKkXkAsdjMtmKBJiLA4cfwn4t2tNUv74p7C6fb7Ti2Yu3azRNAD4BK7BMpt"; + std::string const GOVERNANCE_WALLET_ADDRESS = "hvxy7YfeE8SdTrCmSqLB59WoQn3ZQun1aLX36X3eb1R7Fb26VuNpc235q4fguGUxfGKerywFPnweu15S8RB8DzTJ8Q4hGJCgvv"; + std::string const GOVERNANCE_WALLET_ADDRESS_MULTI = "hvxy3f2PhAhimkeLf617BsbVn6UTbofVcMzofXGsSNLoMFr2SrSxRJ9f52Am1QLVddKetXPKHoTLbBaLNT1kMU6Q3kYRc3t6pF"; } } diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 22abc529..00ee5b18 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -93,7 +93,8 @@ static const struct { // version 1 from the start of the blockchain { 1, 1, 0, 1517398427 }, { 2, 38500, 0, 1522818000 }, // 4th April 2018 - { 3, 89200, 0, 1528942500 } // 14th June 2018 + { 3, 89200, 0, 1528942500 }, // 14th June 2018 + { 4, 283000, 0, 1552960800 } // 19th March 2019 }; static const struct { @@ -1054,6 +1055,7 @@ bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height) LOG_PRINT_L3("Blockchain::" << __func__); CHECK_AND_ASSERT_MES(b.miner_tx.vin.size() == 1, false, "coinbase transaction in the block has no inputs"); CHECK_AND_ASSERT_MES(b.miner_tx.vin[0].type() == typeid(txin_gen), false, "coinbase transaction in the block has the wrong type"); + CHECK_AND_ASSERT_MES(b.miner_tx.rct_signatures.type == rct::RCTTypeNull, false, "V1 miner transactions are not allowed."); if(boost::get(b.miner_tx.vin[0]).height != height) { MWARNING("The miner transaction in block has invalid height: " << boost::get(b.miner_tx.vin[0]).height << ", expected: " << height); @@ -1106,10 +1108,19 @@ bool Blockchain::validate_miner_transaction(const block& b, size_t cumulative_bl } std::string governance_wallet_address_str; - if (m_testnet) { - governance_wallet_address_str = ::config::testnet::GOVERNANCE_WALLET_ADDRESS; + + if (version >= 4) { + if (m_testnet) { + governance_wallet_address_str = ::config::testnet::GOVERNANCE_WALLET_ADDRESS_MULTI; + } else { + governance_wallet_address_str = ::config::GOVERNANCE_WALLET_ADDRESS_MULTI; + } } else { - governance_wallet_address_str = ::config::GOVERNANCE_WALLET_ADDRESS; + if (m_testnet) { + governance_wallet_address_str = ::config::testnet::GOVERNANCE_WALLET_ADDRESS; + } else { + governance_wallet_address_str = ::config::GOVERNANCE_WALLET_ADDRESS; + } } if (!validate_governance_reward_key(m_db->height(), governance_wallet_address_str, b.miner_tx.vout.size() - 1, boost::get(b.miner_tx.vout.back().target).key, m_testnet)) @@ -2460,11 +2471,11 @@ bool Blockchain::check_tx_outputs(const transaction& tx, tx_verification_context } - // from v4, allow bulletproofs - if (hf_version < 4) { + // from v5, allow bulletproofs + if (hf_version < 5) { if (!tx.rct_signatures.p.bulletproofs.empty()) { - MERROR("Bulletproofs are not allowed before v4"); + MERROR("Bulletproofs are not allowed before v5"); tvc.m_invalid_output = true; return false; } diff --git a/src/version.cpp.in b/src/version.cpp.in index 44448052..282e5d38 100644 --- a/src/version.cpp.in +++ b/src/version.cpp.in @@ -1,5 +1,5 @@ #define DEF_HAVEN_VERSION_TAG "@VERSIONTAG@" -#define DEF_HAVEN_VERSION "3.1.0" +#define DEF_HAVEN_VERSION "3.2.0" #define DEF_HAVEN_RELEASE_NAME "Caffeine" #define DEF_HAVEN_VERSION_FULL DEF_HAVEN_VERSION "-" DEF_HAVEN_VERSION_TAG