Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
673c6d2 Reduce compilation time of epee/portable_storage_template_helper.h (mj-xmr)
|
|
cf266d6 bootstrap_daemon: proxy configuration support (xiphon)
|
|
|
|
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.
|
|
|
|
|
|
56748e1d7 ban lists may now include subnets (moneromooo-monero)
|
|
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
|
|
|
|
|
|
65903d2cf Add rpc-restricted-bind-ip option (Howard Chu)
|
|
83da867 Update error messages in daemon (tmoravec)
|
|
Fixes #6369
|
|
|
|
When given a wrong argument, some daemon commands failed with "unknown
command" error, instead of a meaningful error message. This patch
brings consistency into the error messages.
In several places, this patch removes relatively useful messages,
and replaces them with more generic ones. E.g.,
- std::cout << "use: print_pl [white] [gray] [<limit>] [pruned]
[publicrpc]" << std::endl;
+ std::cout << "Invalid syntax: Too many parameters. For more
details, use the help command." << std::endl;
There are two reasons for this:
1. Consistency.
2. Removing duplicates.
The detailed information about the parameters is present in
the help messages already. Having it in two places increases
the risk that the messages would get out of date.
|
|
8baa7bb23 daemon: don't print "(pruned)" for coinbase txes (moneromooo-monero)
|
|
afd002c31 daemon: print sampling time in print_net_stats (moneromooo-monero)
ec7bba079 util: fix kilo prefix typo (K instead of k) (moneromooo-monero)
|
|
fb31167b1 Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' command (rbrunner7)
|
|
Pruned coinbase txes are the same as unpruned ones, so the
prunable data is empty
|
|
|
|
a6803231e daemon: complain if data dir resides on FAT32 volume (Windows) (xiphon)
|
|
8656a8c9f remove double includes (sumogr)
|
|
5ef0607da Update copyright year to 2020 (SomaticFanatic)
|
|
|
|
|
|
|
|
|
|
Update copyright year to 2020
|
|
|
|
5ef7138 daemon: fix print_net_stats RPC calls (moneromooo-monero)
|
|
6810150 daemon: if no banned IPs print something (sumogr)
|
|
c61abf8 remove empty statements (shopglobal)
|
|
|
|
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
|
|
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
|
|
|
|
5f2a32c daemon: run with -rpc-payment-address and --rpc-restricted-bind-port (moneromooo-monero)
|
|
Cleaning up a little around the code base.
|
|
a633f85d daemon: allow printing N blocks from the end of the chain (moneromooo-monero)
|
|
7ba31191 daemon: add +meta print_tx parameter (moneromooo-monero)
|
|
deb350b7 always print peer IDs in the same format (moneromooo-monero)
|
|
017f816 daemon: handle printing higher hash rates (moneromooo-monero)
|
|
The tail emission will bring the total above 64 bits
|
|
Flushes m_invalid_blocks in Blockchain.
|
|
|
|
|
|
|
|
It's a very common usage (for my anyway) and avoids the need to
get the current height, paste, subtract one, etc
|
|
prints size, weight and (if mined) height
|
|
|
|
|
|
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)
|
|
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)
|
|
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.
|
|
It got switched to hexadecimal when we went to 128 bit values
|
|
705edd8 daemon: fix coinbase txes always being seen as pruned (moneromooo-monero)
|
|
641c9cf daemon: add miner tx hash in print_block output (moneromooo-monero)
|
|
4f583d5 daemon: fix print_pl synopsis missing recent options (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
|
|
|
|
1f1fff2 daemon: print mining algorithm in mining_status even when not mining (moneromooo-monero)
|
|
b51f4cd daemon: add pruned and publicrpc flags to print_pl (moneromooo-monero)
|
|
063eebb daemon: implement 'set_bootstrap_daemon' command (xiphon)
|
|
5a4c6cc daemon: fix merge error removing the 'never seen before' timestamp check (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6bb2797 daemon: print 128bit diff properly (stoffu)
|
|
0605406 daemon: sort alt chains by height (moneromooo-monero)
4228ee0 daemon: add optional arguments to alt_chain_info (moneromooo-monero)
880ebfd daemon: add more chain specific info in alt_chain_info (moneromooo-monero)
|
|
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.
|
|
|
|
343c0b4 add a command line option to disable ZMQ server (jtgrassie)
|
|
2aa1134 daemon: display peer address type in print_cn (moneromooo-monero)
|
|
cd720c7 add cumulative difficulty to diff command (wowario)
|
|
fcfcc3a rpc: in/out peers can now return the setting's value (moneromooo-monero)
|
|
c07bbd5 daemon: fix 'never seen before' time span display for peers (moneromooo-monero)
|
|
6abaaaa remove obsolete save_graph skeleton code (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>N limits display to alt chains with more than N blocks
-N limits display to alt chains younger than N blocks
|
|
|
|
|
|
|
|
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)
|
|
b3648232 daemon: fix ratio not being floating point (moneromooo-monero)
e1b097b9 core_rpc_server: remove dummy assigning int to bool (moneromooo-monero)
|
|
|
|
Coverity 197648
|
|
rather than from data dir where it normally is.
It makes things like --log-file ./foo.log behave as you'd expect.
|
|
eda2661a Allow pruning before v10 (moneromooo-monero)
|
|
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.
|
|
c23ea796 New interactive daemon command 'print_net_stats': Global traffic stats (rbrunner7)
|
|
This check is now not needed anymore, and would prevent people
from using --prune-blockchain when starting a new sync
|
|
|
|
Coverity 196596
|
|
551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
|
|
59478c80 daemon: new mining_status command (moneromooo-monero)
|
|
|
|
|
|
8298f42e miner: it can now autodetect the optimal number of threads (moneromooo-monero)
|
|
24569454 epee: add SSL support (moneromooo-monero)
|
|
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.
|
|
|
|
|
|
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.
|
|
acfff8d0 rpc: fix internal daemon calls in restricted rpc getting partial data (moneromooo-monero)
|
|
|
|
d294a577 daemon: extend 'print_pl' command, optional filter by type and limit (xiphon)
|
|
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.
|
|
|
|
65ce387c daemon: add a +hex option to print_block (moneromooo-monero)
|
|
|
|
|
|
ab783b17 easylogging++: ensure logger is initialized before main (moneromooo-monero)
9b69a0ae daemon: print monero version at startup when calling a detached daemon (moneromooo-monero)
4d71d463 mlocker: remove early page size log (moneromooo-monero)
|
|
aba9a9c2 daemon: stop miner before we bring the whole thing down (moneromooo-monero)
|
|
dc1c1252 add command pop_blocks (Jason Wong)
|
|
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero)
1a0733e5 windows_service: fix memory leak (moneromooo-monero)
0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero)
5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero)
d4f50cb1 remove some unused code (moneromooo-monero)
61163971 a few minor (but easy) performance tweaks (moneromooo-monero)
30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
|
|
6f2497bc Don't cache nettype in core_rpc_server use m_core (doy-lee)
|
|
So people who want a timstamp get a timestamp
|
|
This avoids the miner erroring out trying to submit blocks
to a core that's already shut down (and avoids pegging
the CPU while we're busy shutting down).
|
|
add new public method to Blockchain and update according to code review
update after review: better lock/unlock, try catch and coding style
|
|
Found by codacy.com
|
|
c17a1d43 daemon: use msg_writer, not cout, to display information (moneromooo-monero)
|
|
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.
|
|
|
|
a7bffead daemon: fix base fee stating /kB even when it is per byte (moneromooo-monero)
|
|
e54e5668 daemon: Show mining address (Ricardo de Vries)
|
|
fd62b6e7 blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
|
|
|
|
|
|
|
|
|
|
instead, delegate the work to a one off thread
and notify it from the signal handler
|
|
This reverts commit 79d46c4d551a9b1261801960095bf4d24967211a, reversing
changes made to c9fc61dbb56cca442c775faa2554a7460879b637.
|
|
|
|
5ec929fb daemon: do not display uptime when not known (moneromooo-monero)
|
|
|
|
Add architecture flags when cmake invokes gcc manually.
Add 32bit to Travis.
|
|
e6117282 daemon: request no PoW hashes we don't need when asking for blocks (moneromooo-monero)
|
|
76f95f05 rpc: allow to pass RPC login via RPC_LOGIN env var (Dusan Klinec)
|
|
42397359 Fixup 32bit arm build (TheCharlatan)
a06d2581 Fix Windows build (TheCharlatan)
ecaf5b3f Add libsodium to the packages, the arm build was complaining about it. (TheCharlatan)
cbbf4d24 Adapt translations to upstream changes (TheCharlatan)
db571546 Updated pcsc url (TheCharlatan)
f0ba19fd Add lrelease to the depends (TheCharlatan)
cfb30462 Add Miniupnp submodule (TheCharlatan)
5f7da005 Unbound is now a submodule. Adapt depends for this. (TheCharlatan)
d6b9bdd3 Update readmes to reflect the usage of depends (TheCharlatan)
56b6e41e Add support for apple and arm building (TheCharlatan)
29311fd1 Disable stack unwinding for mingw32 depends build. (TheCharlatan)
8db3d573 Modify depends for monero's dependencies (TheCharlatan)
0806a23a Initial depends addition (TheCharlatan)
|
|
|
|
Add pcsc-lite to linux builds
Fixup windows icu4c linking with depends, the static libraries have an 's' appended to them
Compiling depends arm-linux-gnueabihf will allow you to compile armv6zk monero binaries
|
|
This fixes the horrendous slowdown in bc_dyn_stats
|
|
- passing by parameter is insecure as it is shown in the process list
|
|
|
|
438d52d remove epee from link lines where it's redundant (moneromooo-monero)
|
|
bd9e4e3 daemon: show a bit more info with print_block (stoffu)
|
|
50af357 alt_chain_info can now give more info about a particular alt chain (moneromooo-monero)
|
|
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)
|
|
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
|
|
For some reason, this confuses and kills ASAN on startup
as it thinks const uint8_t ipv4_network_address::ID is
defined multiple times.
|
|
|
|
63d0ab0 mlog: --max-log-files to set the max number of rotated log files (stoffu)
|
|
1aae39d daemon: fix readline interfering with std::cerr usage (moneromooo-monero)
|
|
6f9260e handle optional miner params better (cryptochangements34)
|
|
|
|
a87980f fix build with GCC 8.1.0 (moneromooo-monero)
|
|
9cc0d42 connection_context: remove state_ prefix from state names (moneromooo-monero)
d9d002c daemon: print peer state in sync_info (moneromooo-monero)
|
|
|
|
372ffeb Add a space in mining to testnet/stagenet string (cryptochangements34)
|
|
353e9c0 Core RPC: optionally add POW hash to block_header_response (stoffu)
|
|
Once readline is initialized, std::cerr's operator<< will
output a 0xff byte for unknown reasons.
|
|
|
|
instead of uninitialized
|
|
|
|
It's often relevant
|
|
|
|
998c1461 daemon: read config file before reading any other args (stoffu)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e3f0980a daemon: don't drop RPC with busy error when running offline (moneromooo-monero)
|
|
7539603f Bootstrap daemon (stoffu)
|
|
628b78ae Fix in_peers/out_peers RPC operations (Erik de Castro Lopo)
ece9bcf5 rpc_client: Fix error handling (Erik de Castro Lopo)
8f30350d Fix method name in invoke_http_json_rpc (Erik de Castro Lopo)
32c0f908 Allow the number of incoming connections to be limited (Erik de Castro Lopo)
d609a2c1 Rename delete_connections to delete_out_connections (Erik de Castro Lopo)
b927c0fc Rename connections_count to max_out_connection_count (Erik de Castro Lopo)
|
|
78a2e15b daemon: exit with 0 when successful (moneromooo-monero)
|
|
a85dbb3f Fixed typos and wording tweaks (Maxithi)
|
|
|
|
|
|
Original implementations could never have worked.
|