Commit graph

685 commits

Author SHA1 Message Date
xiphon
4cf3545a31 core_rpc_server: on_get_blocks - forward bootstrap daemon error 2020-10-13 00:44:59 +00:00
xiphon
ad7ea2c60c core_rpc_server: on_send_raw_tx - fix bootstrap daemon mode check 2020-10-12 23:49:37 +00:00
Michal m@lbit Malicki
f4b2382713
rpc_private_headers declaration fix 2020-09-27 13:41:44 +01:00
TheCharlatan
80e535c95a
wallet2: adapt to deterministic unlock time 2020-09-15 11:40:31 +00:00
moneromooo-monero
5498142e8f
rpc: assume randomx from v13 onwards 2020-09-07 01:13:06 +00:00
Riccardo Spagni
aefa7740c3
Merge pull request #6111
d20ff4f64 functional_tests: add a large (many randomx epochs) p2p reorg test (moneromooo-monero)
6a0b3b1f8 functional_tests: add randomx tests (moneromooo-monero)
9d42649d5 core: fix mining from a block that's not the current top (moneromooo-monero)
2020-09-06 15:49:37 +02:00
luigi1111
a51ccc036f
Merge pull request #6770
bdc6b10 Fix ZMQ pruned bulletproof transactions (vtnerd)
2020-08-31 16:50:18 -05:00
moneromooo-monero
9d42649d58
core: fix mining from a block that's not the current top 2020-08-27 15:13:00 +00:00
moneromooo-monero
82ee01699c
Integrate CLSAGs into monero
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-27 12:44:04 +00:00
Alexander Blair
27b49033fd
Merge pull request #6763
728ba38b1 rpc: always send raw txes through P2P (don't use bootstrap daemon) (xiphon)
2020-08-27 03:02:30 -07:00
Lee Clagett
bdc6b10d62 Fix ZMQ pruned bulletproof transactions 2020-08-19 00:36:06 -04:00
moneromooo-monero
7175dcb107
replace most boost serialization with existing monero serialization
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-17 16:23:58 +00:00
Alexander Blair
d73b1b6560
Merge pull request #6727
13eee1d6a rpc: reject wrong sized txid (moneromooo-monero)
92e6b7df2 easylogging++: fix crash with reentrant logging (moneromooo-monero)
6dd95d530 epee: guard against exceptions in RPC handlers (moneromooo-monero)
90016ad74 blockchain: guard against exceptions in add_new_block/children (moneromooo-monero)
2020-08-16 12:55:25 -07:00
Alexander Blair
569d07d60b
Merge pull request #6722
c1b03fb1a rpc: return empty txid get_outs rather than 00..00 when not requested (moneromooo-monero)
2020-08-16 12:54:42 -07:00
Alexander Blair
a08df6eb1b
Merge pull request #6603
4e2377995 Change ZMQ-JSON txextra to hex and remove unnecessary base fields (Lee Clagett)
2020-08-16 12:43:38 -07:00
xiphon
728ba38b11 rpc: always send raw txes through P2P (don't use bootstrap daemon)
It turns out that some remote (bootstrap) nodes silently drop /
don't broadcast client's transactions.
2020-08-16 17:34:28 +00:00
Lee Clagett
4e2377995d Change ZMQ-JSON txextra to hex and remove unnecessary base fields 2020-08-14 23:01:00 +00:00
Lee Clagett
60627c9f24 Switch to insitu parsing for ZMQ-JSON; GetBlocksFast reads 13%+ faster 2020-08-14 19:46:59 +00:00
Lee Clagett
fe96e66ebe Fix pruned tx for ZMQ's GetBlocksFast 2020-08-14 19:46:33 +00:00
moneromooo-monero
13eee1d6ab
rpc: reject wrong sized txid
Reporter requested credit to be given to Decred
2020-07-30 22:52:14 +00:00
moneromooo-monero
c1b03fb1a6
rpc: return empty txid get_outs rather than 00..00 when not requested
It's more obvious there's no txid, and it saves space
2020-07-25 17:01:21 +00:00
Alexander Blair
a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
luigi1111
e8d87fccc2
Merge pull request #6627
4df8f9c rpc: fix loading rpc payment data from file (moneromooo-monero)
2020-07-08 17:22:33 -05:00
luigi1111
0376195015
Merge pull request #6611
dc1a053 rpc: fix comparison of seconds vs microseconds (moneromooo-monero)
2020-07-08 17:21:31 -05:00
luigi1111
3057f52f89
Merge pull request #6599
6e4a55b rpc: fix relay_tx error return mixup (moneromooo-monero)
9b86e14 functional_tests: add simple relay_tx test (moneromooo-monero)
2020-07-08 17:20:29 -05:00
luigi1111
be170c485c
Merge pull request #6584
78d435a rpc: don't display invalid json errors on default log level (moneromooo-monero)
2020-07-08 17:12:43 -05:00
luigi1111
8b3fa2d373
Merge pull request #6574
7ebb351 rpc: lock access to the rpc payment object (moneromooo-monero)
2020-07-08 17:11:32 -05:00
luigi1111
ff4d470629
Merge pull request #6576
4d3c2d0 rpc: add a sanity limit to a few RPC in restricted mode (moneromooo-monero)
2020-06-08 14:27:05 -05:00
moneromooo-monero
4df8f9c414
rpc: fix loading rpc payment data from file
Got broken after making one of those micro optimizations requested on review..
2020-06-05 11:21:24 +00:00
Lee Clagett
7aeb503547 Fix boost <1.60 compilation and fix boost 1.73+ warnings 2020-05-31 21:18:11 -04:00
moneromooo-monero
dc1a053081
rpc: fix comparison of seconds vs microseconds 2020-05-31 22:28:23 +00:00
moneromooo-monero
6e4a55ba7e
rpc: fix relay_tx error return mixup 2020-05-28 11:33:27 +00:00
moneromooo-monero
78d435a5fa
rpc: don't display invalid json errors on default log level
It's not something the user needs to know, and will display
attacker controlled data
2020-05-23 12:26:49 +00:00
moneromooo-monero
4d3c2d0b7b
rpc: add a sanity limit to a few RPC in restricted mode 2020-05-20 19:17:49 +00:00
moneromooo-monero
7ebb351c2d
rpc: lock access to the rpc payment object 2020-05-19 18:26:28 +00:00
SomaticFanatic
5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
luigi1111
f2c78f6a5b
Merge pull request #6486
feee455 Fixes for ZMQ JSON-RPC endpoint names for raw tx (vtnerd)
2020-05-06 00:34:30 -05:00
luigi1111
de025281dc
Merge pull request #6481
119f706 rpc: fix 'use_bootstrap_daemon_if_necessary' return value (xiphon)
2020-05-06 00:29:49 -05:00
Lee Clagett
e5214a2ca2 Adding ZMQ/Pub support for txpool_add and chain_main events 2020-05-04 02:06:35 +00:00
Lee Clagett
feee455c9f Fixes for ZMQ JSON-RPC endpoint names for raw tx 2020-04-29 01:07:27 -04:00
xiphon
119f706921 rpc: fix 'use_bootstrap_daemon_if_necessary' return value 2020-04-27 10:32:33 +00: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
ec90f9a54b
Merge pull request #6453
d2d3a81 bootstrap_daemon: fix missing virtual destructor and lambda capture (clang warning) (xiphon)
2020-05-01 15:47:47 -05:00
xiphon
d2d3a81d0e bootstrap_daemon: fix missing virtual destructor and lambda capture (clang warning) 2020-04-15 21:22:55 +00: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
ad5200e440
Merge pull request #6342
82da832 rpc: Add check for too old timestamps in payment signatures. (glv2)
2020-04-04 12:49:02 -05:00
luigi1111
081d49c59f
Merge pull request #6338
80d5320 Hash domain separation (SarangNoether)
2020-04-04 12:44:45 -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
Sarang Noether
80d5320fff Hash domain separation 2020-04-01 08:31:00 -04:00
xiphon
6d6af701ec cryptonote_basic: drop unused verification_context::m_not_rct field 2020-03-31 21:58:25 +00:00
luigi1111
94f44d4ee3
Merge pull request #6325
3627e53 rpc: fix print_pool_sh not finding local txes (moneromooo-monero)
2020-03-31 15:13:51 -05:00
luigi1111
ccc3726d86
Merge pull request #6260
320bc84 rpc: add --rpc-payment-allow-free-loopback (moneromooo-monero)
2020-03-31 13:35:16 -05:00
Lee Clagett
babf25d2ec Allow unrestricted rpc calls to get full txpool info 2020-03-30 17:52:42 +00:00
Alexander Blair
8cb005b39c
Merge pull request #6289
ffe7165e wallet: reroll fake outs selection on local tx_sanity_check failure (xiphon)
2020-03-27 12:28:29 -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
320bc845b3
rpc: add --rpc-payment-allow-free-loopback
This allows RPC coming from the loopback interface to not have
to pay for service. This makes it possible to run an externally
accessible RPC server for payment while also having a local RPC
server that can be run unrestricted and payment free.
2020-03-12 11:27:34 +00: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
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
f3fddd935f
Merge pull request #6259
69336931 rpc: fill miner_tx_hash again (moneromooo-monero)
2020-02-28 19:51:15 -08:00
Alexander Blair
9ea7df3b31
Merge pull request #6242
716012ca rpc: drop the obsolete and wrong "unpruned size" log (moneromooo-monero)
2020-02-28 19:50:02 -08:00
Alexander Blair
4371ac4265
Merge pull request #6225
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
2020-02-28 19:48:11 -08:00
Alexander Blair
e22655a187
Merge pull request #6215
a2578892 --disable-ban-rpc option to prevent RPC users from banning (naughtyfox)
2020-02-28 19:43:06 -08:00
Alexander Blair
4da37daf67
Merge pull request #6211
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
2020-02-28 19:36:16 -08:00
xiphon
42a7a4dd32 daemon: auto public nodes - cache and prioritize most stable nodes 2020-02-28 08:06:43 +00:00
luigi1111
39e1890276
Merge pull request #6198
5f2a32c daemon: run with -rpc-payment-address and --rpc-restricted-bind-port (moneromooo-monero)
2020-02-19 22:25:44 -05:00
Guillaume Le Vaillant
82da832368 rpc: Add check for too old timestamps in payment signatures. 2020-02-17 15:10:19 +01:00
moneromooo-monero
3627e53aab
rpc: fix print_pool_sh not finding local txes 2020-02-08 12:56:00 +00:00
Alexander Blair
9658f5d7fc
Merge pull request #6040
2f8f3a94 rpc: base flush_cache request/response on the new base structs (moneromooo-monero)
2020-02-06 00:26:34 -08:00
Alexander Blair
25c1bd4714
Merge pull request #6035
b90c4bc3 rpc: error out from get_info if the proxied call errors out (moneromooo-monero)
fa16df99 make_test_signature: exit nicely on top level exception (moneromooo-monero)
054b2621 node_rpc_proxy: init some new rpc payment fields in invalidate (moneromooo-monero)
d0faae2a rpc: init a few missing client_info members (moneromooo-monero)
d56a483a rpc: do not propagate exceptions out of a dtor (moneromooo-monero)
3c849188 rpc: always set the update field in update on sucess (moneromooo-monero)
2020-02-06 00:26:13 -08:00
Alexander Blair
e8f94e7f1d
Merge pull request #6173
8231c7cd rpc: fix bootstrap RPC payment RPC being made in raw JSON, not JSON RPC (moneromooo-monero)
81c26589 rpc: don't auto fail RPC needing payment in bootstrap mode (moneromooo-monero)
2020-01-24 20:19:41 -08:00
Alexander Blair
93d49c1a54
Merge pull request #6172
d7cf8727 rpc: add received_timestamp for pool txes in gettransactions (moneromooo-monero)
2020-01-24 20:17:39 -08:00
Alexander Blair
2ce5529680
Merge pull request #6134
a7a40e28 Actually concatenate error strings. (Bert Peters)
2020-01-16 17:42:27 -08:00
xiphon
ffe7165ebf wallet: reroll fake outs selection on local tx_sanity_check failure 2020-01-14 22:56:23 +00:00
moneromooo-monero
6933693179
rpc: fill miner_tx_hash again
It was removed to save duplicated generation time, but it can
be copied from another instance instead
2019-12-20 14:16:31 +00:00
moneromooo-monero
716012ca3a
rpc: drop the obsolete and wrong "unpruned size" log
Since we now get pruned data in the first place, the "unpruned" data
size will in fact be the pruned data size, leading to confusion
2019-12-16 14:50:07 +00: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
987c3139dc
print_coinbase_tx_sum now supports 128 bits sums
The tail emission will bring the total above 64 bits
2019-12-12 01:56:59 +00:00
naughtyfox
a2578892c0 --disable-ban-rpc option to prevent RPC users from banning 2019-12-04 17:45:27 +03:00
moneromooo-monero
5985c5afe8
rpc: add bad-blocks to flush_cache RPC
Flushes m_invalid_blocks in Blockchain.
2019-12-02 18:53:30 +00:00
moneromooo-monero
5f2a32c15a
daemon: run with -rpc-payment-address and --rpc-restricted-bind-port 2019-11-29 20:07:01 +00:00
moneromooo-monero
b90c4bc39e
rpc: error out from get_info if the proxied call errors out
Coverity 205410
2019-11-27 19:52:39 +00:00
moneromooo-monero
d0faae2a92
rpc: init a few missing client_info members
Coverity 205414
2019-11-27 19:52:37 +00:00
moneromooo-monero
d56a483abe
rpc: do not propagate exceptions out of a dtor
Coverity 205415
2019-11-27 19:52:36 +00:00
moneromooo-monero
3c849188ab
rpc: always set the update field in update on sucess
Coverity 205416
2019-11-27 19:52:33 +00:00
moneromooo-monero
8231c7cd04
rpc: fix bootstrap RPC payment RPC being made in raw JSON, not JSON RPC 2019-11-25 19:28:43 +00:00
moneromooo-monero
81c2658989
rpc: don't auto fail RPC needing payment in bootstrap mode 2019-11-22 18:12:29 +00:00
moneromooo-monero
d7cf872767
rpc: add received_timestamp for pool txes in gettransactions 2019-11-22 15:53:40 +00:00
Lee Clagett
68a6507c3f Fixed bug in ZMQ JSON-RPC method field 2019-11-18 12:59:41 +00:00
Bert Peters
a7a40e285c Actually concatenate error strings. 2019-11-14 10:36:49 +01:00
Nathan Dorfman
dce6f055f9 rpc: Only show version string if it matches expected pattern 2019-11-12 18:19:24 -07:00
Lee Clagett
5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
Riccardo Spagni
da31077bed
Merge pull request #6047
ebc6ce44f cryptonote: untangle dependency from miner to blockchain (moneromooo-monero)
2019-11-02 17:30:09 +02:00
moneromooo-monero
ebc6ce44f4
cryptonote: untangle dependency from miner to blockchain
It causes link errors at least on mac
2019-10-31 01:06:42 +00:00
xiphon
2e2bf8a207 daemon: always use bootstrap daemon (if set) in '--no-sync' mode 2019-10-28 21:52:19 +00:00
moneromooo-monero
2f8f3a9432
rpc: base flush_cache request/response on the new base structs 2019-10-27 16:14:28 +00:00
luigi1111
ef8b3a15b4
Merge pull request #6017
5734686 rpc: Include tag in get_info version string (ndorf)
2019-10-25 20:48:04 -05:00
moneromooo-monero
f7f7513ec3
rpc: fix PRIx64 build error on some systems 2019-10-26 00:05:21 +00:00