aboutsummaryrefslogtreecommitdiff
path: root/src/rpc (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-05-03build: rely on pkg-config to find zmq and sodiumv0.15.0.5Bertrand Jacquin1-4/+3
if zmq was built with libnorm, libproto or libpgm, pkg-config can inform us directly instead of having to find them. The location of zmq.h can be obtained the same way motivation is to remove opengpm from the list of mandatory dependencies when monero does not have direct dependency on opengpm, but only when zeromq is buily with pgm support which itself has hard dependency on pyton2 which is now EOL.
2019-11-18Fixed bug in ZMQ JSON-RPC method fieldLee Clagett1-3/+12
2019-10-31cryptonote: untangle dependency from miner to blockchainmoneromooo-monero1-1/+3
It causes link errors at least on mac
2019-10-30daemon: always use bootstrap daemon (if set) in '--no-sync' modexiphon1-3/+5
2019-10-26rpc: fix PRIx64 build error on some systemsmoneromooo-monero1-1/+1
2019-10-25rpc: add a flush_cache RPCmoneromooo-monero3-1/+34
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)
2019-10-25simplewallet: add public_nodes commandmoneromooo-monero3-3/+6
Lists nodes exposing their RPC port for public use
2019-10-25daemon, wallet: new pay for RPC use systemmoneromooo-monero11-431/+1929
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.
2019-10-24rpc: Include tag in get_info version stringNathan Dorfman1-1/+1
2019-10-24add a quick early out to get_blocks.bin when up to datemoneromooo-monero1-1/+15
2019-10-13p2p+rpc: don't skip p2p or rpc port bind failure by defaultxiphon2-4/+4
2019-10-07Print cdifficulty and don't serialize miner tx hash twiceDoyle1-1/+0
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero2-7/+8
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-25RandomX integrationHoward Chu2-2/+19
Support RandomX PoW algorithm
2019-09-25ban peers sending bad pow outrightmoneromooo-monero2-3/+3
PoW is expensive to verify, so be strict
2019-09-17functional_tests: add get_transaction_pool_statsmoneromooo-monero1-3/+3
Also fix part of the RPC results being returned as binary. This makes the RPC backward incompatible.
2019-09-16p2p: fix bans taking port into accountmoneromooo-monero1-3/+3
2019-09-07bootstrap_daemon: resolve CID 203915 (UNCAUGHT_EXCEPT)anonimal2-2/+2
The issue is triggered by the captured `this` in RPC server, which passes reference to throwable `core_rpc_server`: `core_rpc_server.cpp:164: m_bootstrap_daemon.reset(new bootstrap_daemon([this]{ return get_random_public_node(); }));` The solution is to simply remove noexcept from the remaining `bootstrap_daemon` constructors because noexcept is false in this context. >"An exception of type "boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::asio::invalid_service_owner>>" is thrown but the throw list "noexcept" doesn't allow it to be thrown. This will cause a call to unexpected() which usually calls terminate()."
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-1/+1
2019-08-28rpc: don't include an address in mining_status when not miningmoneromooo-monero1-1/+2
Best case is an address mined previously and it'll get returned, worst case it was never initialized in the first place
2019-08-28rpc: move a leftover light wallet RPC out of daemon RPCmoneromooo-monero1-50/+0
2019-08-27daemon: automatic public nodes discovering and bootstrap daemon switchingxiphon5-35/+246
2019-08-26wallet, rpc: add a release field to get_versionmoneromooo-monero2-1/+4
It does not leak much since you can make a fair guess by RPC version already, and some people want to avoid non release clients when using third parties' nodes (because they'd never lie about it)
2019-08-20rpc: fix unitialized 'core_rpc_server::m_was_bootstrap_ever_used'xiphon1-0/+1
2019-08-19daemon: fix print_pl only printing public zone peersmoneromooo-monero2-7/+14
2019-07-31Add IPv6 supportThomas Winget4-1/+57
new cli options (RPC ones also apply to wallet): --p2p-bind-ipv6-address (default = "::") --p2p-bind-port-ipv6 (default same as ipv4 port for given nettype) --rpc-bind-ipv6-address (default = "::1") --p2p-use-ipv6 (default false) --rpc-use-ipv6 (default false) --p2p-require-ipv4 (default true, if ipv4 bind fails and this is true, will not continue even if ipv6 bind successful) --rpc-require-ipv4 (default true, description as above) ipv6 addresses are to be specified as "[xx:xx:xx::xx:xx]:port" except in the cases of the cli args for bind address. For those the square braces can be omitted.
2019-07-29rpc: implement get_public_nodes commandxiphon3-1/+90
2019-07-22Dropping cppzmq dependency; adding some zmq utilsLee Clagett3-71/+87
2019-07-16allow blocking whole subnetsmoneromooo-monero3-2/+87
2019-07-16p2p: store network address directly in blocked host listmoneromooo-monero1-4/+4
rather than their string representation
2019-07-03rpc: get_block_template add optional extra_nonceJethro Grassie2-1/+27
Circumvents the need to create a new blockhashing blob when you already know the data you want to set in the extra_nonce (so use this instead of reserve_size).
2019-07-01zmq: MacPorts latest fixJethro Grassie1-1/+1
2019-06-25rpc headers fixMichal vel m@lbit1-1/+1
2019-06-20rpc: set sanity_check_failed to false when successfulstoffu1-0/+1
2019-06-16Bans for RPC connectionsHoward Chu2-0/+24
Make bans control RPC sessions too. And auto-ban some bad requests. Drops HTTP connections whenever response code is 500.
2019-06-14rpc: restrict the recent cutoff size in restricted RPC modemoneromooo-monero1-0/+9
2019-06-12rpc: work around a GCC 7.4.0 (at least) bugmoneromooo-monero1-1/+3
In static member function ‘static boost::optional<cryptonote::rpc::output_distribution_data> cryptonote::rpc::RpcHandler::get_output_distribution(const std::function<bool(long unsigned int, long unsigned int, long unsigned int, long unsigned int&, std::vector<long unsigned int>&, long unsigned int&)>&, uint64_t, uint64_t, uint64_t, const std::function<crypto::hash(long unsigned int)>&, bool, uint64_t)’: cc1plus: warning: ‘void* __builtin_memset(void*, int, long unsigned int)’: specified size 18446744073709551536 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
2019-06-12rpc: fix get_transactions getting v1 txes from the txpoolmoneromooo-monero1-1/+2
It would try to get their prunable hash, but v1 txes don't have one
2019-06-10rpc: implement set_bootstrap_daemon methodxiphon3-27/+108
2019-06-09miner: fix double free of thread attributesston1th2-8/+2
issue: #5568
2019-06-04rpc: use ip address string representation for peer::host fieldxiphon1-1/+4
2019-06-01daemon: add more chain specific info in alt_chain_infomoneromooo-monero2-29/+50
2019-05-30rpc: in/out peers can now return the setting's valuemoneromooo-monero2-5/+17
2019-05-22Add ssl_options support to monerod's rpc mode.Lee Clagett3-84/+99
2019-05-10remove obsolete save_graph skeleton codemoneromooo-monero3-60/+0
2019-05-09rpc: fail update RPC when running offlinemoneromooo-monero1-0/+7
2019-05-09daemon: sort alt chains by heightmoneromooo-monero2-2/+2
2019-05-01fix wide difficulty conversion with some versions of boostmoneromooo-monero2-5/+5
2019-04-29add a few checks where it seems appropriatemoneromooo-monero1-1/+1
2019-04-26change SSL certificate fingerprint whitelisting from SHA1 to SHA-256moneromooo-monero1-0/+9
SHA1 is too close to bruteforceable
2019-04-25rpc: improve get_output_distributionmoneromooo-monero4-8/+34
It can now handle small reorgs without having to rescan the whole blockchain. Also add a test for it.
2019-04-23consensus: from v12, enforce >= 2 outputsmoneromooo-monero3-0/+9
2019-04-16rpc: add a pruned bool to the prune_blockchain callmoneromooo-monero2-1/+4
2019-04-15rpc: fix get_block_hashes.bin from wallet on pruned blockchainmoneromooo-monero2-8/+3
We want to get all blocks here, even pruned ones
2019-04-15rpc: omit irrelevant fields for pool txes in gettransactionsmoneromooo-monero1-4/+10
2019-04-15rpc: add relayed in get_transaction outputmoneromooo-monero2-5/+11
2019-04-15rpc: set default log category in core_rpc_server.hmoneromooo-monero1-0/+3
2019-04-14core_rpc_server: remove dummy assigning int to boolmoneromooo-monero1-3/+1
Coverity 197653
2019-04-12rpc: new sanity check on relayed transactionsmoneromooo-monero2-0/+13
This will weed out some transactions with silly rings
2019-04-12rpc.getblocktemplate: set reserved_offset to zero when reserve_size==0stoffu1-1/+4
2019-04-11rpc: fix off by one in get_heightmoneromooo-monero1-0/+1
2019-04-11functional_tests: add more blockchain related testsmoneromooo-monero2-3/+30
Related to emission, reorgs, getting tx data back, output distribution and histogram
2019-04-07Pass SSL arguments via one class and use shared_ptr instead of referenceLee Clagett1-12/+19
2019-04-06Change default SSL to "enabled" if user specifies fingerprint/certificateLee Clagett1-7/+12
Currently if a user specifies a ca file or fingerprint to verify peer, the default behavior is SSL autodetect which allows for mitm downgrade attacks. It should be investigated whether a manual override should be allowed - the configuration is likely always invalid.
2019-04-06Change SSL certificate file list to OpenSSL builtin load_verify_locationLee Clagett2-18/+8
Specifying SSL certificates for peer verification does an exact match, making it a not-so-obvious alias for the fingerprints option. This changes the checks to OpenSSL which loads concatenated certificate(s) from a single file and does a certificate-authority (chain of trust) check instead. There is no drop in security - a compromised exact match fingerprint has the same worse case failure. There is increased security in allowing separate long-term CA key and short-term SSL server keys. This also removes loading of the system-default CA files if a custom CA file or certificate fingerprint is specified.
2019-04-06rpc: merge the two get_info implementationsmoneromooo-monero1-62/+3
2019-04-05rpc: make wide_difficulty hexadecimalmoneromooo-monero1-1/+1
This should be friendlier for clients which don't have bignum support
2019-04-04wallet: new option to start background miningmoneromooo-monero2-0/+7
The setup-background-mining option can be used to select background mining when a wallet loads. The user will be asked the first time the wallet is created.
2019-04-04rpc.gettransactions: fill as_json with partial tx in pruned modestoffu1-12/+43
2019-04-01Add hash of top block to /getheight RPCHoward Chu2-2/+6
2019-03-24Make difficulty 128 bit instead of 64 bitmoneromooo-monero4-13/+60
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24New interactive daemon command 'print_net_stats': Global traffic statsrbrunner73-1/+53
2019-03-21rpc: add miner tx hash to block header responsemoneromooo-monero2-1/+4
2019-03-17rpc: quantize db size up to 5 GB in restricted modemoneromooo-monero1-1/+3
2019-03-15wallet: move light wallet RPC out of core RPCmoneromooo-monero1-283/+0
It's not nothing to do with it
2019-03-09daemon: new mining_status commandmoneromooo-monero2-2/+35
2019-03-06rpc: make fill_pow restrictedmoneromooo-monero1-5/+10
It's slow work, so let's not expose it
2019-03-05Update 2019 copyrightbinaryFate19-19/+19
2019-03-05epee: add SSL supportMartijn Otto2-1/+12
RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
2019-03-04default initialize rpc structuresmoneromooo-monero1-140/+259
2019-03-04ArticMine's new block weight algorithmmoneromooo-monero2-0/+3
This curbs runaway growth while still allowing substantial spikes in block weight Original specification from ArticMine: here is the scaling proposal Define: LongTermBlockWeight Before fork: LongTermBlockWeight = BlockWeight At or after fork: LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight) Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time. Define: LongTermEffectiveMedianBlockWeight LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight)) Change Definition of EffectiveMedianBlockWeight From (current definition) EffectiveMedianBlockWeight = max(300000, MedianOverPrevious100Blocks(BlockWeight)) To (proposed definition) EffectiveMedianBlockWeight = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight) Notes: 1) There are no other changes to the existing penalty formula, median calculation, fees etc. 2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork. 3) When the EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty. Note: the long term block weight is stored in the database, but not in the actual block itself, since it requires recalculating anyway for verification.
2019-02-27rpc: Allow submitting tx as hex blob over ZMQNathan Dorfman4-6/+59
2019-02-25daemon: add --public-node mode, RPC port propagation over P2Pxiphon4-9/+13
2019-02-21rpc: quantize db size up to 5 GB in restricted modemoneromooo-monero1-1/+8
2019-02-02epee: add SSL supportmoneromooo-monero2-3/+65
RPC connections now have optional tranparent SSL. An optional private key and certificate file can be passed, using the --{rpc,daemon}-ssl-private-key and --{rpc,daemon}-ssl-certificate options. Those have as argument a path to a PEM format private private key and certificate, respectively. If not given, a temporary self signed certificate will be used. SSL can be enabled or disabled using --{rpc}-ssl, which accepts autodetect (default), disabled or enabled. Access can be restricted to particular certificates using the --rpc-ssl-allowed-certificates, which takes a list of paths to PEM encoded certificates. This can allow a wallet to connect to only the daemon they think they're connected to, by forcing SSL and listing the paths to the known good certificates. To generate long term certificates: openssl genrsa -out /tmp/KEY 4096 openssl req -new -key /tmp/KEY -out /tmp/REQ openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT /tmp/KEY is the private key, and /tmp/CERT is the certificate, both in PEM format. /tmp/REQ can be removed. Adjust the last command to set expiration date, etc, as needed. It doesn't make a whole lot of sense for monero anyway, since most servers will run with one time temporary self signed certificates anyway. SSL support is transparent, so all communication is done on the existing ports, with SSL autodetection. This means you can start using an SSL daemon now, but you should not enforce SSL yet or nothing will talk to you.
2019-01-28Adding initial support for broadcasting transactions over TorLee Clagett3-26/+22
- Support for ".onion" in --add-exclusive-node and --add-peer - Add --anonymizing-proxy for outbound Tor connections - Add --anonymous-inbounds for inbound Tor connections - Support for sharing ".onion" addresses over Tor connections - Support for broadcasting transactions received over RPC exclusively over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28rpc: fix internal daemon calls in restricted rpc getting partial datamoneromooo-monero2-159/+179
2019-01-22Pruningmoneromooo-monero4-19/+118
The blockchain prunes seven eighths of prunable tx data. This saves about two thirds of the blockchain size, while keeping the node useful as a sync source for an eighth of the blockchain. No other data is currently pruned. There are three ways to prune a blockchain: - run monerod with --prune-blockchain - run "prune_blockchain" in the monerod console - run the monero-blockchain-prune utility The first two will prune in place. Due to how LMDB works, this will not reduce the blockchain size on disk. Instead, it will mark parts of the file as free, so that future data will use that free space, causing the file to not grow until free space grows scarce. The third way will create a second database, a pruned copy of the original one. Since this is a new file, this one will be smaller than the original one. Once the database is pruned, it will stay pruned as it syncs. That is, there is no need to use --prune-blockchain again, etc.
2018-12-30wallet: do not display daemon controlled text if untrustedmoneromooo-monero1-12/+12
2018-12-18blockchain_db: speedup tx output gatheringmoneromooo-monero1-13/+16
We know all the data we'll want for getblocks.bin is contiguous
2018-12-07p2p: use vector instead of list for peer listsmoneromooo-monero1-3/+4
2018-12-04rpc: mask values that are nobody else's business in restricted RPCmoneromooo-monero1-24/+29
2018-11-28add command pop_blocksJason Wong3-0/+37
add new public method to Blockchain and update according to code review update after review: better lock/unlock, try catch and coding style
2018-11-27rpc: speed up the common get_output_distribution case while syncingmoneromooo-monero1-2/+19
2018-11-26rpc: speedup get_outs.binmoneromooo-monero1-1/+3
2018-11-23remove some unused codemoneromooo-monero1-72/+0
Found by codacy.com
2018-11-23tests: slow_memmem now returns size_tmoneromooo-monero1-1/+1
Makes more sense than uint64_t for an offset, and agrees with the %zu used to print results. Found by codacy.com
2018-11-21rpc: add version to get_infoJethro Grassie5-1/+11
2018-11-20rpc: speedup get_output_distributionmoneromooo-monero3-2/+105
and decrease the amount of data carried around
2018-11-19Avoid unnecessary temp block and copy ctormoneromooo-monero1-3/+3
block already has a default ctor, and the extra object churn due to its innards (vectors, etc) is pointless.
2018-11-16tests: add unit tests for get_output_distributionmoneromooo-monero4-5/+5
2018-11-16Don't cache nettype in core_rpc_server use m_coredoy-lee2-15/+18
This can go out of sync with m_core's nettype if you run in fakechain mode since entering fakechain mode is done through code not the command line and core_rpc_server only looks at the command line to figure out the nettype.
2018-11-15Removed a lot of unnecessary includesMartijn Otto1-1/+0
2018-11-04rpc: fix linking error of 6097472a, get_output_distributionDusan Klinec1-5/+5
Undefined symbols for architecture x86_64: "cryptonote::core::get_output_distribution(unsigned long long, unsigned long long, unsigned long long, unsigned long long&, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> >&, unsigned long long&) const", referenced from: cryptonote::rpc::RpcHandler::get_output_distribution(cryptonote::core&, unsigned long long, unsigned long long, unsigned long long, bool) in rpc_handler.cpp.o
2018-11-02use current height - 1 for top block height in err msgscryptochangements341-3/+3
2018-10-28return message in stop_mining if mining never startedcryptochangements341-1/+8
2018-10-27rpc: adjust ring size error message now that too high is also possiblemoneromooo-monero1-1/+1
2018-10-24rpc: fix build with older compilersmoneromooo-monero1-1/+1
2018-10-23Update ZMQ fee estimate and add ZMQ output distributionLee Clagett10-80/+226
2018-10-22rpc: fix wrongly formatted JSON for pruned txstoffu1-19/+12
Fix for #4399. Also unifies code for serializing pruned tx to binary/json into one.
2018-10-19rpc: fix output distribution caching ignoring chain changesmoneromooo-monero1-6/+8
0 is placeholder for whole chain, so we should compare chain height changes rather than chain-height-or-zero. Even this isn't totally foolproof if a blocks are popped and the same number added again, but it is much better as it prevents the data from slowly going out of sync.
2018-10-18tx_pool: revert #4592 and move bin2hex conversion to on_get_transaction_poolstoffu1-0/+2
2018-10-16rpc: init m_rpc_version in Message ctormoneromooo-monero1-1/+1
Coverity 182501
2018-10-16rpc: remove unused ctorsmoneromooo-monero1-3/+0
Also prevents coverity from moaning about them not initializing fields
2018-10-12rpc: blanket initialize 0MQ request and response structuresmoneromooo-monero1-1/+1
2018-10-04rpc: fixed typo in JSON command error response messageAnythingTechPro1-1/+1
2018-09-17rpc: allow pruning of json encoded txscryptochangements341-1/+10
2018-09-14remove obsolete daemon selection of fake outs and old tx constructionmoneromooo-monero6-232/+0
2018-09-14rpc: add a "is an update available" flag in get_infomoneromooo-monero2-1/+5
Make it easier for a user to be told when to update
2018-09-13rpc: add cumulative difficulty in block header datamoneromooo-monero2-0/+3
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero5-17/+33
2018-09-09rpc: return "already mining" in start_mining if already miningmoneromooo-monero1-1/+7
2018-09-07rpc: don't include start time if restrictedmoneromooo-monero1-1/+1
2018-08-31rpc: allow to pass RPC login via RPC_LOGIN env varDusan Klinec1-4/+10
- passing by parameter is insecure as it is shown in the process list
2018-08-02Fixed ZMQ-RPC for transactions and GET_BLOCKS_FASTLee Clagett2-26/+18
2018-07-13db: store cumulative rct output distribution in the db for speedmoneromooo-monero3-147/+25
This gets rid of the temporary precalc cache. Also make the RPC able to send data back in binary or JSON, since there can be a lot of data This bumps the LMDB database format to v3, with migration.
2018-06-29update get_info RPC and bump RPC versionvictorsintnicolaas3-1/+6
2018-06-29add --regtest and --fixed-difficulty for regression testingvictorsintnicolaas4-0/+90
on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest. Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'. Queries hard fork heights info of other network types
2018-06-28remove epee from link lines where it's redundantmoneromooo-monero1-1/+0
For some reason, this confuses and kills ASAN on startup as it thinks const uint8_t ipv4_network_address::ID is defined multiple times.
2018-06-26rpc: rework to avoid repeated calculations in get_blocks.binmoneromooo-monero2-30/+17
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero4-49/+38
also use reserve where appropriate
2018-06-26rpc: sanity check on number of txes in a blockmoneromooo-monero1-0/+6
2018-06-26rpc: add option to skip coinbase info in get_blocks.binmoneromooo-monero2-4/+9
2018-06-26alt_chain_info can now give more info about a particular alt chainmoneromooo-monero2-3/+19
2018-06-21fix typos in language files and rpc_args.cppordtrogen1-1/+1
2018-06-21rpc: add a non binary get_transaction_pool_hashes RPCmoneromooo-monero3-5/+45
2018-06-20rpc: add blockchain disk size to getinfomoneromooo-monero2-1/+5
This should help new nodes predict how much disk space will be needed for a full sync
2018-06-17zmq_server: fix bind call when address and/or port are emptymoneromooo-monero1-0/+4
2018-06-01rpc: the cache is still for non cumulative on that branchmoneromooo-monero1-0/+7
2018-05-31rpc: convert distribution to cumulative after cachingmoneromooo-monero1-6/+7
This avoids double conversion on a later cache hit
2018-05-30rpc: fix get_output_distribution cache for the cumulative casemoneromooo-monero1-0/+7
The distribution was not converted to cumulative after a cache hit
2018-05-26fix build with GCC 8.1.0moneromooo-monero1-0/+2
2018-05-23db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero2-18/+3
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-21speed up get_output_distribution (and precalc common case)moneromooo-monero2-1/+129
2018-04-25Fix broken interactive daemon 'limit' commands plus RPC callsrbrunner71-1/+1
2018-04-23speedup get_output_histogram for all amounts when min_count > 0moneromooo-monero1-1/+1
This skips the vast majority of "dust" output amounts with just one instance on the chain. Clocks in at 0.15% of the original time on testnet.
2018-04-19add top height to get_output_distribution, and cache it for rctmoneromooo-monero2-0/+35
This should cache the vast majority of calls for long running wallets
2018-04-19rpc: add missing perf timer for get_output_distributionmoneromooo-monero1-0/+1
2018-04-07rpc: allow getting pruned blocks from gettransactionsmoneromooo-monero2-8/+14
and get them pruned in find_and_save_rings, since it does not need the pruned data in the first place. Also set decode_to_json to false where missing, we don't need this either.
2018-04-05Core RPC: optionally add POW hash to block_header_responsestoffu3-8/+22
2018-03-27fix lambda compile error on openbsdmoneromooo-monero1-1/+1
2018-03-23rpc: make get_output_distribution a non-restricted RPCmoneromooo-monero1-1/+1
so that those nodes can still be used for sending transactions
2018-03-16add RPC to get a histogram of outputs of a given amountmoneromooo-monero3-1/+81
2018-03-15Fix typos in various filesDimitris Apostolou1-2/+2
2018-03-05Stagenetstoffu5-18/+32
2018-02-16options: add testnet option dependencieswhythat1-2/+6
2018-02-16options: remove testnet-* optionswhythat2-18/+4
2018-01-30Bootstrap daemonstoffu3-1/+349
2018-01-29Fixed typos and wording tweaksMaxithi1-1/+1
2018-01-29Allow the number of incoming connections to be limitedErik de Castro Lopo3-2/+36
It was already possible to limit outgoing connections. One might want to do this on home network connections with high bandwidth but low usage caps.
2018-01-29Rename delete_connections to delete_out_connectionsErik de Castro Lopo1-1/+1
This rename is needed so that delete_in_connections can be added.
2018-01-29Rename connections_count to max_out_connection_countErik de Castro Lopo1-1/+1
This is needed so that a max_in_connection_count can be added.
2018-01-26Readd copyright starting datexmr-eric6-6/+6
2018-01-26Update 2018 copyrightxmr-eric19-19/+19
2018-01-17rpc: expose recent median block size in getinfomoneromooo-monero2-1/+5
2018-01-16rpc: default do_not_relay to false in sendrawtransactionmoneromooo-monero1-1/+1
2018-01-10fix some link errors in debug mode for macosstoffu1-0/+2
2018-01-10epee: remove dependency on commonmoneromooo-monero1-1/+2
2018-01-06Implement #3045, fixing RPC snakecasesNick Johnson1-0/+18
2018-01-04Change cryptonote::COMMAND_RPC_SET_LIMIT::response to use int64_tNick Johnson1-2/+2
2017-12-28zmq: use older 3-arg version of setsockoptstoffu1-1/+1
2017-12-18add empty container sanity checks when using front() and back()moneromooo-monero2-3/+12
2017-12-18rpc: guard against json parsing a non objectmoneromooo-monero1-1/+1
2017-12-18rpc: do not try to use an invalid txid in relay_txmoneromooo-monero1-6/+17
2017-12-16Wallets now do not depend on the daemon rpc libmoneromooo-monero1-2/+21
The shared RPC code is now moved off into a separate lib
2017-12-16cryptonote_core does not depend on p2p anymoremoneromooo-monero3-1/+41
As a followon side effect, this makes a lot of inline code included only in particular cpp files (and instanciated when necessary.
2017-12-16move includes around to lessen overall loadmoneromooo-monero3-1/+3
2017-11-30rpc: add offline state in info rpcmoneromooo-monero2-1/+5
2017-11-28Corrections in rate limiting / trottle code, especially in 'out' directionrbrunner71-2/+2
Deleted 3 out of 4 calls to method connection_basic::sleep_before_packet that were erroneous / superfluous, which enabled the elimination of a "fudge" factor of 2.1 in connection_basic::set_rate_up_limit; also ended the multiplying of limit values and numbers of bytes transferred by 1024 before handing them over to the global throttle objects
2017-11-23rpc: increase the max number of outs one can requestmoneromooo-monero1-1/+1
It's getting hit too easily
2017-11-18make connection_id a string in RPCmoneromooo-monero2-4/+5
It's sent as JSON, so raw binary is not appropriate
2017-11-17RPC: allow binding of restricted port in addition to core portTim L2-7/+26
2017-11-14rpc: remove obsolete busy core checksmoneromooo-monero1-126/+2
2017-11-14wallet: rejig to avoid prompting in wallet2moneromooo-monero1-1/+3
wallet2 is a library, and should not prompt for stdin. Instead, pass a function so simplewallet can prompt on stdin, and a GUI might display a window, etc.
2017-11-14move cryptonote command line options to cryptonote_coremoneromooo-monero1-1/+1
Those have no reason to be in a generic module
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-1/+1
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-14core: warn when free disk space is lowmoneromooo-monero2-1/+5
2017-11-14rpc: added miner_tx_hash to resp of getblockstoffu2-1/+4
2017-11-08Protect node privacy by proper filtering in restricted-mode RPC answersbinaryFate2-13/+13
This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode. This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected. In practice, when running with `--restricted-rpc`: * get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero. * get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions * get_transaction_pool_hashes.bin will not list such transaction * get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality. Fixes #2590.
2017-11-07RPC: get_info add rpc_connections_countTim L2-1/+5
2017-11-06track double spending in the txpoolmoneromooo-monero3-5/+41
Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
2017-11-03Fix file permission issueTim L3-0/+0
This branch fixes a file permission issue introduced by https://github.com/monero-project/monero/commit/69c37200aa87f100f731e755bdca7a0dc6ae820a
2017-10-30RPC Add cross origin resource sharing supportTim L3-1/+21
2017-10-30rpc: add performance timersmoneromooo-monero1-0/+57
Enable with perf:DEBUG
2017-10-26Fix JSON-RPC response object over ZMQLee Clagett1-22/+31
2017-10-15lightwallet rpc server commandsJaquee1-1/+353
2017-10-14rpc: make get_coinbase_tx_sum a restricted RPCmoneromooo-monero1-1/+1
It's pretty slow and I/O intensive
2017-10-07Subaddresseskenshi843-11/+31
2017-10-06rpc: out_peers now works againmoneromooo-monero1-15/+7
2017-10-05Upgrades to epee::net_utils::network_addressLee Clagett1-1/+1
- internal nullptr checks - prevent modifications to network_address (shallow copy issues) - automagically works with any type containing interface functions - removed fnv1a hashing - ipv4_network_address now flattened with no base class