aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic (follow)
AgeCommit message (Collapse)AuthorFilesLines
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-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)
2018-06-16Merge pull request #3725luigi11111-5/+5
9cc0d42 connection_context: remove state_ prefix from state names (moneromooo-monero) d9d002c daemon: print peer state in sync_info (moneromooo-monero)
2018-06-11cryptonote_config: add get_config to refactor x = testnet ? ↵stoffu1-14/+5
config::testnet::X : stagenet ? config::stagenet::X : config::X
2018-05-30hardfork: fix get_next_version()stoffu1-3/+3
2018-05-30hardfork: fix get_earliest_ideal_height_for_version() to support ↵stoffu1-4/+8
non-existent versions
2018-05-26fix build with GCC 8.1.0moneromooo-monero1-1/+1
2018-05-23db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero2-8/+60
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-07cryptonote: make sure outPk setup always happensmoneromooo-monero1-0/+37
2018-05-06handle optional miner params bettercryptochangements341-0/+5
2018-04-28connection_context: remove "state_" prefix from state namesmoneromooo-monero1-5/+5
It's redundant and makes it easier to print them in columns
2018-03-15Fix typos in various filesDimitris Apostolou1-1/+1
2018-03-14keypair::generate: always require hw::device to avoid possible mistakestoffu1-6/+0
2018-03-14device: untangle cyclic depenencystoffu5-200/+15
When #3303 was merged, a cyclic dependency chain was generated: libdevice <- libcncrypto <- libringct <- libdevice This was because libdevice needs access to a set of basic crypto operations implemented in libringct such as scalarmultBase(), while libringct also needs access to abstracted crypto operations implemented in libdevice such as ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct into libringct_basic and libringct, where the basic crypto ops previously in libringct are moved into libringct_basic. The cyclic dependency is now resolved thanks to this separation: libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct This eliminates the need for crypto_device.cpp and rctOps_device.cpp. Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and get_subaddress_secret_key() were previously implemented in libcryptonote_basic (cryptonote_format_utils.cpp) and were then called from hw::core::device_default, which is odd because libdevice is supposed to be independent of libcryptonote_basic. Therefore, those functions were moved to device_default.cpp.
2018-03-14device: made function prototypes consistent with pre-#3303 codebasestoffu1-7/+3
2018-03-12Ledger HW Bug fixesCédric1-2/+0
Fix the way the REAL mode is handle: Let create_transactions_2 and create_transactions_from construct the vector of transactions. Then iterate on it and resign. We just need to add 'outs' list in the TX struct for that. Fix default secret keys value when DEBUG_HWDEVICE mode is off The magic value (00...00 for view key and FF..FF for spend key) was not correctly set when DEBUG_HWDEVICE was off. Both was set to 00...00. Add sub-address info in ABP map in order to correctly display destination sub-address on device Fix DEBUG_HWDEVICE mode: - Fix compilation errors. - Fix control device init in ledger device. - Add more log. Fix sub addr control Fix debug Info
2018-03-05Monero Cryptonight variants, and add one for v7moneromooo-monero1-1/+2
This is the first variant of many, with the intent to improve Monero's resistance to ASICs and encourage mining decentralization.
2018-03-05Merge pull request #3277Riccardo Spagni6-28/+32
0e7ad2e2 Wallet API: generalize 'bool testnet' to 'NetworkType nettype' (stoffu) af773211 Stagenet (stoffu) cc9a0bee command_line: allow args to depend on more than one args (stoffu) 55f8d917 command_line::get_arg: remove 'required' for dependent args as they're always optional (stoffu) 450306a0 command line: allow has_arg to handle arg_descriptor<bool,false,true> #3318 (stoffu) 9f9e095a Use `genesis_tx` parameter in `generate_genesis_block`. #3261 (Jean Pierre Dudey)
2018-03-05Correct spelling mistakes.Edward Betts1-1/+1
2018-03-05Stagenetstoffu6-28/+32
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm6-23/+188
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.
2018-02-20Merge pull request #3260Riccardo Spagni1-1/+0
b2d4bb9b Remove `voting_version` parameter documentation. (Jean Pierre Dudey)
2018-02-20Merge pull request #3255Riccardo Spagni1-11/+5
3962bcb2 Closes #2886: really ignore battery checking (Timothy D. Prime)
2018-02-20Merge pull request #3247Riccardo Spagni2-0/+40
89ad162a wallet2: remove unused m_subaddresses_inv (moneromooo-monero) f2c4c399 wallet2: speed up subaddress generation (by about a third) (moneromooo-monero)
2018-02-16wallet2: speed up subaddress generation (by about a third)moneromooo-monero2-0/+40
2018-02-16Merge pull request #3226Riccardo Spagni1-1/+2
e4646379 keccak: fix mdlen bounds sanity checking (moneromooo-monero) 2e3e90ac pass large parameters by const ref, not value (moneromooo-monero) 61defd89 blockchain: sanity check number of precomputed hash of hash blocks (moneromooo-monero) 9af6b2d1 ringct: fix infinite loop in unused h2b function (moneromooo-monero) 8cea8d0c simplewallet: double check a new multisig wallet is multisig (moneromooo-monero) 9b98a6ac threadpool: catch exceptions in dtor, to avoid terminate (moneromooo-monero) 24803ed9 blockchain_export: fix buffer overflow in exporter (moneromooo-monero) f3f7da62 perf_timer: rewrite to make it clear there is no division by zero (moneromooo-monero) c6ea3df0 performance_tests: remove add_arg call stray extra param (moneromooo-monero) fa6b4566 fuzz_tests: fix an uninitialized var in setup (moneromooo-monero) 03887f11 keccak: fix sanity check bounds test (moneromooo-monero) ad11db91 blockchain_db: initialize m_open in base class ctor (moneromooo-monero) bece67f9 miner: restore std::cout precision after modification (moneromooo-monero) 1aabd14c db_lmdb: check hard fork info drop succeeded (moneromooo-monero)
2018-02-16Merge pull request #3232Riccardo Spagni1-1/+1
b81e276c connection_context: initialize m_last_request_time to current time (moneromooo-monero)
2018-02-13Remove `voting_version` parameter documentation.Jean Pierre Dudey1-1/+0
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-02-12Closes #2886: really ignore battery checkingTimothy D. Prime1-11/+5
Move option test first.
2018-02-04connection_context: initialize m_last_request_time to current timemoneromooo-monero1-1/+1
This prevents spurious early peer drops
2018-02-02miner: restore std::cout precision after modificationmoneromooo-monero1-1/+2
Coverity 136462
2018-01-31ringct: pseudoOuts moved to prunable in the simple bulletproof casemoneromooo-monero1-2/+6
Saves 64 bytes non prunable data per typical tx This breaks v7 consensus, will require a testnet reorg from v6
2018-01-26Readd copyright starting datexmr-eric1-1/+1
2018-01-26Update 2018 copyrightxmr-eric22-22/+22
2018-01-10Merge pull request #2990Riccardo Spagni3-2/+2
2d17feb0 factor STL container serialization (moneromooo-monero)
2017-12-22factor STL container serializationmoneromooo-monero3-2/+2
2017-12-18check accessing an element past the end of a containermoneromooo-monero1-1/+1
2017-12-18check return value for generate_key_derivation and derive_public_keymoneromooo-monero1-4/+8
2017-12-17make multisig work with subaddressesmoneromooo-monero1-4/+49
Thanks to kenshi84 for help getting this work
2017-12-17N-1/N multisigmoneromooo-monero2-2/+14
2017-12-17Add N/N multisig tx generation and signingmoneromooo-monero1-0/+15
Scheme by luigi1111: Multisig for RingCT on Monero 2 of 2 User A (coordinator): Spendkey b,B Viewkey a,A (shared) User B: Spendkey c,C Viewkey a,A (shared) Public Address: C+B, A Both have their own watch only wallet via C+B, a A will coordinate spending process (though B could easily as well, coordinator is more needed for more participants) A and B watch for incoming outputs B creates "half" key images for discovered output D: I2_D = (Hs(aR)+c) * Hp(D) B also creates 1.5 random keypairs (one scalar and 2 pubkeys; one on base G and one on base Hp(D)) for each output, storing the scalar(k) (linked to D), and sending the pubkeys with I2_D. A also creates "half" key images: I1_D = (Hs(aR)+b) * Hp(D) Then I_D = I1_D + I2_D Having I_D allows A to check spent status of course, but more importantly allows A to actually build a transaction prefix (and thus transaction). A builds the transaction until most of the way through MLSAG_Gen, adding the 2 pubkeys (per input) provided with I2_D to his own generated ones where they are needed (secret row L, R). At this point, A has a mostly completed transaction (but with an invalid/incomplete signature). A sends over the tx and includes r, which allows B (with the recipient's address) to verify the destination and amount (by reconstructing the stealth address and decoding ecdhInfo). B then finishes the signature by computing ss[secret_index][0] = ss[secret_index][0] + k - cc[secret_index]*c (secret indices need to be passed as well). B can then broadcast the tx, or send it back to A for broadcasting. Once B has completed the signing (and verified the tx to be valid), he can add the full I_D to his cache, allowing him to verify spent status as well. NOTE: A and B *must* present key A and B to each other with a valid signature proving they know a and b respectively. Otherwise, trickery like the following becomes possible: A creates viewkey a,A, spendkey b,B, and sends a,A,B to B. B creates a fake key C = zG - B. B sends C back to A. The combined spendkey C+B then equals zG, allowing B to spend funds at any time! The signature fixes this, because B does not know a c corresponding to C (and thus can't produce a signature). 2 of 3 User A (coordinator) Shared viewkey a,A "spendkey" j,J User B "spendkey" k,K User C "spendkey" m,M A collects K and M from B and C B collects J and M from A and C C collects J and K from A and B A computes N = nG, n = Hs(jK) A computes O = oG, o = Hs(jM) B anc C compute P = pG, p = Hs(kM) || Hs(mK) B and C can also compute N and O respectively if they wish to be able to coordinate Address: N+O+P, A The rest follows as above. The coordinator possesses 2 of 3 needed keys; he can get the other needed part of the signature/key images from either of the other two. Alternatively, if secure communication exists between parties: A gives j to B B gives k to C C gives m to A Address: J+K+M, A 3 of 3 Identical to 2 of 2, except the coordinator must collect the key images from both of the others. The transaction must also be passed an additional hop: A -> B -> C (or A -> C -> B), who can then broadcast it or send it back to A. N-1 of N Generally the same as 2 of 3, except participants need to be arranged in a ring to pass their keys around (using either the secure or insecure method). For example (ignoring viewkey so letters line up): [4 of 5] User: spendkey A: a B: b C: c D: d E: e a -> B, b -> C, c -> D, d -> E, e -> A Order of signing does not matter, it just must reach n-1 users. A "remaining keys" list must be passed around with the transaction so the signers know if they should use 1 or both keys. Collecting key image parts becomes a little messy, but basically every wallet sends over both of their parts with a tag for each. Thia way the coordinating wallet can keep track of which images have been added and which wallet they come from. Reasoning: 1. The key images must be added only once (coordinator will get key images for key a from both A and B, he must add only one to get the proper key actual key image) 2. The coordinator must keep track of which helper pubkeys came from which wallet (discussed in 2 of 2 section). The coordinator must choose only one set to use, then include his choice in the "remaining keys" list so the other wallets know which of their keys to use. You can generalize it further to N-2 of N or even M of N, but I'm not sure there's legitimate demand to justify the complexity. It might also be straightforward enough to support with minimal changes from N-1 format. You basically just give each user additional keys for each additional "-1" you desire. N-2 would be 3 keys per user, N-3 4 keys, etc. The process is somewhat cumbersome: To create a N/N multisig wallet: - each participant creates a normal wallet - each participant runs "prepare_multisig", and sends the resulting string to every other participant - each participant runs "make_multisig N A B C D...", with N being the threshold and A B C D... being the strings received from other participants (the threshold must currently equal N) As txes are received, participants' wallets will need to synchronize so that those new outputs may be spent: - each participant runs "export_multisig FILENAME", and sends the FILENAME file to every other participant - each participant runs "import_multisig A B C D...", with A B C D... being the filenames received from other participants Then, a transaction may be initiated: - one of the participants runs "transfer ADDRESS AMOUNT" - this partly signed transaction will be written to the "multisig_monero_tx" file - the initiator sends this file to another participant - that other participant runs "sign_multisig multisig_monero_tx" - the resulting transaction is written to the "multisig_monero_tx" file again - if the threshold was not reached, the file must be sent to another participant, until enough have signed - the last participant to sign runs "submit_multisig multisig_monero_tx" to relay the transaction to the Monero network
2017-12-17wallet: add multisig key generationmoneromooo-monero2-0/+8
Scheme by luigi1111
2017-12-16move includes around to lessen overall loadmoneromooo-monero4-2/+43
2017-12-16Merge pull request #2860Riccardo Spagni2-4/+10
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero) 7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero) 54950829 use memwipe in a few relevant places (moneromooo-monero) 000666ff add a memwipe function (moneromooo-monero)
2017-12-08add bulletproofs from v7 on testnetmoneromooo-monero1-4/+4
2017-12-08integrate bulletproofs into moneromoneromooo-monero1-0/+21
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero2-4/+10
2017-11-25Merge pull request #2784Riccardo Spagni2-4/+4
54a4c1cb cryptonote: do not overwrite const data (moneromooo-monero)
2017-11-25Merge pull request #2792Riccardo Spagni1-5/+107
47c0948a Implement missing miner functions on FreeBSD (Vasil Dimov) fdb5bd16 Remove unused variables and fix typos in comments (Vasil Dimov)
2017-11-22cryptonote: do not overwrite const datamoneromooo-monero2-4/+4
2017-11-14remove "using namespace std" from headersmoneromooo-monero1-0/+2
It's nasty, and actually breaks on Solaris, where if.h fails to build due to: struct map *if_memmap;
2017-11-11Implement missing miner functions on FreeBSDVasil Dimov1-1/+105
cryptonote::miner::get_system_times(): Fetch the system's total and idle time using sysctl kern.cp_time. cryptonote::miner::get_process_time(): Use the same implementation as Linux and OSX, the times(3) function conforms to POSIX.1 and is available on FreeBSD. cryptonote::miner::on_battery_power(): Try to fetch the battery status using sysctl hw.acpi.acline. If that fails (if ACPI is not enabled on the system), then try querying /dev/apm.
2017-11-11Remove unused variables and fix typos in commentsVasil Dimov1-4/+2
2017-10-15Merge pull request #2597Riccardo Spagni1-2/+1
c4136134 miner: always update block template when starting (moneromooo-monero)
2017-10-15refactor cryptonote_basic::add_tx_pub_key_to_extraJaquee2-3/+15
2017-10-07miner: always update block template when startingmoneromooo-monero1-2/+1
This fixes using the previous address when starting mining, then stopping and restarting with a different address
2017-10-07Subaddresseskenshi8410-84/+333
2017-09-27connection_context: initialize m_callback_request_count to 0moneromooo-monero1-1/+1
2017-09-25fix typo in basic and core CMakeLists.txtmoneromooo-monero1-1/+1
2017-09-25move checkpoints in a separate librarymoneromooo-monero7-522/+3
2017-09-25Merge pull request #2257Riccardo Spagni2-0/+19
651baaec wallet: add encrypted seed functionality (moneromooo-monero)
2017-09-20Merge pull request #2410Riccardo Spagni1-13/+0
20256b7c Fix AC power supply detection on Linux (Guillaume LE VAILLANT)
2017-09-12wallet: add encrypted seed functionalitymoneromooo-monero2-0/+19
This uses luigi1111's CN_Add method. See https://xmr.llcoins.net for details.
2017-09-08Fix AC power supply detection on LinuxGuillaume LE VAILLANT1-13/+0
The /sys/class/power_supply/*/present file usually does not exist for AC power supplies.
2017-09-06update hardcoded checkpointsRiccardo Spagni1-0/+2
2017-08-17Merge pull request #2303Riccardo Spagni1-0/+3
5a283078 cryptonote_protocol: large block sync size before v4 (moneromooo-monero) 7b747607 cryptonote_protocol: kick idle synchronizing peers (moneromooo-monero)
2017-08-16cryptonote_protocol: kick idle synchronizing peersmoneromooo-monero1-0/+3
In case they dropped off downloading for any reason, they'll get sent to download again.
2017-08-15befor -> beforeNano Akron1-4/+4
Really unique yet consistent spelling mistake
2017-08-15Merge pull request #2283Riccardo Spagni1-1/+1
d1f204d6 miner: set thread name before logging (moneromooo-monero)
2017-08-15Merge pull request #2264Riccardo Spagni1-1/+1
980e476c cryptonote_basic: fix silly CLANG warning about not emitting function (moneromooo-monero)
2017-08-15Merge pull request #2245Riccardo Spagni1-2/+2
c8640a3d difficulty: fix misleading comment (Guillaume LE VAILLANT)
2017-08-15Merge pull request #2232Riccardo Spagni1-1/+1
87b5ede9 miner: fix ignoring battery from command line (moneromooo-monero)
2017-08-12protocol: fix reorgs while syncingmoneromooo-monero1-1/+3
2017-08-12miner: set thread name before loggingmoneromooo-monero1-1/+1
2017-08-09connection_context: initialize statemoneromooo-monero1-0/+1
Why this was initialized properly before I have no idea, but it is not anymore. Fix it, which fixes syncing in release mode.
2017-08-08cryptonote_basic: fix silly CLANG warning about not emitting functionmoneromooo-monero1-1/+1
2017-08-07Merge pull request #2149Riccardo Spagni1-0/+1
158c3ecf core: thread most of handle_incoming_tx (moneromooo-monero) f57ee382 cryptonote_protocol: retry stale spans early (moneromooo-monero) 90df52e1 cryptonote_protocol: light cleanup (moneromooo-monero) 84e23156 cryptonote_protocol: avoid spurious SYNCHRONIZED OK messages (moneromooo-monero) 5be43fcd cryptonote_protocol_handler: sync speedup (moneromooo-monero)
2017-08-07Merge pull request #2234Riccardo Spagni1-1/+0
214fd81e some include cleanup (moneromooo-monero)
2017-08-07Merge pull request #2210Riccardo Spagni2-6/+15
cb0b5594 Move OpenAlias console input back from libs (moneromooo-monero)
2017-08-07Merge pull request #2147Riccardo Spagni1-26/+86
94717021 fix on_battery_power for linux (Ryan Mehta)
2017-08-07cryptonote_protocol_handler: sync speedupmoneromooo-monero1-0/+1
A block queue is now placed between block download and block processing. Blocks are now requested only from one peer (unless starved). Includes a new sync_info coommand.
2017-08-02difficulty: fix misleading commentGuillaume LE VAILLANT1-2/+2
2017-07-31some include cleanupmoneromooo-monero1-1/+0
2017-07-31miner: fix ignoring battery from command linemoneromooo-monero1-1/+1
2017-07-27Move OpenAlias console input back from libsmoneromooo-monero2-6/+15
Library code should definitely not ask for console input unless it's clearly an input function. Delegating the user interaction part to the caller means it can now be used by a GUI, or have a decision algorithm better adapted to a particular caller.
2017-07-12miner: fix background mining options parsingmoneromooo-monero1-2/+2
They were set as uint8_t, which boost was apparently treating as a character type, rather than a numeric type
2017-07-06fix on_battery_power for linuxRyan Mehta1-26/+86
fix ac/battery linux
2017-06-08Add OSX background miningjethro2-1/+43
Implements miner::get_system_times, miner::get_process_time and miner::on_battery_power for OSX so that background mining works on OSX.
2017-05-23changed crypto to cncrypto so it generated libcncryptoGentian1-1/+1
fix a cmakelist
2017-04-24Merge pull request #1938Riccardo Spagni2-2/+4
bff90264 Add expected total reward to RPC "getblocktemplate". Only works from V5 fork onward - returns 0 before that block. (assylias)
2017-04-19Add expected total reward to RPC "getblocktemplate".assylias2-2/+4
Only works from V5 fork onward - returns 0 before that block.
2017-04-11Simplified the implementation and features of spanLee Clagett1-7/+22
2017-04-11Improvements for epee binary to hex functions:Lee Clagett2-17/+8
- Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
2017-04-11Merge pull request #1955Riccardo Spagni2-7/+1
5b632468 core: fix blob size cache, and reenable hash and blob size caches (moneromooo-monero)
2017-04-11Merge pull request #1946Riccardo Spagni1-0/+2
a38343bf miner: add a debug log in pause and resume (moneromooo-monero)
2017-04-03core: fix blob size cache, and reenable hash and blob size cachesmoneromooo-monero2-7/+1
2017-03-31miner: add a debug log in pause and resumemoneromooo-monero1-0/+2
2017-03-28Add other possible paths of AC power status file on LinuxGuillaume LE VAILLANT1-3/+5
2017-03-26core: disable tx/block hash cachemoneromooo-monero1-0/+6
Looks like it doesn't work on win64
2017-03-25core: avoid possible reordering bugs wth tx/bloch hash cachemoneromooo-monero3-28/+42
2017-03-23core: cache tx and block hashes in the respective classesmoneromooo-monero4-2/+114
An idea from smooth
2017-03-17wallet-rpc: enable openaliasstoffu2-2/+6
2017-03-15Add intervening v5 fork for increased min block sizemoneromooo-monero2-1/+11
Minimum mixin 4 and enforced ringct is moved from v5 to v6. v5 is now used for an increased minimum block size (from 60000 to 300000) to cater for larger typical/minimum transaction size. The fee algorithm is also changed to decrease the base per kB fee, and add a cheap tier for those transactions which we do not care if they get delayed (or even included in a block).