Commit Graph

247 Commits

Author SHA1 Message Date
moneromooo-monero fcfcc3ac86
rpc: in/out peers can now return the setting's value 2019-05-30 12:13:31 +00:00
moneromooo-monero 6abaaaa994
remove obsolete save_graph skeleton code 2019-05-10 14:17:18 +00:00
moneromooo-monero 0605406714
daemon: sort alt chains by height 2019-05-09 09:12:49 +00:00
moneromooo-monero df83ed74e4
consensus: from v12, enforce >= 2 outputs 2019-04-23 22:09:35 +00:00
Riccardo Spagni 1b092f3a44
Merge pull request #5452
c30d93fc rpc: add a pruned bool to the prune_blockchain call (moneromooo-monero)
2019-04-16 22:48:50 +02:00
Riccardo Spagni f376cd5605
Merge pull request #5446
7d79222f daemon: remove debug info (moneromooo-monero)
8fec0f98 functional_tests: add sweep_single test (moneromooo-monero)
9880d61b wallet_rpc_server: remove unused code (moneromooo-monero)
8a61b33d rpc: omit irrelevant fields for pool txes in gettransactions (moneromooo-monero)
56508524 rpc: add relayed in get_transaction output (moneromooo-monero)
82e510f1 rpc: set default log category in core_rpc_server.h (moneromooo-monero)
2019-04-16 22:46:29 +02:00
moneromooo-monero c30d93fcd9
rpc: add a pruned bool to the prune_blockchain call 2019-04-16 15:15:14 +00:00
moneromooo-monero 8a61b33d8e
rpc: omit irrelevant fields for pool txes in gettransactions 2019-04-15 09:11:54 +00:00
moneromooo-monero 565085245a
rpc: add relayed in get_transaction output 2019-04-15 09:11:50 +00:00
moneromooo-monero ccb996afc6
rpc: new sanity check on relayed transactions
This will weed out some transactions with silly rings
2019-04-12 20:22:09 +00:00
moneromooo-monero 064ab12340
functional_tests: add more blockchain related tests
Related to emission, reorgs, getting tx data back, output
distribution and histogram
2019-04-11 11:07:58 +00:00
Riccardo Spagni 4a2cc76c84
Merge pull request #5376
c746f45d Add hash of top block to /getheight RPC (Howard Chu)
2019-04-11 13:01:54 +02:00
moneromooo-monero a2561653cb
wallet: new option to start background mining
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-04 18:10:45 +00:00
Riccardo Spagni 1ed6441925
Merge pull request #5327
c23ea796 New interactive daemon command 'print_net_stats': Global traffic stats (rbrunner7)
2019-04-01 17:32:01 +02:00
Riccardo Spagni a69b71dc41
Merge pull request #5326
dc20d774 rpc: add miner tx hash to block header response (moneromooo-monero)
2019-04-01 17:31:36 +02:00
Riccardo Spagni 4a06b3ee62
Merge pull request #5298
8fd7452b wallet: move light wallet RPC out of core RPC (moneromooo-monero)
2019-04-01 17:24:13 +02:00
Howard Chu c746f45d3e
Add hash of top block to /getheight RPC 2019-04-01 01:02:58 +01:00
moneromooo-monero 91f4c7f45f
Make difficulty 128 bit instead of 64 bit
Based on Boolberry work by:
  jahrsg <jahr@jahr.me>
  cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24 21:03:19 +00:00
rbrunner7 c23ea7962d New interactive daemon command 'print_net_stats': Global traffic stats 2019-03-24 16:58:57 +01:00
moneromooo-monero dc20d77459
rpc: add miner tx hash to block header response 2019-03-21 00:24:12 +00:00
Riccardo Spagni 848591c4d8
Merge pull request #5190
551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
2019-03-17 17:56:04 +02:00
Riccardo Spagni 429930534d
Merge pull request #5185
59478c80 daemon: new mining_status command (moneromooo-monero)
2019-03-17 17:55:32 +02:00
moneromooo-monero 8fd7452b6e
wallet: move light wallet RPC out of core RPC
It's not nothing to do with it
2019-03-15 13:34:08 +00:00
moneromooo-monero 59478c80dd
daemon: new mining_status command 2019-03-09 20:51:53 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero e396146aee
default initialize rpc structures 2019-03-04 22:38:03 +00:00
moneromooo-monero b8787f4302
ArticMine's new block weight algorithm
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-03-04 09:33:58 +00:00
xiphon 551104fbf1 daemon: add --public-node mode, RPC port propagation over P2P 2019-02-25 02:40:23 +03:00
moneromooo-monero b750fb27b0
Pruning
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.
2019-01-22 20:30:51 +00:00
Riccardo Spagni 0fccc78e39
Merge pull request #4903
dc1c1252 add command pop_blocks (Jason Wong)
2018-12-12 11:58:37 +02:00
Riccardo Spagni e282e9fa40
Merge pull request #4878
517f25ef rpc: add version to get_info (Jethro Grassie)
2018-12-04 17:28:24 +02:00
Jason Wong dc1c12528d add command pop_blocks
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-28 12:20:28 +01:00
Riccardo Spagni 58ce16d4d9
Merge pull request #4821
fc98f7a0 rpc: speedup get_outs.bin (moneromooo-monero)
2018-11-26 21:51:27 +02:00
moneromooo-monero fc98f7a0a1
rpc: speedup get_outs.bin 2018-11-26 18:56:23 +00:00
Jethro Grassie 517f25efd1
rpc: add version to get_info 2018-11-21 12:56:34 -05:00
moneromooo-monero b9b307d11a
rpc: speedup get_output_distribution
and decrease the amount of data carried around
2018-11-20 10:11:25 +00:00
Riccardo Spagni 0c7086bf7f
Merge pull request #4687
6097472a Update ZMQ fee estimate and add ZMQ output distribution (Lee Clagett)
2018-11-04 20:44:49 +02:00
Lee Clagett 6097472a19 Update ZMQ fee estimate and add ZMQ output distribution 2018-10-23 23:46:31 -04:00
moneromooo-monero bfa2dce171
rpc: remove unused ctors
Also prevents coverity from moaning about them not initializing fields
2018-10-16 11:58:52 +00:00
Riccardo Spagni 0645dcdbdb
Merge pull request #4378
ac934663 rpc: add a "is an update available" flag in get_info (moneromooo-monero)
2018-09-21 20:41:53 +02:00
Riccardo Spagni 629db71593
Merge pull request #4373
4f81cd3a rpc: add cumulative difficulty in block header data (moneromooo-monero)
2018-09-21 20:40:23 +02:00
moneromooo-monero be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
moneromooo-monero ac9346637a
rpc: add a "is an update available" flag in get_info
Make it easier for a user to be told when to update
2018-09-14 09:28:03 +00:00
moneromooo-monero 4f81cd3a3c
rpc: add cumulative difficulty in block header data 2018-09-13 12:41:59 +00:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
luigi1111 9315e12d34
Merge pull request #4033
3e46db9 rpc: add a non binary get_transaction_pool_hashes RPC (moneromooo-monero)
2018-07-19 13:55:37 -05:00
luigi1111 3e026ff6ed
Merge pull request #4013
e5592c4 rpc: add blockchain disk size to getinfo (moneromooo-monero)
2018-07-19 13:40:42 -05:00
luigi1111 21afa71ba6
Merge pull request #3981
45e419b db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
2018-07-19 13:39:24 -05:00
luigi1111 d518dae4bf
Merge pull request #3973
50af357 alt_chain_info can now give more info about a particular alt chain (moneromooo-monero)
2018-07-19 13:37:10 -05:00
luigi1111 025187e6c9
Merge pull request #3854
149da42 db_lmdb: enable batch transactions by default (stoffu)
34cb6b4 add --regtest and --fixed-difficulty for regression testing (vicsn)
9e1403e update get_info RPC and bump RPC version (vicsn)
207b66e first new functional tests (vicsn)
2018-07-19 13:35:25 -05:00
moneromooo-monero 45e419bd5c
db: store cumulative rct output distribution in the db for speed
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-07-13 11:37:04 +01:00
victorsintnicolaas 9e1403e155 update get_info RPC and bump RPC version 2018-06-29 10:06:18 +02:00
victorsintnicolaas 34cb6b4b70 add --regtest and --fixed-difficulty for regression testing
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-29 10:06:11 +02:00
moneromooo-monero ed2c81ed95
replace std::list with std::vector on some hot paths
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
moneromooo-monero 6795bd0d4e
rpc: add option to skip coinbase info in get_blocks.bin 2018-06-26 22:14:16 +01:00
moneromooo-monero 50af3579ee
alt_chain_info can now give more info about a particular alt chain 2018-06-26 08:19:51 +01:00
moneromooo-monero 3e46db97e5
rpc: add a non binary get_transaction_pool_hashes RPC 2018-06-21 09:02:42 +01:00
moneromooo-monero e5592c4bab
rpc: add blockchain disk size to getinfo
This should help new nodes predict how much disk space will be
needed for a full sync
2018-06-20 23:48:37 +01:00
luigi1111 9a3bd88b9f
Merge pull request #3851
a87980f fix build with GCC 8.1.0 (moneromooo-monero)
2018-06-19 12:51:13 -05:00
luigi1111 737712c0c6
Merge pull request #3561
353e9c0 Core RPC: optionally add POW hash to block_header_response (stoffu)
2018-05-31 14:38:01 -05:00
moneromooo-monero a87980f6c2
fix build with GCC 8.1.0 2018-05-26 14:54:10 +01:00
rbrunner7 f9d0827bba Fix broken interactive daemon 'limit' commands plus RPC calls 2018-04-25 21:37:10 +02:00
Riccardo Spagni 03ff3be10e
Merge pull request #3672
875c1cab wallet2: increase rpc timeout for get_output_distribution (moneromooo-monero)
70f23217 add top height to get_output_distribution, and cache it for rct (moneromooo-monero)
8c7363fb rpc: add missing perf timer for get_output_distribution (moneromooo-monero)
2018-04-21 21:54:08 +02:00
moneromooo-monero 70f2321763
add top height to get_output_distribution, and cache it for rct
This should cache the vast majority of calls for long running wallets
2018-04-19 16:06:22 +01:00
moneromooo-monero 25fe67e4cf
rpc: allow getting pruned blocks from gettransactions
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-07 08:29:11 +01:00
stoffu 353e9c0c90
Core RPC: optionally add POW hash to block_header_response 2018-04-05 23:15:15 +09:00
moneromooo-monero 41f727ce42
add RPC to get a histogram of outputs of a given amount 2018-03-16 10:32:26 +00:00
stoffu af773211cb
Stagenet 2018-03-05 11:55:05 +09:00
Riccardo Spagni 04a676397f
Merge pull request #3165
7539603f Bootstrap daemon (stoffu)
2018-02-16 14:18:50 +01:00
stoffu 7539603f94
Bootstrap daemon 2018-01-30 20:15:47 +09:00
Erik de Castro Lopo 32c0f908cd Allow the number of incoming connections to be limited
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-29 11:14:02 +11:00
Riccardo Spagni f7dcb730cb
Merge pull request #3144
42f86624 rpc: expose recent median block size in getinfo (moneromooo-monero)
2018-01-27 17:25:40 -08:00
Riccardo Spagni 6d48bddffd
Merge pull request #3136
e0404d35 rpc: default do_not_relay to false in sendrawtransaction (moneromooo-monero)
2018-01-27 17:25:07 -08:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 42f86624a3
rpc: expose recent median block size in getinfo 2018-01-17 11:12:26 +00:00
moneromooo-monero e0404d35fe
rpc: default do_not_relay to false in sendrawtransaction 2018-01-16 11:15:01 +00:00
Nick Johnson 301ec15c49
Change cryptonote::COMMAND_RPC_SET_LIMIT::response to use int64_t 2018-01-04 21:01:10 -06:00
Riccardo Spagni 8da24c2a57
Merge pull request #2878
abebe392 rpc: add offline state in info rpc (moneromooo-monero)
7696e849 core: make --offline also disable DNS lookups (moneromooo-monero)
2017-12-16 23:27:00 +02:00
Riccardo Spagni ed8fc8ac1c
Merge pull request #2838
310b790a make connection_id a string in RPC (moneromooo-monero)
2017-12-02 09:23:22 +02:00
moneromooo-monero abebe392c7
rpc: add offline state in info rpc 2017-11-30 15:44:01 +00:00
Riccardo Spagni ed2fc4a1ff
Merge pull request #2794
43f27c7d core: warn when free disk space is low (moneromooo-monero)
2017-11-25 19:48:33 +02:00
moneromooo-monero 310b790a64
make connection_id a string in RPC
It's sent as JSON, so raw binary is not appropriate
2017-11-18 00:13:07 +00:00
Riccardo Spagni a2241e8151
Merge pull request #2753
fa514082 RPC: get_info add rpc_connections_count (Tim L)
2017-11-14 15:54:33 +02:00
Riccardo Spagni e759c78a17
Merge pull request #2735
a524b750 rpc: added miner_tx_hash to resp of getblock (stoffu)
2017-11-14 15:27:51 +02:00
moneromooo-monero 43f27c7d43
core: warn when free disk space is low 2017-11-14 10:21:34 +00:00
stoffu a524b7508e
rpc: added miner_tx_hash to resp of getblock 2017-11-14 16:31:46 +09:00
Tim L fa51408272 RPC: get_info add rpc_connections_count 2017-11-07 16:34:49 -05:00
moneromooo-monero ccf53a566c
track double spending in the txpool
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-06 00:05:44 +00:00
Jaquee 8bfa6c2d9f lightwallet rpc server commands 2017-10-15 17:30:23 +02:00
Riccardo Spagni 3bab2676ec
Merge pull request #2512
792ba4f0 Log categories can now be added to and removed from (moneromooo-monero)
48f92eb6 easylogging++: add categories getter (moneromooo-monero)
f35afe62 epee: factor log level/categories setting (moneromooo-monero)
2017-10-02 23:28:59 +04:00
Riccardo Spagni 3bf20a77f2
Merge pull request #2470
2e59f6ea rpc: add new RPCs to get and set limits (MaxXor)
2017-10-02 23:15:22 +04:00
moneromooo-monero 792ba4f0fe
Log categories can now be added to and removed from
Also, set_log without parameters now prints the log categories
2017-09-22 18:08:14 +01:00
stoffu b5cbdce8a6
wallet2: correctly handle in/out payments for view-only wallet 2017-09-21 07:46:19 +09:00
MaxXor 2e59f6ea50 rpc: add new RPCs to get and set limits 2017-09-19 10:30:55 +02:00
Riccardo Spagni 72b5f37f58
Merge pull request #2349
1914c999 txpool: update db tx metadata when it changes (moneromooo)
4dbf29bd txpool: add tx size median to the pool stats (moneromooo)
2017-08-27 18:15:13 +02:00
moneromooo-monero 55bec1f03d
rpc: add a new RPC to get current txpool backlog (sizes and fees) 2017-08-26 16:23:31 +01:00
moneromooo 4dbf29bd32
txpool: add tx size median to the pool stats 2017-08-25 22:21:38 +01:00
Riccardo Spagni 6db8a60a18
Merge pull request #2149
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero)
f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero)
90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero)
84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero)
5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07 15:24:58 +02:00
moneromooo-monero 5be43fcdba
cryptonote_protocol_handler: sync speedup
A block queue is now placed between block download and
block processing. Blocks are now requested only from one
peer (unless starved).

Includes a new sync_info coommand.
2017-08-07 09:33:04 +01:00
moneroexamples 125f823bda Add on_get_alt_blocks_hashes RPC call 2017-07-04 12:32:44 +08:00