aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_config.h
Commit message (Collapse)AuthorAgeFilesLines
...
* daemon, wallet: new pay for RPC use systemmoneromooo-monero2019-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* blockchain: use effective median block weight for penalty from v12moneromooo-monero2019-10-111-0/+1
| | | | | It was using the raw block weight median, which was not what was intended in ArticMine's design
* Merge pull request #5915luigi11112019-10-081-1/+1
|\ | | | | | | 8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
| * monerod can now sync from pruned blocksmoneromooo-monero2019-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | RandomX integrationHoward Chu2019-09-251-0/+1
| | | | | | | | Support RandomX PoW algorithm
* | blockchain: enforce 10 block age for spending outputsmoneromooo-monero2019-09-171-0/+1
| | | | | | | | | | Some custom wallet code apparently ignores this, which causes users of that code to be fingerprinted
* | Merge pull request #5823luigi11112019-09-141-0/+3
|\ \ | |/ |/| | | | | | | 26072f1 blockchain: forbid v1 coinbase from v12 (moneromooo-monero) 555dc7c core: from v12, require consistent ring size for mixable txes (moneromooo-monero) d22dfb7 blockchain: reject rct signatures in coinbase txes from v12 (moneromooo-monero)
| * blockchain: reject rct signatures in coinbase txes from v12moneromooo-monero2019-08-191-0/+1
| |
| * core: from v12, require consistent ring size for mixable txesmoneromooo-monero2019-08-191-0/+1
| | | | | | | | | | | | We're supposed to have a fixed ring size now Already checked by MLSAG verification, but here seems more intuitive
| * blockchain: forbid v1 coinbase from v12moneromooo-monero2019-08-191-0/+1
| |
* | Added support for "noise" over I1P/Tor to mask Tx transmission.Lee Clagett2019-07-171-0/+10
|/
* Merge pull request #5649luigi11112019-08-151-0/+2
|\ | | | | | | a182df2 Bans for RPC connections (hyc)
| * Bans for RPC connectionsHoward Chu2019-06-161-0/+2
| | | | | | | | | | Make bans control RPC sessions too. And auto-ban some bad requests. Drops HTTP connections whenever response code is 500.
* | consensus: from v12, enforce >= 2 outputsmoneromooo-monero2019-04-231-0/+1
|/
* cryptonote: rework block blob size sanity checkmoneromooo-monero2019-04-051-2/+2
| | | | | Use the actual block weight limit, assuming that weight is always greater or equal to size
* Merge pull request #5199Riccardo Spagni2019-03-191-0/+1
|\ | | | | | | eef164f7 cryptonote_protocol_handler: search for syncing peers in "cruise mode" (moneromooo-monero)
| * cryptonote_protocol_handler: search for syncing peers in "cruise mode"moneromooo-monero2019-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | When all our outgoing peer slots are filled, we cycle one peer at a time looking for syncing peers until we have at least two such peers. This brings two advantages: - Peers without incoming connections will find more syncing peers that before, thereby strengthening network decentralization - Peers will have more resistance to isolation attacks, as they are more likely to find a "good" peer than they were before
* | Update 2019 copyrightbinaryFate2019-03-051-1/+1
| |
* | Merge pull request #5091Riccardo Spagni2019-03-041-1/+1
|\ \ | | | | | | | | | 123fc2a2 i2p: initial support (Jethro Grassie)
| * | i2p: initial supportJethro Grassie2019-01-301-1/+1
| |/
* / ArticMine's new block weight algorithmmoneromooo-monero2019-03-041-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.
* Adding initial support for broadcasting transactions over TorLee Clagett2019-01-281-0/+1
| | | | | | | | | - 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).
* Merge pull request #5052Riccardo Spagni2019-01-281-0/+1
|\ | | | | | | | | | | | | | | b6534c40 ringct: remove unused senderPk from ecdhTuple (moneromooo-monero) 7d375981 ringct: the commitment mask is now deterministic (moneromooo-monero) 99d946e6 ringct: encode 8 byte amount, saving 24 bytes per output (moneromooo-monero) cdc3ccec ringct: save 3 bytes on bulletproof size (moneromooo-monero) f931e16c add a bulletproof version, new bulletproof type, and rct config (moneromooo-monero)
| * add a bulletproof version, new bulletproof type, and rct configmoneromooo-monero2019-01-221-0/+1
| | | | | | | | This makes it easier to modify the bulletproof format
* | Pruningmoneromooo-monero2019-01-221-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Expose limit-rate defaults from command line helpRaskaRuby2018-10-311-0/+2
|
* blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon2018-10-221-0/+1
|
* Revert "Merge pull request #4472"Riccardo Spagni2018-10-081-1/+0
| | | | | This reverts commit 79d46c4d551a9b1261801960095bf4d24967211a, reversing changes made to c9fc61dbb56cca442c775faa2554a7460879b637.
* blocks: use auto-generated .c files instead of 'LD -r -b binary'xiphon2018-10-041-0/+1
|
* v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero2018-09-111-1/+5
|
* Add a define for the max number of bulletproof multi-outputsmoneromooo-monero2018-09-111-0/+2
|
* cryptonote_config: add get_config to refactor x = testnet ? ↵stoffu2018-06-111-0/+56
| | | | config::testnet::X : stagenet ? config::stagenet::X : config::X
* core: fix use of uninitialised datamoneromooo-monero2018-03-181-1/+2
|
* Bump min ring size from 5 to 7 from v7moneromooo-monero2018-03-071-0/+1
|
* Stagenetstoffu2018-03-051-0/+26
|
* Use `genesis_tx` parameter in `generate_genesis_block`. #3261Jean Pierre Dudey2018-03-051-1/+1
| | | | | | | | | | | | | * src/cryptnote_config.h: The constant `config::testnet::GENESIS_TX` was changed to be the same as `config::GENESIS_TX` (the mainnet's transaction) because the mainnet's transaction was being used for both networks. * src/cryptonote_core/cryptonote_tx_utils.cpp: The `generate_genesis_block` function was ignoring the `genesis_tx` parameter, and instead it was using the `config::GENESIS_TX` constant. That's why the testnet genesis transaction was changed. Also five lines of unused code were removed. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
* tx_pool: add a max pool size, settable with --max-txpool-sizemoneromooo-monero2018-02-071-0/+1
|
* txpool: increase unmined tx expiry to three daysmoneromooo-monero2018-02-011-1/+1
|
* Update 2018 copyrightxmr-eric2018-01-261-1/+1
|
* subaddress: change prefix so that it starts with 8kenshi842017-10-161-1/+1
|
* Merge pull request #2469Riccardo Spagni2017-10-151-0/+3
|\ | | | | | | 7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
| * precomputed block hashes are now in blocks of N (currently 256)moneromooo-monero2017-09-181-0/+3
| | | | | | | | This shaves a lot of space off binaries
* | Subaddresseskenshi842017-10-071-0/+2
| |
* | Merge pull request #2458Riccardo Spagni2017-09-251-1/+0
|\ \ | |/ |/| | | 7f2f6ee1 protocol: remove hop count on block propagation (moneromooo-monero)
| * protocol: remove hop count on block propagationmoneromooo-monero2017-09-171-1/+0
| | | | | | | | | | | | It is unused, as it was apparently a future optimization, and it leaks some information (though since pools publish thei blocks they find, that amount seems small).
* | json serialization for rpc-relevant monero typesThomas Winget2017-09-051-0/+2
|/ | | | | | | | | | | Structured {de-,}serialization methods for (many new) types which are used for requests or responses in the RPC. New types include RPC requests and responses, and structs which compose types within those. # Conflicts: # src/cryptonote_core/blockchain.cpp
* cryptonote_protocol: large block sync size before v4moneromooo-monero2017-08-171-0/+1
|
* Change default block sync size from 200 to 20moneromooo-monero2017-08-081-1/+1
| | | | | | With the new sync algorithm, the network overhead will be masked as the thread adding blocks isn't interrupted by network calls anymore. This should reduce memory usage a lot during sync.
* Merge pull request #1701Riccardo Spagni2017-05-051-0/+1
|\ | | | | | | 8277e67f Add anchor connections (Miguel Herranz)
| * Add anchor connectionsMiguel Herranz2017-02-101-0/+1
| | | | | | | | | | | | Based on https://eprint.iacr.org/2015/263.pdf 4. Anchor connections. Peer list serialisation version bumped to 5.