Commit graph

1099 commits

Author SHA1 Message Date
moneromooo-monero
a59c27465b
unit_tests: fix crash in debug in output_distribution test
updating the block size limit needs recent block sizes,
so we feed it dummy ones
2019-04-25 22:49:10 +00:00
moneromooo-monero
0eb0d6b802
rpc: improve get_output_distribution
It can now handle small reorgs without having to rescan the
whole blockchain.

Also add a test for it.
2019-04-25 16:49:29 +00:00
Riccardo Spagni
973405018f
Merge pull request #5483
c0736643 unit_tests: don't delete log file on windows, it will fail (moneromooo-monero)
2019-04-24 22:40:40 +02:00
Riccardo Spagni
eb1da46ac1
Merge pull request #5467
aba2b2e7 functional_tests: reset blockchain on test start (moneromooo-monero)
375fde94 hardfork: fix off by one updating fork index after popping (moneromooo-monero)
2019-04-24 22:37:16 +02:00
moneromooo-monero
1a93aa4b79
functional_tests: add get_fee_estimate to blockchain test 2019-04-24 13:27:35 +00:00
moneromooo-monero
df83ed74e4
consensus: from v12, enforce >= 2 outputs 2019-04-23 22:09:35 +00:00
moneromooo-monero
36ced06727
functional_tests: flush stdout before popening new process 2019-04-23 18:22:09 +00:00
moneromooo-monero
c07366430a
unit_tests: don't delete log file on windows, it will fail 2019-04-23 15:27:54 +00:00
moneromooo-monero
aba2b2e7a2
functional_tests: reset blockchain on test start 2019-04-20 11:28:19 +00:00
Lee Clagett
55aae6a9a3 Fix socks tests in windows and handle errors better 2019-04-19 01:10:02 -04:00
Riccardo Spagni
ef1f1c5314
Merge pull request #5465
3e50a9e8 functional_tests: detect requests python module (moneromooo-monero)
2019-04-18 22:14:44 +02:00
moneromooo-monero
3e50a9e8fc
functional_tests: detect requests python module 2019-04-18 19:33:01 +00:00
moneromooo-monero
35e0a968bd
wallet2: "output lineup" fake out selection
Based on python code by sarang:
https://github.com/SarangNoether/skunkworks/blob/outputs/outputs/simulate.py
2019-04-18 15:14:38 +00:00
Riccardo Spagni
7973fb6a69
Merge pull request #5415
299052bc Remove unneeded SFINAE on check_tx/block verification in core_tests (Doyle)
2019-04-17 08:28:16 +02:00
Riccardo Spagni
e9464eb5e3
Merge pull request #5413
5fafb90e testdb: add override keyword where missing (stoffu)
2019-04-17 08:27:36 +02:00
stoffu
5fafb90e91
testdb: add override keyword where missing
and delete obsolete BlockchainBDB::get_tx_output_indices along the way
2019-04-17 10:26:25 +09:00
Doyle
299052bca3 Remove unneeded SFINAE on check_tx/block verification in core_tests 2019-04-17 10:43:14 +10:00
moneromooo-monero
e3dea47859
unit_tests: undo is_blocked implementation factoring
The is_host_blocked method is not on master yet
2019-04-16 22:23:15 +00:00
Riccardo Spagni
f376cd5605
Merge pull request #5446
7d79222f daemon: remove debug info (moneromooo-monero)
8fec0f98 functional_tests: add sweep_single test (moneromooo-monero)
9880d61b wallet_rpc_server: remove unused code (moneromooo-monero)
8a61b33d rpc: omit irrelevant fields for pool txes in gettransactions (moneromooo-monero)
56508524 rpc: add relayed in get_transaction output (moneromooo-monero)
82e510f1 rpc: set default log category in core_rpc_server.h (moneromooo-monero)
2019-04-16 22:46:29 +02:00
Riccardo Spagni
8d16e92dcb
Merge pull request #5425
58585986 p2p: fix integer overflow in host bans (moneromooo-monero)
2019-04-16 22:38:56 +02:00
Riccardo Spagni
a1ea611e24
Merge pull request #5424
93bb2f48 ringct: prevent use of full ringct signatures for more than one input (moneromooo-monero)
2019-04-16 22:38:32 +02:00
Riccardo Spagni
0d2aaac15b
Merge pull request #5414
e9fac29a unit_tests/long_term_block_weight: some tweaks that seem to make more sense (stoffu)
467f4c7e tests/block_weight: use integer division when computing median (stoffu)
815d08dc tests/block_weight: remove unused MULTIPLIER_SMALL (stoffu)
661f1fb8 blockchain: remove unused calc of short_term_constraint (stoffu)
2019-04-16 22:37:02 +02:00
Riccardo Spagni
45a4145f87
Merge pull request #5409
ac874e2d tests: fix test_options initialization error (Dusan Klinec)
2019-04-16 22:34:30 +02:00
Riccardo Spagni
46c477ab30
Merge pull request #5400
5e673c03 blockchain_db: fix db txn ending too early (moneromooo-monero)
2019-04-16 22:30:40 +02:00
moneromooo-monero
8fec0f9831
functional_tests: add sweep_single test 2019-04-15 09:13:31 +00:00
Riccardo Spagni
9bd0983d5e
Merge pull request #5402
cbf32241 rpc: make wide_difficulty hexadecimal (moneromooo-monero)
2019-04-15 09:18:10 +02:00
Riccardo Spagni
e31559d319
Merge pull request #5398
41901b8d device/trezor: env-configurable ports (Dusan Klinec)
c97a1f79 tests: trezor tests fixes and improvements (Dusan Klinec)
2019-04-15 09:17:47 +02:00
Riccardo Spagni
07c1734985
Merge pull request #5393
c5d3ea2f tests: add a few try/catch in main to shut coverity up (moneromooo-monero)
2019-04-15 09:14:48 +02:00
moneromooo-monero
5e673c03fe
blockchain_db: fix db txn ending too early
The db txn in add_block ending caused the entire overarching
batch txn to stop.
Also add a new guard class so a db txn can be stopped in the
face of exceptions.

Also use a read only db txn in init when the db itself is
read only, and do not save the max tx size in that case.
2019-04-14 08:35:38 +00:00
moneromooo-monero
5858598604
p2p: fix integer overflow in host bans 2019-04-11 21:59:27 +00:00
moneromooo-monero
93bb2f48f7
ringct: prevent use of full ringct signatures for more than one input 2019-04-11 19:44:06 +00:00
Riccardo Spagni
716f5a2a6a
Merge pull request #5384
0eee6cd7 block_weight: catch exceptions in main for clean exit on error (moneromooo-monero)
4b3bb829 epee: init a new ssl related variable in ctor (moneromooo-monero)
2019-04-11 13:15:20 +02:00
moneromooo-monero
0eee6cd7fe
block_weight: catch exceptions in main for clean exit on error 2019-04-11 11:10:18 +00:00
moneromooo-monero
8646bd0086
functional_tests: exit with 1 if any test fails 2019-04-11 11:08:27 +00:00
moneromooo-monero
04a20cb242
functional_tests: cold signing key images/outputs import/export 2019-04-11 11:08:20 +00:00
moneromooo-monero
798e3cad2b
functional_tests: add double spend detection tests 2019-04-11 11:08:17 +00:00
moneromooo-monero
7c657bb2dd
functional_tests: add alt chains tests 2019-04-11 11:08:15 +00:00
moneromooo-monero
f8be31d269
functional_tests: add wallet creation language tests 2019-04-11 11:08:12 +00:00
moneromooo-monero
2d68b31f3e
functional_tests: add more wallet tests
get_transfer_by_txid, get_height, open/close
2019-04-11 11:08:09 +00:00
moneromooo-monero
b3a32d5505
functional_tests: add describe_transfer tests 2019-04-11 11:08:04 +00:00
moneromooo-monero
064ab12340
functional_tests: add more blockchain related tests
Related to emission, reorgs, getting tx data back, output
distribution and histogram
2019-04-11 11:07:58 +00:00
moneromooo-monero
21b1ac1dd2
functional_tests: add bans tests 2019-04-11 11:07:55 +00:00
Dusan Klinec
41901b8deb
device/trezor: env-configurable ports 2019-04-10 18:29:24 +02:00
Dusan Klinec
c97a1f79d6
tests: trezor tests fixes and improvements
- configurable hardforks via env vars
2019-04-10 17:00:12 +02:00
Dusan Klinec
f29fecd517
build: debug and test builds via contrib 2019-04-10 15:43:52 +02:00
stoffu
e9fac29a4b
unit_tests/long_term_block_weight: some tweaks that seem to make more sense 2019-04-09 20:21:45 +09:00
stoffu
467f4c7ed3
tests/block_weight: use integer division when computing median 2019-04-09 19:40:57 +09:00
stoffu
815d08dc5f
tests/block_weight: remove unused MULTIPLIER_SMALL 2019-04-09 19:40:52 +09:00
Dusan Klinec
ac874e2d40
tests: fix test_options initialization error 2019-04-07 18:18:54 +02:00
Riccardo Spagni
c34930c207
Merge pull request #5391
71907980 unit_tests: fix long term block weight test after cache change (moneromooo-monero)
2019-04-06 16:04:27 +02:00
Riccardo Spagni
55e3980d89
Merge pull request #5353
1bc78cc2 tests: trezor_test fix (Dusan Klinec)
2019-04-06 16:02:16 +02:00
Riccardo Spagni
c96fc4bf59
Merge pull request #5341
0218bc49 test: hmac_keccak - fix number of chunks counting (Dusan Klinec)
2019-04-06 15:57:28 +02:00
moneromooo-monero
cbf3224180
rpc: make wide_difficulty hexadecimal
This should be friendlier for clients which don't have bignum support
2019-04-05 16:30:16 +00:00
moneromooo-monero
c5d3ea2fef
tests: add a few try/catch in main to shut coverity up 2019-04-03 16:24:09 +00:00
moneromooo-monero
7190798049
unit_tests: fix long term block weight test after cache change 2019-04-03 00:10:48 +00:00
Riccardo Spagni
4308a2e173
Merge pull request #5318
1a91385e block_weight: fix python 2/3 compatibility (moneromooo-monero)
2019-04-01 17:37:57 +02:00
Riccardo Spagni
29e4e70f30
Merge pull request #5352
ae6885f6 blockchain: incremental long term block weight cache (moneromooo-monero)
9b687c78 blockchain: simple cache for the long term block weights (moneromooo-monero)
2019-04-01 17:34:02 +02:00
Riccardo Spagni
e601028649
Merge pull request #5331
32973434 python-rpc: add getblockheadersrange daemon RPC (moneromooo-monero)
c7bfdc35 python-rpc: add console.py (moneromooo-monero)
22b644f4 functional_tests: move RPC API to utils, it is not test specific (moneromooo-monero)
30c865f0 functional_tests: add balance tests (moneromooo-monero)
fdfa832f functional_tests: add missing parameters to get_balance (moneromooo-monero)
cf6d7759 functional_tests: add proofs tests (tx key, in/out tx, reserve) (moneromooo-monero)
a3144bd7 functional_tests: add more transfer tests (moneromooo-monero)
5d580bfa functional_tests: add get_bulk_transfer tests (moneromooo-monero)
0becbd16 functional_tests: add message signing/verification tests (moneromooo-monero)
a5dbf7f5 functional_tests: add multisig and cold signing tests (moneromooo-monero)
b2fc5719 functional_tests: support several daemons/wallets (moneromooo-monero)
9e979ffa functional_tests: add txpool RPC tests (moneromooo-monero)
3e93c157 functional_tests: add integrated address tests (moneromooo-monero)
b384309e functional_tests: add basic transfer tests (moneromooo-monero)
ef7681b6 functional_tests: plug RPC tests into the cmake machinery (moneromooo-monero)
18a2ed45 functional_tests: add basic mining tests (moneromooo-monero)
98e280fc functional_tests: add wallet address/subaddress RPC tests (moneromooo-monero)
8dcd4d3d functional_tests: improve RPC blockchain tests (moneromooo-monero)
2019-04-01 17:33:24 +02:00
moneromooo-monero
1a91385eaf
block_weight: fix python 2/3 compatibility 2019-04-01 15:31:52 +00:00
Riccardo Spagni
96e1b4e672
Merge pull request #5289
ab6c3b1d tests: fix path in instructions (moneromooo-monero)
2019-04-01 17:20:06 +02:00
Riccardo Spagni
e55b3f9dda
Merge pull request #5239
91f4c7f4 Make difficulty 128 bit instead of 64 bit (moneromooo-monero)
2019-04-01 17:19:10 +02:00
moneromooo-monero
9b687c7873
blockchain: simple cache for the long term block weights 2019-03-28 18:07:57 +00:00
Dusan Klinec
1bc78cc29a
tests: trezor_test fix 2019-03-26 13:47:28 +01:00
Lee Clagett
7acfa9f3cc Added socks proxy (tor/i2pd/kovri) support to wallet 2019-03-25 01:35:13 +00:00
moneromooo-monero
91f4c7f45f
Make difficulty 128 bit instead of 64 bit
Based on Boolberry work by:
  jahrsg <jahr@jahr.me>
  cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24 21:03:19 +00:00
Dusan Klinec
0218bc497d
test: hmac_keccak - fix number of chunks counting 2019-03-24 20:24:28 +01:00
Riccardo Spagni
37ee4acf48
Merge pull request #5274
dc0c0c91 tests: disable wallet SSL init for tests involving wallet2 (moneromooo-monero)
2019-03-24 19:35:11 +02:00
moneromooo-monero
c7bfdc3566
python-rpc: add console.py
It allows one to connect to a running daemon or wallet, and use
its RPC API from python.

Usage: python -i console.py <port>

It will detect whether it's talking to a daemon or wallet and
initialize itself accordingly.
2019-03-23 18:59:47 +00:00
moneromooo-monero
22b644f47e
functional_tests: move RPC API to utils, it is not test specific 2019-03-22 15:29:44 +00:00
moneromooo-monero
30c865f0f8
functional_tests: add balance tests 2019-03-22 15:29:44 +00:00
moneromooo-monero
fdfa832f00
functional_tests: add missing parameters to get_balance 2019-03-22 15:29:44 +00:00
moneromooo-monero
cf6d775964
functional_tests: add proofs tests (tx key, in/out tx, reserve) 2019-03-21 19:28:56 +00:00
moneromooo-monero
a3144bd7c8
functional_tests: add more transfer tests
manual relay, transfer to integrated address, and a few negative
transfer tests
2019-03-21 19:28:44 +00:00
moneromooo-monero
5d580bfa9c
functional_tests: add get_bulk_transfer tests 2019-03-21 19:28:44 +00:00
moneromooo-monero
0becbd1612
functional_tests: add message signing/verification tests 2019-03-21 19:28:44 +00:00
moneromooo-monero
a5dbf7f5fa
functional_tests: add multisig and cold signing tests 2019-03-21 19:28:15 +00:00
moneromooo-monero
b2fc571943
functional_tests: support several daemons/wallets 2019-03-21 19:28:06 +00:00
moneromooo-monero
9e979ffa22
functional_tests: add txpool RPC tests 2019-03-21 19:28:06 +00:00
moneromooo-monero
3e93c157bd
functional_tests: add integrated address tests 2019-03-21 19:27:47 +00:00
moneromooo-monero
b384309e17
functional_tests: add basic transfer tests 2019-03-21 19:27:45 +00:00
moneromooo-monero
ef7681b699
functional_tests: plug RPC tests into the cmake machinery 2019-03-21 19:27:42 +00:00
moneromooo-monero
18a2ed4518
functional_tests: add basic mining tests 2019-03-21 19:26:49 +00:00
moneromooo-monero
98e280fcb8
functional_tests: add wallet address/subaddress RPC tests 2019-03-21 19:26:49 +00:00
moneromooo-monero
8dcd4d3d11
functional_tests: improve RPC blockchain tests 2019-03-21 19:26:49 +00:00
Riccardo Spagni
5ac46c5310
Merge pull request #5256
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
2019-03-21 14:48:40 +02:00
Riccardo Spagni
39107e18d5
Merge pull request #5251
7632dede crypto: fix PaX issue on NetBSD with CNv4 JIT (moneromooo-monero)
89b1630e gtest: build fix for NetBSD (moneromooo-monero)
fa43b547 tests: handle any cmake detected python interpreter (moneromooo-monero)
2019-03-21 14:47:43 +02:00
Riccardo Spagni
48e3a341f8
Merge pull request #5211
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec)
a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec)
d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-21 14:44:04 +02:00
Dusan Klinec
c9b13fbbc2
tests/trezor: HF9 and HF10 tests
- tests fixes for HF10, builder change, rct_config; fix_chain
- get_tx_key test
- proper testing after live refresh added
- live refresh synthetic test
- log available funds for easier test construction
- wallet::API tests with mocked daemon
2019-03-20 21:11:02 +01:00
Dusan Klinec
d74d26f2c9
crypto: hmac_keccak added 2019-03-20 21:11:01 +01:00
Lee Clagett
0c7e7bce18 Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
Riccardo Spagni
edb294ef23
Merge pull request #5240
c8c154a2 tests: fix cnv4-jit-test link on mac (moneromooo-monero)
2019-03-19 09:48:16 +02:00
Riccardo Spagni
c3de019f56
Merge pull request #5192
d0e07b3d performance_tests: fix NetBSD build (moneromooo-monero)
7d88d8f2 discontinue use of alloca (moneromooo-monero)
2019-03-17 17:56:52 +02:00
Riccardo Spagni
4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
moneromooo-monero
ab6c3b1da0
tests: fix path in instructions
Reported by notmike
2019-03-14 19:23:29 +00:00
Riccardo Spagni
c88e992104
Merge pull request #4977
5ea17909 device/trezor: debugging features, trezor tests (Dusan Klinec)
2019-03-14 09:43:02 +02:00
moneromooo-monero
dc0c0c91c5
tests: disable wallet SSL init for tests involving wallet2 2019-03-12 20:43:02 +00:00
moneromooo-monero
4b21d38dfd
blockchain: speed up getting N blocks weights/long term weights 2019-03-08 12:04:14 +00:00
moneromooo-monero
89b1630e35
gtest: build fix for NetBSD 2019-03-07 16:46:02 +00:00
moneromooo-monero
fa43b54780
tests: handle any cmake detected python interpreter 2019-03-07 16:46:02 +00:00
moneromooo-monero
c8c154a2c9
tests: fix cnv4-jit-test link on mac 2019-03-06 15:29:55 +00:00
binaryFate
1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
Riccardo Spagni
5bbbe3902b
Merge pull request #4852
057c279c epee: add SSL support (Martijn Otto)
2019-03-05 16:21:30 +02:00
Martijn Otto
057c279cb4
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-03-05 14:16:08 +01:00
Dusan Klinec
5ea17909ca
device/trezor: debugging features, trezor tests 2019-03-05 14:02:45 +01:00
moneromooo-monero
88c85c18e0
cryptonote: avoid double parsing blocks when syncing 2019-03-05 11:58:18 +00:00
moneromooo-monero
79b4e9f377
save some database calls when getting top block hash and height 2019-03-05 11:58:05 +00:00
moneromooo-monero
b044d03a51
Avoid repeated (de)serialization when syncing 2019-03-05 11:57:55 +00:00
Riccardo Spagni
d3f39da7c8
Merge pull request #5117
fcd00079 unit_tests: remove leftover debug print (moneromooo-monero)
2019-03-04 21:26:14 +02:00
Riccardo Spagni
a28237c9ca
Merge pull request #5102
1eef0565 performance_tests: better stats, and keep track of timing history (moneromooo-monero)
2019-03-04 21:22:51 +02:00
moneromooo-monero
0de14396b9
tests: add a CNv4 JIT test 2019-03-04 11:56:55 +00:00
moneromooo-monero
b9a618848f
performance_tests: add tests for new Cryptonight variants 2019-03-04 11:56:38 +00:00
Riccardo Spagni
1b4fa00d7c
Merge pull request #5126
f1fb06b1 Fixed path to int-util.h (SChernykh)
9da0892b Adding cnv4-2 tweaks (SChernykh)
f51397b3 Cryptonight variant 4 aka CryptonightR (SChernykh)
2019-03-04 12:10:16 +02:00
moneromooo-monero
b8787f4302
ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.

Note: the long term block weight is stored in the database, but not in the actual block itself,
since it requires recalculating anyway for verification.
2019-03-04 09:33:58 +00:00
moneromooo-monero
d0e07b3d86
performance_tests: fix NetBSD build 2019-02-25 11:11:09 +00:00
SChernykh
9da0892b10 Adding cnv4-2 tweaks
Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
2019-02-14 20:42:50 +01:00
SChernykh
f51397b306 Cryptonight variant 4 aka CryptonightR
It introduces random integer math into the main loop.
2019-02-14 11:29:54 +01:00
moneromooo-monero
fcd0007952
unit_tests: remove leftover debug print 2019-02-01 19:14:55 +00:00
Lee Clagett
973403bc9f Adding initial support for broadcasting transactions over Tor
- Support for ".onion" in --add-exclusive-node and --add-peer
  - Add --anonymizing-proxy for outbound Tor connections
  - Add --anonymous-inbounds for inbound Tor connections
  - Support for sharing ".onion" addresses over Tor connections
  - Support for broadcasting transactions received over RPC exclusively
    over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28 23:56:33 +00:00
moneromooo-monero
f6db59b011
notify: handle arbitrary tags 2019-01-28 19:32:28 +00:00
Riccardo Spagni
8fafdc4767
Merge pull request #5064
5ecc5cc7 added two tests for partial word and case tolerance in mnemonics (Paul Shapiro)
2019-01-28 21:30:54 +02:00
Riccardo Spagni
0daa00e035
Merge pull request #5052
b6534c40 ringct: remove unused senderPk from ecdhTuple (moneromooo-monero)
7d375981 ringct: the commitment mask is now deterministic (moneromooo-monero)
99d946e6 ringct: encode 8 byte amount, saving 24 bytes per output (moneromooo-monero)
cdc3ccec ringct: save 3 bytes on bulletproof size (moneromooo-monero)
f931e16c add a bulletproof version, new bulletproof type, and rct config (moneromooo-monero)
2019-01-28 21:24:55 +02:00
moneromooo-monero
1eef056588
performance_tests: better stats, and keep track of timing history 2019-01-28 15:45:37 +00:00
moneromooo-monero
b6534c40e6
ringct: remove unused senderPk from ecdhTuple
This was an early ringct field, which was never used in production
2019-01-22 23:17:42 +00:00
moneromooo-monero
7d37598158
ringct: the commitment mask is now deterministic
saves space in the tx and is safe

Found by knaccc
2019-01-22 23:17:39 +00:00
moneromooo-monero
99d946e619
ringct: encode 8 byte amount, saving 24 bytes per output
Found by knaccc
2019-01-22 23:17:31 +00:00
moneromooo-monero
f931e16c6e
add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-01-22 23:17:24 +00:00
moneromooo-monero
b750fb27b0
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.

No other data is currently pruned.

There are three ways to prune a blockchain:

- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility

The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.

The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.

Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2019-01-22 20:30:51 +00:00
Riccardo Spagni
08f08beede
Merge pull request #5046
524bf750 core_tests: add a --list_tests command line switch (moneromooo-monero)
2019-01-18 19:00:16 +02:00
Riccardo Spagni
aa5b0c7f71
Merge pull request #5028
464097e5 blockchain_ancestry: allow getting ancestry of a single output (moneromooo-monero)
a6216d1a blockchain_db: allow getting output keys without commitment (moneromooo-monero)
2019-01-18 09:25:34 +02:00
moneromooo-monero
a6216d1ac2
blockchain_db: allow getting output keys without commitment
Since the commitment has to be calculated for non rct outputs,
it slows down a lot unnecessarily if we don't need it
2019-01-16 20:13:08 +00:00
moneromooo-monero
21777daf6e
epee: speedup word/number matching
Number matching semantics are slightly changed: since this is used
as a filter to check whether a number is signed and/or floating
point, we can speed this up further. strto* functions are called
afterwards and will error out where necessary. We now also accept
numbers like .4 which were not accepted before.

The strto* calls on a boost::string_ref will not access unallocated
memory since the parsers always stop at the first bad character,
and the original string is zero terminated.

in arbitrary time measurement units for some arbitrary test case:

match_number2: 235 -> 70
match_word2: 330 -> 108
2019-01-16 19:59:40 +00:00
Riccardo Spagni
7e172dc8b0
Merge pull request #5036
d6dde478 remove trailing whitespace in README.md (David Meister)
2019-01-16 21:41:09 +02:00
Riccardo Spagni
36d420413b
Merge pull request #5005
306a1244 core_tests: rename invalid multisig tests to read "invalid" (moneromooo-monero)
2019-01-16 19:28:15 +02:00
Riccardo Spagni
3e9bb9626a
Merge pull request #5001
a5ffc2d5 Remove boost::lexical_cast for uuid and unused uuid function (Lee Clagett)
2019-01-16 19:27:13 +02:00
Riccardo Spagni
9d57ee9ff6
Merge pull request #4984
008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
2019-01-16 19:06:07 +02:00
Riccardo Spagni
846362842c
Merge pull request #4976
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-16 19:04:22 +02:00
Paul Shapiro
5ecc5cc790 added two tests for partial word and case tolerance in mnemonics 2019-01-11 13:46:20 -06:00
moneromooo-monero
524bf750c0
core_tests: add a --list_tests command line switch 2019-01-07 14:42:19 +00:00
moneroexamples
ec68cf822f Make get_output_key method const
get_output_key method is commonly used when working with txs and their key images. Because the method is not const, passing blockchain object though const& or pointers to const is not possible in this context. This is especially problematic in external projects (e.g., projects in moneroexamples) that use monero C++ api to operate on the blockchain and txs.

Thus, having get_output_key method will simplify moving blockchain object around through const references and pointers to const objects.
2019-01-07 05:53:14 +08:00
Riccardo Spagni
577a8f5c84
Merge pull request #4952
570dd369 p2p: use vector instead of list for peer lists (moneromooo-monero)
2019-01-06 20:39:07 +02:00
David Meister
d6dde478de remove trailing whitespace in README.md 2019-01-02 12:25:18 +11:00
luigi1111
4a78bcd275
Merge pull request #4941
1cfd6f1 unit_tests: strengthen notify test against OS scheduling (moneromooo-monero)
2018-12-31 15:48:52 -06:00
moneromooo-monero
85665003a7
epee: better network buffer data structure
avoids pointless allocs and memcpy
2018-12-23 16:46:07 +00:00
Lee Clagett
a5ffc2d5ad Remove boost::lexical_cast for uuid and unused uuid function 2018-12-23 11:11:30 +00:00
moneromooo-monero
306a124494
core_tests: rename invalid multisig tests to read "invalid" 2018-12-22 01:31:43 +00:00
moneromooo-monero
008647d7eb
blockchain_db: speedup tx output gathering
We know all the data we'll want for getblocks.bin is contiguous
2018-12-18 11:55:21 +00:00
Riccardo Spagni
d855f9bb92
Merge pull request #4901
a48f2dab blockchain_prune_known_spent_data: blackball file is now optional (moneromooo-monero)
17b45725 Outputs where all amounts are known spent can now be pruned (moneromooo-monero)
2018-12-12 11:57:31 +02:00
Riccardo Spagni
dde1e69723
Merge pull request #4787
3dba7f25 protocol: option to pad transaction relay to the next kB (moneromooo-monero)
2018-12-12 11:53:10 +02:00
moneromooo-monero
570dd3690e
p2p: use vector instead of list for peer lists 2018-12-07 13:20:34 +00:00
moneromooo-monero
1cfd6f1060
unit_tests: strengthen notify test against OS scheduling 2018-12-05 00:32:02 +00:00
Riccardo Spagni
36219feff1
Merge pull request #4895
3de7d52f unit_tests: fix malloc/delete mismatch (moneromooo-monero)
2018-12-04 17:33:31 +02:00
Riccardo Spagni
81418cb281
Merge pull request #4894
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero)
1a0733e5 windows_service: fix memory leak (moneromooo-monero)
0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero)
5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero)
d4f50cb1 remove some unused code (moneromooo-monero)
61163971 a few minor (but easy) performance tweaks (moneromooo-monero)
30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04 17:33:19 +02:00
moneromooo-monero
ec1a62b50d
move int-util.h to epee 2018-12-04 15:14:29 +00:00
Riccardo Spagni
c00ac446fd
Merge pull request #4854
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
Riccardo Spagni
40650b43b8
Merge pull request #4850
b36353e2 unit_tests: add some hex parsing test for non hex input (xiphon)
6671110c unit_tests: add a test for parse_hexstr_to_binbuff (moneromooo-monero)
f6187cd8 epee: speed up parse_hexstr_to_binbuff a little (Howard Chu)
2018-12-04 17:07:19 +02:00
Riccardo Spagni
3552553f89
Merge pull request #4848
80be2dca unit_tests: don't take the address of an unwrapped secret key (moneromooo-monero)
2018-12-04 17:06:47 +02:00
moneromooo-monero
17b45725af
Outputs where all amounts are known spent can now be pruned
Only for pre rct for obvious reasons.

Note: DO NOT use a known spent list which includes outputs
which are not known spent. If the list includes any output
that's just strongly thought to be spent, but not provably
so, you risk finding yourself unable to sync past the point
where that output is spent.

I estimate only 200 MB saved on current mainnet though,
unless the new blackballing rule unearths a good amount of
large-amount-set extra spent outs.
2018-11-27 15:45:42 +00:00
Riccardo Spagni
58ce16d4d9
Merge pull request #4821
fc98f7a0 rpc: speedup get_outs.bin (moneromooo-monero)
2018-11-26 21:51:27 +02:00
moneromooo-monero
fc98f7a0a1
rpc: speedup get_outs.bin 2018-11-26 18:56:23 +00:00
Riccardo Spagni
6e100964ea
Merge pull request #4832
9da6c52b unit_tests: add logging unit test (moneromooo-monero)
2018-11-26 20:29:53 +02:00
moneromooo-monero
3de7d52f7c
unit_tests: fix malloc/delete mismatch 2018-11-23 15:55:41 +00:00
moneromooo-monero
0dac3c6428
unit_tests: do not rethrow a copy of an exception
Found by codacy.com
2018-11-23 15:38:00 +00:00
moneromooo-monero
d4f50cb109
remove some unused code
Found by codacy.com
2018-11-23 15:37:36 +00:00
moneromooo-monero
3002307418
tests: slow_memmem now returns size_t
Makes more sense than uint64_t for an offset, and agrees with
the %zu used to print results.

Found by codacy.com
2018-11-23 15:36:48 +00:00
moneromooo-monero
80be2dca2b
unit_tests: don't take the address of an unwrapped secret key 2018-11-16 19:36:02 +00:00
moneromooo-monero
31d80027b5
tests: add unit tests for get_output_distribution 2018-11-16 19:21:45 +00:00
Riccardo Spagni
afaff5fb77
Merge pull request #4803
fa3f756b unit_tests: fix leak when the test check fails (moneromooo-monero)
2018-11-16 11:15:15 +02:00
Riccardo Spagni
46f989bc49
Merge pull request #4795
5d7c2316 rct: add a zeroCommit cache for common pre-rct case (moneromooo-monero)
2018-11-16 11:11:10 +02:00
xiphon
b36353e268
unit_tests: add some hex parsing test for non hex input 2018-11-15 23:34:15 +00:00
moneromooo-monero
6671110ca3
unit_tests: add a test for parse_hexstr_to_binbuff 2018-11-15 23:34:15 +00:00
Martijn Otto
bd98e99c80
Removed a lot of unnecessary includes 2018-11-15 17:29:34 +01:00
Riccardo Spagni
0cc3fc3756
Merge pull request #4769
5808530f blockchain: remove unused output_scan_worker parameter (moneromooo-monero)
1426209a blockchain: don't run threads if we have just one function to run (moneromooo-monero)
6f7a5fd4 db_lmdb: slight speedup getting array data from the blockchain (moneromooo-monero)
99fbe100 db_lmdb: save some string copies for readonly db keys/values (moneromooo-monero)
bf31447e tx_pool: speed up take_tx for transactions from blocks (moneromooo-monero)
4f005a77 tx_pool: remove unnecessary get_transaction_hash (moneromooo-monero)
593ef598 perf_timer: call reserve on new timer array (moneromooo-monero)
6ecc99ad core: avoid unnecessary tx/blob conversions (moneromooo-monero)
00cc1a16 unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
2018-11-14 21:35:03 +02:00
stoffu
6d3311aceb
libwallet_api_tests: add missing dependency on Boost Locale and ICU 2018-11-15 00:19:41 +09:00
moneromooo-monero
9da6c52bb2
unit_tests: add logging unit test 2018-11-09 16:57:03 +00:00
Riccardo Spagni
f7edda5304
Merge pull request #4739
9c1c92db tests: fix MSYS2 gcc 7.3.0 warning -Wtype-limits (xiphon)
2018-11-06 21:32:06 +02:00
Riccardo Spagni
e00a6ce9c7
Merge pull request #4732
3a056b73 performance_tests: add ge_p3_tobytes (moneromooo-monero)
30f728e3 performance_tests: measure ge_frombytes_vartime only (moneromooo-monero)
2018-11-06 21:30:40 +02:00
moneromooo-monero
3dba7f252e
protocol: option to pad transaction relay to the next kB
To help protect one's privacy from traffic volume analysis
for people using Tor or I2P. This will really fly once we
relay txes on a timer rather than on demand, though.

Off by default for now since it's wasteful and doesn't bring
anything until I2P's in.
2018-11-06 15:47:05 +00:00
moneromooo-monero
fa3f756bfb
unit_tests: fix leak when the test check fails
Coverity 189527
2018-11-05 11:15:39 +00:00
moneromooo-monero
5f614ba968
simplewallet: print the number of show/all transfers 2018-11-04 22:27:05 +00:00
moneromooo-monero
8d71b2b1b3
wallet2: only export necessary outputs and key images
and disable annoying test that requires ridiculous amounts
of skullduggery every time some format changes
2018-11-04 22:27:01 +00:00
Riccardo Spagni
6d3d8635be
Merge pull request #4693
74fb3d88 multiexp: some minor speedups (moneromooo-monero)
a6d2e246 bulletproofs: only enable profiling on request (moneromooo-monero)
a110e6aa multiexp: tune which variants to use for which number of points (moneromooo-monero)
8b476722 bulletproofs: speedup prover (moneromooo-monero)
6f9ae5b6 multiexp: handle pippenger multiexps with part precalc (moneromooo-monero)
10e5a927 bulletproofs: maintain -z4, -z5, and -y0 to avoid subtractions (moneromooo-monero)
8629a42c bulletproofs: rework flow to use sarang's fast batch inversion code (moneromooo-monero)
fc9f7d9c bulletproofs: merge multiexps as per sarang's new python code (moneromooo-monero)
4061960a multiexp: pack the digits table when STRAUS_C is 4 (moneromooo-monero)
bf8e4b98 bulletproofs: some more minor speedup (moneromooo-monero)
c415df97 performance_tests: sc_check and ge_dsm_precomp (moneromooo-monero)
a281b950 bulletproofs: remove single value prover (moneromooo-monero)
484155d0 bulletproofs: some more speedup (moneromooo-monero)
a621d6c8 bulletproofs: random minor speedups (moneromooo-monero)
a49a1761 bulletproofs: shave off a lot of scalar muls from the g/h construction (moneromooo-monero)
4564a5d1 bulletproofs: speedup PROVE (moneromooo-monero)
2018-11-04 20:46:42 +02:00
moneromooo-monero
5d7c231604
rct: add a zeroCommit cache for common pre-rct case
This is called for every pre-rct output at blockchain sync time,
and a lot of them wil hit the cache, saving a scalarmult each.
2018-11-04 15:44:56 +00:00
moneromooo-monero
6ecc99ad1f
core: avoid unnecessary tx/blob conversions 2018-11-01 15:51:19 +00:00
moneromooo-monero
00cc1a1657
unit_tests: notify test special case for the usual weirdo 2018-11-01 15:51:16 +00:00
xiphon
9c1c92db65 tests: fix MSYS2 gcc 7.3.0 warning -Wtype-limits 2018-10-29 08:20:15 +03:00
moneromooo-monero
f48db530be
unit_tests: fix notify unit test when /tmp does not exist 2018-10-27 11:19:54 +00:00
Riccardo Spagni
4cbb476cd1
Merge pull request #4721
a9f9406c unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
2018-10-26 22:42:58 +02:00
Riccardo Spagni
b5fafa6c61
Merge pull request #4613
45a6880d unit_tests: call umask before mkstemp (moneromooo-monero)
2018-10-26 22:38:18 +02:00
Riccardo Spagni
1c91963dcd
Merge pull request #4308
9907ea06 cryptonote: sort tx_extra fields (moneromooo-monero)
2018-10-26 22:18:28 +02:00
moneromooo-monero
3a056b7393
performance_tests: add ge_p3_tobytes 2018-10-26 17:02:11 +00:00
moneromooo-monero
30f728e362
performance_tests: measure ge_frombytes_vartime only
not an extra dynamic cast, which might be heavy
2018-10-26 17:01:05 +00:00
moneromooo-monero
a9f9406c5b
unit_tests: notify test special case for the usual weirdo 2018-10-24 21:55:03 +00:00
Riccardo Spagni
af7caf78a1
Merge pull request #4640
11415128 unit_tests: fix notify test when run from make *test (moneromooo-monero)
2018-10-23 11:45:57 +02:00
moneromooo-monero
6f9ae5b6eb
multiexp: handle pippenger multiexps with part precalc 2018-10-22 16:07:44 +00:00
moneromooo-monero
c415df97bd
performance_tests: sc_check and ge_dsm_precomp 2018-10-22 16:07:44 +00:00
Riccardo Spagni
14dbe67fa7
Merge pull request #4521
6653062e unit_tests: add unit test for alloc alignment being a power of 2 (moneromooo-monero)
2018-10-20 20:39:58 +02:00
moneromooo-monero
99cd6f961a
Rename "blackball" for clarity
Apparently some people seem to think it's a censorship list...
2018-10-18 18:45:45 +00:00
moneromooo-monero
1141512811
unit_tests: fix notify test when run from make *test 2018-10-17 21:13:21 +00:00
moneromooo-monero
45a6880d78
unit_tests: call umask before mkstemp
Coverity 188788
2018-10-16 09:19:27 +00:00
iDunk5400
e7f24850d5
Fix Windows build after epee dependency change 2018-10-15 23:08:17 +00:00