Commit Graph

731 Commits

Author SHA1 Message Date
luigi1111 e9a4deef81
Merge pull request #9079
eed975d Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:18 -05:00
luigi1111 8ee57110b0
Merge pull request #9077
2525200 serialization: remove container wrappers and serialize directly (jeffro256)
2024-01-18 18:02:31 -05:00
luigi1111 4b1910af13
Merge pull request #9073
53e632b fix merge mining with more than one merge mined chain (Crypto City)
2024-01-18 18:01:34 -05:00
luigi1111 9d7b253263
Merge pull request #9052
4acae11 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB (Lee *!* Clagett)
2024-01-18 17:57:30 -05:00
Crypto City 53e632b435
fix merge mining with more than one merge mined chain
reported by sech1
2023-11-30 17:01:52 +00:00
Lee Clagett eed975db5d Fix missing checks for IsObject in ZMQ jsonrpc reading 2023-11-28 18:02:57 -05:00
jeffro256 2525200185
serialization: remove container wrappers and serialize directly
Some downstream code (most notably PR https://github.com/UkoeHB/monero/pull/25) wants to use the src/serialization lib
for storing information persistently. When one builds classes/machines wishing to serialize containers, they must use
the `serializable_*` container classes. In this case, this makes the Seraphis library code unnecessarily tightly coupled
with the src/serialization code since one cannot swap out their type of storage format without major refactoring of class
field types. By serializing STL containers directly, we can abstract the serialization details away, making for much
cleaner design. Also small bonus side effect of this change is that STL containers with custom Comparators, Allocators,
and Hashers are serializable. `std::multimap` is added to the list of serializable containers.

Depends upon https://github.com/monero-project/monero/pull/9069.
2023-11-28 14:06:24 -06:00
luigi1111 476398687d
Merge pull request #8965
1e2e703 core_rpc_server: silence unused  warnings (jeffro256)
2023-11-06 09:23:08 -05:00
Lee *!* Clagett 4acae11327 Fix EAGAIN bug in ZMQ-RPC/ZMQ-PUB 2023-11-04 13:42:14 -04:00
luigi1111 e3d0154b5b
Merge pull request #8969
8190f25 KV_SERIALIZE: remove extraneous semicolons in DSL (jeffro256)
2023-10-25 21:35:43 -04:00
luigi1111 d5da693866
Merge pull request #8958
b0bf49a blockchain_db: add k-anonymity to txid fetching (jeffro256)
2023-10-25 21:34:06 -04:00
luigi1111 30ba5a5280
Merge pull request #8890
e8cac61 core_rpc_server: return ID of submitted block (jeffro256)
2023-08-17 10:17:46 -05:00
jeffro256 8190f2532b
`KV_SERIALIZE`: remove extraneous semicolons in DSL
Prereq of https://github.com/monero-project/monero/pull/8867
2023-08-10 11:13:14 -05:00
jeffro256 1e2e7035e9
core_rpc_server: silence unused warnings 2023-08-01 17:46:34 -05:00
jeffro256 b0bf49a65a
blockchain_db: add k-anonymity to txid fetching
Read more about k-anonymity [here](https://en.wikipedia.org/wiki/K-anonymity). We implement this feature in the monero daemon for transactions
by providing a "Txid Template", which is simply a txid with all but `num_matching_bits` bits zeroed out, and the number `num_matching_bits`. We add an operation to `BlockchainLMDB` called
`get_txids_loose` which takes a txid template and returns all txids in the database (chain and mempool) that satisfy that template. Thus, a client can
ask about a specific transaction from a daemon without revealing the exact transaction they are inquiring about. The client can control the statistical
chance that other TXIDs (besides the one in question) match the txid template sent to the daemon up to a power of 2. For example, if a client sets their `num_matching_bits`
to 5, then statistically any txid has a 1/(2^5) chance to match. With `num_matching_bits`=10, there is a 1/(2^10) chance, so on and so forth.

Co-authored-by: ACK-J <60232273+ACK-J@users.noreply.github.com>
2023-08-01 17:25:25 -05:00
Jeffrey Ryan 70bbd2536b
core_rpc_server: new file: rpc_ssl.fingerprint 2023-07-02 19:38:51 -05:00
jeffro256 e8cac61f4b
core_rpc_server: return ID of submitted block 2023-06-30 15:31:35 -05:00
luigi1111 b442d5d4c1
Merge pull request #8780
4e16559 rpc: give reason when sending non-hex raw tx (jeffro256)
2023-04-25 11:21:48 -04:00
luigi1111 9bf06ea75d
Merge pull request #8698
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-04-25 11:12:56 -04:00
luigi1111 76dd14dfb1
Merge pull request #8733
3771641 Add a size limit for tx_extra in tx pool (tevador)
2023-03-18 18:18:13 -04:00
luigi1111 a511202222
Merge pull request #8076
c4af33e Enforce restricted # pool txs served via RPC + optimize chunked reqs (j-berman)
9752116 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call (rbrunner7)
2023-03-18 17:58:27 -04:00
jeffro256 4e16559053 rpc: give reason when sending non-hex raw tx 2023-03-17 18:18:06 -05:00
j-berman c4af33eded Enforce restricted # pool txs served via RPC + optimize chunked reqs
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-03-07 20:35:45 +01:00
tevador 3771641fc5 Add a size limit for tx_extra in tx pool 2023-02-26 10:26:53 +01:00
luigi1111 672eedf9c2
Merge pull request #8691
934b798 rpc: do not misidentify coinbase txes as pruned (moneromooo-monero)
2023-02-06 12:24:17 -05:00
mj-xmr 5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
SChernykh dab7d01dc0 Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
2023-01-09 07:43:07 +01:00
moneromooo-monero 934b798c74
rpc: do not misidentify coinbase txes as pruned 2023-01-01 09:30:59 +00:00
rbrunner7 9752116ed3 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call 2022-12-30 13:50:22 +01:00
j-berman b8271ab881 wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:24:24 -06:00
luigi1111 ddb434fc19
Merge pull request #8519
2639c4f rpc: skip bootstrap nodes that are lower than last checkpoint (selsta)
2022-09-09 12:49:46 -05:00
luigi1111 e553884d1f
Merge pull request #8348
a4cb77f epee: update 'http_server_handlers_map2.h' macros to use fully qualified names (Jeffrey Ryan)
2022-09-09 12:46:39 -05:00
selsta 2639c4f2ff
rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:06:45 +02:00
j-berman 8460fcc32b Revert "Merge pull request #7937"
This reverts commit 50410d1f7d, reversing
changes made to d054def63f.
2022-06-13 18:44:09 +01:00
Jeffrey Ryan a4cb77f9f3 epee: update 'http_server_handlers_map2.h' macros to use fully qualified names
quick patch which fixes the issue where if you use some macros from `http_server_handlers_map2.h` you have to be in the `epee` namespace or it doesn't compile. Now can remove `using namespace epee;` from header file `core_rpc_server.h`, which caused a couple of name qualifying mistakes
2022-05-23 14:46:36 -05:00
Jeffrey Ryan 1ddb1ee819 Give better error messages when missing SSL files
While copying my data dir to another drive, I missed copying the rpc_ssl.key file b/c of the file permissions.
This change will give a much more clear, descriptive error in that scenario.
2022-05-05 21:48:19 -05:00
moneromooo-monero 9209880e9c
add a sanity check to RPC input data size
reported by m31007
2022-04-21 22:22:56 +00:00
Jeffrey 40f02f9d73 Add Include statements 2022-04-18 09:55:20 -05:00
moneromooo-monero b030f20751
Fee changes from ArticMine
https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf

with a change to use 1.7 instead of 2.0 for the max long term increase rate
2022-04-10 18:13:34 +00:00
luigi1111 0eb1b570b6
Merge pull request #8197
da9aa1f Copyright: Update to 2022 (mj-xmr)
2022-04-06 00:08:53 -04:00
luigi1111 50410d1f7d
Merge pull request #7937
83bb027 Make RPC server functions that read db thread safe (j-berman)
2022-04-06 00:02:47 -04:00
j-berman 83bb02745a Make RPC server functions that read db thread safe
- grab an lmdb db_rtxn_guard to ensure consistent data from the db
- fixed on_getblockhash error resp when requested height >= blockchain height
- left functions that read shared memory untouched for now
2022-04-05 20:20:12 -07:00
luigi1111 427bd85893
Merge pull request #8187
9bde2db Fixes: Don't require --rpc-login with --rpc-access-control-origins #8168 (Jeffrey)
2022-03-18 16:32:25 -05:00
mj-xmr da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
Jeffrey 9bde2dbfed Fixes: Don't require --rpc-login with --rpc-access-control-origins #8168
This PR removes the requirement for --rpc-login to be specified if --rpc-access-control-origins is.
This will allow public nodes to serve cross-origin requests. You can still use --rpc-login with
--rpc-access-control-origins, but it is no longer mandatory.

Original Issue: #8168
2022-02-19 13:49:38 -06:00
tobtoht 5e201fedc5
rpc: add explicit restricted flag to /get_info 2022-02-07 17:59:22 +01:00
luigi1111 55fc2335a4
Merge pull request #7943
3a90be4 rpc: don't set error code as status string (selsta)
2021-11-30 17:00:20 -05:00
luigi1111 105e2304a2
Merge pull request #8083
e8e507f rpc: fix DoS vector in get_output_distribution (moneromooo-monero)
2021-11-26 23:05:31 -06:00
Howard Chu 0221b01519
Add calcpow RPC
Calculate PoW hash for a block candidate
2021-11-20 18:52:05 +00:00
moneromooo-monero e8e507f36f
rpc: fix DoS vector in get_output_distribution
This will prevent people spending old pre-rct outputs using a
stranger's node, which may be a good thing
2021-10-24 17:17:12 +00:00