aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_format_utils.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-02cryptonote_basic: fix amount overflow detection on 32-bit systems [RELEASE]jeffro2561-1/+1
2022-08-06ledger support for hf 15 (BP+, view tags)j-berman1-6/+14
2022-06-20cryptonote_basic: catch crypto api errorsmoneromooo-monero1-2/+2
2022-04-21Preserve commitment format inside transactionsLuke Parker1-1/+1
2022-04-18Add view tags to outputs to reduce wallet scanning timej-berman1-26/+133
Implements view tags as proposed by @UkoeHB in MRL issue https://github.com/monero-project/research-lab/issues/73 At tx construction, the sender adds a 1-byte view tag to each output. The view tag is derived from the sender-receiver shared secret. When scanning for outputs, the receiver can check the view tag for a match, in order to reduce scanning time. When the view tag does not match, the wallet avoids the more expensive EC operations when deriving the output public key using the shared secret.
2022-04-10Fee changes from ArticMinemoneromooo-monero1-0/+63
https://github.com/ArticMine/Monero-Documents/blob/master/MoneroScaling2021-02.pdf with a change to use 1.7 instead of 2.0 for the max long term increase rate
2022-04-06Merge pull request #8197luigi11111-1/+1
da9aa1f Copyright: Update to 2022 (mj-xmr)
2022-04-05store outPk/8 in the tx for speedmoneromooo-monero1-1/+1
It avoids dividing by 8 when deserializing a tx, which is a slow operation, and multiplies by 8 when verifying and extracing the amount, which is much faster as well as less frequent
2022-04-05plug bulletproofs plus into consensusmoneromooo-monero1-9/+38
2022-03-04Copyright: Update to 2022mj-xmr1-1/+1
2022-02-22multisig key exchange update and refactorkoe1-1/+20
2021-07-13cmake: fix undefined symbols and multiple definitionsanon1-16/+0
2021-01-23Improve cryptonote (block and tx) binary read performanceLee Clagett1-45/+15
2021-04-16Split epee/string_tools.h and encapsulate boost::lexical_castmj-xmr1-0/+1
2021-03-20Merge pull request #6810luigi11111-0/+19
19b2283 New add_aux_pow RPC to support merge mining (moneromooo-monero)
2021-02-09New add_aux_pow RPC to support merge miningmoneromooo-monero1-0/+19
2021-02-09Remove unused variables in monero codebaseKevin Barbour1-1/+0
There are quite a few variables in the code that are no longer (or perhaps never were) in use. These were discovered by enabling compiler warnings for unused variables and cleaning them up. In most cases where the unused variables were the result of a function call the call was left but the variable assignment removed, unless it was obvious that it was a simple getter with no side effects.
2020-08-27Integrate CLSAGs into moneromoneromooo-monero1-3/+6
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-17Avoid some temporary strings when reading off the databasemoneromooo-monero1-17/+20
2020-05-06Update copyright year to 2020SomaticFanatic1-1/+1
Update copyright year to 2020
2020-05-06Merge pull request #6472luigi11111-0/+2
2efbd5f cryptonote: fix reuse of non default tx data when relaying (moneromooo-monero)
2020-05-01Merge pull request #6436luigi11111-0/+14
688a3e8 Add timelock verification on device (cslashm)
2020-04-22cryptonote: fix reuse of non default tx data when relayingmoneromooo-monero1-0/+2
An automatic tx variable is initialized properly on the first run through the loop, but not the second. Moving the variable inside the loop ensures the ctor is called again to init it.
2020-04-08Add timelock verification on devicecslashm1-0/+14
2020-04-01Hash domain separationSarang Noether1-2/+0
2019-12-12print_coinbase_tx_sum now supports 128 bits sumsmoneromooo-monero1-2/+16
The tail emission will bring the total above 64 bits
2019-10-11cryptonote: add function to get weight from a pruned txmoneromooo-monero1-11/+65
The weight of the prunable data is deterministic from the unpruned data, so it can be determined from a pruned tx
2019-10-08Merge pull request #5915luigi11111-12/+21
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-09-27monerod can now sync from pruned blocksmoneromooo-monero1-12/+21
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-09-25RandomX integrationHoward Chu1-22/+0
Support RandomX PoW algorithm
2019-06-14cryptonote: throw on tx hash calculation errormoneromooo-monero1-3/+3
2019-04-11Merge pull request #5380Riccardo Spagni1-2/+0
113e4877 blockchain_stats: fix sign in formatting function (moneromooo-monero) adaea3ea various: remove unused variables (moneromooo-monero) 631ef00e blockchain: some debug info when adding txes-from-block fails (moneromooo-monero)
2019-04-01various: remove unused variablesmoneromooo-monero1-2/+0
2019-03-25cryptonote_basic: some more minor speedupsmoneromooo-monero1-4/+16
2019-03-25cryptonote_basic: speedup calculate_block_hashmoneromooo-monero1-2/+7
The block 202612 fix can be left tested at the end, if we already know we're not in the general case
2019-03-25cryptonote: block parsing + hash calculation speedupmoneromooo-monero1-3/+27
This saves a duplicate serialization step
2019-03-21cryptonote: fix calculating coinbase tx hashmoneromooo-monero1-10/+6
Also set error flag on exception when handling new txes to keep tests working
2019-03-21Merge pull request #5211Riccardo Spagni1-0/+5
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec) a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec) d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-20device/trezor: HF10 support added, wallet::APIDusan Klinec1-0/+5
- import only key images generated by cold signing process - wallet_api: trezor methods added - wallet: button request code added - const added to methods - wallet2::get_tx_key_device() tries to decrypt stored tx private keys using the device. - simplewallet supports get_tx_key and get_tx_proof on hw device using the get_tx_key feature - live refresh enables refresh with trezor i.e. computing key images on the fly. More convenient and efficient for users. - device: has_ki_live_refresh added - a thread is watching whether live refresh is being computed, if not for 30 seconds, it terminates the live refresh process - switches Trezor state
2019-03-17Merge pull request #5135Riccardo Spagni1-0/+1
de32dcea Human readable message if maximum outputs reached (italocoin)
2019-03-05Update 2019 copyrightbinaryFate1-1/+1
2019-03-05cryptonote: speed up calculating coinbase tx prunable hashmoneromooo-monero1-2/+9
It's a hash of an empty buffer, so we can avoid keccak
2019-03-05core: avoid calculating tx prefix hash when we don't need itmoneromooo-monero1-1/+8
2019-03-05db: speedup block additionmoneromooo-monero1-22/+40
by avoiding repeated (de)serialization
2019-02-14Cryptonight variant 4 aka CryptonightRSChernykh1-1/+1
It introduces random integer math into the main loop.
2019-02-10Human readable message if maximum outputs reacheditalocoin1-0/+1
2019-01-22Pruningmoneromooo-monero1-0/+17
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-31Merge pull request #4953luigi11111-5/+13
dbbb3ce cryptonote: don't serialize for blob size if already known (moneromooo-monero)
2018-12-31Merge pull request #4946luigi11111-0/+1
6644b9b blockchain_db: remove a couple unused functions (moneromooo-monero) ce594f5 blockchain_db: allocate known size vector only once (moneromooo-monero) 8332698 db_lmdb: inline check_open, it's trivial and called everywhere (moneromooo-monero) 5511563 db_lmdb: avoid pointless division (moneromooo-monero) d1efe3d cryptonote: set tx hash on newly parsed txes when known (moneromooo-monero) 9cc68a2 tx_pool: add a few std::move where it can make a difference (moneromooo-monero)
2018-12-07cryptonote: don't serialize for blob size if already knownmoneromooo-monero1-5/+13
2018-12-05cryptonote: set tx hash on newly parsed txes when knownmoneromooo-monero1-0/+1
2018-12-04Merge pull request #4894Riccardo Spagni1-2/+2
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero) 1a0733e5 windows_service: fix memory leak (moneromooo-monero) 0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero) 5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero) d4f50cb1 remove some unused code (moneromooo-monero) 61163971 a few minor (but easy) performance tweaks (moneromooo-monero) 30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-11-23cryptonote: fix get_unit for non default settingsmoneromooo-monero1-2/+2
Found by codacy.com
2018-11-15Removed a lot of unnecessary includesMartijn Otto1-3/+2
2018-10-26Merge pull request #4308Riccardo Spagni1-0/+85
9907ea06 cryptonote: sort tx_extra fields (moneromooo-monero)
2018-10-08tx_pool: avoid parsing a whole tx if only the prefix is neededmoneromooo-monero1-0/+10
2018-10-07cryptonote: sort tx_extra fieldsmoneromooo-monero1-0/+85
This removes some small amount of fingerprinting entropy. There is no consensus rule to require this since this field is technically free form, and a transaction is free to have custom data in it.
2018-09-14Merge pull request #4330Riccardo Spagni1-3/+13
93e7627d cryptonote_format_utils: do not early out on invalid tx pubkeys (moneromooo-monero)
2018-09-11bulletproofs: scale points by 8 to ensure subgroup validitymoneromooo-monero1-1/+1
2018-09-11cryptonote_basic: check output type before using itmoneromooo-monero1-0/+7
Reported by QuarksLab.
2018-09-11v8: per byte fee, pad bulletproofs, fixed 11 ring sizemoneromooo-monero1-12/+46
2018-09-11Bulletproof aggregated verification and testsmoneromooo-monero1-5/+13
Also constrains bulletproofs to simple rct, for simplicity
2018-09-02cryptonote_format_utils: do not early out on invalid tx pubkeysmoneromooo-monero1-3/+13
Another such pubkey might be valid
2018-05-23db_lmdb: save pruned and prunable tx data separatelymoneromooo-monero1-8/+56
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-07cryptonote: make sure outPk setup always happensmoneromooo-monero1-0/+37
2018-03-14device: untangle cyclic depenencystoffu1-182/+13
When #3303 was merged, a cyclic dependency chain was generated: libdevice <- libcncrypto <- libringct <- libdevice This was because libdevice needs access to a set of basic crypto operations implemented in libringct such as scalarmultBase(), while libringct also needs access to abstracted crypto operations implemented in libdevice such as ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct into libringct_basic and libringct, where the basic crypto ops previously in libringct are moved into libringct_basic. The cyclic dependency is now resolved thanks to this separation: libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct This eliminates the need for crypto_device.cpp and rctOps_device.cpp. Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and get_subaddress_secret_key() were previously implemented in libcryptonote_basic (cryptonote_format_utils.cpp) and were then called from hw::core::device_default, which is odd because libdevice is supposed to be independent of libcryptonote_basic. Therefore, those functions were moved to device_default.cpp.
2018-03-14device: made function prototypes consistent with pre-#3303 codebasestoffu1-7/+3
2018-03-05Monero Cryptonight variants, and add one for v7moneromooo-monero1-1/+2
This is the first variant of many, with the intent to improve Monero's resistance to ASICs and encourage mining decentralization.
2018-03-04Code modifications to integrate Ledger HW device into monero-wallet-cli.cslashm1-20/+117
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.
2018-02-16wallet2: speed up subaddress generation (by about a third)moneromooo-monero1-0/+39
2018-01-26Update 2018 copyrightxmr-eric1-1/+1
2018-01-10Merge pull request #2990Riccardo Spagni1-0/+1
2d17feb0 factor STL container serialization (moneromooo-monero)
2017-12-22factor STL container serializationmoneromooo-monero1-0/+1
2017-12-18check return value for generate_key_derivation and derive_public_keymoneromooo-monero1-4/+8
2017-12-17make multisig work with subaddressesmoneromooo-monero1-4/+49
Thanks to kenshi84 for help getting this work
2017-12-16move includes around to lessen overall loadmoneromooo-monero1-0/+2
2017-11-27new wipeable_string class to replace std::string passphrasesmoneromooo-monero1-2/+3
2017-11-22cryptonote: do not overwrite const datamoneromooo-monero1-2/+2
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-10-15refactor cryptonote_basic::add_tx_pub_key_to_extraJaquee1-3/+13
2017-10-07Subaddresseskenshi841-13/+125
2017-09-25move checkpoints in a separate librarymoneromooo-monero1-1/+1
2017-09-12wallet: add encrypted seed functionalitymoneromooo-monero1-0/+17
This uses luigi1111's CN_Add method. See https://xmr.llcoins.net for details.
2017-04-03core: fix blob size cache, and reenable hash and blob size cachesmoneromooo-monero1-6/+0
2017-03-26core: disable tx/block hash cachemoneromooo-monero1-0/+6
Looks like it doesn't work on win64
2017-03-25core: avoid possible reordering bugs wth tx/bloch hash cachemoneromooo-monero1-15/+11
2017-03-23core: cache tx and block hashes in the respective classesmoneromooo-monero1-2/+77
An idea from smooth
2017-03-05format_utils: fix typo in assert messagelethos31-2/+2
Fix two small typos as mentioned by reddit user nthterm.
2017-03-03Merge pull request #1826Riccardo Spagni1-8/+56
2c468dd4 allow user I/O in millinero, micronero, nanonero, piconero (moneromooo-monero)
2017-03-02allow user I/O in millinero, micronero, nanonero, piconeromoneromooo-monero1-8/+56
2017-02-27core: add functions to serialize base tx infomoneromooo-monero1-0/+10
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/+743