Commit Graph
127 Commits
Author SHA1 Message Date
j-berman 657ea80212 cryptonote_basic: get_transaction_unprunable_summary FCMP++/Carrot 2026-09-18 17:08:44 -07:00
+3 a9145f9d38 FCMP++/Carrot mega commit [9/14/26]
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
Co-authored-by: Lee *!* Clagett <code@leeclagett.com>
Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com>
Co-authored-by: jeetrex17 <jeetrex@tutamail.com>
Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com>
Co-authored-by: MrCyjaneK
Co-authored-by: tobtoht
Co-authored-by: selsta
Co-authored-by: Thomas <thomas.giudici@proton.me>
Co-authored-by: navidR
Co-authored-by: Boog900 <boog900@tutanota.com>
2026-09-17 18:33:24 -07:00
tobtoht cee436892f Merge pull request #11235
f8e2a87 cryptonote_basic: serialization checks (j-berman)

ACKs: plowsof, selsta*, jpk68
2026-09-10 13:30:16 +00:00
j-berman f8e2a8709d cryptonote_basic: serialization checks 2026-09-09 18:20:50 -07:00
tobtoht 8bbd915f59 Merge pull request #11223
70ac701 cryptonote_basic: cache prunable hash for pruned txs (Samy)

ACKs: jpk68, selsta
2026-09-09 20:14:57 +00:00
jeffro256 c7a2d4f66a crypto: reduce crypto.h header weight 2026-09-07 21:32:29 -05:00
Samy 70ac70101a cryptonote_basic: cache prunable hash for pruned txs 2026-09-01 02:52:19 +02:00
tobtoht 78fb311ebb Merge pull request #10605
59702e0 rpc: speedup block&tx RPC calls (jeffro256)

ACKs: thomasbuilds*, selsta, jpk68
2026-08-28 07:58:16 +00:00
jeffro256 59702e0275 rpc: speedup block&tx RPC calls
In RPC calls `get_blocks.bin` and `get_transactions`:
  1. Skip deserializing then re-serializing tx blobs
  2. Provide full unpruned transaction from mempool in `get_transactions` when `!req.prune`
  3. Change `on_get_transactions()` response sort time from O(N^2) to O(N)
  4. Generally improve memory usage and lookups in `on_get_transactions()`

Reviewed-by: selsta <selsta@sent.at>
Reviewed-by: j-berman <justinberman@protonmail.com>
Reviewed-by: jpk68 <jpk68@tutanota.com>
2026-08-27 15:08:57 -05:00
Thomas c1df77c81a cryptonote_basic: remove dead code 2026-08-20 20:43:23 +02:00
j-berman 236ca60be0 cryptonote_basic: parse_and_validate_tx param to check max size
Simple API to check max blob size before parsing. This is useful
when reading blobs from untrusted sources.

@selsta pointed out that coinbase txs can technically be larger
than get_max_tx_size(), otherwise we could enforce it on all txs.
2026-08-13 09:12:10 -07:00
tobtoht ed0363031c Merge pull request #11067
bfe6990 cryptonote_basic: sanity check on key offsets (j-berman)

ACKs: jpk68*, SNeedlewoods, thomasbuilds, jeffro256
2026-08-13 13:03:22 +00:00
j-berman bfe699082e cryptonote_basic: sanity check on key offsets
Nice early check on allowed n key offsets per tx based on the
guaranteed ceiling for the entire chain.
2026-08-07 14:25:58 -07:00
Cole Munz 5f767c6e4e cryptonote_basic: keep additional derivations aligned in key image helper
generate_key_image_helper only appended to additional_recv_derivations when
generate_key_derivation succeeded. A tx pubkey that is not a valid point makes
that call fail, so every later derivation shifted down one slot.

is_out_to_acc_precomp indexes that vector by the output index, so once the
list is short the lookup either falls off the bounds check or reads the
derivation belonging to a different output. Either way the helper reports that
the output does not belong to the address, and the wallet cannot build a key
image for an output it owns. Anyone who can put a transaction in front of the
wallet chooses those pubkeys.

The main tx pubkey a few lines up already handles a failed derivation by
keeping its slot and padding with identity, and wallet2 does the same in the
three places it builds this list (wallet2.cpp:2393, :7887, :13397). Do it here
too.
2026-07-31 23:37:25 -05:00
jeffro256 edea8505db general: replace auto_scope_leave_caller with scope_guard
And replace unused inclusions of misc_language.h
2026-07-15 19:54:58 -05:00
selstaandjeffro256 dc8bc028a6 cryptonote: scope 202612 PoW workaround
The block 202612 PoW workaround previously applied to any block at
height 202612. Restrict it to the object hashes of the known historical
mainnet, testnet, and stagenet block hashing blobs so new chains do not
inherit the fixed PoW hash, which would prevent sync or mining past that
height if their difficulty is higher.

Reported-by: DataHoarder
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
2026-07-03 14:59:41 +02:00
tobtoht a9d9134f62 Merge pull request #10800
f4047ae cryptonote_basic: copy tx extra payment IDs (Ap4sh)

ACKs: jeffro256, selsta
2026-07-01 20:00:37 +00:00
Ap4sh f4047aeb41 cryptonote_basic: copy tx extra payment IDs 2026-06-21 16:41:13 +02:00
jpk68 d7e23999d9 cryptonote_basic: remove unused function 2026-06-16 21:34:48 -04:00
j-berman 94089a8788 cryptonote_basic: pruned hash return bool 2026-04-21 12:04:31 -07:00
tobtoht 2404f1bc92 Merge pull request #10220
2eed71e cryptonote_basic: fix add_extra_nonce_to_tx_extra() length (jeffro256)
2026-03-01 11:27:03 +00:00
jeffro256 2eed71e575 cryptonote_basic: fix add_extra_nonce_to_tx_extra() length
Reviewed-by: selsta <selsta@sent.at>
Reviewed-by: SChernykh
2026-02-24 17:13:37 -06:00
jeffro256 6a99c22cbc rpc: return error gracefully on cryptonight v1 check 2026-01-31 10:14:05 -06:00
tobtoht 74dd968cd9 Merge pull request #10039
488bf71 cryptonote_basic: add overload for get_block_longhash() (jeffro256)
2026-01-29 15:43:22 +00:00
jeffro256 ca27d519df cryptonote_basic: remove redundant call to get_transaction_hash() in overload
Issue noticed by DataHoarder.
2025-10-05 16:47:57 -05:00
jeffro256 488bf71925 cryptonote_basic: add overload for get_block_longhash() 2025-09-07 09:58:20 -05:00
jeffro256 06b74ae3f5 ringct & cryptonote_basic: detangle dependencies
`libringct` was linking against `libcryptonote_basic` for a single, one-line convenience function: `cryptonote::get_blob_hash`.
Since `cryptonote_basic.h` includes `rctTypes.h`, this one function effectively made an explicit circular dependency between
the two libraries. `cryptonote_format_utils.cpp` was including header `rctSigs.h` from `libringct`, when only `rctOps.h` from
`libringct_basic` needed to be included. `libcryptonote_basic` wasn't explictly linking against `libringct_basic` nor
`libringct` like it should have. And `libblockchain_db` wasn't linking against `libcryptonote_basic` like it should have. We
can also downgrade `libblockchain_db`'s dependency on `libringct` to `libringct_basic`.
2025-05-07 19:52:24 -05:00
jeffro256 c069c04ede blockchain sync: reduce disk writes from 2 to 1 per tx 2025-03-10 01:02:37 -05:00
luigi1111 785e3ac673 Merge pull request #9122
a79734c cryptonote_basic: faster and more readable is_valid_decomposed_amount (jeffro256)
2024-12-23 10:18:07 -05:00
jeffro256 ed955bf751 build: fix build with Boost 1.85 and remove instances of viewkey logging
1. Use `std::is_standard_layout` and `std::is_trivially_copyable` instead of `std::is_pod` for KV byte-wise serialization, which fixes compile issue for Boost UUIDs
2. Use `std::has_unique_object_representations` instead of `alignof(T) == 1` for epee byte spans and epee hex functions
3. Removed reimplementation of `std::hash` for `boost::uuids::uuid
4. Removed `<<` operator overload for `crypto::secret_key`
5. Removed instances in code where private view key was dumped to the log in plaintext
2024-09-06 11:46:22 -05:00
copyCat 341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
jeffro256 a79734c848 cryptonote_basic: faster and more readable is_valid_decomposed_amount
Includes performance tests
2024-01-15 15:44:10 -06:00
Crypto Cityandmoneromooo-monero 53e632b435 fix merge mining with more than one merge mined chain
reported by sech1
2023-11-30 17:01:52 +00:00
jeffro256 7206ef8ab8 cryptonote_basic: fix amount overflow detection on 32-bit systems
On systems where `ULONG_MAX` != `ULLONG_MAX` (e.g. most 32-bit systems), the `round_money_up` function will not correctly detect overflows.
2023-06-02 22:14:26 -05:00
mj-xmrandmj-xmr 5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
j-berman 04a1e2875d ledger support for hf 15 (BP+, view tags) 2022-08-06 15:00:49 -07:00
moneromooo-monero 4278a3a7e3 cryptonote_basic: catch crypto api errors 2022-06-20 22:17:57 +00:00
Luke Parker baee2c06ec Preserve commitment format inside transactions 2022-04-21 18:58:47 -04:00
j-berman ea87b30f89 Add view tags to outputs to reduce wallet scanning time
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-18 00:49:53 -07:00
moneromooo-monero b030f20751 Fee changes from ArticMine
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-10 18:13:34 +00:00
luigi1111 0eb1b570b6 Merge pull request #8197
da9aa1f Copyright: Update to 2022 (mj-xmr)
2022-04-06 00:08:53 -04:00
moneromooo-monero 4c94cfecfc store outPk/8 in the tx for speed
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-05 18:50:22 +00:00
moneromooo-monero a0d80b1f95 plug bulletproofs plus into consensus 2022-04-05 18:50:17 +00:00
mj-xmr da9aa1f7f8 Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
koe e08abaa43f multisig key exchange update and refactor 2022-02-22 16:37:42 -06:00
anonandselsta fe76d7dee7 cmake: fix undefined symbols and multiple definitions 2021-07-13 08:00:20 +02:00
Lee Clagett 08e4497c6e Improve cryptonote (block and tx) binary read performance 2021-01-23 06:23:39 +00:00
mj-xmr dc81e23e60 Split epee/string_tools.h and encapsulate boost::lexical_cast 2021-04-16 20:54:20 +02:00
luigi1111 8d7c1135b8 Merge pull request #6810
19b2283 New add_aux_pow RPC to support merge mining (moneromooo-monero)
2021-03-20 01:33:10 -04:00
moneromooo-monero 19b228393f New add_aux_pow RPC to support merge mining 2021-02-09 11:58:21 +00:00