summaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix v5 heightRiccardo Spagni2016-09-181-1/+1
|
* fix v5 fork date descriptionRiccardo Spagni2016-09-181-1/+1
|
* updated fork heights for v4 and v5Riccardo Spagni2016-09-181-0/+7
|
* compile errors fixed when PER_BLOCK_CHECKPOINT not definedrckngOpossum2016-09-151-1/+3
|
* compile errors fixed when DEBUG_CREATE_BLOCK_TEMPLATE definedrckngOpossum2016-09-151-1/+1
|
* Merge pull request #1022Riccardo Spagni2016-09-011-1/+1
|\ | | | | | | b8c03a5 Remove blocks_per_sync limits (Howard Chu)
| * Remove blocks_per_sync limitsHoward Chu2016-08-311-1/+1
| | | | | | | | | | | | 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.
* | core: faster find_blockchain_supplementmoneromooo-monero2016-08-311-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.
* core: allow empty global indices for txes with empty voutmoneromooo-monero2016-08-291-1/+6
|
* blockchain: testnet heights for v3, v4, and v5moneromooo-monero2016-08-281-0/+4
|
* wallet: transfer_selected_rct now also selects fake outsmoneromooo-monero2016-08-281-2/+2
|
* increase minimum mixin to 4 on hard fork 5moneromooo-monero2016-08-281-2/+3
|
* core: allow v1 txes after HF 5 when sweeping unmixable outputsmoneromooo-monero2016-08-281-1/+19
|
* New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero2016-08-281-14/+10
| | | | | | | | | | | | | | | 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.
* rct: rework v2 txes into prunable and non prunable datamoneromooo-monero2016-08-281-9/+15
| | | | Nothing is pruned, but this allows easier changes later.
* rct: rework the verification preparation processmoneromooo-monero2016-08-281-126/+96
| | | | | | | | | | 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.
* rct: change the simple flag to a typemoneromooo-monero2016-08-281-3/+9
| | | | for future expansion
* rct: avoid the need for the last II elementShen Noether2016-08-281-8/+6
| | | | | | 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.
* core: add some locking around pool usemoneromooo-monero2016-08-281-1/+3
|
* change fork settings to allow pre-rct txes for one more fork cyclemoneromooo-monero2016-08-281-1/+1
|
* rct: do not serialize public keys in outPkmoneromooo-monero2016-08-281-4/+31
| | | | They can be reconstructed from vout
* integrate simple rct apimoneromooo-monero2016-08-281-57/+155
|
* mixable transactions must be rct for v3moneromooo-monero2016-08-281-6/+28
|
* move the rct commitments to the output_amounts databasemoneromooo-monero2016-08-281-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.
* ringct: do not serialize what can be reconstructedmoneromooo-monero2016-08-281-20/+67
| | | | | | 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.
* Use the supplied hard fork version in validate_miner_transactionmoneromooo-monero2016-08-281-1/+1
| | | | | rather than using the current one. No functional changes, but may save some bugs in the future.
* add rct to the protocolmoneromooo-monero2016-08-281-67/+212
| | | | | It is not yet constrained to a fork, so don't use on the real network or you'll be orphaned or rejected.
* core: new /getrandom_rctouts.bin binary RPC callmoneromooo-monero2016-08-281-0/+98
| | | | to get random ringct outputs to mix with
* Fake outs set is now decided by the walletmoneromooo-monero2016-08-111-0/+19
| | | | | | | | | | | | | | | | | | 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.
* new unlocked parameter to output_histogrammoneromooo-monero2016-08-011-2/+2
| | | | | | | | 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).
* Merge branch 'performance' of https://github.com/LMDB/bitmoneroRiccardo Spagni2016-04-291-2/+3
|\
| * Merge branch 'performance' into masterHoward Chu2016-04-051-2/+3
| |\
| | * Schema update: tx_indices - improve further with less indirectionwarptangent2016-04-051-2/+3
| | |
* | | add a --max-concurrency flagmoneromooo-monero2016-04-281-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.
* | | blockchain: add missing overflow check for already generated coinsmoneromooo-monero2016-04-171-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.
* | | blockchain: update cumulative block limit when popping a blockmoneromooo-monero2016-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | Avoids possible issues with accepting a tx too large to fit in an actual block. Reported by smooth.
* | | Merge pull request #784Riccardo Spagni2016-04-141-0/+1
|\ \ \ | | | | | | | | | | | | 087373e Fix potential race with parallel processing of txes/signatures/blocks (moneromooo-monero)
| * | | Fix potential race with parallel processing of txes/signatures/blocksmoneromooo-monero2016-04-021-0/+1
| |/ /
* / / blockchain: remove the tx validation result cachemoneromooo-monero2016-04-061-18/+0
|/ / | | | | | | | | As pointed out by smooth, a transaction's validity may change over time as the blockchain changes.
* | Merge pull request #767Riccardo Spagni2016-04-021-5/+10
|\ \ | | | | | | | | | 24b3e90 Convey tx verification failure reasons to the RPC client (moneromooo-monero)
| * | Convey tx verification failure reasons to the RPC clientmoneromooo-monero2016-03-271-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #765Riccardo Spagni2016-03-271-0/+5
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 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)
| * | New RPC and daemon command to get output histogrammoneromooo-monero2016-03-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | blockchain: for v3, require miner tx to have well behaved outsmoneromooo-monero2016-03-251-2/+11
|/ / | | | | | | | | | | 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.
* | Merge pull request #749Riccardo Spagni2016-03-251-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | Revert "Merge pull request #749"Riccardo Spagni2016-03-251-39/+10
| | | | | | | | | | This reverts commit 7fa63a82a1c3a0243f6757c1689855ed3ca61695, reversing changes made to cb6be986c36b78eddb4b7f16e9ad440af8567dc4.
* | Merge pull request #749Riccardo Spagni2016-03-251-10/+39
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Move checkpoint functions into checkpoints classThomas Winget2016-03-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Remove unnecessary or defunct codeThomas Winget2016-03-221-1/+0
| | |
| * | Updated documentation for blockchain.*Thomas Winget2016-03-221-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | 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.