From f137a35984985232a3aae50cd4c7b47634866594 Mon Sep 17 00:00:00 2001 From: j-berman Date: Tue, 13 Dec 2022 16:08:56 -0800 Subject: Enforce restricted # pool txs served via RPC + optimize chunked reqs [release-v0.18] - `/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. --- src/wallet/node_rpc_proxy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/wallet/node_rpc_proxy.h') diff --git a/src/wallet/node_rpc_proxy.h b/src/wallet/node_rpc_proxy.h index f78cd6427..0088090a8 100644 --- a/src/wallet/node_rpc_proxy.h +++ b/src/wallet/node_rpc_proxy.h @@ -59,6 +59,7 @@ public: boost::optional get_dynamic_base_fee_estimate_2021_scaling(uint64_t grace_blocks, std::vector &fees); boost::optional get_fee_quantization_mask(uint64_t &fee_quantization_mask); boost::optional get_rpc_payment_info(bool mining, bool &payment_required, uint64_t &credits, uint64_t &diff, uint64_t &credits_per_hash_found, cryptonote::blobdata &blob, uint64_t &height, uint64_t &seed_height, crypto::hash &seed_hash, crypto::hash &next_seed_hash, uint32_t &cookie); + boost::optional get_transactions(const std::vector &txids, const std::function &f); boost::optional get_block_header_by_height(uint64_t height, cryptonote::block_header_response &block_header); private: -- cgit v1.2.3