aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-14Refactored rx-slow-hash.cSChernykh1-2/+3
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)` - Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens - `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance) - New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification) - When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then) - When mining is running, PoW checks now also use dataset for faster verification
2022-09-12wallet2: check wallet compatibility with daemon's hard fork versionj-berman1-0/+5
2022-08-06ledger support for hf 15 (BP+, view tags)j-berman2-7/+15
2022-06-20cryptonote_basic: catch crypto api errorsmoneromooo-monero1-2/+2
2022-05-17src, epee: fix a couple compiler warningsselsta1-2/+0
2022-04-21Preserve commitment format inside transactionsLuke Parker1-1/+1
2022-04-19Merge pull request #8061luigi11114-30/+170
ea87b30 Add view tags to outputs to reduce wallet scanning time (j-berman)
2022-04-18Move copyable_atomic into connection_contextJeffrey1-4/+35
Relevant commit from old PR: bd0a5119957d3ef9130a0b82599e1696995ef235
2022-04-18Add view tags to outputs to reduce wallet scanning timej-berman4-30/+170
Implements view tags as proposed by @UkoeHB in MRL issue https://github.com/monero-project/research-lab/issues/73 At tx construction, the sender adds a 1-byte view tag to each output. The view tag is derived from the sender-receiver shared secret. When scanning for outputs, the receiver can check the view tag for a match, in order to reduce scanning time. When the view tag does not match, the wallet avoids the more expensive EC operations when deriving the output public key using the shared secret.
2022-04-18Merge pull request #8207luigi11111-14/+1
4db6aed CMake: Add missing headers via monero_find_all_headers macro (mj-xmr)
2022-04-10Fee changes from ArticMinemoneromooo-monero2-0/+65
https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf with a change to use 1.7 instead of 2.0 for the max long term increase rate
2022-04-06CMake: Add missing headers via monero_find_all_headers macromj-xmr1-14/+1
2022-04-06Merge pull request #8223luigi11112-10/+9
17772ef Eliminate dependence on boost::interprocess #8223 (Jeffrey)
2022-04-06Merge pull request #8197luigi111127-27/+32
da9aa1f Copyright: Update to 2022 (mj-xmr)
2022-04-05store outPk/8 in the tx for speedmoneromooo-monero1-1/+1
It avoids dividing by 8 when deserializing a tx, which is a slow operation, and multiplies by 8 when verifying and extracing the amount, which is much faster as well as less frequent
2022-04-05plug bulletproofs plus into consensusmoneromooo-monero2-14/+65
2022-03-30Eliminate dependence on boost::interprocess #8223Jeffrey2-10/+9
In this repo, `boost::interprocess` was being used soley to make `uint32_t` operations atomic. So I replaced each instance of `boost::interprocess::ipcdetail::atomic(...)32` with `std::atomic` methods. I replaced member declarations as applicable. For example, when I needed to change a `volatile uint32_t` into a `std::atomic<uint32_t>`. Sometimes, a member was being used a boolean flag, so I replaced it with `std::atomic<bool>`. You may notice that I didn't touch `levin_client_async.h`. That is because this file is entirely unused and will be deleted in PR monero-project#8211. Additional changes from review: * Make some local variables const * Change postfix operators to prefix operators where value was not need
2022-03-04Copyright: Update to 2022mj-xmr27-27/+32
2022-02-22multisig key exchange update and refactorkoe3-7/+20
2021-09-11RPC and ZeroMQ APIs to support p2poolSChernykh3-0/+4
Adds the following: - "get_miner_data" to RPC API - "json-miner-data" to ZeroMQ subscriber contexts Both provide the necessary data to create a custom block template. They are used by p2pool. Data provided: - major fork version - current height - previous block id - RandomX seed hash - network difficulty - median block weight - coins mined by the network so far - mineable mempool transactions
2021-07-13cmake: fix undefined symbols and multiple definitionsanon3-16/+58
2021-01-23Improve cryptonote (block and tx) binary read performanceLee Clagett4-67/+26
2021-04-16Split epee/string_tools.h and encapsulate boost::lexical_castmj-xmr1-0/+1
2021-04-16Merge pull request #7002luigi11111-0/+1
673c6d2 Reduce compilation time of epee/portable_storage_template_helper.h (mj-xmr)
2021-03-28Reduce compilation time of epee/portable_storage_template_helper.hmj-xmr1-0/+1
2021-03-22cryptonote_protocol_handler: fix race conditionanon1-0/+2
2021-03-20Merge pull request #6810luigi11115-0/+157
19b2283 New add_aux_pow RPC to support merge mining (moneromooo-monero)
2021-02-09New add_aux_pow RPC to support merge miningmoneromooo-monero5-0/+157
2021-02-09Remove unused variables in monero codebaseKevin Barbour1-1/+0
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.
2020-12-22Command max_bytes moved from dynamic map to static switchLee Clagett3-22/+75
2021-01-03add a max levin packet size by command typemoneromooo-monero1-0/+23
2020-12-17Add aggressive restrictions to pre-handshake p2p buffer limitLee Clagett1-0/+2
2020-12-26cryptonote_basic: guess what got lost porting patches to branches againmoneromooo-monero1-1/+1
2020-12-25protocol: drop nodes if they claim new data but only give stale datamoneromooo-monero1-1/+2
Some joker is spending time actually doing this
2020-12-11protocol: stricter checks on received chain hash listmoneromooo1-0/+1
2020-12-06protocol: drop peers that don't reply to queriesmoneromooo1-1/+3
2020-12-04protocol: add scoring system to drop peers that don't behavemoneromooo1-2/+2
2020-09-06Merge pull request #6111Riccardo Spagni2-7/+9
d20ff4f64 functional_tests: add a large (many randomx epochs) p2p reorg test (moneromooo-monero) 6a0b3b1f8 functional_tests: add randomx tests (moneromooo-monero) 9d42649d5 core: fix mining from a block that's not the current top (moneromooo-monero)
2020-08-27core: fix mining from a block that's not the current topmoneromooo-monero2-7/+9
2020-08-27Integrate CLSAGs into moneromoneromooo-monero2-8/+28
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-27Merge pull request #6690Alexander Blair3-3/+1
7175dcb10 replace most boost serialization with existing monero serialization (moneromooo-monero)
2020-08-27Merge pull request #6613Alexander Blair3-31/+35
55363c594 Avoid some temporary strings when reading off the database (moneromooo-monero)
2020-08-26Merge pull request #6607Alexander Blair1-4/+3
eb1b321fe miner: increase min/max intervals to full extents (moneromooo-monero)
2020-08-17Revert "Use domain-separated ChaCha20 for in-memory key encryption"luigi11112-71/+50
This reverts commit 921dd8dde5d381052d0aa2936304a3541a230c55.
2020-08-17replace most boost serialization with existing monero serializationmoneromooo-monero3-3/+1
This reduces the attack surface for data that can come from malicious sources (exported output and key images, multisig transactions...) since the monero serialization is already exposed to the outside, and the boost lib we were using had a few known crashers. For interoperability, a new load-deprecated-formats wallet setting is added (off by default). This allows loading boost format data if there is no alternative. It will likely go at some point, along with the ability to load those. Notably, the peer lists file still uses the boost serialization code, as the data it stores is define in epee, while the new serialization code is in monero, and migrating it was fairly hairy. Since this file is local and not obtained from anyone else, the marginal risk is minimal, but it could be migrated later if needed. Some tests and tools also do, this will stay as is for now.
2020-08-17Avoid some temporary strings when reading off the databasemoneromooo-monero3-31/+35
2020-08-16Merge pull request #6493Alexander Blair2-50/+71
921dd8dde Use domain-separated ChaCha20 for in-memory key encryption (Sarang Noether)
2020-08-09Use domain-separated ChaCha20 for in-memory key encryptionSarang Noether2-50/+71
2020-05-31miner: increase min/max intervals to full extentsmoneromooo-monero1-4/+3
This prevents setting target to, eg, 65 being ignored and remove an unused constant
2020-05-06Update copyright year to 2020SomaticFanatic21-21/+21
Update copyright year to 2020
2020-05-06Merge pull request #6472luigi11111-0/+2
2efbd5f cryptonote: fix reuse of non default tx data when relaying (moneromooo-monero)
2020-05-04Adding ZMQ/Pub support for txpool_add and chain_main eventsLee Clagett2-0/+82
2020-05-01Merge pull request #6436luigi11112-0/+16
688a3e8 Add timelock verification on device (cslashm)
2020-04-22cryptonote: fix reuse of non default tx data when relayingmoneromooo-monero1-0/+2
An automatic tx variable is initialized properly on the first run through the loop, but not the second. Moving the variable inside the loop ensures the ctor is called again to init it.
2020-04-08Add timelock verification on devicecslashm2-0/+16
2020-03-26Adding Dandelion++ support to public networks:Lee Clagett1-1/+6
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode - Stem loops detected in tx_pool.cpp - Embargo timeout for a blackhole attack during stem phase
2020-04-04Merge pull request #6338luigi11112-6/+2
80d5320 Hash domain separation (SarangNoether)
2020-04-01Hash domain separationSarang Noether2-6/+2
2020-03-31cryptonote_basic: drop unused verification_context::m_not_rct fieldxiphon1-1/+0
2020-03-20p2p: remove old debug commandsAaron Hook2-55/+0
2020-02-28Merge pull request #6225Alexander Blair2-2/+18
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
2020-02-06miner: use verification mode for low diff one block nonce searchesmoneromooo-monero1-1/+1
This avoids lengthy init times when testing
2019-12-12print_coinbase_tx_sum now supports 128 bits sumsmoneromooo-monero2-2/+18
The tail emission will bring the total above 64 bits
2019-10-31cryptonote: untangle dependency from miner to blockchainmoneromooo-monero2-9/+9
It causes link errors at least on mac
2019-10-25daemon, wallet: new pay for RPC use systemmoneromooo-monero1-1/+2
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-22Merge pull request #5972luigi11112-11/+66
9447e72 cryptonote: add function to get weight from a pruned tx (moneromooo-monero)
2019-10-22Merge pull request #5966luigi11111-5/+2
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-21Support median block size > 4 GBmoneromooo-monero1-5/+2
add a 128/64 division routine so we can use a > 32 bit median block size in calculations
2019-10-16Merge pull request #5984luigi11111-0/+4
7fdaa82 Fix build on FreeBSD/!x86 (pkubaj) 0f4fddc Add also ifdef __x86_64__ (pkubaj)
2019-10-14Merge pull request #5933luigi11111-0/+1
3455efa ban peers sending bad pow outright (moneromooo-monero)
2019-10-13Add also ifdef __x86_64__pkubaj1-2/+2
2019-10-13Fix build on FreeBSD/!x86pkubaj1-0/+4
Checking battery status uses x86-only headers and functions. Remove this functionality to get it to build on other architectures.
2019-10-11cryptonote: add function to get weight from a pruned txmoneromooo-monero2-11/+66
The weight of the prunable data is deterministic from the unpruned data, so it can be determined from a pruned tx
2019-10-08Merge pull request #5915luigi11113-17/+92
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero3-17/+92
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 Chu4-30/+14
Support RandomX PoW algorithm
2019-09-25ban peers sending bad pow outrightmoneromooo-monero1-0/+1
PoW is expensive to verify, so be strict
2019-09-24Merge pull request #5877luigi11111-2/+1
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami) 4ad191f Removed unused boost/value_init header (whyamiroot) 928f4be Make null hash constants constexpr (whyamiroot)
2019-09-19core: move hardforks into its own libmoneromooo-monero2-11/+4
So it can be used by others without encumbrance
2019-09-05Make null hash constants constexprLev Sizov1-1/+1
Simplify m_template initialization in miner
2019-09-04difficulty: fix check_hash on big endianmoneromooo-monero1-1/+0
2019-09-02Removed unused boost/value_init headerLev Sizov1-1/+0
2019-09-02Changed the use of boost:value_initialized for C++ list initializerJesus Ramirez1-1/+1
2019-07-17Added support for "noise" over I1P/Tor to mask Tx transmission.Lee Clagett1-0/+2
2019-08-19Merge pull request #5720luigi11111-1/+1
bcd2da7 miner: fix --bg-mining-enable description (moneromooo-monero)
2019-08-14Merge pull request #5487luigi11111-0/+1
df83ed7 consensus: from v12, enforce >= 2 outputs (moneromooo-monero)
2019-07-02miner: fix --bg-mining-enable descriptionmoneromooo-monero1-1/+1
2019-06-14serialization: check stream good flag at the endmoneromooo-monero1-1/+1
just in case
2019-06-14cryptonote: throw on tx hash calculation errormoneromooo-monero1-3/+3
2019-06-09miner: fix double free of thread attributesston1th2-10/+6
issue: #5568
2019-05-01fix wide difficulty conversion with some versions of boostmoneromooo-monero1-2/+2
2019-04-23consensus: from v12, enforce >= 2 outputsmoneromooo-monero1-0/+1
2019-04-20hardfork: fix off by one updating fork index after poppingmoneromooo-monero1-3/+2
2019-04-16Merge pull request #5444Riccardo Spagni1-0/+1
6643b047 Increment m_threads_active when mining thread starts (Doyle)
2019-04-16Merge pull request #5443Riccardo Spagni1-20/+2
07dd5536 hardfork: remove "no hf version db" recreation check (moneromooo-monero)
2019-04-16Merge pull request #5400Riccardo Spagni1-6/+2
5e673c03 blockchain_db: fix db txn ending too early (moneromooo-monero)
2019-04-15Merge pull request #5402Riccardo Spagni2-0/+18
cbf32241 rpc: make wide_difficulty hexadecimal (moneromooo-monero)
2019-04-15Increment m_threads_active when mining thread startsDoyle1-0/+1
2019-04-14hardfork: remove "no hf version db" recreation checkmoneromooo-monero1-20/+2
This is now obsolete, and this removes the warning on startup on a new db that confuses some people
2019-04-14blockchain_db: fix db txn ending too earlymoneromooo-monero1-6/+2
The db txn in add_block ending caused the entire overarching batch txn to stop. Also add a new guard class so a db txn can be stopped in the face of exceptions. Also use a read only db txn in init when the db itself is read only, and do not save the max tx size in that case.
2019-04-11functional_tests: add more blockchain related testsmoneromooo-monero3-2/+14
Related to emission, reorgs, getting tx data back, output distribution and histogram
2019-04-11Merge pull request #5381Riccardo Spagni2-6/+10
def40161 miner: fix race when stopping mining with start mining enabled (moneromooo-monero)
2019-04-11Merge pull request #5380Riccardo Spagni1-2/+0
113e4877 blockchain_stats: fix sign in formatting function (moneromooo-monero) adaea3ea various: remove unused variables (moneromooo-monero) 631ef00e blockchain: some debug info when adding txes-from-block fails (moneromooo-monero)
2019-04-11Merge pull request #5374Riccardo Spagni1-5/+11
a2561653 wallet: new option to start background mining (moneromooo-monero)
2019-04-11Merge pull request #5123Riccardo Spagni3-6/+2
089c7637 cryptonote: rework block blob size sanity check (moneromooo-monero)
2019-04-06Merge pull request #5346Riccardo Spagni2-8/+51
c84ea299 cryptonote_basic: some more minor speedups (moneromooo-monero) e40eb2ad cryptonote_basic: speedup calculate_block_hash (moneromooo-monero) 547a9708 cryptonote: block parsing + hash calculation speedup (moneromooo-monero) 11604b6d blockchain: avoid unneeded block copy (moneromooo-monero) 8461df04 save some database calls when getting top block hash and height (moneromooo-monero) 3bbc3661 Avoid repeated (de)serialization when syncing (moneromooo-monero)
2019-04-05rpc: make wide_difficulty hexadecimalmoneromooo-monero2-0/+18
This should be friendlier for clients which don't have bignum support
2019-04-05cryptonote: rework block blob size sanity checkmoneromooo-monero3-6/+2
Use the actual block weight limit, assuming that weight is always greater or equal to size
2019-04-04wallet: new option to start background miningmoneromooo-monero1-5/+11
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-01miner: fix race when stopping mining with start mining enabledmoneromooo-monero2-6/+10
2019-04-01various: remove unused variablesmoneromooo-monero1-2/+0
2019-04-01Merge pull request #5288Riccardo Spagni1-2/+3
39f000b3 miner: fix possible exit crash due to race in stop (moneromooo-monero)
2019-03-25cryptonote_basic: some more minor speedupsmoneromooo-monero1-4/+16
2019-03-25cryptonote_basic: speedup calculate_block_hashmoneromooo-monero1-2/+7
The block 202612 fix can be left tested at the end, if we already know we're not in the general case
2019-03-25cryptonote: block parsing + hash calculation speedupmoneromooo-monero2-4/+30
This saves a duplicate serialization step
2019-03-24Make difficulty 128 bit instead of 64 bitmoneromooo-monero3-4/+115
Based on Boolberry work by: jahrsg <jahr@jahr.me> cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24Merge pull request #5277Riccardo Spagni1-0/+7
adf6d773 wallet: fix offline signing calling a daemon RPC (moneromooo-monero)
2019-03-21cryptonote: fix calculating coinbase tx hashmoneromooo-monero1-10/+6
Also set error flag on exception when handling new txes to keep tests working
2019-03-21wallet: fix offline signing calling a daemon RPCmoneromooo-monero1-0/+7
2019-03-21Merge pull request #5271Riccardo Spagni1-0/+3
2790d4d3 hardfork: update last_versions on popped block (moneromooo-monero)
2019-03-21Merge pull request #5211Riccardo Spagni1-0/+5
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec) a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec) d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-20device/trezor: HF10 support added, wallet::APIDusan Klinec1-0/+5
- import only key images generated by cold signing process - wallet_api: trezor methods added - wallet: button request code added - const added to methods - wallet2::get_tx_key_device() tries to decrypt stored tx private keys using the device. - simplewallet supports get_tx_key and get_tx_proof on hw device using the get_tx_key feature - live refresh enables refresh with trezor i.e. computing key images on the fly. More convenient and efficient for users. - device: has_ki_live_refresh added - a thread is watching whether live refresh is being computed, if not for 30 seconds, it terminates the live refresh process - switches Trezor state
2019-03-17Merge pull request #5190Riccardo Spagni1-1/+3
551104fb daemon: add --public-node mode, RPC port propagation over P2P (xiphon)
2019-03-17Merge pull request #5185Riccardo Spagni2-4/+9
59478c80 daemon: new mining_status command (moneromooo-monero)
2019-03-17Merge pull request #5135Riccardo Spagni1-0/+1
de32dcea Human readable message if maximum outputs reached (italocoin)
2019-03-14miner: fix possible exit crash due to race in stopmoneromooo-monero1-2/+3
If a thread asks to stop the miner, m_stop will be set, and that thread will wait to join. If the main thread is exiting at that time, it will ask the miner to stop, but the miner will claim it's not mining and early out since m_stop is set. This will cause the database and other things to get shutdown. If the miner happens to find a block at that time, it will try to call core, and crash. Instead, lock and check whether any threads are currently in m_threads, since they'll only be cleared once the threads are joined. Moreover, since we lock, the second thread will have to wait for the first one to have finished. Calling join twice on a thread seems fine as per pthread_join(3).
2019-03-12hardfork: update last_versions on popped blockmoneromooo-monero1-0/+3
2019-03-09daemon: new mining_status commandmoneromooo-monero2-4/+9
2019-03-05Update 2019 copyrightbinaryFate22-22/+22
2019-03-05cryptonote: speed up calculating coinbase tx prunable hashmoneromooo-monero1-2/+9
It's a hash of an empty buffer, so we can avoid keccak
2019-03-05core: avoid calculating tx prefix hash when we don't need itmoneromooo-monero2-1/+9
2019-03-05db: speedup block additionmoneromooo-monero3-26/+67
by avoiding repeated (de)serialization
2019-03-04check load_t_from_json return valuesmoneromooo-monero1-1/+2
2019-03-04default initialize rpc structuresmoneromooo-monero1-1/+2
2019-03-04Merge pull request #5125Riccardo Spagni2-4/+84
8298f42e miner: it can now autodetect the optimal number of threads (moneromooo-monero)
2019-03-04hardfork: fix fork determination for historical heightsmoneromooo1-1/+1
2019-03-04Merge pull request #5126Riccardo Spagni1-1/+1
f1fb06b1 Fixed path to int-util.h (SChernykh) 9da0892b Adding cnv4-2 tweaks (SChernykh) f51397b3 Cryptonight variant 4 aka CryptonightR (SChernykh)
2019-02-25daemon: add --public-node mode, RPC port propagation over P2Pxiphon1-1/+3
2019-02-23miner: it can now autodetect the optimal number of threadsmoneromooo-monero2-4/+84
2019-02-14Cryptonight variant 4 aka CryptonightRSChernykh1-1/+1
It introduces random integer math into the main loop.
2019-02-10Human readable message if maximum outputs reacheditalocoin1-0/+1
2019-02-03ringct: fix v1 ecdhInfo serializationmoneromooo-monero1-15/+2
The change made for v2 broke v1, and we have no way to know which version we're serializing here. However, since we don't actually care about space savings in this case, we continue serialiazing both mask and amount.
2019-01-28Merge pull request #5052Riccardo Spagni1-6/+18
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)
2019-01-22ringct: remove unused senderPk from ecdhTuplemoneromooo-monero1-1/+0
This was an early ringct field, which was never used in production
2019-01-22ringct: the commitment mask is now deterministicmoneromooo-monero1-1/+4
saves space in the tx and is safe Found by knaccc
2019-01-22ringct: encode 8 byte amount, saving 24 bytes per outputmoneromooo-monero1-1/+11
Found by knaccc
2019-01-22add a bulletproof version, new bulletproof type, and rct configmoneromooo-monero1-3/+3
This makes it easier to modify the bulletproof format
2019-01-22Pruningmoneromooo-monero5-5/+56
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-01blockchain: fix wrong hf version when popping multiple blocksmoneromooo-monero2-0/+33
Since we keep track of the hf version in the db, we pick it up from there instead of doing the full reorg call, which is quite expensive
2019-01-01hardfork: remove batch transactions setupmoneromooo-monero1-1/+0
This is now default, so it spares us the warnings
2018-12-31Merge pull request #4953luigi11111-5/+13
dbbb3ce cryptonote: don't serialize for blob size if already known (moneromooo-monero)
2018-12-31Merge pull request #4946luigi11112-0/+3
6644b9b blockchain_db: remove a couple unused functions (moneromooo-monero) ce594f5 blockchain_db: allocate known size vector only once (moneromooo-monero) 8332698 db_lmdb: inline check_open, it's trivial and called everywhere (moneromooo-monero) 5511563 db_lmdb: avoid pointless division (moneromooo-monero) d1efe3d cryptonote: set tx hash on newly parsed txes when known (moneromooo-monero) 9cc68a2 tx_pool: add a few std::move where it can make a difference (moneromooo-monero)
2018-12-12Merge pull request #4924Riccardo Spagni1-7/+10
0c5dd316 cryptonote: add a set_null for transaction_prefix (moneromooo-monero)
2018-12-07cryptonote: don't serialize for blob size if already knownmoneromooo-monero1-5/+13
2018-12-05cryptonote: set tx hash on newly parsed txes when knownmoneromooo-monero2-0/+3
2018-12-04Merge pull request #4894Riccardo Spagni3-4/+4
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)
2018-12-04move int-util.h to epeemoneromooo-monero2-2/+2
2018-12-04Merge pull request #4869Riccardo Spagni1-1/+1
60f36386 Avoid unnecessary temp block and copy ctor (moneromooo-monero)
2018-12-04Merge pull request #4854Riccardo Spagni3-23/+18
bd98e99c Removed a lot of unnecessary includes (Martijn Otto)
2018-11-30cryptonote: add a set_null for transaction_prefixmoneromooo-monero1-7/+10
Since it's all inline, I suspect the compiler will merge the duplicate stores anyway.
2018-11-23cryptonote: fix get_unit for non default settingsmoneromooo-monero1-2/+2
Found by codacy.com
2018-11-23a few minor (but easy) performance tweaksmoneromooo-monero2-2/+2
Found by codacy.com
2018-11-19Avoid unnecessary temp block and copy ctormoneromooo-monero1-1/+1
block already has a default ctor, and the extra object churn due to its innards (vectors, etc) is pointless.
2018-11-15Removed a lot of unnecessary includesMartijn Otto3-23/+18
2018-11-14Merge pull request #4753Riccardo Spagni1-3/+4
157054b8 hardfork: initialize current_fork_index in ctor (moneromooo-monero) 2362baf7 network_throttle: initialize m_last_sample_time in ctor (moneromooo-monero) d9400f69 serializtion: add missing mainnet and stagenet fields for 0mq (moneromooo-monero) cbe0122b wallet2: initialize amount to 0 in tx_scan_info_t ctor (moneromooo-monero)
2018-11-06Merge pull request #4744Riccardo Spagni1-1/+1
b3e8677c cryptonote: use logging functions for errors, not std::cout (moneromooo-monero)
2018-11-02device/trezor: trezor support addedDusan Klinec2-5/+20
2018-10-29hardfork: initialize current_fork_index in ctormoneromooo-monero1-3/+4
Also order init list to match actual runtime init order Coverity 136605
2018-10-27cryptonote: use logging functions for errors, not std::coutmoneromooo-monero1-1/+1
2018-10-26Merge pull request #4700Riccardo Spagni1-1/+1
3bb4b0d4 miner: fix build with boost 1.69 (moneromooo-monero)
2018-10-26Merge pull request #4617Riccardo Spagni1-0/+1
3ffbec15 rpc: init m_rpc_version in Message ctor (moneromooo-monero) bfa2dce1 rpc: remove unused ctors (moneromooo-monero) 7cc39845 account: init creation timestamp to 0 (moneromooo-monero) 32123789 wallet2: initialize some scalar fields in ctor where appropriate (moneromooo-monero) 4eca42b2 blockchain_db: initialize m_hardfork in ctor just in case (moneromooo-monero)
2018-10-26Merge pull request #4308Riccardo Spagni3-1/+87
9907ea06 cryptonote: sort tx_extra fields (moneromooo-monero)
2018-10-22miner: fix build with boost 1.69moneromooo-monero1-1/+1
2018-10-20Merge pull request #4523Riccardo Spagni1-1/+1
6ca00b6d miner: really reset flags/precision on std::cout (moneromooo-monero)
2018-10-16account: init creation timestamp to 0moneromooo-monero1-0/+1
Never actually used uninitialized Coverity 136615
2018-10-15Merge pull request #4389Riccardo Spagni2-0/+11
6844ae1b tx_pool: avoid parsing a whole tx if only the prefix is needed (moneromooo-monero)
2018-10-08miner: really reset flags/precision on std::coutmoneromooo-monero1-1/+1
2018-10-08tx_pool: avoid parsing a whole tx if only the prefix is neededmoneromooo-monero2-0/+11
2018-10-07cryptonote: sort tx_extra fieldsmoneromooo-monero3-1/+87
This removes some small amount of fingerprinting entropy. There is no consensus rule to require this since this field is technically free form, and a transaction is free to have custom data in it.
2018-09-29Merge pull request #4459Riccardo Spagni1-2/+4
bcf3f6af fuzz_tests: catch unhandled exceptions (moneromooo-monero) 3ebd05d4 miner: restore stream flags after changing them (moneromooo-monero) a093092e levin_protocol_handler_async: do not propagate exception through dtor (moneromooo-monero) 1eebb82b net_helper: do not propagate exceptions through dtor (moneromooo-monero) fb6a3630 miner: do not propagate exceptions through dtor (moneromooo-monero) 2e2139ff epee: do not propagate exception through dtor (moneromooo-monero) 0749a8bd db_lmdb: do not propagate exceptions in dtor (moneromooo-monero) 1b0afeeb wallet_rpc_server: exit cleanly on unhandled exceptions (moneromooo-monero) 418a9936 unit_tests: catch unhandled exceptions (moneromooo-monero) ea7f9543 threadpool: do not propagate exceptions through the dtor (moneromooo-monero) 6e855422 gen_multisig: nice exit on unhandled exception (moneromooo-monero) 53df2deb db_lmdb: catch error in mdb_stat calls during migration (moneromooo-monero) e67016dd blockchain_blackball: catch failure to commit db transaction (moneromooo-monero) 661439f4 mlog: don't remove old logs if we failed to rename the current file (moneromooo-monero) 5fdcda50 easylogging++: test for NULL before dereference (moneromooo-monero) 7ece1550 performance_test: fix bad last argument calling add_arg (moneromooo-monero) a085da32 unit_tests: add check for page size > 0 before dividing (moneromooo-monero) d8b1ec8b unit_tests: use std::shared_ptr to shut coverity up about leaks (moneromooo-monero) 02563bf4 simplewallet: top level exception catcher to print nicer messages (moneromooo-monero) c57a65b2 blockchain_blackball: fix shift range for 32 bit archs (moneromooo-monero)
2018-09-18Merge pull request #4299Riccardo Spagni2-3/+8
f9b22a7b hw_device: support for multiple devices added [for review] (Dusan Klinec)
2018-09-18Merge pull request #3430Riccardo Spagni1-3/+7
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)
2018-09-14hw_device: support for multiple devices added [for review]Dusan Klinec2-3/+8
- device name is a new wallet property - full device name is now a bit more structured so we can address particular device vendor + device path. Example: 'Ledger', 'Trezor:udp', 'Trezor:udp:127.0.0.1:21324', 'Trezor:bridge:usb01'. The part before ':' identifies HW device implementation, the optional part after ':' is device path to look for. - new --hw-device parameter added to the wallet, can name the hardware device - device reconnect added
2018-09-14Merge pull request #4330Riccardo Spagni1-3/+13
93e7627d cryptonote_format_utils: do not early out on invalid tx pubkeys (moneromooo-monero)
2018-09-11bulletproofs: scale points by 8 to ensure subgroup validitymoneromooo-monero1-1/+1
2018-09-11cryptonote_basic: check output type before using itmoneromooo-monero1-0/+7
Reported by QuarksLab.
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero4-28/+64
2018-09-11Bulletproof aggregated verification and testsmoneromooo-monero2-8/+16
Also constrains bulletproofs to simple rct, for simplicity
2018-09-10Add support for apple and arm buildingTheCharlatan1-3/+7
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
2018-09-02cryptonote_format_utils: do not early out on invalid tx pubkeysmoneromooo-monero1-3/+13
Another such pubkey might be valid
2018-08-16crypto: make secret_key automatically mlockmoneromooo-monero1-2/+2
2018-08-16store secret keys encrypted where possiblemoneromooo-monero2-0/+82
The secret spend key is kept encrypted in memory, and decrypted on the fly when needed. Both spend and view secret keys are kept encrypted in a JSON field in the keys file. This avoids leaving the keys in memory due to being manipulated by the JSON I/O API.
2018-07-19Merge pull request #4030luigi11111-1/+1
0c41488 miner: show id and height when a block is found (stoffu)
2018-07-19Merge pull request #3854luigi11111-7/+8
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-06-29add --regtest and --fixed-difficulty for regression testingvictorsintnicolaas1-7/+8
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-27Merge pull request #3982luigi11111-14/+5
08b85a8 cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X (stoffu) 0cf80ba net_node: resolve host for node addresses given via command line flags (stoffu)
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero1-1/+1
also use reserve where appropriate
2018-06-20Merge pull request #3757luigi11111-0/+5
6f9260e handle optional miner params better (cryptochangements34)
2018-06-20miner: show id and height when a block is foundstoffu1-1/+1
2018-06-19Merge pull request #3851luigi11111-1/+1
a87980f fix build with GCC 8.1.0 (moneromooo-monero)