aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-10-18Merge pull request #1215Riccardo Spagni2-2/+2
a6bc110 patched parameter type bug that was causing failure on 32 bit (Dion Ahmetaj)
2016-10-15wallet: select part of the fake outs from recent outputsmoneromooo-monero2-3/+4
25% of the outputs are selected from the last 5 days (if possible), in order to avoid the common case of sending recently received outputs again. 25% and 5 days are subject to review later, since it's just a wallet level change.
2016-10-14patched parameter type bug that was causing failure on 32 bitDion Ahmetaj2-2/+2
2016-10-11Merge pull request #1203Riccardo Spagni2-0/+5
4038e86 Add performance timers for ringct tx verification (moneromooo-monero) 74dfdb0 perf_timer: new class and macros to make performance logs easier (moneromooo-monero)
2016-10-11Merge pull request #1204Riccardo Spagni2-0/+35
7db29d6 print_coinbase_tx_sum now breaks output into fee and emission components (Dion Ahmetaj) dd6c443 changed params from start/end index to height/count (Dion Ahmetaj) e95d3f3 attempted to remove whitespace spam (Dion Ahmetaj) 412da63 added print_coinbase_tx_sum option (Dion Ahmetaj)
2016-10-10print_coinbase_tx_sum now breaks output into fee and emission componentsDion Ahmetaj2-6/+20
2016-10-10changed params from start/end index to height/countDion Ahmetaj2-4/+4
2016-10-10attempted to remove whitespace spamDion Ahmetaj1-1/+1
2016-10-10Add performance timers for ringct tx verificationmoneromooo-monero2-0/+5
2016-10-10added print_coinbase_tx_sum optionDion Ahmetaj2-1/+22
2016-10-08core: remove some unused codemoneromooo-monero1-3/+0
2016-10-04Merge pull request #1177Riccardo Spagni1-1/+1
3644aa9 blockchain: avoid using a reference to a temporary (moneromooo-monero)
2016-10-04Merge pull request #1139Riccardo Spagni1-2/+2
01ec195 Update CMakeLists.txt (codehalo) 446ebbc Update CMakeLists.txt (codehalo) bd773e7 Update CMakeLists.txt (codehalo) 3627cea Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 2a51396 Dropped "bit" from bitmonero. (Randi Joseph) 78b13d6 Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 1e6aedb Cleanup. Dropped "bit" from bitmonero. (Randi Joseph) 9e54616 Dropped "bit" from bitmonero. (Randi Joseph)
2016-10-04Merge pull request #1133Riccardo Spagni1-4/+1
cec090f Revert "Fix fake 'network synchronized, begin using' messages" (moneromooo-monero)
2016-10-04Merge pull request #1123Riccardo Spagni1-8/+0
0d036be blockchain: do not reject chain histories matching only genesis (moneromooo-monero)
2016-10-04Merge pull request #1171Riccardo Spagni2-36/+1
6390673 Removed all code related to fast_exit (NanoAkron)
2016-10-04Merge pull request #1168Riccardo Spagni4-13/+32
10be903 Brackets to prevent premature return (NanoAkron) fb1785a Brackets to ensure doesn't function prematurely return (NanoAkron) 8ed0d72 Moved logging to target functions rather than caller (NanoAkron) 442bfd1 Added messages at log level 2 to reflect deactivation procedure (NanoAkron)
2016-10-04Merge pull request #1140Riccardo Spagni2-9/+30
bba6af9 wallet: cold wallet transaction signing (moneromooo-monero) 9872dcb wallet: fix log confusion between bytes and kilobytes (moneromooo-monero) d9b0bf9 cryptonote_core: make extra field removal more generic (moneromooo-monero) 98f19d4 serialization: add support for serializing std::pair and std::list (moneromooo-monero)
2016-10-04Brackets to prevent premature returnNanoAkron1-0/+2
2016-10-04Brackets to ensure doesn't function prematurely returnNanoAkron1-0/+2
2016-10-03blockchain: avoid using a reference to a temporarymoneromooo-monero1-1/+1
2016-10-03Moved logging to target functions rather than callerNanoAkron4-17/+28
2016-10-03Removed all code related to fast_exitNanoAkron2-36/+1
2016-10-02Added messages at log level 2 to reflect deactivation procedureNanoAkron1-0/+4
2016-09-27wallet: cold wallet transaction signingmoneromooo-monero2-5/+26
This change adds the ability to create a new unsigned transaction from a watch only wallet, and save it to a file. This file can then be moved to another computer/VM where a cold wallet may load it, sign it, and save it. That cold wallet does not need to have a blockchain nor daemon. The signed transaction file can then be moved back to the watch only wallet, which can load it and send it to the daemon. Two new simplewallet commands to use it: sign_transfer (on the cold wallet) submit_transfer (on the watch only wallet) The transfer command used on a watch only wallet now writes an unsigned transaction set in a file called 'unsigned_monero_tx' instead of submitting the tx to the daemon as a normal wallet does. The signed tx file is called 'signed_monero_tx'.
2016-09-26cryptonote_core: make extra field removal more genericmoneromooo-monero2-4/+4
2016-09-26Dropped "bit" from bitmonero.Randi Joseph1-2/+2
2016-09-25Revert "Fix fake 'network synchronized, begin using' messages"moneromooo-monero1-4/+1
This reverts commit 78035d2b6c9922f4cd730df0766aa74f4854ccb2. The patch doesn't work, and causes constant SYNCHRONIZED OK spam.
2016-09-24core: make the sync chunk block count overridablemoneromooo-monero2-0/+14
2016-09-24blockchain: do not reject chain histories matching only genesismoneromooo-monero1-8/+0
This is fine if our local chain is so small that it is entirely contained within the last jump in the peer's short chain history.
2016-09-18fix v5 heightRiccardo Spagni1-1/+1
2016-09-18fix v5 fork date descriptionRiccardo Spagni1-1/+1
2016-09-18updated fork heights for v4 and v5Riccardo Spagni1-0/+7
2016-09-18add checkpointsRiccardo Spagni1-0/+2
2016-09-18Merge pull request #1094Riccardo Spagni1-3/+3
06bb692 cmake: support BUILD_SHARED_LIBS built-in option (redfish) e1c7af3 cmake: transitive deps and remove deprecated LINK_* (redfish) 54010b9 crypto: armv7: slow-hash: remove redundant source include (redfish)
2016-09-18miner: do not try to save config if the path isn't setmoneromooo-monero1-1/+2
This saves on an exception dump when trying to write to / after finding a block.
2016-09-18cmake: transitive deps and remove deprecated LINK_*redfish1-3/+3
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
2016-09-15compile errors fixed when PER_BLOCK_CHECKPOINT not definedrckngOpossum1-1/+3
2016-09-15compile errors fixed when DEBUG_CREATE_BLOCK_TEMPLATE definedrckngOpossum3-2/+8
2016-09-14rct: rework serialization to avoid storing vector sizesmoneromooo-monero3-22/+56
2016-09-14core: cleanup some typecastingmoneromooo-monero1-4/+4
2016-09-03fix nigglies, as pointed out by moneromooo-moneroRiccardo Spagni1-1/+1
2016-09-03fix remaining bitmonero and simplewallet bitsRiccardo Spagni1-2/+2
2016-09-01Merge pull request #1022Riccardo Spagni2-6/+5
b8c03a5 Remove blocks_per_sync limits (Howard Chu)
2016-08-31core: faster find_blockchain_supplementmoneromooo-monero1-6/+2
Since this queries block heights for blocks that may or may not exist, queries for non existing blocks would throw an exception, and that would slow down the loop a lot. 7 seconds to go through a 30 hash list. Fix this by adding an optional return block height to block_exists and using this instead. Actual errors will still throw an exception. This also cuts down on log exception spam.
2016-08-31Remove blocks_per_sync limitsHoward Chu2-6/+5
The code used to cap at 5000 blocks per sync. It also treated 0 as 1. Remove these checks; if specified as 0 do no periodic syncs at all. Then the user is responsible for syncing in some external process.
2016-08-29Merge pull request #1002Riccardo Spagni1-1/+6
91ca0b4 core: allow empty global indices for txes with empty vout (moneromooo-monero)
2016-08-29core: allow empty global indices for txes with empty voutmoneromooo-monero1-1/+6
2016-08-28Merge pull request #999Riccardo Spagni1-13/+14
dc411ea Change default db-sync-mode to fast, not fastest (Howard Chu)
2016-08-28blockchain: testnet heights for v3, v4, and v5moneromooo-monero1-0/+4
2016-08-28core: use full rct signatures if just one inputmoneromooo-monero1-1/+4
It is slightly smaller, but requires all rings to have the real input on the same index, so can only be used for single input txes.
2016-08-28wallet: transfer_selected_rct now also selects fake outsmoneromooo-monero1-2/+2
2016-08-28increase minimum mixin to 4 on hard fork 5moneromooo-monero1-2/+3
2016-08-28core: allow v1 txes after HF 5 when sweeping unmixable outputsmoneromooo-monero2-16/+19
2016-08-28New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero5-19/+34
When RingCT is enabled, outputs from coinbase transactions are created as a single output, and stored as RingCT output, with a fake mask. Their amount is not hidden on the blockchain itself, but they are then able to be used as fake inputs in a RingCT ring. Since the output amounts are hidden, their "dustiness" is not an obstacle anymore to mixing, and this makes the coinbase transactions a lot smaller, as well as helping the TXO set to grow more slowly. Also add a new "Null" type of rct signature, which decreases the size required when no signatures are to be stored, as in a coinbase tx.
2016-08-28rct amount key modified as per luigi1111's recommendationsmoneromooo-monero2-5/+10
This allows the key to be not the same for two outputs sent to the same address (eg, if you pay yourself, and also get change back). Also remove the key amounts lists and return parameters since we don't actually generate random ones, so we don't need to save them as we can recalculate them when needed if we have the correct keys.
2016-08-28rct: rework v2 txes into prunable and non prunable datamoneromooo-monero4-20/+69
Nothing is pruned, but this allows easier changes later.
2016-08-28rct: rework the verification preparation processmoneromooo-monero3-133/+114
The whole rct data apart from the MLSAGs is now included in the signed message, to avoid malleability issues. Instead of passing the data that's not serialized as extra parameters to the verification API, the transaction is modified to fill all that information. This means the transaction can not be const anymore, but it cleaner in other ways.
2016-08-28rct: change the simple flag to a typemoneromooo-monero3-11/+22
for future expansion
2016-08-28rct: avoid the need for the last II elementShen Noether2-18/+9
This element is used in the generation of the MLSAG, but isn't needed in verification. Also misc changes in the cryptonote code to match, by mooo.
2016-08-28wallet: do not store signatures in the wallet cachemoneromooo-monero4-1/+17
Saves some substantial space. Also avoid calculating tx hashes we don't need.
2016-08-28core: add some locking around pool usemoneromooo-monero2-1/+4
2016-08-28rct: do not serialize senderPk - it is not used anymoremoneromooo-monero1-1/+1
2016-08-28tx_pool: log why a transaction was rejected for version checksmoneromooo-monero1-0/+3
2016-08-28change fork settings to allow pre-rct txes for one more fork cyclemoneromooo-monero2-3/+8
2016-08-28rct: make the amount key derivable by a third party with the tx keymoneromooo-monero1-7/+3
Scheme design from luigi1114.
2016-08-28rct: do not serialize public keys in outPkmoneromooo-monero3-13/+53
They can be reconstructed from vout
2016-08-28core: always use the new simple rct variantmoneromooo-monero1-1/+1
2016-08-28port get_tx_key/check_tx_key to rctmoneromooo-monero2-5/+15
2016-08-28integrate simple rct apimoneromooo-monero4-102/+229
2016-08-28ringct: "simple" ringct variantShen Noether1-0/+13
Allows the fake outs to be in different positions for each ring. For rct inputs only.
2016-08-28mixable transactions must be rct for v3moneromooo-monero2-6/+29
2016-08-28Condition v2 txes on v3 hard forkmoneromooo-monero2-1/+12
2016-08-28move the rct commitments to the output_amounts databasemoneromooo-monero1-23/+2
Since these are needed at the same time as the output pubkeys, this is a whole lot faster, and takes less space. Only outputs of 0 amount store the commitment. When reading other outputs, a fake commitment is regenerated on the fly. This avoids having to rewrite the database to add space for fake commitments for existing outputs. This code relies on two things: - LMDB must support fixed size records per key, rather than per database (ie, all records on key 0 are the same size, all records for non 0 keys are same size, but records from key 0 and non 0 keys do have different sizes). - the commitment must be directly after the rest of the data in outkey and output_data_t.
2016-08-28rct: add the tx prefix hash into the MLSAGmoneromooo-monero1-3/+4
to protect the non-signatures parts of the tx from tampering.
2016-08-28ringct: do not serialize what can be reconstructedmoneromooo-monero2-24/+81
The mixRing (output keys and commitments) and II fields (key images) can be reconstructed from vin data. This saves some modest amount of space in the tx.
2016-08-28Use the supplied hard fork version in validate_miner_transactionmoneromooo-monero1-1/+1
rather than using the current one. No functional changes, but may save some bugs in the future.
2016-08-28add rct to the protocolmoneromooo-monero8-149/+451
It is not yet constrained to a fork, so don't use on the real network or you'll be orphaned or rejected.
2016-08-28make rct tx serialization workmoneromooo-monero1-0/+56
It may be suboptimal, but it's a pain to have to rebuild everything when some of this changes. Also, no clue why there seems to be two different code paths for serializing a tx...
2016-08-28core: link against libringctmoneromooo-monero1-0/+1
2016-08-28core: new /getrandom_rctouts.bin binary RPC callmoneromooo-monero4-0/+136
to get random ringct outputs to mix with
2016-08-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero8-2404/+0
2016-08-28Change default db-sync-mode to fast, not fastestHoward Chu1-13/+14
2016-08-23Fix fake 'network synchronized, begin using' messagesThomas Winget1-1/+4
2016-08-12daemon: print time to next forkmoneromooo-monero3-0/+26
2016-08-11Fake outs set is now decided by the walletmoneromooo-monero4-0/+46
This plugs a privacy leak from the wallet to the daemon, as the daemon could previously see what input is included as a transaction input, which the daemon hadn't previously supplied. Now, the wallet requests a particular set of outputs, including the real one. This can result in transactions that can't be accepted if the wallet happens to select too many outputs with non standard unlock times. The daemon could know this and select another output, but the wallet is blind to it. It's currently very unlikely since I don't think anything uses non default unlock times. The wallet requests more outputs than necessary so it can use spares if any of the returns outputs are still locked. If there are not enough spares to reach the desired mixin, the transaction will fail.
2016-08-01new unlocked parameter to output_histogrammoneromooo-monero2-3/+4
This constrains the number of instances of any amount to the unlocked ones (as defined by the default unlock time setting: outputs with non default unlock time are not considered, so may be counted as unlocked even if they are not actually unlocked).
2016-07-25hardfork: fix off by one in rescaning fork state after restartmoneromooo-monero1-3/+8
This code should die anyway.
2016-07-13remove hf_starting_height dbmoneromooo-monero2-24/+6
It's not really needed, it used to be an optimization for when that code was not using the db and needed to recalculate things fast on startup.
2016-06-06tx_extra: parse new chunk added by minergateblashyrkh1-1/+12
Patch from blashyrkh on forum.getmonero.org: https://forum.getmonero.org/5/support/2530/simplewallet-returns-invalid-paymentid
2016-05-17Merge pull request #831Riccardo Spagni2-5/+5
9ef8c7b tests: fix tests broken by the removal of the block reward accumulation loop (moneromooo-monero) a6e717e cn_deserialize: deserialize tx_extra too (moneromooo-monero) 3eff37f unit_tests: add a write_varint/read_varint test (moneromooo-monero) 7a66387 unit_tests: fix UNBOUND_LIBRARIES/UNBOUND_LIBRARY typo (moneromooo-monero) d6bce4b core: move tx_extra parsing errors to log level 1 (moneromooo-monero)
2016-05-01tests: fix tests broken by the removal of the block reward accumulation loopmoneromooo-monero1-1/+1
The tests for rejection of unmixable outputs in v2 are commented out, as there are no unmixable outputs created anymore. This should be restored at some point.
2016-05-01core: move tx_extra parsing errors to log level 1moneromooo-monero1-4/+4
They're not fatal, though indicate something wrong
2016-04-29Merge branch 'performance' of https://github.com/LMDB/bitmoneroRiccardo Spagni1-2/+3
2016-04-28add a --max-concurrency flagmoneromooo-monero1-3/+3
It sets the max number of threads to use for a parallel job. This is different that the number of total threads, since monero binaries typically start a lot of them.
2016-04-17blockchain: add missing overflow check for already generated coinsmoneromooo-monero1-1/+5
When reaching the tail emission phase, the amount of coins will eventually go over MONEY_SUPPLY, overflowing 64 bits. There was a check added to blockchain_storage, but this was not ported to the blockchain DB version. Reported by smooth.
2016-04-17blockchain: update cumulative block limit when popping a blockmoneromooo-monero1-0/+1
Avoids possible issues with accepting a tx too large to fit in an actual block. Reported by smooth.
2016-04-14Merge pull request #784Riccardo Spagni1-0/+1
087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
2016-04-14Merge pull request #782Riccardo Spagni1-1/+13
113cdc1 core: keep the acc loop for the genesis block (moneromooo-monero)
2016-04-14Merge pull request #800Riccardo Spagni2-19/+0
4cfb4df blockchain: remove the tx validation result cache (moneromooo-monero)
2016-04-14Merge pull request #796Riccardo Spagni1-1/+1
d817aec tx_pool: ensure no txes that fail check_inputs get in the block template (moneromooo-monero)
2016-04-06blockchain: remove the tx validation result cachemoneromooo-monero2-19/+0
As pointed out by smooth, a transaction's validity may change over time as the blockchain changes.
2016-04-06tx_pool: fix (hopefully) save/load of kept_by_blockmoneromooo-monero1-0/+2
2016-04-05Merge branch 'performance' into masterHoward Chu1-2/+3
2016-04-05Schema update: tx_indices - improve further with less indirectionwarptangent1-2/+3
2016-04-05tx_pool: ensure no txes that fail check_inputs get in the block templatemoneromooo-monero1-1/+1
2016-04-02Fix potential race with parallel processing of txes/signatures/blocksmoneromooo-monero1-0/+1
2016-04-02core: keep the acc loop for the genesis blockmoneromooo-monero1-1/+13
For unknown reasons, it was generated with a block reward consisting of a single large dusty output.
2016-04-02Merge pull request #779Riccardo Spagni1-5/+1
daac1cc core: remove the block reward accumulation loop (moneromooo-monero)
2016-04-02Merge pull request #767Riccardo Spagni5-11/+39
24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
2016-04-02Merge pull request #764Riccardo Spagni2-74/+374
f746c9d minor corrections/clarifications (Thomas Winget) c6bb201 Transaction pool documentation (and some cleanup) (Thomas Winget)
2016-04-01core: remove the block reward accumulation loopmoneromooo-monero1-5/+1
This can generate non decomposed outputs for very large block rewards (or not so large ones if a miner decides to not quantize the block rewards). Out of an abundance of caution, we refuse to generate those. They are still accepted by the consensus code, however.
2016-03-30minor corrections/clarificationsThomas Winget2-4/+6
2016-03-27Merge pull request #765Riccardo Spagni2-0/+14
d5d46e6 tests: obligatory hardfork unit build fix after interface change (moneromooo-monero) 25672d3 wallet: pass std::function by const ref, not value (moneromooo-monero) 0be6e08 wallet: do not leak owned amounts to the daemon unless --trusted-daemon (moneromooo-monero) 12146da wallet: change sweep_dust to sweep_unmixable (moneromooo-monero) 600a3cf New RPC and daemon command to get output histogram (moneromooo-monero) f9a2fd2 wallet: handle rare case where fee adjustment can bump to the next kB (moneromooo-monero) f26651a wallet: factor fee calculation (moneromooo-monero)
2016-03-27Convey tx verification failure reasons to the RPC clientmoneromooo-monero5-11/+39
This allows appropriate action to be taken, like displaying the reason to the user. Do just that in simplewallet, which should help a lot in determining why users fail to send. Also make it so a tx which is accepted but not relayed is seen as a success rather than a failure.
2016-03-26New RPC and daemon command to get output histogrammoneromooo-monero2-0/+14
This is a list of existing output amounts along with the number of outputs of that amount in the blockchain. The daemon command takes: - no parameters: all outputs with at least 3 instances - one parameter: all outputs with at least that many instances - two parameters: all outputs within that many instances The default starts at 3 to avoid massive spamming of all dust outputs in the blockchain, and is the current minimum mixin requirement. An optional vector of amounts may be passed, to request histogram only for those outputs.
2016-03-25blockchain: for v3, require miner tx to have well behaved outsmoneromooo-monero2-3/+13
This was meant to go in v2, but the miner tx slipped through the cracks as it doesn't go through the main tx verification since it doesn't get added to the pool.
2016-03-25core: fix miner tx block reward with feesmoneromooo-monero1-8/+7
2016-03-25Merge pull request #749Riccardo Spagni12-431/+1965
bfd4a28 Update BlockchainDB documentation (Thomas Winget) 797357e Change Doxyfile, Blockchain not blockchain_storage (Thomas Winget) c835215 remove defunct code from cryptonote::core (Thomas Winget) 50dba6d cryptonote::core doxygen documentation (Thomas Winget) 8ac329d doxygen documentation for difficulty functions (Thomas Winget) 540a76c Move checkpoint functions into checkpoints class (Thomas Winget) 1b0c98e doxygen documentation for checkpoints.{h,cpp} (Thomas Winget) 89c24ac Remove unnecessary or defunct code (Thomas Winget) ab0ed14 doxygen include private and static members (Thomas Winget) 3a48449 Updated documentation for blockchain.* (Thomas Winget)
2016-03-25Revert "Merge pull request #749"Riccardo Spagni12-1965/+431
This reverts commit 7fa63a82a1c3a0243f6757c1689855ed3ca61695, reversing changes made to cb6be986c36b78eddb4b7f16e9ad440af8567dc4.
2016-03-25Merge pull request #749Riccardo Spagni12-431/+1965
bfd4a28 Update BlockchainDB documentation (Thomas Winget) 797357e Change Doxyfile, Blockchain not blockchain_storage (Thomas Winget) c835215 remove defunct code from cryptonote::core (Thomas Winget) 50dba6d cryptonote::core doxygen documentation (Thomas Winget) 8ac329d doxygen documentation for difficulty functions (Thomas Winget) 540a76c Move checkpoint functions into checkpoints class (Thomas Winget) 1b0c98e doxygen documentation for checkpoints.{h,cpp} (Thomas Winget) 89c24ac Remove unnecessary or defunct code (Thomas Winget) ab0ed14 doxygen include private and static members (Thomas Winget) 3a48449 Updated documentation for blockchain.* (Thomas Winget)
2016-03-24Transaction pool documentation (and some cleanup)Thomas Winget2-74/+372
tx_pool.h doxygen documentation completed. Many notes made on areas for improvement, be that functionality or code clarity. Commented code and unused code removed.
2016-03-24remove defunct code from cryptonote::coreThomas Winget2-22/+0
2016-03-24cryptonote::core doxygen documentationThomas Winget2-26/+617
2016-03-24doxygen documentation for difficulty functionsThomas Winget2-2/+16
2016-03-24Move checkpoint functions into checkpoints classThomas Winget8-358/+327
The functions in src/cryptonote_core/checkpoints_create.{h,cpp} should be member functions of the checkpoints class, if nothing else for the sake of keeping their documentation together. This commit covers moving those functions to be member functions of the checkpoints class as well as documenting those functions.
2016-03-22doxygen documentation for checkpoints.{h,cpp}Thomas Winget2-6/+99
All functions in src/cryptonote_core/checkpoints.h are now documented in doxygen style. checkpoints.cpp has been reviewed, one function has been marked for discussion on correctness.
2016-03-22Remove unnecessary or defunct codeThomas Winget2-22/+0
2016-03-22Updated documentation for blockchain.*Thomas Winget2-14/+925
All functions are now documented in doxygen format. Comments have been updated to reflect the current state of the code. Many areas for improvement in clarity and design have been noted, as well as cruft to be removed. These changes are not reflected in this commit both to allow time for comment and to keep commits organized by purpose.
2016-03-22blockchain: fix partial block reward detectionmoneromooo-monero1-1/+1
2016-03-21Merge pull request #743Riccardo Spagni1-1/+1
a1c3829 also maybe do the block height this time, you know, just so that it actually works. (Riccardo Spagni)
2016-03-21also maybe do the block height this time, you know, just so that it actually ↵Riccardo Spagni1-1/+1
works.
2016-03-21Merge pull request #742Riccardo Spagni1-1/+1
23d1538 also update the timestamp for the hard fork (Riccardo Spagni)
2016-03-21also update the timestamp for the hard forkRiccardo Spagni1-1/+1
2016-03-21Merge pull request #741Riccardo Spagni1-0/+3
eda51a0 set fork date for September, add hyc's GPG key, remove aabramov's (Riccardo Spagni)
2016-03-21set fork date for September, add hyc's GPG key, remove aabramov'sRiccardo Spagni1-0/+3
2016-03-21Revert "Print stack trace upon exceptions"moneromooo-monero5-6/+2
Ain't nobody got time for link/cmake skullduggery. This reverts commit fff238ec94ac6d45fc18c315d7bc590ddfaad63d.
2016-03-19Print stack trace upon exceptionsmoneromooo-monero5-2/+6
Useful for debugging users' logs
2016-03-19Fix issue #706Howard Chu1-0/+1
2016-03-11Use boost::thread instead of std::threadHoward Chu1-3/+3
and all other associated IPC
2016-03-03Blockchain: Omit verbose time stats messages by defaultwarptangent1-1/+1
This is already the default for the daemon, but by checking a command line argument and calling a Blockchain member function setter. Initialize the variable to false so it's not dependent on an external command-line argument check. This allows utilities like blockchain_import to have a reasonable default without code changes.
2016-02-29Merge pull request #688Riccardo Spagni2-1/+10
c2a1fee simplewallet: prompt for private keys when generating wallets (moneromooo-monero) 4513b4c simplewallet: add a new --restore-from-keys option (moneromooo-monero)
2016-02-23Wrap some more actions in a larger read txnHoward Chu1-11/+25
2016-02-23read txn/cursor stuffHoward Chu2-1/+14
Could wrap more later.
2016-02-23core: check whether an update is needed straight awaymoneromooo-monero1-1/+1
2016-02-23core: print "update needed" hard fork notifications in redmoneromooo-monero1-2/+2
2016-02-22simplewallet: add a new --restore-from-keys optionmoneromooo-monero2-1/+10
It is similar in use to --restore-from-view-key, but also expects a spend private key. Requested by luigi1112, and useful to restore MyMonero wallets.
2016-02-17core: check whether an update is needed straight awaymoneromooo-monero1-1/+1
2016-02-17core: print "update needed" hard fork notifications in redmoneromooo-monero1-2/+2
2016-02-08hardfork: add a default fork entry for v1 if none existmoneromooo-monero1-0/+5
To avoid special cases
2016-02-08blockchain: initialize m_hardfork to NULLmoneromooo-monero1-1/+1
It can now be set by some other code, and is thus tested
2016-02-08core_tests: add tests for hard fork behaviors (MRL-0004)moneromooo-monero4-12/+26
We also replace the --fakechain option with an optional structure containing details about configuration for the core/blockchain, for test purposes. This seems more future friendly.
2016-02-08blockchain: reset hardfork object when resetting blockchainmoneromooo-monero1-0/+1
Not doing so will prevent the new genesis block from being reset if a switch past v1 had occured already.
2016-02-08Blockchain: Update comments on removing blockwarptangent1-0/+5
2016-02-08Move HardFork DB update to BlockchainDB::add_block()warptangent1-3/+0
Ensures the database is consistent. Also simplifes blockchain_import in that verify mode off has less to work around.
2016-02-08Make HardFork object available to BlockchainDB and derived DB implementationswarptangent1-0/+2
This will later allow the HardFork object's DB update functions to be called when the DB transaction that persists across block add/remove is open.
2016-02-08Blockchain: Optionally pass in HardFork objectwarptangent2-4/+21
2016-02-08Merge pull request #643Riccardo Spagni1-8/+10
05bfb51 core: move the db lock to the data directory (moneromooo-monero)
2016-02-08Merge pull request #641Riccardo Spagni2-56/+87
7658ac0 blockchain: revert handle_get_objects adding block id on tx not found (moneromooo-monero) 3a0f4d8 berkeleydb: fix delete/free mismatch (moneromooo-monero) 1642be2 minor bugfixes and refactoring (Thomas Winget) 098dcf2 unit_tests: fix mnemonics unit test testing invalid seeds (moneromooo-monero)
2016-02-04core: move the db lock to the data directorymoneromooo-monero1-8/+10
Locking just one db turns out to not have been a good idea, since the pool and p2p state fdles have to be used anyway. Also ensure the directory exists before tring to lock.
2016-02-03blockchain: revert handle_get_objects adding block id on tx not foundmoneromooo-monero1-1/+0
This differs from the original CN code, and there seems to be no reason to include the block itself, if it was found
2016-02-02minor bugfixes and refactoringThomas Winget2-56/+88
- Blockchain should store if it's running on testnet or not - moved loading compiled-in block hashes to its own function for clarity - on handle_get_objects, should now correctly return false if a block's transactions are missing - replace instances of BOOST_FOREACH with C++11 for loops in Blockchain.
2016-02-01hardfork: allow passing chain height in get(height) for conveniencemoneromooo-monero1-1/+4
2016-01-31Merge pull request #635Riccardo Spagni2-0/+46
8b3539b core: prevent the database from being used by multiple daemons (moneromooo-monero)
2016-01-31Merge pull request #634Riccardo Spagni1-0/+1
7fc6fa3 wallet: forbid dust altogether in output selection where appropriate (moneromooo-monero) 5e1a739 blockchain: log number of outputs available for a new tx (moneromooo-monero)
2016-01-31Merge pull request #631Riccardo Spagni3-5/+2
bcac101 daemon: fix a few issues reported by valgrind (moneromooo-monero) a7e8174 tx_pool: fix serialization of new relayed data (moneromooo-monero) 601ad76 hardfork: fix mixup in indexing variable in get_voting_info (moneromooo-monero) 444e22f blockchain: remove unused timer (moneromooo-monero) 7edfdd8 blockchain: fix m_sync_counter uninitialized variable use (moneromooo-monero) d97582c epee: use generate_random_bytes for new random uuids (moneromooo-monero) 17c7c9c epee: remove dodgy random code that nobody uses (moneromooo-monero)
2016-01-31core: prevent the database from being used by multiple daemonsmoneromooo-monero2-0/+46
A boost lock is used to determine whether more than one process wants to access the database. The boost file_lock doesn't seem to like locking directories, so we use an arbitrary file in it. This allows to still run two daemons if they have different database directories (ie, LMDB/BDB, different data directories).
2016-01-31blockchain: log number of outputs available for a new txmoneromooo-monero1-0/+1
2016-01-30tx_pool: fix serialization of new relayed datamoneromooo-monero1-2/+0
2016-01-30hardfork: fix mixup in indexing variable in get_voting_infomoneromooo-monero1-1/+1
2016-01-30blockchain: remove unused timermoneromooo-monero1-1/+0
2016-01-30blockchain: fix m_sync_counter uninitialized variable usemoneromooo-monero1-1/+1
It counts the number of blocks added since last zeroing
2016-01-30new flush_txpool command, and associated RPC callmoneromooo-monero4-0/+41
It can flush a particular tx, or the whole pool (the RPC command can flush a list of transactions too)
2016-01-29tx_pool: serialize missing kept_by_block flagmoneromooo-monero1-1/+4
2016-01-29tx_pool: do not accept txes not in a block if they timed out beforemoneromooo-monero2-2/+14
This is intended to avoid cases where a timed out tx will be re-relayed by another peer for which it has not timed out yet, which would cause the tx to stay in the network's pool for a long time (until all peers time it out before another one tries to relay it again).
2016-01-29tx_pool: fix use of invalidated iteratormoneromooo-monero1-1/+2
2016-01-29Fix V1/V2 use of hard fork related parametersmoneromooo-monero6-32/+65
Some of it uses hardcoded height, which will need some thinking for next (voted upon) fork.
2016-01-15added checkpointsRiccardo Spagni1-0/+8
2016-01-15hardfork: fix accepting v2 blocks too earlymoneromooo-monero1-2/+1
2015-12-31Merge pull request #587Riccardo Spagni1-28/+20
1e07110 Nicer looking exit when blockchain.bin is found (moneromooo-monero)
2015-12-31Nicer looking exit when blockchain.bin is foundmoneromooo-monero1-28/+20
Do not print the exception message, and write the important bit in red, since people will only read the last line otherwise.
2015-12-31core: do not use the persistent pool state for testsmoneromooo-monero2-1/+7
Fixes intermittent test failures when the pool contains unexpected transactions that were brought in from the live pool.
2015-12-31updated copyright yearRiccardo Spagni31-31/+31
2015-12-31fixed copyrights with bad year referencesRiccardo Spagni2-2/+2
2015-12-30blockchain: kill ioservice on scope end, rather than manuallymoneromooo-monero1-6/+7
This ensures this will be done without fail, as the error prone matching of every return with a call to KILL_IOSERVICE leads to hard to debug corruption when one is missing.
2015-12-30miner: minor fixes on stopmoneromooo-monero1-1/+4
- only try to stop if actually started - print number of threads before zeroing it This fixes the suspiciously doubled "Mining has been stopped" message on exit.
2015-12-30Merge pull request #573Riccardo Spagni1-0/+22
0953355 blockchain_db: inform user about new format if blockchain.bin is found (moneromooo-monero)
2015-12-30Merge pull request #572Riccardo Spagni1-0/+2
b39aae7 Tweak 45800a25e9374e63caaabba05c89585c86acd668 (hyc) 4a5a5ff blockchain: always stop the ioservice before returning (moneromooo-monero) 78b65cf db_lmdb: safety close db at exit (moneromooo-monero) 45800a2 db_lmdb: fix a strdup/delete[] mistmatch (moneromooo-monero)
2015-12-30Merge pull request #570Riccardo Spagni1-1/+1
fc34132 Remove assert from status command (hyc)
2015-12-30Merge pull request #568Riccardo Spagni2-9/+2
b0541a5 blockchain: remove obsolete containers (moneromooo-monero) 18a5211 blockchain: Fix height in call to on_blockchain_dec (moneromooo-monero)
2015-12-28blockchain_db: inform user about new format if blockchain.bin is foundmoneromooo-monero1-0/+22
2015-12-28blockchain: always stop the ioservice before returningmoneromooo-monero1-0/+2
Fixes a use after free
2015-12-27Remove assert from status commandhyc1-1/+1
Crashes every time...
2015-12-26blockchain: remove obsolete containersmoneromooo-monero2-8/+1
2015-12-26blockchain: Fix height in call to on_blockchain_decmoneromooo-monero1-1/+1
It was a noop anyway
2015-12-26hardfork: ensure current_fork_index can not become negative on rescanmoneromooo-monero1-1/+1
2015-12-25blockchain: fix a few block addition bugsmoneromooo-monero2-34/+46
If the block reward was too high, the verification failed flag was set, but the function continued. The code which was supposed to trap this flag and return failure failed to trap it, and, while the block was not added to the chain, the function would return success. The reason for avoiding returning when the block reward problem was detected was to be able to return any transactions to the pool if needed. This is now mooted by moving the transaction return code to a separate function, which is now called at all appropriate points, making the logic much simpler, and hopefully correct now. We also move the hard fork version check after the prev_id check, as block which does not go on the top of the chain might not have the expected version there, without being invalid just for this reason. Last, we trap the case where a block fails to be added due to using already spent key images, to set the verification failed flag.
2015-12-25blockchain: fix an off by one error in unlocked time checkmoneromooo-monero1-1/+1
2015-12-25blockchain: reinstate double spending checks in check_tx_inputsmoneromooo-monero1-3/+7
This fixes some double spending tests. This may or may not be unneeded in normal (non test) circumstances, to be determined later. Keeping these for now may be slower, but safer.
2015-12-25blockchain: make some flag twiddling code closer to the originalmoneromooo-monero1-2/+2
Probably paranoid and unnecessary