Commit Graph

348 Commits

Author SHA1 Message Date
luigi1111 4b1910af13
Merge pull request #9073
53e632b fix merge mining with more than one merge mined chain (Crypto City)
2024-01-18 18:01:34 -05:00
luigi1111 5d3679c43c
Merge pull request #9069
a11e03a serialization: fix infinite loops and clean up dispatching (jeffro256)
2024-01-18 18:00:25 -05:00
Crypto City 53e632b435
fix merge mining with more than one merge mined chain
reported by sech1
2023-11-30 17:01:52 +00:00
jeffro256 a11e03afa6
serialization: fix infinite loops and clean up dispatching
Resolves #8687
2023-11-18 03:47:55 -06:00
luigi1111 b22ba16dec
Merge pull request #9038
e191083 epee: remove dead code in math_helper and string_tools (jeffro256)
2023-11-06 09:31:33 -05:00
luigi1111 a87f2bdd3f
Merge pull request #8979
80b5bf8 gcc: fix uninitialized constructor warnings (jeff)
2023-11-06 09:23:48 -05:00
luigi1111 10f208fbc5
Merge pull request #8989
9b231c9 add account_generators for mapping public EC generators to account keys (koe)
2023-10-25 21:37:37 -04:00
jeffro256 e191083bed
epee: remove dead code in math_helper and string_tools 2023-10-25 16:41:21 -05:00
jeff 80b5bf8b3d
gcc: fix uninitialized constructor warnings 2023-10-16 16:48:27 -05:00
koe 9b231c9ac3 add account_generators for mapping public EC generators to account keys 2023-09-10 16:02:46 -05:00
jeffro256 b0bf49a65a
blockchain_db: add k-anonymity to txid fetching
Read more about k-anonymity [here](https://en.wikipedia.org/wiki/K-anonymity). We implement this feature in the monero daemon for transactions
by providing a "Txid Template", which is simply a txid with all but `num_matching_bits` bits zeroed out, and the number `num_matching_bits`. We add an operation to `BlockchainLMDB` called
`get_txids_loose` which takes a txid template and returns all txids in the database (chain and mempool) that satisfy that template. Thus, a client can
ask about a specific transaction from a daemon without revealing the exact transaction they are inquiring about. The client can control the statistical
chance that other TXIDs (besides the one in question) match the txid template sent to the daemon up to a power of 2. For example, if a client sets their `num_matching_bits`
to 5, then statistically any txid has a 1/(2^5) chance to match. With `num_matching_bits`=10, there is a 1/(2^10) chance, so on and so forth.

Co-authored-by: ACK-J <60232273+ACK-J@users.noreply.github.com>
2023-08-01 17:25:25 -05:00
luigi1111 794f59b8bd
Merge pull request #8844
7206ef8 cryptonote_basic: fix amount overflow detection on 32-bit systems (jeffro256)
2023-06-27 11:37:54 -05: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
SChernykh 092e964a87 Fixed RandomX initialization when mining from scratch 2023-04-27 16:31:21 +02:00
luigi1111 5387018ade
Merge pull request #8771
2eaa523 cryptonote::transaction_prefix: fix IDE parsing error (koe)
2023-04-25 11:21:22 -04:00
luigi1111 8172e4d8ad
Merge pull request #8765
630906c cryptonote_basic: remove unused struct (tobtoht)
2023-04-25 11:20:12 -04:00
luigi1111 9bf06ea75d
Merge pull request #8698
5b4fea7 Copyright: Update to 2023 (mj-xmr)
2023-04-25 11:12:56 -04:00
jeffro256 caa7561705 cryptonote core/protocol: don't drop peers for soft offenses
Also: txs with tx_extra which is too large will not get published to ZMQ

Co-authored-by: SChernykh <sergey.v.chernykh@gmail.com>
2023-03-29 02:05:43 -05:00
koe 2eaa523af1 cryptonote::transaction_prefix: fix IDE parsing error 2023-03-09 15:18:21 -06:00
tobtoht 630906ce5b
cryptonote_basic: remove unused struct 2023-03-06 15:15:00 +01:00
tevador 3771641fc5 Add a size limit for tx_extra in tx pool 2023-02-26 10:26:53 +01:00
mj-xmr 5b4fea72cf Copyright: Update to 2023
Co-authored-by: plowsof <plowsof@protonmail.com>
extra files
2023-01-16 13:00:18 +01:00
SChernykh dab7d01dc0 Refactored rx-slow-hash.c
- Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)`
- Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens
- `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance)
- New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification)
- When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then)
- When mining is running, PoW checks now also use dataset for faster verification
2023-01-09 07:43:07 +01:00
j-berman b8271ab881 wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:24:24 -06: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
selsta 1164874afc
src, epee: fix a couple compiler warnings 2022-05-17 00:33:10 +02:00
Luke Parker baee2c06ec
Preserve commitment format inside transactions 2022-04-21 18:58:47 -04:00
luigi1111 96758a7d05
Merge pull request #8061
ea87b30 Add view tags to outputs to reduce wallet scanning time (j-berman)
2022-04-19 22:14:03 -05:00
Jeffrey 7764d69782 Move copyable_atomic into connection_context
Relevant commit from old PR:
bd0a511995
2022-04-18 09:55:21 -05: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
luigi1111 6694597974
Merge pull request #8207
4db6aed CMake: Add missing headers via monero_find_all_headers macro (mj-xmr)
2022-04-18 02:14:04 -05: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
mj-xmr 4db6aed98c CMake: Add missing headers via monero_find_all_headers macro 2022-04-06 08:12:44 +02:00
luigi1111 bb093ec9a8
Merge pull request #8223
17772ef Eliminate dependence on boost::interprocess #8223 (Jeffrey)
2022-04-06 00:19:59 -04: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
Jeffrey 17772ef53e Eliminate dependence on boost::interprocess #8223
In this repo, `boost::interprocess` was being used soley to make `uint32_t` operations atomic. So I replaced each instance of
`boost::interprocess::ipcdetail::atomic(...)32` with `std::atomic` methods. I replaced member declarations as applicable. For example,
when I needed to change a `volatile uint32_t` into a `std::atomic<uint32_t>`. Sometimes, a member was being used a boolean flag, so
I replaced it with `std::atomic<bool>`.

You may notice that I didn't touch `levin_client_async.h`. That is because this file is entirely unused and will be deleted in PR monero-project#8211.

Additional changes from review:
* Make some local variables const
* Change postfix operators to prefix operators where value was not need
2022-03-30 13:18:32 -05: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
SChernykh dfee15eee1 RPC and ZeroMQ APIs to support p2pool
Adds the following:

- "get_miner_data" to RPC API
- "json-miner-data" to ZeroMQ subscriber contexts

Both provide the necessary data to create a custom block template. They are used by p2pool.

Data provided:

- major fork version
- current height
- previous block id
- RandomX seed hash
- network difficulty
- median block weight
- coins mined by the network so far
- mineable mempool transactions
2021-09-11 15:15:07 +02:00
anon 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 2218e23e84
Merge pull request #7002
673c6d2 Reduce compilation time of epee/portable_storage_template_helper.h (mj-xmr)
2021-04-16 12:43:42 -05:00
mj-xmr 673c6d2d11 Reduce compilation time of epee/portable_storage_template_helper.h 2021-03-28 15:41:48 +02:00
anon fe632560f4
cryptonote_protocol_handler: fix race condition 2021-03-22 19:42:46 +00: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