Compare commits

..

17 Commits

Author SHA1 Message Date
jwinterm
2d1ce0993d Merge pull request 'update public and seed nodes' (#319) from qvqc/wownero:master into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/319
2020-09-04 19:09:40 +00:00
qvqc
437134b47d update public and seed nodes 2020-09-03 12:22:42 -04:00
jwinterm
74a9ab0b03 Merge pull request 'Deterministic builds work! (for the most part)' (#317) from qvqc/wownero:master into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/317
2020-09-01 19:12:03 +00:00
jwinterm
f33c12396f Merge pull request 'Fix build with Boost 1.74' (#316) from asymptotically/wownero:boost-1.73 into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/316
2020-09-01 19:11:22 +00:00
qvqc
51bf95597d use wownero/wownero git 2020-08-30 16:08:06 -04:00
selsta
45142e0ecb depends: fix broken links for ds_store / mac_alias 2020-08-29 15:41:03 -04:00
qvqc
9e9e4b8485 couple more :3 2020-08-29 13:47:52 -04:00
qvqc
c590033558 update git url for deterministic test 2020-08-29 13:22:16 -04:00
moneromooo-monero
11b13ee36f Fix build with Boost 1.74
Thanks iDunk for testing
2020-08-16 18:26:18 +01:00
jwinterm
04d6c39149 Merge pull request 'cmake: Use job pool feature to limit concurrent jobs' (#314) from asymptotically/wownero:cmake-job-pools into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/314
2020-08-12 22:38:48 +00:00
jwinterm
e805d42c1a Merge pull request 'Dynamic Unlock from HF 16' (#313) from wowario/wownero:dynamic-lock into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/313
2020-08-12 22:38:27 +00:00
wowario
8757282908 use block id 2020-08-08 09:55:48 +03:00
Matt Smith
465b5d85e4 cmake: Use job pool feature to limit concurrent jobs
Add two new options, WOWNERO_PARALLEL_COMPILE_JOBS and
WOWNERO_PARALLEL_LINK_JOBS to try and prevent running out of memory when
building everything.

Requires >= cmake 3.0.0, and the use of the Ninja generator.

Useful links:

* https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html
* https://reviews.llvm.org/D6304
2020-08-05 19:25:33 +01:00
wowario
5b46a0df6d add generated coins and height to unlock calculation 2020-08-01 09:40:24 +03:00
wowario
1eb01bb388 Dynamic Unlock from HF 16 2020-08-01 00:13:27 +03:00
dsc
db89c585da Merge pull request 'difficulty non-void function warning' (#312) from wowario/wownero:diff into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/312
2020-07-30 15:38:29 +00:00
wowario
97dfd5ae74 fix non-void function
Signed-off-by: wowario <wowario@protonmail.com>
2020-07-30 18:01:45 +03:00
18 changed files with 97 additions and 38 deletions

View File

@@ -55,6 +55,21 @@ else()
message(STATUS "ccache deselected")
endif()
# Job pool feature requires Ninja.
if (${CMAKE_VERSION} VERSION_GREATER "3.0.0")
set(WOWNERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")
if (WOWNERO_PARALLEL_COMPILE_JOBS)
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${WOWNERO_PARALLEL_COMPILE_JOBS})
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
endif ()
set(WOWNERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.")
if (WOWNERO_PARALLEL_LINK_JOBS)
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${WOWNERO_PARALLEL_LINK_JOBS})
set(CMAKE_JOB_POOL_LINK link_job_pool)
endif ()
endif()
enable_language(C ASM)
function (die msg)

View File

@@ -41,12 +41,11 @@ Blockchain Explorers
- https://wownero.xmrauctions.com
Free Public Nodes
- wow7dhbgiljnkspkzpjyy66auegbrye2ptfv4gucgbhireg5rrjza5ad.onion:34568
- so.wow.candy.surf:34568 (US)
- such.wow.candy.surf:34568 (CAN)
- very.wow.candy.surf:34568 (IN)
- much.wow.candy.surf:34568 (UK)
- node.suchwow.xyz:34568 (US)
- global.wownodes.com:34568 (Global)
- node.suchwow.xyz:34568 (US)
- wow.pwned.systems:34568 (NL)
- wowbux.org:34568 (CA)
- wowbuxx535x4exuexja2xfezpwcyznxkofui4ndjiectj4yuh2xheiid.onion:34568
Tor Peers
- wowp2p5gelm6vhl2d5tvfqills63jilgy6hkvlrqljooov5ktaxgqdad.onion

View File

@@ -1,9 +1,9 @@
package=native_ds_store
$(package)_version=1.1.0
$(package)_download_path=https://bitbucket.org/al45tair/ds_store/get
$(package)_download_file=v$($(package)_version).tar.bz2
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=921596764d71d1bbd3297a90ef6d286f718794d667e4f81d91d14053525d64c1
$(package)_download_path=https://github.com/al45tair/ds_store/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=a9f4c0755c6be7224ff7029e188dd262e830bb81e801424841db9eb0780ec8ed
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist

View File

@@ -1,9 +1,9 @@
package=native_mac_alias
$(package)_version=1.1.0
$(package)_download_path=https://bitbucket.org/al45tair/mac_alias/get
$(package)_download_file=v$($(package)_version).tar.bz2
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=87ad827e66790028361e43fc754f68ed041a9bdb214cca03c853f079b04fb120
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_download_file=v$($(package)_version).tar.gz
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=b10cb44ecb64fc25283fae7a9cf365d2829377d84e37b9c21100aca8757509be
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_patches=python3.patch

View File

@@ -32,7 +32,7 @@ packages:
- "python3-zmq"
- "unzip"
remotes:
- "url": "https://github.com/wownero/wownero.git"
- "url": "https://git.wownero.com/qvqc/wownero.git"
"dir": "wownero"
files: []
script: |

View File

@@ -5,8 +5,8 @@ import os
import subprocess
import sys
gsigs = 'https://github.com/wownero/gitian.sigs.git'
gbrepo = 'https://github.com/wownero/gitian-builder.git'
gsigs = 'https://git.wownero.com/qvqc/gitian.sigs.git'
gbrepo = 'https://git.wownero.com/qvqc/gitian-builder.git'
platforms = {'l': ['Linux', 'linux', 'tar.bz2'],
'a': ['Android', 'android', 'tar.bz2'],
@@ -118,7 +118,7 @@ def main():
parser = argparse.ArgumentParser(description='Script for running full Gitian builds.', usage='%(prog)s [options] signer version')
parser.add_argument('-c', '--commit', action='store_true', dest='commit', help='Indicate that the version argument is for a commit or branch')
parser.add_argument('-p', '--pull', action='store_true', dest='pull', help='Indicate that the version argument is the number of a github repository pull request')
parser.add_argument('-u', '--url', dest='url', default='https://github.com/wownero/wownero', help='Specify the URL of the repository. Default is %(default)s')
parser.add_argument('-u', '--url', dest='url', default='https://git.wownero.com/wownero/wownero', help='Specify the URL of the repository. Default is %(default)s')
parser.add_argument('-v', '--verify', action='store_true', dest='verify', help='Verify the Gitian build')
parser.add_argument('-b', '--build', action='store_true', dest='build', help='Do a Gitian build')
parser.add_argument('-B', '--buildsign', action='store_true', dest='buildsign', help='Build both signed and unsigned binaries')

View File

@@ -32,7 +32,7 @@ packages:
- "libprotobuf-dev"
- "python3-zmq"
remotes:
- "url": "https://github.com/wownero/wownero.git"
- "url": "https://git.wownero.com/wownero/wownero.git"
"dir": "wownero"
files: []
script: |

View File

@@ -43,13 +43,13 @@ packages:
- "libprotobuf-dev"
- "python3-zmq"
remotes:
- "url": "https://github.com/wownero/wownero.git"
- "url": "https://git.wownero.com/wownero/wownero.git"
"dir": "wownero"
files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu i686-linux-gnu"
HOSTS="x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="date"
HOST_CFLAGS="-O2 -g"

View File

@@ -24,7 +24,7 @@ packages:
- "python-dev"
- "python-setuptools"
remotes:
- "url": "https://github.com/wownero/wownero.git"
- "url": "https://git.wownero.com/wownero/wownero.git"
"dir": "wownero"
files:
- "MacOSX10.11.sdk.tar.gz"

View File

@@ -36,12 +36,12 @@ alternatives:
package: "x86_64-w64-mingw32-gcc"
path: "/usr/bin/x86_64-w64-mingw32-gcc-posix"
remotes:
- "url": "https://github.com/wownero/wownero.git"
- "url": "https://git.wownero.com/wownero/wownero.git"
"dir": "wownero"
files: []
script: |
WRAP_DIR=$HOME/wrapped
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
HOSTS="x86_64-w64-mingw32"
FAKETIME_HOST_PROGS="windres objcopy"
FAKETIME_PROGS="date zip"
HOST_CFLAGS="-O2 -g"

View File

@@ -41,7 +41,6 @@
#define CRYPTONOTE_MAX_TX_SIZE 1000000
#define CRYPTONOTE_MAX_TX_PER_BLOCK 0x10000000
#define CRYPTONOTE_PUBLIC_ADDRESS_TEXTBLOB_VER 0
#define CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW 60
#define CURRENT_TRANSACTION_VERSION 2
#define CURRENT_BLOCK_MAJOR_VERSION 7
#define CURRENT_BLOCK_MINOR_VERSION 7
@@ -178,6 +177,7 @@
#define HF_VERSION_REJECT_SIGS_IN_COINBASE 15
#define HF_VERSION_ENFORCE_MIN_AGE 15
#define HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY 15
#define HF_VERSION_DYNAMIC_UNLOCK 16
#define PER_KB_FEE_QUANTIZATION_DECIMALS 8

View File

@@ -1358,6 +1358,7 @@ difficulty_type Blockchain::get_next_difficulty_for_alternative_chain(const std:
if (m_nettype == TESTNET) {
return next_difficulty_test(timestamps, cumulative_difficulties, T, N, HEIGHT);
}
return next_difficulty(timestamps, cumulative_difficulties, target);
}
//------------------------------------------------------------------
// This function does a sanity check on basic things that all miner
@@ -1384,7 +1385,31 @@ bool Blockchain::prevalidate_miner_transaction(const block& b, uint64_t height,
return false;
}
MDEBUG("Miner tx hash: " << get_transaction_hash(b.miner_tx));
CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW, false, "coinbase transaction transaction has the wrong unlock time=" << b.miner_tx.unlock_time << ", expected " << height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW);
// Dynamic unlock time from HF 16
// To calculate unlock window, get the block hash at height-1337, convert the
// first 3 characters from hexadecimal to decimal, multiply by 2, and then add 288.
// Unlock minimum 1 day (288 blocks), maximum is ~29 days ((4095*2)+288 = 8478 blocks)
// unlock time = unlock_window + height
if (hf_version >= HF_VERSION_DYNAMIC_UNLOCK)
{
crypto::hash blk_id = get_block_id_by_height(height-1337);
std::string hex_str = epee::string_tools::pod_to_hex(blk_id).substr(0, 3);
uint64_t blk_num = std::stol(hex_str,nullptr,16)*2;
uint64_t unlock_window = blk_num + 288;
if (b.miner_tx.unlock_time != height + unlock_window) {
MWARNING("Coinbase transaction has the wrong unlock time=" << b.miner_tx.unlock_time << ", expected " << height + unlock_window);
return false;
}
LOG_PRINT_L1("+++++ MINER TX UNLOCK TIME INFO" <<
"\nHeight: " << height << ", Unlock window: " << unlock_window << ", Unlock time: " << b.miner_tx.unlock_time <<
"\nblk_height: " << height-1337 << ", blk_id: " << blk_id <<
"\nhex_str: " << hex_str << ", blk_num: " << blk_num);
} else {
CHECK_AND_ASSERT_MES(b.miner_tx.unlock_time == height + 60, false, "coinbase transaction transaction has the wrong unlock time="
<< b.miner_tx.unlock_time << ", expected " << height + 60);
}
//check outs overflow
//NOTE: not entirely sure this is necessary, given that this function is
@@ -1722,7 +1747,7 @@ bool Blockchain::create_block_template(block& b, const crypto::hash *from_block,
//make blocks coin-base tx looks close to real coinbase tx to get truthful blob weight
uint8_t hf_version = b.major_version;
size_t max_outs = hf_version >= 4 ? 1 : 11;
bool r = construct_miner_tx(height, median_weight, already_generated_coins, txs_weight, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
bool r = construct_miner_tx(this, height, median_weight, already_generated_coins, txs_weight, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
CHECK_AND_ASSERT_MES(r, false, "Failed to construct miner tx, first chance");
size_t cumulative_weight = txs_weight + get_transaction_weight(b.miner_tx);
#if defined(DEBUG_CREATE_BLOCK_TEMPLATE)
@@ -1731,7 +1756,7 @@ bool Blockchain::create_block_template(block& b, const crypto::hash *from_block,
#endif
for (size_t try_count = 0; try_count != 10; ++try_count)
{
r = construct_miner_tx(height, median_weight, already_generated_coins, cumulative_weight, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
r = construct_miner_tx(this, height, median_weight, already_generated_coins, cumulative_weight, fee, miner_address, b.miner_tx, ex_nonce, max_outs, hf_version);
CHECK_AND_ASSERT_MES(r, false, "Failed to construct miner tx, second chance");
size_t coinbase_weight = get_transaction_weight(b.miner_tx);

View File

@@ -30,6 +30,9 @@
#pragma once
#include <boost/asio/io_service.hpp>
#if BOOST_VERSION >= 107400
#include <boost/serialization/library_version_type.hpp>
#endif
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/version.hpp>
#include <boost/serialization/list.hpp>

View File

@@ -76,7 +76,7 @@ namespace cryptonote
LOG_PRINT_L2("destinations include " << num_stdaddresses << " standard addresses and " << num_subaddresses << " subaddresses");
}
//---------------------------------------------------------------
bool construct_miner_tx(size_t height, size_t median_weight, uint64_t already_generated_coins, size_t current_block_weight, uint64_t fee, const account_public_address &miner_address, transaction& tx, const blobdata& extra_nonce, size_t max_outs, uint8_t hard_fork_version) {
bool construct_miner_tx(const Blockchain *pb, size_t height, size_t median_weight, uint64_t already_generated_coins, size_t current_block_weight, uint64_t fee, const account_public_address &miner_address, transaction& tx, const blobdata& extra_nonce, size_t max_outs, uint8_t hard_fork_version) {
tx.vin.clear();
tx.vout.clear();
tx.extra.clear();
@@ -167,7 +167,16 @@ namespace cryptonote
tx.version = 1;
//lock
tx.unlock_time = height + CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW;
if (hard_fork_version >= HF_VERSION_DYNAMIC_UNLOCK)
{
crypto::hash blk_id = pb->get_block_id_by_height(height-1337);
std::string hex_str = epee::string_tools::pod_to_hex(blk_id).substr(0, 3);
uint64_t blk_num = std::stol(hex_str,nullptr,16)*2;
uint64_t unlock_window = blk_num + 288;
tx.unlock_time = height + unlock_window;
} else {
tx.unlock_time = height + 60;
}
tx.vin.push_back(in);
tx.invalidate_hashes();

View File

@@ -37,7 +37,8 @@
namespace cryptonote
{
//---------------------------------------------------------------
bool construct_miner_tx(size_t height, size_t median_weight, uint64_t already_generated_coins, size_t current_block_weight, uint64_t fee, const account_public_address &miner_address, transaction& tx, const blobdata& extra_nonce = blobdata(), size_t max_outs = 999, uint8_t hard_fork_version = 1);
class Blockchain;
bool construct_miner_tx(const Blockchain *pb, size_t height, size_t median_weight, uint64_t already_generated_coins, size_t current_block_weight, uint64_t fee, const account_public_address &miner_address, transaction& tx, const blobdata& extra_nonce = blobdata(), size_t max_outs = 999, uint8_t hard_fork_version = 1);
struct tx_source_entry
{

View File

@@ -619,11 +619,13 @@ namespace nodetool
}
else
{
full_addrs.insert("138.197.199.19:34567");
full_addrs.insert("165.22.116.169:34567");
full_addrs.insert("139.59.4.6:34567");
full_addrs.insert("158.69.60.225:34567");
full_addrs.insert("159.65.91.59:34567");
full_addrs.insert("158.69.60.225:34567"); // OVH France
full_addrs.insert("159.65.91.59:34567"); // DigiO london
full_addrs.insert("164.90.230.176:34567"); // de1.wownodes.com
full_addrs.insert("64.227.81.144:34567"); // us1.wownodes.com
full_addrs.insert("188.166.237.187:34567"); // sg1.wownodes.com
full_addrs.insert("54.185.62.197:34567"); // node.suchwow.xyz
full_addrs.insert("167.114.196.241:34567"); // wowbux.org
}
return full_addrs;
}

View File

@@ -8097,7 +8097,8 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
const uint64_t amount = td.is_rct() ? 0 : td.amount();
std::unordered_set<uint64_t> seen_indices;
// request more for rct in base recent (locked) coinbases are picked, since they're locked for longer
size_t requested_outputs_count = base_requested_outputs_count + (td.is_rct() ? CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE : 0);
// Unlock minimum 1 day (288 blocks), maximum is ~29 days ((4095*2)+288 = 8478 blocks)
size_t requested_outputs_count = base_requested_outputs_count + (td.is_rct() ? 8478 - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE : 0);
size_t start = req.outputs.size();
bool use_histogram = amount != 0 || !has_rct_distribution;
@@ -8413,7 +8414,8 @@ void wallet2::get_outs(std::vector<std::vector<tools::wallet2::get_outs_entry>>
for(size_t idx: selected_transfers)
{
const transfer_details &td = m_transfers[idx];
size_t requested_outputs_count = base_requested_outputs_count + (td.is_rct() ? CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE : 0);
// Unlock minimum 1 day (288 blocks), maximum is ~29 days ((4095*2)+288 = 8478 blocks)
size_t requested_outputs_count = base_requested_outputs_count + (td.is_rct() ? 8478 - CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE : 0);
outs.push_back(std::vector<get_outs_entry>());
outs.back().reserve(fake_outputs_count + 1);
const rct::key mask = td.is_rct() ? rct::commit(td.amount(), td.m_mask) : rct::zeroCommit(td.amount());

View File

@@ -34,6 +34,9 @@
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
#if BOOST_VERSION >= 107400
#include <boost/serialization/library_version_type.hpp>
#endif
#include <boost/serialization/list.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/deque.hpp>