aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-12Fixed bugs for take_slice and byte_stream->byte_sliceLee Clagett1-0/+31
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-04-21Merge pull request #6359luigi11111-0/+3
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
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
2018-12-12Merge pull request #4901Riccardo Spagni1-0/+1
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-12Merge pull request #4787Riccardo Spagni1-0/+1
3dba7f25 protocol: option to pad transaction relay to the next kB (moneromooo-monero)
2018-12-07p2p: use vector instead of list for peer listsmoneromooo-monero1-3/+3
2018-12-05unit_tests: strengthen notify test against OS schedulingmoneromooo-monero1-5/+16
2018-12-04Merge pull request #4895Riccardo Spagni1-1/+1
3de7d52f unit_tests: fix malloc/delete mismatch (moneromooo-monero)
2018-12-04Merge pull request #4894Riccardo Spagni5-9/+6
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-04move int-util.h to epeemoneromooo-monero1-1/+1
2018-12-04Merge pull request #4854Riccardo Spagni1-1/+1
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04Merge pull request #4850Riccardo Spagni1-0/+29
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-04Merge pull request #4848Riccardo Spagni1-1/+4
80be2dca unit_tests: don't take the address of an unwrapped secret key (moneromooo-monero)
2018-11-27Outputs where all amounts are known spent can now be prunedmoneromooo-monero1-0/+1
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-26Merge pull request #4821Riccardo Spagni1-1/+1
fc98f7a0 rpc: speedup get_outs.bin (moneromooo-monero)
2018-11-26rpc: speedup get_outs.binmoneromooo-monero1-1/+1
2018-11-26Merge pull request #4832Riccardo Spagni2-0/+178
9da6c52b unit_tests: add logging unit test (moneromooo-monero)
2018-11-23unit_tests: fix malloc/delete mismatchmoneromooo-monero1-1/+1
2018-11-23unit_tests: do not rethrow a copy of an exceptionmoneromooo-monero1-1/+1
Found by codacy.com
2018-11-23remove some unused codemoneromooo-monero3-4/+1
Found by codacy.com
2018-11-23tests: slow_memmem now returns size_tmoneromooo-monero1-4/+4
Makes more sense than uint64_t for an offset, and agrees with the %zu used to print results. Found by codacy.com
2018-11-16unit_tests: don't take the address of an unwrapped secret keymoneromooo-monero1-1/+4
2018-11-16tests: add unit tests for get_output_distributionmoneromooo-monero4-87/+325
2018-11-16Merge pull request #4803Riccardo Spagni1-2/+2
fa3f756b unit_tests: fix leak when the test check fails (moneromooo-monero)
2018-11-16Merge pull request #4795Riccardo Spagni1-0/+19
5d7c2316 rct: add a zeroCommit cache for common pre-rct case (moneromooo-monero)
2018-11-15unit_tests: add some hex parsing test for non hex inputxiphon1-0/+16
2018-11-15unit_tests: add a test for parse_hexstr_to_binbuffmoneromooo-monero1-0/+13
2018-11-15Removed a lot of unnecessary includesMartijn Otto1-1/+1
2018-11-14Merge pull request #4769Riccardo Spagni1-1/+1
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-09unit_tests: add logging unit testmoneromooo-monero2-0/+178
2018-11-06Merge pull request #4739Riccardo Spagni1-1/+1
9c1c92db tests: fix MSYS2 gcc 7.3.0 warning -Wtype-limits (xiphon)
2018-11-06protocol: option to pad transaction relay to the next kBmoneromooo-monero1-0/+1
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-05unit_tests: fix leak when the test check failsmoneromooo-monero1-2/+2
Coverity 189527
2018-11-04simplewallet: print the number of show/all transfersmoneromooo-monero1-1/+0
2018-11-04wallet2: only export necessary outputs and key imagesmoneromooo-monero1-1/+13
and disable annoying test that requires ridiculous amounts of skullduggery every time some format changes
2018-11-04rct: add a zeroCommit cache for common pre-rct casemoneromooo-monero1-0/+19
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-01core: avoid unnecessary tx/blob conversionsmoneromooo-monero1-1/+1
2018-11-01unit_tests: notify test special case for the usual weirdomoneromooo-monero1-1/+5
2018-10-29tests: fix MSYS2 gcc 7.3.0 warning -Wtype-limitsxiphon1-1/+1
2018-10-27unit_tests: fix notify unit test when /tmp does not existmoneromooo-monero1-1/+9
2018-10-26Merge pull request #4721Riccardo Spagni1-1/+5
a9f9406c unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
2018-10-26Merge pull request #4613Riccardo Spagni1-0/+10
45a6880d unit_tests: call umask before mkstemp (moneromooo-monero)
2018-10-26Merge pull request #4308Riccardo Spagni1-0/+84
9907ea06 cryptonote: sort tx_extra fields (moneromooo-monero)