Commit Graph

264 Commits

Author SHA1 Message Date
wowario 47f78dc11a
vote by block 2023-02-24 11:27:32 +03:00
wowario 2d3fa0f1c9
tidy up miner msgs 2023-02-24 11:27:16 +03:00
wowario a9534ceb46
show full version 2023-02-24 11:13:32 +03:00
wowario ddef0b1b8b
wownero skin pack 2023-02-24 11:09:41 +03:00
mj-xmr da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
luigi1111 c2bc829cca
Merge pull request #7326
cf266d6 bootstrap_daemon: proxy configuration support (xiphon)
2021-03-29 21:08:36 -04:00
Kevin Barbour 85db1734e7
Remove unused variables in monero codebase
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.
2021-02-09 08:05:05 +01:00
xiphon cf266d66dd bootstrap_daemon: proxy configuration support 2021-01-21 13:45:44 +00:00
Denis Goddard 46cc4a253b Header row for peer list in sync_info 2020-12-31 20:09:35 -05:00
moneromooo-monero d2fda6c25f
restrict public node checks a little
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
2020-12-22 23:39:07 +00:00
Alexander Blair 43f91ee12e
Merge pull request #6703
8baa7bb23 daemon: don't print "(pruned)" for coinbase txes (moneromooo-monero)
2020-08-16 12:50:43 -07:00
Alexander Blair 0b0da2aa81
Merge pull request #6689
afd002c31 daemon: print sampling time in print_net_stats (moneromooo-monero)
ec7bba079 util: fix kilo prefix typo (K instead of k) (moneromooo-monero)
2020-08-16 12:47:36 -07:00
moneromooo-monero 8baa7bb238
daemon: don't print "(pruned)" for coinbase txes
Pruned coinbase txes are the same as unpruned ones, so the
prunable data is empty
2020-07-24 13:42:20 +00:00
Alexander Blair a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
moneromooo-monero afd002c31f
daemon: print sampling time in print_net_stats 2020-06-25 13:03:59 +00:00
moneromooo-monero bcef52d430
daemon: remove time based "update needed" status string 2020-05-24 21:44:03 +00:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
luigi1111 cb8f4280bb
Merge pull request #6408
5ef7138 daemon: fix print_net_stats RPC calls (moneromooo-monero)
2020-04-21 08:46:39 -05:00
luigi1111 6a6eedd842
Merge pull request #6353
6810150 daemon: if no banned IPs print something (sumogr)
2020-04-04 12:56:36 -05:00
moneromooo-monero 5ef7138d86
daemon: fix print_net_stats RPC calls 2020-03-29 13:45:58 +00:00
Alexander Blair 4371ac4265
Merge pull request #6225
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
2020-02-28 19:48:11 -08:00
Alexander Blair 4da37daf67
Merge pull request #6211
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
2020-02-28 19:36:16 -08:00
sumogr 6810150d46 daemon: if no banned IPs print something 2020-02-24 20:52:55 +00:00
Alexander Blair 8136bf37e2
Merge pull request #6096
a633f85d daemon: allow printing N blocks from the end of the chain (moneromooo-monero)
2020-02-06 00:31:50 -08:00
Alexander Blair b8e5c769c7
Merge pull request #6095
7ba31191 daemon: add +meta print_tx parameter (moneromooo-monero)
2020-02-06 00:31:17 -08:00
Alexander Blair 34d7ea62f6
Merge pull request #6053
deb350b7 always print peer IDs in the same format (moneromooo-monero)
2020-02-06 00:28:47 -08:00
luigi1111 ccde60838b
Merge pull request #6054
017f816 daemon: handle printing higher hash rates (moneromooo-monero)
2019-12-12 13:45:50 -06:00
moneromooo-monero 987c3139dc
print_coinbase_tx_sum now supports 128 bits sums
The tail emission will bring the total above 64 bits
2019-12-12 01:56:59 +00:00
moneromooo-monero 5985c5afe8
rpc: add bad-blocks to flush_cache RPC
Flushes m_invalid_blocks in Blockchain.
2019-12-02 18:53:30 +00:00
Nathan Dorfman dce6f055f9 rpc: Only show version string if it matches expected pattern 2019-11-12 18:19:24 -07:00
Nathan Dorfman 3293780992 daemon: Use rpc for "version" command 2019-11-12 17:57:36 -07:00
moneromooo-monero a633f85da9
daemon: allow printing N blocks from the end of the chain
It's a very common usage (for my anyway) and avoids the need to
get the current height, paste, subtract one, etc
2019-11-04 17:38:14 +00:00
moneromooo-monero 7ba31191f3
daemon: add +meta print_tx parameter
prints size, weight and (if mined) height
2019-11-04 15:57:56 +00:00
moneromooo-monero 017f816897
daemon: handle printing higher hash rates 2019-10-29 11:33:15 +00:00
moneromooo-monero deb350b783
always print peer IDs in the same format 2019-10-29 11:30:20 +00:00
moneromooo-monero a4dc575ccb
rpc: add a flush_cache RPC
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-25 18:41:54 +00:00
luigi1111 960c215801
Merge pull request #5357
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)
2019-10-25 13:38:21 -05:00
moneromooo-monero 2899379791
daemon, wallet: new pay for RPC use system
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-25 09:34:38 +00:00
moneromooo-monero 951ceab4f6
daemon: print difficulty in decimal, as it used to be
It got switched to hexadecimal when we went to 128 bit values
2019-10-24 17:37:05 +00:00
luigi1111 f9b5af85ea
Merge pull request #6001
705edd8 daemon: fix coinbase txes always being seen as pruned (moneromooo-monero)
2019-10-24 10:57:30 -05:00
luigi1111 8926829569
Merge pull request #6000
641c9cf daemon: add miner tx hash in print_block output (moneromooo-monero)
2019-10-24 10:56:20 -05:00
moneromooo-monero 705edd81d9
daemon: fix coinbase txes always being seen as pruned 2019-10-18 12:25:08 +00:00
moneromooo-monero 641c9cf19d
daemon: add miner tx hash in print_block output 2019-10-18 12:21:30 +00:00
Doyle fd4846134d Print cdifficulty and don't serialize miner tx hash twice 2019-10-07 12:50:05 +11:00
luigi1111 b526208001
Merge pull request #5868
1f1fff2 daemon: print mining algorithm in mining_status even when not mining (moneromooo-monero)
2019-09-14 13:10:51 -05:00
luigi1111 d30b234f08
Merge pull request #5849
b51f4cd daemon: add pruned and publicrpc flags to print_pl (moneromooo-monero)
2019-09-08 19:59:05 -05:00
luigi1111 21290005d7
Merge pull request #5840
063eebb daemon: implement 'set_bootstrap_daemon' command (xiphon)
2019-09-08 19:46:03 -05:00
moneromooo-monero 1f1fff2679
daemon: print mining algorithm in mining_status even when not mining 2019-08-28 15:55:31 +00:00
moneromooo-monero b51f4cdcaf
daemon: add pruned and publicrpc flags to print_pl 2019-08-23 19:15:45 +00:00
xiphon 063eebbd43 daemon: implement 'set_bootstrap_daemon' command 2019-08-23 12:09:02 +00:00