aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-25Merge pull request #4423v0.13.0.0-RC1Riccardo Spagni1-1/+1
357441a2 add checkpoints for testnet and mainnet (Riccardo Spagni) d9f666d7 update checkpoints.dat (Riccardo Spagni) 6b1b4e83 update version to 13.0 (Riccardo Spagni) 6f153533 update readme with v13.0 (Riccardo Spagni)
2018-09-24blockchain: add stagenet v8 and v9, two weeks before mainnetmoneromooo-monero1-0/+2
2018-09-23update checkpoints.datRiccardo Spagni1-1/+1
2018-09-21Merge pull request #4369Riccardo Spagni1-7/+2
b2bb9312 blockchain: simplify output distribution code (moneromooo-monero) befdcbf4 db_lmdb: do not use base for cumulative distribution (moneromooo-monero)
2018-09-18Merge pull request #4325Riccardo Spagni1-0/+6
4e1e9a60 blockchain: add mainnet v8 height targetting 18 october (moneromooo-monero)
2018-09-14remove obsolete daemon selection of fake outs and old tx constructionmoneromooo-monero1-242/+0
2018-09-12blockchain: simplify output distribution codemoneromooo-monero1-7/+2
2018-09-11blockchain: add a testnet v9 a day after v8moneromooo-monero1-0/+1
So that bulletproofs become mandatory
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero1-122/+175
2018-09-11Bulletproof aggregated verification and testsmoneromooo-monero1-8/+7
Also constrains bulletproofs to simple rct, for simplicity
2018-09-11bulletproofs: add aggregated verificationmoneromooo-monero1-1/+1
Ported from sarang's java code
2018-09-11bulletproofs: add multi output bulletproofs to rctmoneromooo-monero1-0/+16
2018-09-02blockchain: add mainnet v8 height targetting 18 octobermoneromooo-monero1-0/+6
and v9 a day later
2018-08-22Merge pull request #4240luigi11111-1/+1
83f5587 blockchain: use uint64_t for height, not size_t (moneromooo-monero)
2018-08-22Merge pull request #4204luigi11111-4/+8
b278b83 core: sync database based on bytes added, not blocks added (moneromooo-monero)
2018-08-16core: cache block template where possiblemoneromooo-monero1-1/+43
This avoids constant rechecking of the same things each time a miner asks for the block template. The tx pool maintains a cookie to allow users to detect when the pool state changed, which means the block template needs rebuilding.
2018-08-15Merge pull request #4164luigi11111-15/+19
8e24533 blockchain: some batch tx scanning speedup (moneromooo-monero)
2018-08-12core: sync database based on bytes added, not blocks addedmoneromooo-monero1-4/+8
Blocks have a very wide range, whereas actual size is the relevant quantity to consider when syncing
2018-08-09blockchain: use uint64_t for height, not size_tmoneromooo-monero1-1/+1
2018-07-27Merge pull request #4108luigi11111-0/+1
8c05237 blockchain: cache next block difficulty after adding a block (moneromooo-monero)
2018-07-21blockchain: some batch tx scanning speedupmoneromooo-monero1-15/+19
2018-07-19Merge pull request #4081luigi11111-1/+2
d95bc44 blockchain: fix getting invalid block data on failure (moneromooo-monero)
2018-07-19Merge pull request #4076luigi11111-0/+2
aa0ea0a blockchain: set the m_verifivation_failed flag in a couple more places (moneromooo-monero)
2018-07-19Merge pull request #3981luigi11111-5/+34
45e419b db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
2018-07-19Merge pull request #3973luigi11111-5/+6
50af357 alt_chain_info can now give more info about a particular alt chain (moneromooo-monero)
2018-07-19Merge pull request #3854luigi11111-1/+45
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-07-13db: store cumulative rct output distribution in the db for speedmoneromooo-monero1-5/+34
This gets rid of the temporary precalc cache. Also make the RPC able to send data back in binary or JSON, since there can be a lot of data This bumps the LMDB database format to v3, with migration.
2018-07-07blockchain: cache next block difficulty after adding a blockmoneromooo-monero1-0/+1
It's not 100% certain it'll be needed, but it avoids getinfo needing the blockchain lock and potentially blocking
2018-06-29blockchain: fix getting invalid block data on failuremoneromooo-monero1-1/+2
2018-06-29add --regtest and --fixed-difficulty for regression testingvictorsintnicolaas1-1/+45
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-28blockchain: set the m_verifivation_failed flag in a couple more placesmoneromooo-monero1-0/+2
when a block being added to the main chain is invalid. This ensures the peer is banned after a number of these.
2018-06-28blockchain: fix build after waiter::wait prototype changemoneromooo-monero1-1/+1
2018-06-27Merge pull request #3986luigi11111-2/+2
b628503 Remove old logic saved in comments. (jeandudey)
2018-06-27Merge pull request #3982luigi11111-12/+1
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-27Merge pull request #3716luigi11111-46/+74
a2b557f 6795bd0 209ec96 ed2c81e a830db2 57ea902 31a895e ba8331c f7f1917 41be339 f025ae9 ef2cb63 dcfd299 5d3e702 2704624 2771a18 0e4c7d0 (moneromooo-monero)
2018-06-26threadpool: allow leaf functions to run concurrentlymoneromooo-monero1-6/+6
Decrease the number of worker threads by one to account for the fact the calling thread acts as a worker thread now
2018-06-26blockchain: simplify/speedup handle_get_objectsmoneromooo-monero1-13/+8
2018-06-26rpc: rework to avoid repeated calculations in get_blocks.binmoneromooo-monero1-6/+15
2018-06-26replace std::list with std::vector on some hot pathsmoneromooo-monero1-21/+45
also use reserve where appropriate
2018-06-26alt_chain_info can now give more info about a particular alt chainmoneromooo-monero1-5/+6
2018-06-25Merge pull request #3975luigi11111-1/+1
2d5921e blockchain: avoid duplicate db query for height (moneromooo-monero)
2018-06-20Merge pull request #3919luigi11111-1/+1
ace2eda blockchain: pop forked blocks only when DB is not read-only (stoffu)
2018-06-20Merge pull request #3904luigi11111-6/+13
4f3a4fb blockchain: return error when requesting non existent output (moneromooo-monero)
2018-06-16Merge pull request #3732luigi11111-1/+1
fa0839f Ensure m_timestamps has the correct number for computing difficulty. (thaerkh)
2018-06-16Merge pull request #3726luigi11111-8/+11
b5cb1bc blockchain: avoid exception if asked for a block we do not have (moneromooo-monero)
2018-06-12Merge pull request #3687luigi11111-3/+3
6b13976 blockchain: log in DEBUG when a block is found, and where (moneromooo-monero)
2018-06-11Remove old logic saved in comments.Jean Pierre Dudey1-2/+2
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-06-11cryptonote_config: add get_config to refactor x = testnet ? ↵stoffu1-12/+1
config::testnet::X : stagenet ? config::stagenet::X : config::X
2018-06-09blockchain: avoid duplicate db query for heightmoneromooo-monero1-1/+1
2018-06-08Merge pull request #3908luigi11111-1/+1
827ca3f bump version for 0.12.2 point release (fluffypony) 95ccf50 update checkpoints.dat for point release (fluffypony)
2018-06-07Merge pull request #3940luigi11111-8/+12
f24cbc5 blockchain: fix deadlock with the difficulty cache (moneromooo-monero)
2018-06-06blockchain: fix deadlock with the difficulty cachemoneromooo-monero1-8/+12
2018-06-04blockchain: pop forked blocks only when DB is not read-onlystoffu1-1/+1
2018-06-02blockchain: demote a hash-of-hashes validation warning to debugmoneromooo-monero1-1/+1
This data comes from untrusted peers, and validation failures are therefore normal.
2018-06-02update checkpoints.dat for point releaseRiccardo Spagni1-1/+1
2018-06-01blockchain: return error when requesting non existent outputmoneromooo-monero1-6/+13
avoids RPC thread dying, causing the wallet to timeout
2018-05-30Merge pull request #3525luigi11111-0/+1
66a659b blockchain: add scope guard to waiter for threaded txv1 verification (stoffu)
2018-05-30Merge pull request #3731luigi11111-4/+10
a66f152 Use median timestamp if current time renders a block invalid. (thaerkh)
2018-05-29Merge pull request #3251luigi11111-6/+9
b9389e5 db_lmdb: save pruned and prunable tx data separately (moneromooo-monero)
2018-05-29Merge pull request #3420luigi11111-3/+18
a6a54fa blockchain: cache difficulty for next block (moneromooo-monero)
2018-05-23db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero1-6/+9
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-23update checkpointsRiccardo Spagni1-1/+1
2018-05-21Merge pull request #3787Riccardo Spagni1-0/+6
ce63ab09 blockchain: invalidate misc caches when popping blocks (moneromooo-monero)
2018-05-21speed up get_output_distribution (and precalc common case)moneromooo-monero1-17/+2
2018-05-13Use median timestamp if current time renders a block invalid.Thaer Khawaja1-4/+10
2018-05-09blockchain: avoid exception if asked for a block we do not havemoneromooo-monero1-8/+11
This can happen if a peer tries to obtain the next span from other peers if that span is needed for not downloaded yet. Also if the peer maliciously requests a non existent block hash.
2018-05-09blockchain: invalidate misc caches when popping blocksmoneromooo-monero1-0/+6
Might be a bit heavy handed, but conservative.
2018-05-06blockchain: pop top if block version disagrees with the ideal fork versionstoffu1-0/+47
2018-04-29Ensure m_timestamps has the correct number for computing difficulty.Thaer Khawaja1-1/+1
2018-04-23blockchain: log in DEBUG when a block is found, and wheremoneromooo-monero1-3/+3
Eases up debugging
2018-04-23speedup get_output_histogram for all amounts when min_count > 0moneromooo-monero1-2/+2
This skips the vast majority of "dust" output amounts with just one instance on the chain. Clocks in at 0.15% of the original time on testnet.
2018-03-30blockchain: add scope guard to waiter for threaded txv1 verificationstoffu1-0/+1
2018-03-24update block hashes for checkpoints.datRiccardo Spagni1-1/+1
2018-03-19blockchain: cache difficulty for next blockmoneromooo-monero1-3/+18
Takes about 10 ms, which takes pretty much all of the get_info RPC, which is called pretty often from wallets. Also add a new lock so we don't need to lock the blockchain lock, which will avoid blocking for a long time when calling the getinfo RPC while syncing. Users of get_difficulty_for_next_block who need the lock will have locked it already.
2018-03-18Move v7 fork to 1546000 to give more update timemoneromooo-monero1-2/+2
2018-03-17Merge pull request #3418Riccardo Spagni1-1/+2
20a00266 blockchain: forbid bulletproof types before v8 (moneromooo-monero)
2018-03-16blockchain: forbid bulletproof types before v8moneromooo-monero1-1/+2
They were already forbidden implicitely, but let's make that explicit for robustness
2018-03-16Merge pull request #3414Riccardo Spagni1-1/+1
524cbdc1 blockchain: fix log message about per-kB fee (stoffu)
2018-03-16Merge pull request #3336Riccardo Spagni1-2/+2
57c0b1ed Fix typos in various files (Dimitris Apostolou)
2018-03-16add RPC to get a histogram of outputs of a given amountmoneromooo-monero1-1/+45
2018-03-16blockchain: fix log message about per-kB feestoffu1-1/+1
2018-03-15Fix typos in various filesDimitris Apostolou1-2/+2
2018-03-14Remove the `Blockchain::get_all_known_block_ids` function.Jean Pierre Dudey1-19/+0
This function isn't used in the codebase. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-03-14Merge pull request #3371Riccardo Spagni1-0/+3
84decbea core: add v7 for 1539500 on mainnet (moneromooo-monero)
2018-03-09Stagenet: successive forks up to v7stoffu1-0/+8
2018-03-07core: add v7 for 1539500 on mainnetmoneromooo-monero1-0/+3
2018-03-07Bump min ring size from 5 to 7 from v7moneromooo-monero1-1/+1
2018-03-05Merge pull request #3308Riccardo Spagni1-1/+4
6f8779d2 blockchain: fix random sync failures (moneromooo-monero)
2018-03-05Merge pull request #3277Riccardo Spagni1-20/+39
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-2/+2
2018-03-05Stagenetstoffu1-20/+39
2018-02-23blockchain: fix random sync failuresmoneromooo-monero1-1/+4
When a block is added as part of a chunk (when syncing historical blocks), a block may end up already in the blockchain if it was added to the queue before being added to the chain (though it's not clear how that could happen, but it's an implementation detail) and thus may not be added to the chain when add_block is called. This would cause m_blocks_txs_check to not be cleared, causing it to get out of sync at next call, and thus wrongfully reject the next block.
2018-02-16Merge pull request #3226Riccardo Spagni1-1/+6
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 #3248Riccardo Spagni1-0/+4
d6a0ae96 blockchain: don't try to use hash check array after it's freed (moneromooo-monero)
2018-02-10blockchain: don't try to use hash check array after it's freedmoneromooo-monero1-0/+4
It's freed when we've synced past its end, but we might still find an old chain somewhere
2018-02-02blockchain: sanity check number of precomputed hash of hash blocksmoneromooo-monero1-1/+6
Coverity 142951
2018-01-31blockchain: move bulletproofs to v8moneromooo-monero1-4/+5
and set v7 height to 1057027 on testnet (one block earlier) This is to easily dump current nodes since we're going to change the v7 rules with this.
2018-01-27Merge pull request #3144Riccardo Spagni1-1/+8
42f86624 rpc: expose recent median block size in getinfo (moneromooo-monero)
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-25Merge pull request #3014Riccardo Spagni1-1/+1
deeffaeb blockchain: remove minor floating point usage (moneromooo-monero)
2018-01-17rpc: expose recent median block size in getinfomoneromooo-monero1-1/+8
2018-01-10blockchain: remove minor floating point usagemoneromooo-monero1-1/+1
2018-01-10Merge pull request #2971Riccardo Spagni1-2/+2
ae860230 Fix exceptions not finding txpool txes when relaying (moneromooo-monero)
2017-12-20Fix exceptions not finding txpool txes when relayingmoneromooo-monero1-2/+2
2017-12-18cryptonote_core: remove unused functions with off by one bugsmoneromooo-monero1-43/+0
2017-12-18blockchain: don't leave dangling pointers in thismoneromooo-monero1-0/+2
2017-12-18cryptonote_core: fix db leak on errormoneromooo-monero1-0/+1
2017-12-18check accessing an element past the end of a containermoneromooo-monero1-4/+6
2017-12-18fix a few leaks by throwing objects, not newed pointers to objectsmoneromooo-monero1-1/+1
2017-12-16Merge pull request #2878Riccardo Spagni1-5/+6
abebe392 rpc: add offline state in info rpc (moneromooo-monero) 7696e849 core: make --offline also disable DNS lookups (moneromooo-monero)
2017-12-08add bulletproofs from v7 on testnetmoneromooo-monero1-9/+26
2017-11-30core: make --offline also disable DNS lookupsmoneromooo-monero1-5/+6
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-14Merge pull request #2615Riccardo Spagni1-4/+4
10013e94 Protect node privacy by proper filtering in restricted-mode RPC answers (binaryFate)
2017-11-08Protect node privacy by proper filtering in restricted-mode RPC answersbinaryFate1-4/+4
This patch allows to filter out sensitive information for queries that rely on the pool state, when running in restricted mode. This filtering is only applied to data sent back to RPC queries. Results of inline commands typed locally in the daemon are not affected. In practice, when running with `--restricted-rpc`: * get_transaction_pool will list relayed transactions with the fields "last relayed time" and "received time" set to zero. * get_transaction_pool will not list transaction that have do_not_relay set to true, and will not list key images that are used only for such transactions * get_transaction_pool_hashes.bin will not list such transaction * get_transaction_pool_stats will not count such transactions in any of the aggregated values that are computed The implementation does not make filtering the default, so developers should be mindful of this if they add new RPC functionality. Fixes #2590.
2017-11-06track double spending in the txpoolmoneromooo-monero1-6/+6
Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions).
2017-10-30blockchain: do not lock the blockchain lock for simple DB gettersmoneromooo-monero1-7/+28
It is safe in those cases, though might return slightly out of date information if another thread is busy modifying the blockchain, but it avoids potentially lengthy delays just to get things like the current blockchain height.
2017-10-15Merge pull request #2656Riccardo Spagni1-3/+3
3492de01 fix lightwallet and subaddresses conflict (Jaquee) 329f149e remove reference to cryptonote::null_hash (Jaquee)
2017-10-15remove reference to cryptonote::null_hashJaquee1-3/+3
2017-10-15Merge pull request #2640Riccardo Spagni1-2/+12
22b51e06 db_lmdb: include chain height when failing to find an output key (moneromooo-monero) 5db433b3 blockchain: avoid exceptions in output verification (moneromooo-monero)
2017-10-15Merge pull request #2552Riccardo Spagni1-9/+18
69ce33f2 core: fix failure to sync when a tx is already in the pool (moneromooo-monero)
2017-10-15Merge pull request #2469Riccardo Spagni1-9/+119
7adceee6 precomputed block hashes are now in blocks of N (currently 256) (moneromooo-monero)
2017-10-12blockchain: avoid exceptions in output verificationmoneromooo-monero1-2/+12
This can happen if we get a bad tx, so let's not spam the log.
2017-10-06Merge pull request #2537Riccardo Spagni1-2/+2
269a2a01 blockchain: fix off by one getting blocks (moneromooo-monero)
2017-09-29core: fix failure to sync when a tx is already in the poolmoneromooo-monero1-9/+18
2017-09-27core: remove out sorting from v7 rulesmoneromooo-monero1-20/+0
and restore random shuffle of outputs This turned out to have a flaw (sort order depends on output index), and this doesn't really bring much anyway
2017-09-27blockchain: fix off by one getting blocksmoneromooo-monero1-2/+2
2017-09-25move checkpoints in a separate librarymoneromooo-monero1-1/+0
2017-09-25Merge pull request #2457Riccardo Spagni1-1/+10
d2d8a41c Use actual batch size for resize estimates (Howard Chu)
2017-09-25Merge pull request #2440Riccardo Spagni1-0/+39
6137a0b9 blockchain: reject unsorted ins and outs from v7 (moneromooo-monero) 16afab90 core: sort ins and outs key key image and public key, respectively (moneromooo-monero) 0c36b9f9 common: add apply_permutation file and function (moneromooo-monero)
2017-09-20blockchain: fix crash checking pre-validated txidsmoneromooo-monero1-2/+2
2017-09-18precomputed block hashes are now in blocks of N (currently 256)moneromooo-monero1-9/+119
This shaves a lot of space off binaries
2017-09-18Merge pull request #2446Riccardo Spagni1-56/+16
6d0ca7d1 Tweak concurrency limits (Howard Chu) 510d0d47 Use a threadpool (Howard Chu)
2017-09-18Merge pull request #2044Riccardo Spagni1-74/+129
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget) 77986023 json serialization for rpc-relevant monero types (Thomas Winget) 5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget) 9ac2ad07 DRY refactoring (Thomas Winget)
2017-09-18blockchain: reject unsorted ins and outs from v7moneromooo-monero1-0/+39
This ensures no information is leaked by the ordering
2017-09-17Use actual batch size for resize estimatesHoward Chu1-1/+10
And optimize import startup: Remember start_height position during initial count_blocks pass to avoid having to reread entire file again to arrive at start_height
2017-09-14Use a threadpoolHoward Chu1-56/+16
Instead of constantly creating and destroying threads
2017-09-06update checkpoint hashesRiccardo Spagni1-1/+1
2017-09-05json serialization for rpc-relevant monero typesThomas Winget1-1/+1
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
2017-09-05Refactor some things into more composable (smaller) functionsThomas Winget1-73/+123
This commit refactors some of the rpc-related functions in the Blockchain class to be more composable. This change was made in order to make implementing the new zmq rpc easier without trampling on the old rpc. New functions: Blockchain::get_num_mature_outputs Blockchain::get_random_outputs Blockchain::get_output_key Blockchain::get_output_key_mask_unlocked Blockchain::find_blockchain_supplement (overload) functions which previously had this functionality inline now call these functions as necessary.
2017-08-31DRY refactoringThomas Winget1-1/+6
2017-08-29Fix blockchain_import wedge on exception in cleanup_handle_incoming_blocksmoneromooo-monero1-3/+14
2017-08-27Merge pull request #2347Riccardo Spagni1-2/+7
5807529e blockchain: cap memory size of retrieved blocks (moneromooo-monero) c1b10381 rpc: decrease memory usage a bit in getblocks.bin (moneromooo-monero)
2017-08-26Merge pull request #2314Riccardo Spagni1-1/+18
c22d22e2 Cleanup test impact of adding safesyncmode() method (Howard Chu) 9a859844 Toggle SAFE syncmode on and off automatically (Howard Chu)
2017-08-26blockchain: cap memory size of retrieved blocksmoneromooo-monero1-2/+7
It helps keep memory usage down when a wallet refreshes through a string of large blocks
2017-08-20Toggle SAFE syncmode on and off automaticallyHoward Chu1-1/+18
If monerod is started with default sync mode, set it to SAFE after synchronization completes. Set it back to FAST if synchronization restarts (e.g. because another peer has a longer blockchain). If monerod is started with an explicit sync mode, none of this automation takes effect.
2017-08-18core: add mainnet v6 fork height at 1400000moneromooo-monero1-0/+3
2017-08-15protocol: pass blockchain cumulative difficulty when syncingmoneromooo-monero1-0/+1
Not used yet.
2017-08-15Merge pull request #2250Riccardo Spagni1-1/+3
f4f7eeba blockchain: log more info when we reject an orphan (moneromooo-monero)
2017-08-15Merge pull request #2246Riccardo Spagni1-11/+3
d732c73e blockchain: remove a few unused variables (moneromooo-monero)
2017-08-15Merge pull request #2237Riccardo Spagni1-8/+8
5d4ef719 core: speed up output index unique set calculation (moneromooo-monero) 19d7f568 perf_timer: allow profiling more granular than millisecond (moneromooo-monero) bda8c598 epee: add nanosecond timer and pause/restart profiling macros (moneromooo-monero)
2017-08-07change mixin to ring size in user visible placesmoneromooo-monero1-6/+6
2017-08-07Merge pull request #2225Riccardo Spagni1-0/+9
5d91b26c blockchain: skip checking tx semantics in embedded block hash range (moneromooo-monero)
2017-08-07Merge pull request #2243Riccardo Spagni1-0/+2
4d873046 blockchain: add testnet v6 fork height at 971400 (moneromooo-monero)
2017-08-07Merge pull request #2222Riccardo Spagni1-1/+2
878205f1 core: fix lock ordering bug at init time (moneromooo-monero)
2017-08-07Merge pull request #2216Riccardo Spagni1-6/+6
d8becf2e blockchain: fix cryptonight buffer leak on exit (moneromooo-monero) 91aa90fc blockchain: ensure all blocks get their longhash precalculated (moneromooo-monero) ff4bcaed blockchain: pass correct height to get_block_longhash (moneromooo-monero)
2017-08-07blockchain: add testnet v6 fork height at 971400moneromooo-monero1-0/+2
2017-08-04blockchain: log more info when we reject an orphanmoneromooo-monero1-1/+3
We want to know what happened when a block is wrongly rejected
2017-08-03blockchain: remove a few unused variablesmoneromooo-monero1-11/+3
2017-08-01core: speed up output index unique set calculationmoneromooo-monero1-8/+8
A sort+uniq step was done for every tx in a 200 block chunk, causing a lot of repeated scanning as the size of the offset map got larger with every added tx. We now do the step only once at the end of the loop. Doing it this way potentially uses more memory, but testing shows that it's currently only about 2% more.
2017-07-30blockchain: skip checking tx semantics in embedded block hash rangemoneromooo-monero1-0/+9
If the txes are bad, this'll be picked up by the block hash mismatch since the tx merkle root is part of the block hash.
2017-07-29core: fix lock ordering bug at init timemoneromooo-monero1-1/+2
2017-07-28blockchain: fix cryptonight buffer leak on exitmoneromooo-monero1-1/+1
2017-07-27blockchain: ensure all blocks get their longhash precalculatedmoneromooo-monero1-1/+3
If the number of blocks to check was not a multiple of the number of preparation threads, the last few blocks would not be included in the threaded long hash calculation. Those would still get calculated when the block gets added to the chain, however, so this was only a tiny performance hit, rather than a security bug.
2017-07-27blockchain: pass correct height to get_block_longhashmoneromooo-monero1-4/+2
2017-07-24blockchain: one off warning when seeing a block with unknown versionmoneromooo-monero1-0/+14
2017-06-11blockchain_db: add a txpool tx getter which returns existencemoneromooo-monero1-0/+5
Avoids exception spam for the "nope, not found" case
2017-06-01Don't copy blockchain for coinbase_tx_sumHoward Chu1-2/+2
Changed Blockchain::for_all_blocks() to for_blocks_range() Operate on blockchain in-place instead of building a copy first.
2017-05-30Merge pull request #1982Riccardo Spagni1-3/+71
b52abd13 Move txpool to the database (moneromooo-monero)
2017-05-25Move txpool to the databasemoneromooo-monero1-3/+71
Integration could go further (ie, return_tx_to_pool calls should not be needed anymore, possibly other things). poolstate.bin is now obsolete.
2017-04-24Merge pull request #1968Riccardo Spagni1-1/+3
5e5b8512 Fix obsolete OpenSSL API usage (hyc) 6c72d6a0 Fix Android recognition (hyc) e65d66fe Fix ARM64 identification (hyc) a4673218 Clean up ARMv8-a aes_expand_key() (hyc) a3d77901 Fix block_longhash_worker thread (hyc)
2017-04-19Add expected total reward to RPC "getblocktemplate".assylias1-2/+2
Only works from V5 fork onward - returns 0 before that block.
2017-04-12Fix block_longhash_worker threadhyc1-1/+3
Wasn't getting its stack size initialized; crashes on Android with a default stack size of 1MB.
2017-03-24Fixed typo in v5 hard fork finalized dateDerek Zhang1-1/+1
2017-03-24blockchain: offset v5 addition date on testnetmoneromooo-monero1-1/+1
to silence the update warning, since v5 was done very early on testnet
2017-03-20blockchain: lower the relay fee by 2%moneromooo-monero1-1/+1
This ensures we accept txes with a fee that's slightly too small, to accomodate blockchain median jitter
2017-03-15Add intervening v5 fork for increased min block sizemoneromooo-monero1-14/+19
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).
2017-03-05blockchain: don't try to load an empty block hash setmoneromooo-monero1-1/+1
If the blocks aren't being linked against a binary (such as one of the blockchain utilities), the symbol will not be NULL, but the size will be 0. This avoids a apurious warning about the data hash.
2017-03-03core: quantize per kB fee to 8 decimalsmoneromooo-monero1-1/+19
2017-02-23core: protect precomputed block hashes with SHA256moneromooo-monero1-1/+28
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-21Merge pull request #1727Riccardo Spagni1-22/+69
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
2017-02-21Merge pull request #1724Riccardo Spagni1-1/+1
cca95c1c blockchain_db: do not throw on expected partial results getting keys (moneromooo-monero)
2017-02-18Add a few read txns to streamlineHoward Chu1-0/+4
Slight perf gain, but mainly to reduce spam at loglevel 3
2017-02-13blockchain_db: add "raw" blobdata getters for block and transactionmoneromooo-monero1-22/+69
This speeds up operations such as serving blocks to syncing peers
2017-02-13blockchain_db: do not throw on expected partial results getting keysmoneromooo-monero1-1/+1
When scanning for outputs used in a set of incoming blocks, we expect that some of the inputs in their transactions will not be found in the blockchain, as they could be in previous blocks in that set. Those outputs will be scanned there at a later point. In this case, we add a flag to control wehther an output not being found is expected or not.
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-6/+5
2017-01-22Replace BOOST_REVERSE_FOREACH with ranged forMiguel Herranz1-1/+2
2017-01-22rpc: fix orphan_status when getting blocksmoneromooo-monero1-1/+5
It was always set to false, even for orphan blocks
2017-01-16Change logging to easylogging++moneromooo-monero1-128/+132
This replaces the epee and data_loggers logging systems with a single one, and also adds filename:line and explicit severity levels. Categories may be defined, and logging severity set by category (or set of categories). epee style 0-4 log level maps to a sensible severity configuration. Log files now also rotate when reaching 100 MB. To select which logs to output, use the MONERO_LOGS environment variable, with a comma separated list of categories (globs are supported), with their requested severity level after a colon. If a log matches more than one such setting, the last one in the configuration string applies. A few examples: This one is (mostly) silent, only outputting fatal errors: MONERO_LOGS=*:FATAL This one is very verbose: MONERO_LOGS=*:TRACE This one is totally silent (logwise): MONERO_LOGS="" This one outputs all errors and warnings, except for the "verify" category, which prints just fatal errors (the verify category is used for logs about incoming transactions and blocks, and it is expected that some/many will fail to verify, hence we don't want the spam): MONERO_LOGS=*:WARNING,verify:FATAL Log levels are, in decreasing order of priority: FATAL, ERROR, WARNING, INFO, DEBUG, TRACE Subcategories may be added using prefixes and globs. This example will output net.p2p logs at the TRACE level, but all other net* logs only at INFO: MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE Logs which are intended for the user (which Monero was using a lot through epee, but really isn't a nice way to go things) should use the "global" category. There are a few helper macros for using this category, eg: MGINFO("this shows up by default") or MGINFO_RED("this is red"), to try to keep a similar look and feel for now. Existing epee log macros still exist, and map to the new log levels, but since they're used as a "user facing" UI element as much as a logging system, they often don't map well to log severities (ie, a log level 0 log may be an error, or may be something we want the user to see, such as an important info). In those cases, I tried to use the new macros. In other cases, I left the existing macros in. When modifying logs, it is probably best to switch to the new macros with explicit levels. The --log-level options and set_log commands now also accept category settings, in addition to the epee style log levels.
2017-01-15Merge pull request #1577Riccardo Spagni1-0/+8
feb499aa core: check block version for alt chains too (moneromooo-monero)
2017-01-15Merge pull request #1576Riccardo Spagni1-6/+3
ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
2017-01-15Merge pull request #1571Riccardo Spagni1-8/+8
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15Merge pull request #1565Riccardo Spagni1-0/+2
50b230d1 core: ensure block size limit is set from the start (moneromooo-monero)
2017-01-15Merge pull request #1506Riccardo Spagni1-2/+12
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu) eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu) c903c554 Don't cache block height, always get from DB (Howard Chu) eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu) 0693cff9 Use batch transactions when syncing (Howard Chu)
2017-01-14Must wait for previous batch to finish before starting new oneHoward Chu1-1/+6
2017-01-14Use batch transactions when syncingHoward Chu1-2/+7
Faster throughput while avoiding corruption. I.e., makes running with --db-sync-mode safe more tolerable.
2017-01-14core: check block version for alt chains toomoneromooo-monero1-0/+8
This is incompatible with block version voting
2017-01-14rct: split rct checks between semantics and othermoneromooo-monero1-6/+3
Semantics can be checked early
2017-01-14fix do_not_relay not preventing relaying on a timermoneromooo-monero1-8/+8
Also print its value when printing pool