Commit graph

693 commits

Author SHA1 Message Date
xiphon
76c16822d0 wallet2_api: implement runtime proxy configuration 2020-07-20 13:45:12 +00:00
Alexander Blair
3ba6c7fd30
Merge pull request #6516
8656a8c9f remove double includes (sumogr)
2020-07-19 03:34:28 -07:00
Alexander Blair
a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
luigi1111
35e2520115
Merge pull request #6559
15538f7 ByteSlice: Fix persisting ptr to std::moved SSO buffer (Doy-lee)
2020-07-08 17:07:50 -05:00
Doyle
15538f7e3f ByteSlice: Fix persisting ptr to std::moved SSO buffer
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-20 10:13:58 +10:00
Lee Clagett
67ade80055 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 2020-05-15 07:57:35 +00:00
Lee Clagett
29e563bb1e Fixed bugs for take_slice and byte_stream->byte_slice 2020-05-12 01:26:37 -04:00
sumogr
8656a8c9ff remove double includes 2020-05-11 13:53:17 +00:00
SomaticFanatic
5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
Lee Clagett
e5214a2ca2 Adding ZMQ/Pub support for txpool_add and chain_main events 2020-05-04 02:06:35 +00:00
luigi1111
06c81b6527
Merge pull request #6359
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
2020-04-21 08:38:21 -05:00
Lee Clagett
c26c93019a Add byte_stream for zero-copy serialization, and add support in ZMQ-JSON. 2020-04-11 04:12:11 +00:00
luigi1111
8185054db7
Merge pull request #6451
4ed60b6 Bulletproofs: verification speedup (SarangNoether)
2020-05-02 15:14:41 -05:00
luigi1111
a5cc613a68
Merge pull request #6460
f8b1480 unit_tests: fix gcc+ warning (sumogr)
2020-05-01 15:50:19 -05:00
Sumo Gr
f8b1480f95
unit_tests: fix gcc+ warning 2020-04-18 18:04:20 +03:00
Sarang Noether
4ed60b626a Bulletproofs: verification speedup 2020-04-14 20:31:30 -04:00
luigi1111
d1f3d3376d
Merge pull request #6381
e719760 Fix receive order leakage with tx fluffing (vtnerd)
2020-04-04 13:12:31 -05:00
luigi1111
5757d99208
Merge pull request #6361
68a6507 Fixed bug in ZMQ JSON-RPC method field (vtnerd)
2020-04-04 13:01:15 -05:00
luigi1111
0150a480fd
Merge pull request #6357
42a7a4d daemon: auto public nodes - cache and prioritize most stable nodes (xiphon)
2020-04-04 12:59:23 -05:00
luigi1111
cfc0f4a7fa
Merge pull request #6351
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-04 12:55:02 -05:00
luigi1111
bf70696a85
Merge pull request #6346
dbfa4f8 unit_tests: fix missing test names (xiphon)
2020-04-04 12:50:17 -05:00
luigi1111
c4f75fe898
Merge pull request #6339
c61abf8 remove empty statements (shopglobal)
2020-04-04 12:47:31 -05:00
luigi1111
292e2d8f28
Merge pull request #6335
0078ce7 wipeable_string: split - treat CR, LF and Tabs as separators (xiphon)
2020-04-04 12:42:50 -05:00
Lee Clagett
da99157462 Use byte_slice for sending zmq messages - removes data copy within zmq 2020-04-03 01:56:17 +00:00
luigi1111
096e2135dd
Merge pull request #6214
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-31 13:32:55 -05:00
Lee Clagett
f9441c5759 Fixed string_ref usage bug in epee::from_hex::vector 2020-03-30 16:53:34 +00:00
Lee Clagett
0c29e17581 Fix network unit tests after epee changes 2020-03-28 13:30:22 -04:00
Alexander Blair
7d4a93fab3
Merge pull request #6285
d0641b42 net: fix incorrect less operator for top/i2p addresses (Aaron Hook)
2020-03-27 12:23:00 -07:00
Lee Clagett
02d887c2e5 Adding Dandelion++ support to public networks:
- 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-26 15:01:30 +00:00
moneromooo-monero
054b4c7f41
protocol: request txpool contents when synced
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-22 16:03:31 +00:00
Aaron Hook
aa93e38862 p2p: remove old debug commands 2020-03-20 22:09:44 -07:00
Alexander Blair
820ab9fdea
Merge pull request #6273
0f78b06e Various improvements to the ZMQ JSON-RPC handling: (Lee Clagett)
2020-03-12 01:13:49 -07:00
Lee Clagett
e719760253 Fix receive order leakage with tx fluffing 2020-03-10 22:30:07 -04:00
Lee Clagett
5fcc23ae0a Move hex->bin conversion to monero copyright files and with less includes 2020-03-09 05:23:59 +00:00
Lee Clagett
0f78b06e8c Various improvements to the ZMQ JSON-RPC handling:
- 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-03-05 14:20:56 +00:00
Alexander Blair
944e8a4542
Merge pull request #6220
a9bdc6e4 Improved performance for epee serialization: (Lee Clagett)
2020-02-28 19:45:31 -08:00
Alexander Blair
e7997cd62a
Merge pull request #6202
02b80513 unit_tests: remove invalid bulletproofs unit test (moneromooo-monero)
2020-02-28 19:33:21 -08:00
xiphon
42a7a4dd32 daemon: auto public nodes - cache and prioritize most stable nodes 2020-02-28 08:06:43 +00:00
xiphon
dbfa4f84ee unit_tests: fix missing test names 2020-02-18 23:56:21 +00:00
Interchained
c61abf87c0 remove empty statements
Cleaning up a little around the code base.
2020-02-17 11:55:15 -05:00
xiphon
0078ce7fac wipeable_string: split - treat CR, LF and Tabs as separators 2020-02-12 21:16:07 +00:00
moneromooo-monero
dd8c6b1703
wallet: do not split integrated addresses in address book api 2020-01-26 00:03:53 +00:00
Aaron Hook
d0641b42fe net: fix incorrect less operator for top/i2p addresses 2020-01-18 19:18:56 -08:00
luigi1111
dad4cf121e
Merge pull request #6018
dce6f05 rpc: Only show version string if it matches expected pattern (ndorf)
3293780 daemon: Use rpc for 'version' command (ndorf)
2019-12-12 13:36:05 -06:00
moneromooo-monero
02b8051339
unit_tests: remove invalid bulletproofs unit test
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-12-01 15:40:59 +00:00
Lee Clagett
68a6507c3f Fixed bug in ZMQ JSON-RPC method field 2019-11-18 12:59:41 +00:00
Nathan Dorfman
dce6f055f9 rpc: Only show version string if it matches expected pattern 2019-11-12 18:19:24 -07:00
Lee Clagett
70c9cd3c9c Change to Tx diffusion (Dandelion++ fluff) instead of flooding 2019-11-04 09:23:20 +00:00
Lee Clagett
a9bdc6e4c4 Improved performance for epee serialization:
- 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-04 01:46:41 +00:00
Lee Clagett
5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
moneromooo-monero
1554a7768b
unit_tests: fix use after free 2019-10-30 18:40:20 +00:00
luigi1111
bb2bcf3521
Merge pull request #5972
9447e72 cryptonote: add function to get weight from a pruned tx (moneromooo-monero)
2019-10-22 10:52:14 -05:00
luigi1111
84ce43a239
Merge pull request #5966
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-22 10:08:32 -05:00
moneromooo-monero
be82c40703
Support median block size > 4 GB
add a 128/64 division routine so we can use a > 32 bit median block
size in calculations
2019-10-21 10:41:07 +00:00
moneromooo-monero
c65a221549
unit_tests: fix build after rename 2019-10-15 13:15:19 +00:00
xiphon
d4d2b5c79a p2p+rpc: don't skip p2p or rpc port bind failure by default 2019-10-13 13:27:46 +00:00
moneromooo-monero
9447e7276d
cryptonote: add function to get weight from a pruned tx
The weight of the prunable data is deterministic from the
unpruned data, so it can be determined from a pruned tx
2019-10-11 12:08:36 +00:00
moneromooo-monero
77afe91db6
unit_tests: fix build with boost 1.69 2019-10-11 01:16:03 +00:00
luigi1111
bf525793c7
Merge pull request #5915
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08 15:55:03 -05:00
luigi1111
0e4ab6091c
Merge pull request #5960
ae34e1b unit_tests: fix ringdb unit tests (moneromooo-monero)
2019-10-08 14:49:57 -05:00
luigi1111
342e7f844f
Merge pull request #5921
2a7d915 Fixed i2p/tor tx flooding bug (white noise disabled) (vtnerd)
2019-10-08 14:31:53 -05:00
moneromooo-monero
ae34e1ba1c
unit_tests: fix ringdb unit tests 2019-10-04 21:11:46 +00:00
luigi1111
40501cc131
Merge pull request #5895
fdc00d0 unit tests: replace global var with lambda returning static local var (stoffu)
2019-09-30 18:46:34 -05:00
moneromooo-monero
8330e772f1
monerod can now sync from pruned blocks
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-27 00:10:37 +00:00
luigi1111
3f6096867d
Merge pull request #5916
7b076d5 p2p: fix bans taking port into account (moneromooo-monero)
2019-09-24 10:42:29 -05:00
luigi1111
06bee964a8
Merge pull request #5878
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
2019-09-24 10:10:28 -05:00
luigi1111
ee6e849627
Merge pull request #5877
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-24 10:08:44 -05:00
moneromooo-monero
7b076d5170
p2p: fix bans taking port into account 2019-09-16 22:45:45 +00:00
moneromooo-monero
32f725d32f
Properly format multiline logs
As a side effect, colouring on Windows should now work
regardless of version
2019-09-16 16:58:01 +00:00
Jesus Ramirez
f9b3f6ef3b Removed Berkeley DB and db switching logic 2019-09-16 16:18:05 +02:00
luigi1111
d663e1e3db
Merge pull request #5818
f91a06c Dropping cppzmq dependency; adding some zmq utils (vtnerd)
2019-09-14 13:25:14 -05:00
stoffu
fdc00d0906
unit tests: replace global var with lambda returning static local var
Fixes assertion failure (curstate == 1) in random.c in debug mode
2019-09-09 11:44:06 +09:00
luigi1111
d0d76f771a
Merge pull request #5876
a5c7eeb unit_tests: fix build with CLANG 8 and boost 1.69 (moneromooo-monero)
2019-09-08 20:10:44 -05:00
luigi1111
d91393daaf
Merge pull request #5856
f56e160 unit_tests: Fix uninitialized values (liptakmatyas)
2019-09-08 20:06:04 -05:00
moneromooo-monero
0e2fda5bf0
unit_tests: fix levin unit test on big endian 2019-09-04 14:53:58 +00:00
moneromooo-monero
d046ca1db0
difficulty: fix check_hash on big endian 2019-09-04 14:53:53 +00:00
Jesus Ramirez
2cd4fd8972 Changed the use of boost:value_initialized for C++ list initializer 2019-09-02 14:16:29 +02:00
moneromooo-monero
a5c7eebaea
unit_tests: fix build with CLANG 8 and boost 1.69 2019-08-30 11:43:03 +00:00
luigi1111
98af2e954b
Merge pull request #5793
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-29 14:36:41 -05:00
luigi1111
85014813cf
Merge pull request #5707
3a0451a MLSAG speedup and additional checks (SarangNoether)
2019-08-28 02:22:00 -05:00
Sarang Noether
3a0451a8be MLSAG speedup and additional checks 2019-08-27 16:22:44 -04:00
Matyas Liptak
f56e160217
unit_tests: Fix uninitialized values
-   Initialize the `hash` in the `get_block_hash()` function of the
    `output_distribution` unit test explicitly, to silence `valgrind`
    warnings.
2019-08-27 09:17:34 +02:00
luigi1111
a8e99198bf
Merge pull request #5748
b350726 boost: update obsolete usage of endian API (moneromooo-monero)
2019-08-21 15:18:38 -05:00
luigi1111
f205d28e96
Merge pull request #5727
7b9a420 Replace std::random_shuffle with std::shuffle (tomsmeding)
2019-08-19 17:31:39 -05:00
luigi1111
2da11baecc
Merge pull request #5718
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-19 17:17:11 -05:00
moneromooo-monero
eeca5ca0c8
epee: support unicode in parsed strings 2019-08-16 17:06:03 +00:00
luigi1111
86ee631212
Merge pull request #5652
f81cb4f unit_tests: add more leeway to the 'same distribution' check (moneromooo-monero)
2019-08-15 17:13:18 -05:00
Tom Smeding
7b9a420787 Replace std::random_shuffle with std::shuffle
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-08-15 16:33:15 +02:00
Lee Clagett
2a7d91523b Fixed i2p/tor tx flooding bug (white noise disabled) 2019-07-29 12:27:00 +00:00
luigi1111
7fc76451a5
Merge pull request #5529
de27651 use crypto::rand instead of libc rand in a few tests (moneromooo-monero)
2019-07-24 14:06:11 -05:00
luigi1111
e3de4aa68b
Merge pull request #5502
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
2019-07-24 13:57:06 -05:00
Lee Clagett
f91a06c6d7 Dropping cppzmq dependency; adding some zmq utils 2019-07-22 06:37:16 +00:00
Lee Clagett
3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
Lee Clagett
bdfc63ae4d Add ref-counted buffer byte_slice. Currently used for sending TCP data. 2019-07-16 16:30:35 +00:00
moneromooo-monero
65c4004963
allow blocking whole subnets 2019-07-16 11:35:53 +00:00
moneromooo-monero
b350726a5a
boost: update obsolete usage of endian API 2019-07-09 15:07:13 +00:00
moneromooo-monero
c2238327d0
keccak: guard against misaligned memory accesses on ARM
The code generated is exactly the same as the direct access
one on x86_64
2019-07-04 22:13:16 +00:00
moneromooo-monero
7b18e838ea
unit_tests: check return values on test data parsing
Won't trigger in practice, but you never know when that code changes

Coverity 199723, 199685
2019-07-01 15:17:30 +00:00
moneromooo-monero
f81cb4f24b
unit_tests: add more leeway to the "same distribution" check
This is an inherently probabilistic check, which occasionally fails
for a matching distribution
2019-06-16 12:18:28 +00:00
moneromooo-monero
dbecfe7d5d
unit_tests: make the density test a bit less stringent
It's an inherently random test
2019-05-20 10:42:50 +00:00