aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/rpc_command_executor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Establish Monzero Phase 0 and inactive assets baselinemonzero-phase0-assets-prototype-20260815Monzero Build System5 hours1-4/+4
|
* daemon: fix print_cn command when 0 connectionsjeffro2562026-05-161-6/+3
| | | | | | Deferencing the result of `std::max_element()` when `res.connections` has 0 elements leads to UB, and segfaults in practice. Co-authored-by: iamamyth <user@example.com>
* Show IPv6 addresses in connection listGuillaume Le Vaillant2026-05-161-3/+10
|
* Merge pull request #9740tobtoht2025-03-101-2/+1
|\ | | | | | | 008ba966d blockchain sync: reduce disk writes from 2 to 1 per tx (jeffro256)
| * blockchain sync: reduce disk writes from 2 to 1 per txjeffro2562025-03-101-2/+1
| |
* | epee: update 'http_server_handlers_map2.h' macros to use fully qualified namesJeffrey Ryan2025-02-131-1/+1
|/ | | | 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
* Copyright: Update to 2022mj-xmr2022-03-041-1/+1
|
* Merge pull request #7326luigi11112021-03-291-1/+3
|\ | | | | | | cf266d6 bootstrap_daemon: proxy configuration support (xiphon)
| * bootstrap_daemon: proxy configuration supportxiphon2021-01-211-1/+3
| |
* | Remove unused variables in monero codebaseKevin Barbour2021-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
* | Header row for peer list in sync_infoDenis Goddard2020-12-311-0/+1
|/
* restrict public node checks a littlemoneromooo-monero2020-12-221-0/+4
| | | | | do not include blocked hosts in peer lists or public node lists by default, warn about no https on clearnet and about untrusted peers likely being spies
* Merge pull request #6703Alexander Blair2020-08-161-1/+3
|\ | | | | | | 8baa7bb23 daemon: don't print "(pruned)" for coinbase txes (moneromooo-monero)
| * daemon: don't print "(pruned)" for coinbase txesmoneromooo-monero2020-07-241-1/+3
| | | | | | | | | | Pruned coinbase txes are the same as unpruned ones, so the prunable data is empty
* | Merge pull request #6689Alexander Blair2020-08-161-2/+4
|\ \ | | | | | | | | | | | | afd002c31 daemon: print sampling time in print_net_stats (moneromooo-monero) ec7bba079 util: fix kilo prefix typo (K instead of k) (moneromooo-monero)
| * | daemon: print sampling time in print_net_statsmoneromooo-monero2020-06-251-2/+4
| | |
* | | Merge pull request #6512Alexander Blair2020-07-191-1/+1
|\ \ \ | |_|/ |/| | | | | 5ef0607da Update copyright year to 2020 (SomaticFanatic)
| * | Update copyright year to 2020SomaticFanatic2020-05-061-1/+1
| |/ | | | | | | Update copyright year to 2020
* / daemon: remove time based "update needed" status stringmoneromooo-monero2020-05-241-2/+1
|/
* Merge pull request #6408luigi11112020-04-211-2/+2
|\ | | | | | | 5ef7138 daemon: fix print_net_stats RPC calls (moneromooo-monero)
| * daemon: fix print_net_stats RPC callsmoneromooo-monero2020-03-291-2/+2
| |
* | Merge pull request #6353luigi11112020-04-041-3/+7
|\ \ | |/ |/| | | 6810150 daemon: if no banned IPs print something (sumogr)
| * daemon: if no banned IPs print somethingsumogr2020-02-241-3/+7
| |
* | Merge pull request #6225Alexander Blair2020-02-281-3/+3
|\ \ | | | | | | | | | 987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
| * | print_coinbase_tx_sum now supports 128 bits sumsmoneromooo-monero2019-12-121-3/+3
| | | | | | | | | | | | The tail emission will bring the total above 64 bits
* | | Merge pull request #6211Alexander Blair2020-02-281-1/+2
|\ \ \ | |_|/ |/| | | | | 5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
| * | rpc: add bad-blocks to flush_cache RPCmoneromooo-monero2019-12-021-1/+2
| |/ | | | | | | Flushes m_invalid_blocks in Blockchain.
* | Merge pull request #6096Alexander Blair2020-02-061-3/+32
|\ \ | | | | | | | | | a633f85d daemon: allow printing N blocks from the end of the chain (moneromooo-monero)
| * | daemon: allow printing N blocks from the end of the chainmoneromooo-monero2019-11-041-3/+32
| |/ | | | | | | | | It's a very common usage (for my anyway) and avoids the need to get the current height, paste, subtract one, etc
* | Merge pull request #6095Alexander Blair2020-02-061-0/+24
|\ \ | | | | | | | | | 7ba31191 daemon: add +meta print_tx parameter (moneromooo-monero)
| * | daemon: add +meta print_tx parametermoneromooo-monero2019-11-041-0/+24
| |/ | | | | | | prints size, weight and (if mined) height
* | Merge pull request #6053Alexander Blair2020-02-061-2/+2
|\ \ | | | | | | | | | deb350b7 always print peer IDs in the same format (moneromooo-monero)
| * | always print peer IDs in the same formatmoneromooo-monero2019-10-291-2/+2
| |/
* | Merge pull request #6054luigi11112019-12-121-1/+1
|\ \ | | | | | | | | | 017f816 daemon: handle printing higher hash rates (moneromooo-monero)
| * | daemon: handle printing higher hash ratesmoneromooo-monero2019-10-291-1/+1
| |/
* | rpc: Only show version string if it matches expected patternNathan Dorfman2019-11-121-1/+2
| |
* | daemon: Use rpc for "version" commandNathan Dorfman2019-11-121-0/+35
|/
* rpc: add a flush_cache RPCmoneromooo-monero2019-10-251-0/+28
| | | | | | | This allows flushing internal caches (for now, the bad tx cache, which will allow debugging a stuck monerod after it has failed to verify a transaction in a block, since it would otherwise not try again, making subsequent log changes pointless)
* Merge pull request #5357luigi11112019-10-251-1/+51
|\ | | | | | | | | | | b3a9a4d add a quick early out to get_blocks.bin when up to date (moneromooo-monero) 2899379 daemon, wallet: new pay for RPC use system (moneromooo-monero) ffa4602 simplewallet: add public_nodes command (moneromooo-monero)
| * daemon, wallet: new pay for RPC use systemmoneromooo-monero2019-10-251-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daemons intended for public use can be set up to require payment in the form of hashes in exchange for RPC service. This enables public daemons to receive payment for their work over a large number of calls. This system behaves similarly to a pool, so payment takes the form of valid blocks every so often, yielding a large one off payment, rather than constant micropayments. This system can also be used by third parties as a "paywall" layer, where users of a service can pay for use by mining Monero to the service provider's address. An example of this for web site access is Primo, a Monero mining based website "paywall": https://github.com/selene-kovri/primo This has some advantages: - incentive to run a node providing RPC services, thereby promoting the availability of third party nodes for those who can't run their own - incentive to run your own node instead of using a third party's, thereby promoting decentralization - decentralized: payment is done between a client and server, with no third party needed - private: since the system is "pay as you go", you don't need to identify yourself to claim a long lived balance - no payment occurs on the blockchain, so there is no extra transactional load - one may mine with a beefy server, and use those credits from a phone, by reusing the client ID (at the cost of some privacy) - no barrier to entry: anyone may run a RPC node, and your expected revenue depends on how much work you do - Sybil resistant: if you run 1000 idle RPC nodes, you don't magically get more revenue - no large credit balance maintained on servers, so they have no incentive to exit scam - you can use any/many node(s), since there's little cost in switching servers - market based prices: competition between servers to lower costs - incentive for a distributed third party node system: if some public nodes are overused/slow, traffic can move to others - increases network security - helps counteract mining pools' share of the network hash rate - zero incentive for a payer to "double spend" since a reorg does not give any money back to the miner And some disadvantages: - low power clients will have difficulty mining (but one can optionally mine in advance and/or with a faster machine) - payment is "random", so a server might go a long time without a block before getting one - a public node's overall expected payment may be small Public nodes are expected to compete to find a suitable level for cost of service. The daemon can be set up this way to require payment for RPC services: monerod --rpc-payment-address 4xxxxxx \ --rpc-payment-credits 250 --rpc-payment-difficulty 1000 These values are an example only. The --rpc-payment-difficulty switch selects how hard each "share" should be, similar to a mining pool. The higher the difficulty, the fewer shares a client will find. The --rpc-payment-credits switch selects how many credits are awarded for each share a client finds. Considering both options, clients will be awarded credits/difficulty credits for every hash they calculate. For example, in the command line above, 0.25 credits per hash. A client mining at 100 H/s will therefore get an average of 25 credits per second. For reference, in the current implementation, a credit is enough to sync 20 blocks, so a 100 H/s client that's just starting to use Monero and uses this daemon will be able to sync 500 blocks per second. The wallet can be set to automatically mine if connected to a daemon which requires payment for RPC usage. It will try to keep a balance of 50000 credits, stopping mining when it's at this level, and starting again as credits are spent. With the example above, a new client will mine this much credits in about half an hour, and this target is enough to sync 500000 blocks (currently about a third of the monero blockchain). There are three new settings in the wallet: - credits-target: this is the amount of credits a wallet will try to reach before stopping mining. The default of 0 means 50000 credits. - auto-mine-for-rpc-payment-threshold: this controls the minimum credit rate which the wallet considers worth mining for. If the daemon credits less than this ratio, the wallet will consider mining to be not worth it. In the example above, the rate is 0.25 - persistent-rpc-client-id: if set, this allows the wallet to reuse a client id across runs. This means a public node can tell a wallet that's connecting is the same as one that connected previously, but allows a wallet to keep their credit balance from one run to the other. Since the wallet only mines to keep a small credit balance, this is not normally worth doing. However, someone may want to mine on a fast server, and use that credit balance on a low power device such as a phone. If left unset, a new client ID is generated at each wallet start, for privacy reasons. To mine and use a credit balance on two different devices, you can use the --rpc-client-secret-key switch. A wallet's client secret key can be found using the new rpc_payments command in the wallet. Note: anyone knowing your RPC client secret key is able to use your credit balance. The wallet has a few new commands too: - start_mining_for_rpc: start mining to acquire more credits, regardless of the auto mining settings - stop_mining_for_rpc: stop mining to acquire more credits - rpc_payments: display information about current credits with the currently selected daemon The node has an extra command: - rpc_payments: display information about clients and their balances The node will forget about any balance for clients which have been inactive for 6 months. Balances carry over on node restart.
* | daemon: print difficulty in decimal, as it used to bemoneromooo-monero2019-10-241-8/+8
| | | | | | | | It got switched to hexadecimal when we went to 128 bit values
* | Merge pull request #6001luigi11112019-10-241-1/+2
|\ \ | | | | | | | | | 705edd8 daemon: fix coinbase txes always being seen as pruned (moneromooo-monero)
| * | daemon: fix coinbase txes always being seen as prunedmoneromooo-monero2019-10-181-1/+2
| | |
* | | Merge pull request #6000luigi11112019-10-241-1/+2
|\ \ \ | |_|/ |/| | | | | 641c9cf daemon: add miner tx hash in print_block output (moneromooo-monero)
| * | daemon: add miner tx hash in print_block outputmoneromooo-monero2019-10-181-1/+2
| |/
* / Print cdifficulty and don't serialize miner tx hash twiceDoyle2019-10-071-0/+1
|/
* Merge pull request #5868luigi11112019-09-141-1/+1
|\ | | | | | | 1f1fff2 daemon: print mining algorithm in mining_status even when not mining (moneromooo-monero)
| * daemon: print mining algorithm in mining_status even when not miningmoneromooo-monero2019-08-281-1/+1
| |
* | Merge pull request #5849luigi11112019-09-081-4/+9
|\ \ | | | | | | | | | b51f4cd daemon: add pruned and publicrpc flags to print_pl (moneromooo-monero)
| * | daemon: add pruned and publicrpc flags to print_plmoneromooo-monero2019-08-231-4/+9
| |/