aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-11-29Merge pull request #7018luigi11112-2/+8
a9cd5d9 cryptonote_core: dandelion - use local height or median height if syncing (xiphon)
2020-11-29Merge pull request #6973luigi11111-0/+109
be84f67 Switch to Dandelion++ fluff mode if no out connections for stem mode (Lee Clagett)
2020-11-29Merge pull request #6937luigi11111-2/+2
8a282f6 Add RELINK_TARGETS, monero_add_target_no_relink and use monero_add_executable/monero_add_library where possible (mj-xmr) Add monero_add_minimal_executable and use in tests (mj-xmr)
2020-11-28Merge pull request #6856luigi11111-18/+0
db70af1 Unit Tests: Remove block reward upper bound size checks (TheCharlatan)
2020-11-25cryptonote_core: dandelion - use local height or median height if syncingxiphon2-2/+8
2020-11-16Better log message for unusable anon networksHoward Chu1-1/+2
2020-11-03Switch to Dandelion++ fluff mode if no out connections for stem modeLee Clagett1-0/+109
2020-10-28Add RELINK_TARGETS, monero_add_target_no_relink and use ↵mj-xmr1-2/+2
monero_add_executable/monero_add_library where possible (mj-xmr) Add monero_add_minimal_executable and use in tests This is done in order not to have to relink targets, when just an .so changed, but not its interface.
2020-10-12Dandelion++: skip desynced peers in stem phasexiphon1-34/+41
2020-10-03Unit Tests: Remove block reward upper bound size checksTheCharlatan1-18/+0
Tests running after being compiled with `make debug-test` failed with ``` [ FAILED ] block_reward_and_current_block_weight.fails_on_huge_median_size [ FAILED ] block_reward_and_current_block_weight.fails_on_huge_block_weight ``` With the introduction of the patch in https://github.com/monero-project/monero/commit/be82c40703d267184ee07bf7be71002122c86656#diff-1a57d4e6013984c420da98d1adde0eafL113 the assertions checking the weight of the median and current block against a size limit were removed. Since the limit is now enforced by a long divisor and a uint64_t type, checking in a separate test makes little sense, so they are removed here.
2020-09-03Merge pull request #6757luigi11111-20/+20
6a37da8 threadpool: guard against exceptions in jobs, and armour plating (moneromooo-monero)
2020-09-01threadpool: guard against exceptions in jobs, and armour platingmoneromooo-monero1-20/+20
Those would, if uncaught, exit run and leave the waiter to wait indefinitely for the number of active jobs to reach 0
2020-08-27Merge pull request #6769Alexander Blair1-0/+41
b641e0a2c Add clear method to byte_stream (Lee Clagett)
2020-08-27CLSAG optimizationsSarang Noether1-84/+82
2020-08-27Integrate CLSAGs into moneromoneromooo-monero2-1/+185
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-27unit_tests: add ge_triple_scalarmult_base_vartime testmoneromooo-monero1-0/+62
2020-08-27Merge pull request #6690Alexander Blair2-2/+2
7175dcb10 replace most boost serialization with existing monero serialization (moneromooo-monero)
2020-08-17Add clear method to byte_streamLee Clagett1-0/+41
2020-08-17Revert "Use domain-separated ChaCha20 for in-memory key encryption"luigi11112-74/+0
This reverts commit 921dd8dde5d381052d0aa2936304a3541a230c55.
2020-08-17replace most boost serialization with existing monero serializationmoneromooo-monero2-2/+2
This reduces the attack surface for data that can come from malicious sources (exported output and key images, multisig transactions...) since the monero serialization is already exposed to the outside, and the boost lib we were using had a few known crashers. For interoperability, a new load-deprecated-formats wallet setting is added (off by default). This allows loading boost format data if there is no alternative. It will likely go at some point, along with the ability to load those. Notably, the peer lists file still uses the boost serialization code, as the data it stores is define in epee, while the new serialization code is in monero, and migrating it was fairly hairy. Since this file is local and not obtained from anyone else, the marginal risk is minimal, but it could be migrated later if needed. Some tests and tools also do, this will stay as is for now.
2020-08-16Merge pull request #6718Alexander Blair1-0/+11
85efc88c1 Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with unit test (koe)
2020-08-16Merge pull request #6716Alexander Blair1-1/+1
76c16822d wallet2_api: implement runtime proxy configuration (xiphon)
2020-08-16Merge pull request #6603Alexander Blair1-1/+16
4e2377995 Change ZMQ-JSON txextra to hex and remove unnecessary base fields (Lee Clagett)
2020-08-16Merge pull request #6601Alexander Blair1-1/+1
98c151ecb Optimize ZMQ-JSON vector reading; GetBlocksFast reads 24%+ faster (Lee Clagett) 60627c9f2 Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster (Lee Clagett) fe96e66eb Fix pruned tx for ZMQ's GetBlocksFast (Lee Clagett)
2020-08-16Merge pull request #6493Alexander Blair2-0/+74
921dd8dde Use domain-separated ChaCha20 for in-memory key encryption (Sarang Noether)
2020-08-16Merge pull request #6329Alexander Blair2-0/+131
6bfcd3101 Updates InProofV1, OutProofV1, and ReserveProofV1 to new V2 variants that include all public proof parameters in Schnorr challenges, along with hash function domain separators. Includes new randomized unit tests. (Sarang Noether)
2020-08-14Change ZMQ-JSON txextra to hex and remove unnecessary base fieldsLee Clagett1-1/+16
2020-08-14Fix pruned tx for ZMQ's GetBlocksFastLee Clagett1-1/+1
2020-08-09Use domain-separated ChaCha20 for in-memory key encryptionSarang Noether2-0/+74
2020-08-09Updates InProofV1, OutProofV1, and ReserveProofV1 to new V2 variants that ↵Sarang Noether2-0/+131
include all public proof parameters in Schnorr challenges, along with hash function domain separators. Includes new randomized unit tests.
2020-08-09Merge pull request #6354Alexander Blair1-8/+246
67ade8005 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 (Lee Clagett)
2020-07-23Fix overflow issue in epee:misc_utils::rolling_median_t and median(), with ↵koe1-0/+11
unit test
2020-07-20wallet2_api: implement runtime proxy configurationxiphon1-1/+1
2020-07-19Merge pull request #6516Alexander Blair1-2/+0
8656a8c9f remove double includes (sumogr)
2020-07-19Merge pull request #6512Alexander Blair50-50/+50
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-08Merge pull request #6559luigi11111-0/+23
15538f7 ByteSlice: Fix persisting ptr to std::moved SSO buffer (Doy-lee)
2020-05-20ByteSlice: Fix persisting ptr to std::moved SSO bufferDoyle1-0/+23
The Bug: 1. Construct `byte_slice.portion_` with `epee::span(buffer)` which copies a pointer to the SSO buffer to `byte_slice.portion_` 2. It constructs `byte_slice.storage_` with `std::move(buffer)` (normally this swap pointers, but SSO means a memcpy and clear on the original SSO buffer) 3. `slice.data()` returns a pointer from `slice.portion_` that points to the original SSO cleared buffer, `slice.storage_` has the actual string.
2020-05-15Add randomized delay when forwarding txes from i2p/tor -> ipv4/6Lee Clagett1-8/+246
2020-05-12Fixed bugs for take_slice and byte_stream->byte_sliceLee Clagett1-0/+31
2020-05-11remove double includessumogr1-2/+0
2020-05-06Update copyright year to 2020SomaticFanatic50-50/+50
Update copyright year to 2020
2020-05-04Adding ZMQ/Pub support for txpool_add and chain_main eventsLee Clagett4-8/+776
2020-04-21Merge pull request #6359luigi11111-0/+3
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
2020-04-11Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON.Lee Clagett2-5/+259
2020-05-02Merge pull request #6451luigi11111-0/+8
4ed60b6 Bulletproofs: verification speedup (SarangNoether)
2020-05-01Merge pull request #6460luigi11111-0/+4
f8b1480 unit_tests: fix gcc+ warning (sumogr)
2020-04-18unit_tests: fix gcc+ warningSumo Gr1-0/+4
2020-04-14Bulletproofs: verification speedupSarang Noether1-0/+8
2020-04-04Merge pull request #6381luigi11111-8/+12
e719760 Fix receive order leakage with tx fluffing (vtnerd)
2020-04-04Merge pull request #6361luigi11112-1/+58
68a6507 Fixed bug in ZMQ JSON-RPC method field (vtnerd)
2020-04-04Merge pull request #6357luigi11112-0/+173
42a7a4d daemon: auto public nodes - cache and prioritize most stable nodes (xiphon)
2020-04-04Merge pull request #6351luigi11111-3/+43
81c5943 Remove temporary std::string creation in some hex->bin calls (vtnerd) 5fcc23a Move hex->bin conversion to monero copyright files and with less includes (vtnerd) 3387f0e Reduce template bloat in hex->bin for ZMQ json (vtnerd)
2020-04-04Merge pull request #6346luigi11112-5/+1
dbfa4f8 unit_tests: fix missing test names (xiphon)
2020-04-04Merge pull request #6339luigi11112-2/+2
c61abf8 remove empty statements (shopglobal)
2020-04-04Merge pull request #6335luigi11111-0/+1
0078ce7 wipeable_string: split - treat CR, LF and Tabs as separators (xiphon)
2020-04-03Use byte_slice for sending zmq messages - removes data copy within zmqLee Clagett1-0/+39
2020-03-31Merge pull request #6214luigi11111-0/+2
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-30Fixed string_ref usage bug in epee::from_hex::vectorLee Clagett1-0/+3
2020-03-28Fix network unit tests after epee changesLee Clagett1-2/+2
2020-03-27Merge pull request #6285Alexander Blair1-23/+403
d0641b42 net: fix incorrect less operator for top/i2p addresses (Aaron Hook)
2020-03-26Adding Dandelion++ support to public networks:Lee Clagett1-27/+1074
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode - Stem loops detected in tx_pool.cpp - Embargo timeout for a blackhole attack during stem phase
2020-03-22protocol: request txpool contents when syncedmoneromooo-monero1-0/+2
A newly synced Alice sends a (typically quite small) list of txids in the local tpxool to a random peer Bob, who then uses the existing tx relay system to send Alice any tx in his txpool which is not in the list Alice sent
2020-03-20p2p: remove old debug commandsAaron Hook3-1/+2
2020-03-12Merge pull request #6273Alexander Blair2-20/+38
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
2020-03-10Fix receive order leakage with tx fluffingLee Clagett1-8/+12
2020-03-09Move hex->bin conversion to monero copyright files and with less includesLee Clagett1-3/+43
2020-03-05Various improvements to the ZMQ JSON-RPC handling:Lee Clagett2-20/+38
- Finding handling function in ZMQ JSON-RPC now uses binary search - Temporary `std::vector`s in JSON output now use `epee::span` to prevent allocations. - Binary -> hex in JSON output no longer allocates temporary buffer - C++ structs -> JSON skips intermediate DOM creation, and instead write directly to an output stream.
2020-02-28Merge pull request #6220Alexander Blair1-3/+3
a9bdc6e4 Improved performance for epee serialization: (Lee Clagett)
2020-02-28Merge pull request #6202Alexander Blair1-9/+0
02b80513 unit_tests: remove invalid bulletproofs unit test (moneromooo-monero)
2020-02-28daemon: auto public nodes - cache and prioritize most stable nodesxiphon2-0/+173
2020-02-18unit_tests: fix missing test namesxiphon2-5/+1
2020-02-17remove empty statementsInterchained2-2/+2
Cleaning up a little around the code base.
2020-02-12wipeable_string: split - treat CR, LF and Tabs as separatorsxiphon1-0/+1
2020-01-26wallet: do not split integrated addresses in address book apimoneromooo-monero1-1/+0
2020-01-18net: fix incorrect less operator for top/i2p addressesAaron Hook1-23/+403
2019-12-12Merge pull request #6018luigi11112-1/+51
dce6f05 rpc: Only show version string if it matches expected pattern (ndorf) 3293780 daemon: Use rpc for 'version' command (ndorf)
2019-12-01unit_tests: remove invalid bulletproofs unit testmoneromooo-monero1-9/+0
It was intended to check a case which is actually valid (0 gamma), but was actually duplicating the bad amount test. Reported by WhatDo_ on IRC.
2019-11-18Fixed bug in ZMQ JSON-RPC method fieldLee Clagett2-1/+58
2019-11-12rpc: Only show version string if it matches expected patternNathan Dorfman2-1/+51
2019-11-04Change to Tx diffusion (Dandelion++ fluff) instead of floodingLee Clagett1-14/+82
2019-11-04Improved performance for epee serialization:Lee Clagett1-3/+3
- Removed copy of field names in binary deserialization - Removed copy of array values in binary deserialization - Removed copy of string values in json deserialization - Removed unhelpful allocation in json string value parsing - Removed copy of blob data on binary and json serialization
2019-11-02Adding support for hidden (anonymity) txpoolLee Clagett1-5/+6
2019-10-30unit_tests: fix use after freemoneromooo-monero1-7/+16
2019-10-22Merge pull request #5972luigi11111-0/+37
9447e72 cryptonote: add function to get weight from a pruned tx (moneromooo-monero)
2019-10-22Merge pull request #5966luigi11111-0/+116
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-21Support median block size > 4 GBmoneromooo-monero1-0/+116
add a 128/64 division routine so we can use a > 32 bit median block size in calculations
2019-10-15unit_tests: fix build after renamemoneromooo-monero1-4/+6
2019-10-13p2p+rpc: don't skip p2p or rpc port bind failure by defaultxiphon2-7/+42
2019-10-11cryptonote: add function to get weight from a pruned txmoneromooo-monero1-0/+37
The weight of the prunable data is deterministic from the unpruned data, so it can be determined from a pruned tx
2019-10-11unit_tests: fix build with boost 1.69moneromooo-monero1-3/+6
2019-10-08Merge pull request #5915luigi11111-4/+6
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08Merge pull request #5960luigi11111-5/+11
ae34e1b unit_tests: fix ringdb unit tests (moneromooo-monero)
2019-10-08Merge pull request #5921luigi11111-12/+85
2a7d915 Fixed i2p/tor tx flooding bug (white noise disabled) (vtnerd)
2019-10-04unit_tests: fix ringdb unit testsmoneromooo-monero1-5/+11
2019-09-30Merge pull request #5895luigi11112-9/+9
fdc00d0 unit tests: replace global var with lambda returning static local var (stoffu)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-4/+6
If the peer (whether pruned or not itself) supports sending pruned blocks to syncing nodes, the pruned version will be sent along with the hash of the pruned data and the block weight. The original tx hashes can be reconstructed from the pruned txes and theur prunable data hash. Those hashes and the block weights are hashes and checked against the set of precompiled hashes, ensuring the data we received is the original data. It is currently not possible to use this system when not using the set of precompiled hashes, since block weights can not otherwise be checked for validity. This is off by default for now, and is enabled by --sync-pruned-blocks
2019-09-24Merge pull request #5916luigi11111-2/+20
7b076d5 p2p: fix bans taking port into account (moneromooo-monero)
2019-09-24Merge pull request #5878luigi11111-8/+1
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
2019-09-24Merge pull request #5877luigi11111-1/+1
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
2019-09-16p2p: fix bans taking port into accountmoneromooo-monero1-2/+20
2019-09-16Properly format multiline logsmoneromooo-monero1-0/+17
As a side effect, colouring on Windows should now work regardless of version
2019-09-16Removed Berkeley DB and db switching logicJesus Ramirez1-8/+1
2019-09-14Merge pull request #5818luigi11112-1/+132
f91a06c Dropping cppzmq dependency; adding some zmq utils (vtnerd)
2019-09-09unit tests: replace global var with lambda returning static local varstoffu2-9/+9
Fixes assertion failure (curstate == 1) in random.c in debug mode
2019-09-08Merge pull request #5876luigi11111-6/+12
a5c7eeb unit_tests: fix build with CLANG 8 and boost 1.69 (moneromooo-monero)
2019-09-08Merge pull request #5856luigi11111-1/+1
f56e160 unit_tests: Fix uninitialized values (liptakmatyas)
2019-09-04unit_tests: fix levin unit test on big endianmoneromooo-monero1-23/+23
2019-09-04difficulty: fix check_hash on big endianmoneromooo-monero1-4/+10
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-1/+1
2019-08-30unit_tests: fix build with CLANG 8 and boost 1.69moneromooo-monero1-6/+12
2019-08-29Merge pull request #5793luigi11115-3/+1524
bdfc63a Add ref-counted buffer byte_slice. Currently used for sending TCP data. (vtnerd) 3b24b1d Added support for 'noise' over I1P/Tor to mask Tx transmission. (vtnerd)
2019-08-28Merge pull request #5707luigi11111-1/+14
3a0451a MLSAG speedup and additional checks (SarangNoether)
2019-08-27MLSAG speedup and additional checksSarang Noether1-1/+14
2019-08-27unit_tests: Fix uninitialized valuesMatyas Liptak1-1/+1
- Initialize the `hash` in the `get_block_hash()` function of the `output_distribution` unit test explicitly, to silence `valgrind` warnings.
2019-08-21Merge pull request #5748luigi11111-1/+2
b350726 boost: update obsolete usage of endian API (moneromooo-monero)
2019-08-19Merge pull request #5727luigi11112-3/+3
7b9a420 Replace std::random_shuffle with std::shuffle (tomsmeding)
2019-08-19Merge pull request #5718luigi11111-2/+2
c8709fe wallet: do not print log settings when unset (moneromooo-monero) 7b18e83 unit_tests: check return values on test data parsing (moneromooo-monero)
2019-08-16epee: support unicode in parsed stringsmoneromooo-monero1-0/+17
2019-08-15Merge pull request #5652luigi11111-2/+2
f81cb4f unit_tests: add more leeway to the 'same distribution' check (moneromooo-monero)
2019-08-15Replace std::random_shuffle with std::shuffleTom Smeding2-3/+3
According to [1], std::random_shuffle is deprecated in C++14 and removed in C++17. Since std::shuffle is available since C++11 as a replacement and monero already requires C++11, this is a good replacement. A cryptographically secure random number generator is used in all cases to prevent people from perhaps copying an insecure std::shuffle call over to a place where a secure one would be warranted. A form of defense-in-depth. [1]: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
2019-07-29Fixed i2p/tor tx flooding bug (white noise disabled)Lee Clagett1-12/+85
2019-07-24Merge pull request #5529luigi11113-8/+8
de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
2019-07-24Merge pull request #5502luigi11112-1/+1
25a7cfd add a few checks where it seems appropriate (moneromooo-monero) 1a66a86 remove unused code (moneromooo-monero)
2019-07-22Dropping cppzmq dependency; adding some zmq utilsLee Clagett2-1/+132
2019-07-17Added support for "noise" over I1P/Tor to mask Tx transmission.Lee Clagett4-0/+1088
2019-07-16Add ref-counted buffer byte_slice. Currently used for sending TCP data.Lee Clagett2-3/+436
2019-07-16allow blocking whole subnetsmoneromooo-monero2-3/+53
2019-07-09boost: update obsolete usage of endian APImoneromooo-monero1-1/+2
2019-07-04keccak: guard against misaligned memory accesses on ARMmoneromooo-monero1-0/+17
The code generated is exactly the same as the direct access one on x86_64
2019-07-01unit_tests: check return values on test data parsingmoneromooo-monero1-2/+2
Won't trigger in practice, but you never know when that code changes Coverity 199723, 199685
2019-06-16unit_tests: add more leeway to the "same distribution" checkmoneromooo-monero1-2/+2
This is an inherently probabilistic check, which occasionally fails for a matching distribution
2019-05-20unit_tests: make the density test a bit less stringentmoneromooo-monero1-1/+1
It's an inherently random test
2019-05-10use crypto::rand instead of libc rand in a few testsmoneromooo-monero3-8/+8
We don't need secure randomness here, but it should shut coverity up
2019-05-07Merge pull request #5510Riccardo Spagni1-4/+4
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
2019-05-07Merge pull request #5508Riccardo Spagni1-3/+1
1c44e658 wallet2: reject standalone short payment IDs in monero: URI API (moneromooo-monero)
2019-05-07Merge pull request #5499Riccardo Spagni2-0/+203
a4c4a2d8 blockchain: keep a rolling long term block weight median (moneromooo-monero)
2019-05-07Merge pull request #5496Riccardo Spagni1-11/+18
0eb0d6b8 rpc: improve get_output_distribution (moneromooo-monero)
2019-05-02blockchain: keep a rolling long term block weight medianmoneromooo-monero2-0/+203
2019-05-01fix wide difficulty conversion with some versions of boostmoneromooo-monero1-4/+4
2019-05-01wallet2: reject standalone short payment IDs in monero: URI APImoneromooo-monero1-3/+1
2019-04-29remove unused codemoneromooo-monero1-1/+0
2019-04-29add a few checks where it seems appropriatemoneromooo-monero1-0/+1
2019-04-25unit_tests: fix crash in debug in output_distribution testmoneromooo-monero1-0/+7
updating the block size limit needs recent block sizes, so we feed it dummy ones
2019-04-25rpc: improve get_output_distributionmoneromooo-monero1-11/+18
It can now handle small reorgs without having to rescan the whole blockchain. Also add a test for it.
2019-04-23unit_tests: don't delete log file on windows, it will failmoneromooo-monero1-0/+3
2019-04-19Fix socks tests in windows and handle errors betterLee Clagett1-7/+13
2019-04-18wallet2: "output lineup" fake out selectionmoneromooo-monero1-0/+117
Based on python code by sarang: https://github.com/SarangNoether/skunkworks/blob/outputs/outputs/simulate.py
2019-04-17Merge pull request #5413Riccardo Spagni1-6/+6
5fafb90e testdb: add override keyword where missing (stoffu)
2019-04-17testdb: add override keyword where missingstoffu1-6/+6
and delete obsolete BlockchainBDB::get_tx_output_indices along the way
2019-04-16unit_tests: undo is_blocked implementation factoringmoneromooo-monero1-1/+12
The is_host_blocked method is not on master yet
2019-04-16Merge pull request #5425Riccardo Spagni1-12/+17
58585986 p2p: fix integer overflow in host bans (moneromooo-monero)
2019-04-16Merge pull request #5424Riccardo Spagni2-142/+57
93bb2f48 ringct: prevent use of full ringct signatures for more than one input (moneromooo-monero)
2019-04-16Merge pull request #5414Riccardo Spagni1-8/+9
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-14blockchain_db: fix db txn ending too earlymoneromooo-monero1-0/+4
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-11p2p: fix integer overflow in host bansmoneromooo-monero1-12/+17
2019-04-11ringct: prevent use of full ringct signatures for more than one inputmoneromooo-monero2-142/+57
2019-04-09unit_tests/long_term_block_weight: some tweaks that seem to make more sensestoffu1-8/+9
2019-04-06Merge pull request #5391Riccardo Spagni1-0/+5
71907980 unit_tests: fix long term block weight test after cache change (moneromooo-monero)
2019-04-06Merge pull request #5341Riccardo Spagni1-6/+7
0218bc49 test: hmac_keccak - fix number of chunks counting (Dusan Klinec)
2019-04-03unit_tests: fix long term block weight test after cache changemoneromooo-monero1-0/+5
2019-04-01Merge pull request #5239Riccardo Spagni3-0/+92
91f4c7f4 Make difficulty 128 bit instead of 64 bit (moneromooo-monero)
2019-03-25Added socks proxy (tor/i2pd/kovri) support to walletLee Clagett2-1/+91
2019-03-24Make difficulty 128 bit instead of 64 bitmoneromooo-monero3-0/+92
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24test: hmac_keccak - fix number of chunks countingDusan Klinec1-6/+7
2019-03-24Merge pull request #5274Riccardo Spagni1-1/+1
dc0c0c91 tests: disable wallet SSL init for tests involving wallet2 (moneromooo-monero)
2019-03-21Merge pull request #5256Riccardo Spagni1-0/+12
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
2019-03-21Merge pull request #5211Riccardo Spagni2-0/+153
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-20crypto: hmac_keccak addedDusan Klinec2-0/+153
2019-03-19Adding classes, functions, and utilities for common LMDB operations.Lee Clagett2-0/+406
2019-03-12tests: disable wallet SSL init for tests involving wallet2moneromooo-monero1-1/+1
2019-03-08blockchain: speed up getting N blocks weights/long term weightsmoneromooo-monero1-0/+12
2019-03-05Update 2019 copyrightbinaryFate46-46/+46
2019-03-05Merge pull request #4852Riccardo Spagni1-0/+19
057c279c epee: add SSL support (Martijn Otto)
2019-03-05epee: add SSL supportMartijn Otto1-0/+19
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-05cryptonote: avoid double parsing blocks when syncingmoneromooo-monero1-2/+2
2019-03-05save some database calls when getting top block hash and heightmoneromooo-monero1-1/+3
2019-03-05Avoid repeated (de)serialization when syncingmoneromooo-monero2-29/+29
2019-03-04Merge pull request #5117Riccardo Spagni1-1/+0
fcd00079 unit_tests: remove leftover debug print (moneromooo-monero)
2019-03-04ArticMine's new block weight algorithmmoneromooo-monero6-175/+414
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-02-01unit_tests: remove leftover debug printmoneromooo-monero1-1/+0
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett4-8/+936
- 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-28notify: handle arbitrary tagsmoneromooo-monero1-1/+1
2019-01-28Merge pull request #5064Riccardo Spagni1-0/+36
5ecc5cc7 added two tests for partial word and case tolerance in mnemonics (Paul Shapiro)
2019-01-28Merge pull request #5052Riccardo Spagni5-38/+23
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-22ringct: remove unused senderPk from ecdhTuplemoneromooo-monero2-4/+0
This was an early ringct field, which was never used in production
2019-01-22ringct: the commitment mask is now deterministicmoneromooo-monero2-36/+0
saves space in the tx and is safe Found by knaccc
2019-01-22ringct: encode 8 byte amount, saving 24 bytes per outputmoneromooo-monero2-5/+21
Found by knaccc
2019-01-22add a bulletproof version, new bulletproof type, and rct configmoneromooo-monero4-10/+19
This makes it easier to modify the bulletproof format
2019-01-22Pruningmoneromooo-monero3-0/+243
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-18Merge pull request #5028Riccardo Spagni1-1/+1
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-16blockchain_db: allow getting output keys without commitmentmoneromooo-monero1-1/+1
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-16epee: speedup word/number matchingmoneromooo-monero1-0/+84
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-16Merge pull request #4984Riccardo Spagni1-1/+1
008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
2019-01-16Merge pull request #4976Riccardo Spagni2-4/+73
85665003 epee: better network buffer data structure (moneromooo-monero)
2019-01-11added two tests for partial word and case tolerance in mnemonicsPaul Shapiro1-1/+36
2019-01-07Make get_output_key method constmoneroexamples1-2/+2
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-06Merge pull request #4952Riccardo Spagni1-3/+3
570dd369 p2p: use vector instead of list for peer lists (moneromooo-monero)
2018-12-31Merge pull request #4941luigi11111-5/+16
1cfd6f1 unit_tests: strengthen notify test against OS scheduling (moneromooo-monero)
2018-12-23epee: better network buffer data structuremoneromooo-monero2-4/+73
avoids pointless allocs and memcpy
2018-12-18blockchain_db: speedup tx output gatheringmoneromooo-monero1-1/+1
We know all the data we'll want for getblocks.bin is contiguous