Commit Graph

966 Commits

Author SHA1 Message Date
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