aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_basic.h (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-4/+70
If the peer (whether pruned or not itself) supports sending pruned blocks to syncing nodes, the pruned version will be sent along with the hash of the pruned data and the block weight. The original tx hashes can be reconstructed from the pruned txes and theur prunable data hash. Those hashes and the block weights are hashes and checked against the set of precompiled hashes, ensuring the data we received is the original data. It is currently not possible to use this system when not using the set of precompiled hashes, since block weights can not otherwise be checked for validity. This is off by default for now, and is enabled by --sync-pruned-blocks
2019-06-14serialization: check stream good flag at the endmoneromooo-monero1-1/+1
just in case
2019-04-05cryptonote: rework block blob size sanity checkmoneromooo-monero1-0/+2
Use the actual block weight limit, assuming that weight is always greater or equal to size
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-03-05db: speedup block additionmoneromooo-monero1-2/+23
by avoiding repeated (de)serialization
2019-01-22Pruningmoneromooo-monero1-4/+11
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.
2018-12-05cryptonote: set tx hash on newly parsed txes when knownmoneromooo-monero1-0/+2
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-10-07cryptonote: sort tx_extra fieldsmoneromooo-monero1-1/+0
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-03-14keypair::generate: always require hw::device to avoid possible mistakestoffu1-6/+0
2018-03-14device: untangle cyclic depenencystoffu1-1/+2
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-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm1-0/+6
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-01-26Update 2018 copyrightxmr-eric1-1/+1
2017-12-22factor STL container serializationmoneromooo-monero1-1/+0
2017-12-18check accessing an element past the end of a containermoneromooo-monero1-1/+1
2017-10-07Subaddresseskenshi841-0/+26
2017-09-25move checkpoints in a separate librarymoneromooo-monero1-5/+0
2017-04-11Improvements for epee binary to hex functions:Lee Clagett1-1/+0
- 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-03core: fix blob size cache, and reenable hash and blob size cachesmoneromooo-monero1-1/+1
2017-03-25core: avoid possible reordering bugs wth tx/bloch hash cachemoneromooo-monero1-11/+29
2017-03-23core: cache tx and block hashes in the respective classesmoneromooo-monero1-0/+32
An idea from smooth
2017-02-27core: add functions to serialize base tx infomoneromooo-monero1-0/+22
That is, information without signatures (for v1) nor range proofs and MGs (for v2)
2017-02-21update copyright year, fix occasional lack of newline at line endRiccardo Spagni1-1/+1
2017-02-08extract some basic code from libcryptonote_core into libcryptonote_basickenshi841-0/+0
2016-09-14rct: rework serialization to avoid storing vector sizesmoneromooo-monero1-15/+13
2016-08-28New "Halfway RingCT" outputs for coinbase transactionsmoneromooo-monero1-0/+3
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: change the simple flag to a typemoneromooo-monero1-4/+7
for future expansion
2016-08-28wallet: do not store signatures in the wallet cachemoneromooo-monero1-1/+1
Saves some substantial space. Also avoid calculating tx hashes we don't need.
2016-08-28integrate simple rct apimoneromooo-monero1-2/+10
2016-08-28add rct to the protocolmoneromooo-monero1-24/+38
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-28remove original Cryptonote blockchain_storage blockchain formatmoneromooo-monero1-3/+0
2015-12-31updated copyright yearRiccardo Spagni1-1/+1
2015-11-30Revert "Merge pull request #506"Riccardo Spagni1-2/+2
This reverts commit c6bf73131aaf804cb17f24c856f826be2761a566, reversing changes made to 8a52cf4055d247dd4b162985c931e99683992e3c.
2015-11-27core: serialize block major/minor versions as bytes, not varintsmoneromooo-monero1-2/+2
This allows them to be saved as a fixed (one byte) chunk whatever the value. Using a varint will use two bytes as the high bit gets set. This is backward compatible with current usage (0-2 values).
2015-10-21hardfork: switch voting to block minor versionmoneromooo-monero1-2/+2
Using major version would cause older daemons to reject those blocks as they fail to deserialize blocks with a major version which is not 1. There is no such restriction on the minor version, so switching allows older daemons to coexist with newer ones till the actual fork date, when most will hopefully have updated already. Also, for the same reason, we consider a vote for 0 to be a vote for 1, since older daemons set minor version to 0.
2015-09-12blockchain: use the new hardfork classmoneromooo-monero1-3/+1
2015-08-09encrypted payment ids are now 64 bit, instead of 256 bitmoneromooo-monero1-0/+1
Pros: - smaller on the blockchain - shorter integrated addresses Cons: - less sparseness - less ability to embed actual information The boolean argument to encrypt payment ids is now gone from the RPC calls, since the decision is made based on the length of the payment id passed.
2015-02-02Add compile-time support for both db implementations: in-memory and LMDBwarptangent1-0/+2
Usage: default is lmdb for blockchain branch: $ make release same as: $ DATABASE=lmdb make release for original in-memory implementation: $ DATABASE=memory make release
2015-01-02year updated in licenseRiccardo Spagni1-1/+1
2014-09-25Revert "low risk, potentially varint overflow bug patched thanks to BBR"Riccardo Spagni1-0/+1
This reverts commit 4e2b2b942daa4206ec44c66e59863670dfe3fde4.
2014-09-24low risk, potentially varint overflow bug patched thanks to BBRRiccardo Spagni1-1/+0
2014-07-23License updated to BSD 3-clausefluffypony1-3/+29
2014-03-03moved all stuff to githubAntonio Juarez1-0/+347