Commit Graph

338 Commits

Author SHA1 Message Date
jeffro256 a03e5c3905
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-04-11 15:04:55 +03:00
tobtoht b1710a4fcc
cryptonote_basic: remove unused struct 2023-03-18 11:27:41 +03:00
tevador 2944371b43
Add a size limit for tx_extra in tx pool 2023-02-24 11:33:45 +03:00
wowario b06dd76792
use rx_set_miner_thread after RX_BLOCK_VERSION 2023-02-24 11:33:30 +03:00
wowario a636325df3
support old BP 2023-02-24 11:27:46 +03:00
wowario 47f78dc11a
vote by block 2023-02-24 11:27:32 +03:00
wowario 2d3fa0f1c9
tidy up miner msgs 2023-02-24 11:27:16 +03:00
wowario 7d1b51ebf7
miner block header signing 2023-02-24 11:27:00 +03:00
wowario dd4556c5e1
difficulty is fun 2023-02-24 11:26:48 +03:00
wowario 5c42087ec3
revert Preserve commitment format inside transactions #8277 2023-02-24 11:23:01 +03:00
wowario b895d04401
set decimal point 2023-02-24 11:15:35 +03:00
wowario 2581457497
remove monero tx bug fixes 2023-02-24 11:11:00 +03:00
SChernykh f698f2b708 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
2022-12-14 07:21:00 +01:00
j-berman 864a78ee5f wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:23:08 -06:00
j-berman 2b83d00a9b ledger support for hf 15 (BP+, view tags) 2022-08-06 15:04:16 -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:
bd0a5119957d3ef9130a0b82599e1696995ef235
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
Kevin Barbour 85db1734e7
Remove unused variables in monero codebase
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.
2021-02-09 08:05:05 +01:00
Lee Clagett 927141bcc4 Command max_bytes moved from dynamic map to static switch 2020-12-22 20:54:16 +00:00
moneromooo-monero b652d598d1
add a max levin packet size by command type 2021-01-03 14:07:45 +00:00
Lee Clagett 61b6e4cc67 Add aggressive restrictions to pre-handshake p2p buffer limit 2020-12-17 00:36:10 +00:00
moneromooo-monero 4310780c08
cryptonote_basic: guess what got lost porting patches to branches again 2020-12-26 23:43:59 +00:00
moneromooo-monero efe83982d3
protocol: drop nodes if they claim new data but only give stale data
Some joker is spending time actually doing this
2020-12-25 20:30:39 +00:00
moneromooo 5d1849a9eb
protocol: stricter checks on received chain hash list 2020-12-11 18:47:40 +00:00
moneromooo ff7fdf6db2
protocol: drop peers that don't reply to queries 2020-12-06 15:57:40 +00:00
moneromooo 61f5001c3f
protocol: add scoring system to drop peers that don't behave 2020-12-04 01:55:21 +00:00
Riccardo Spagni aefa7740c3
Merge pull request #6111
d20ff4f64 functional_tests: add a large (many randomx epochs) p2p reorg test (moneromooo-monero)
6a0b3b1f8 functional_tests: add randomx tests (moneromooo-monero)
9d42649d5 core: fix mining from a block that's not the current top (moneromooo-monero)
2020-09-06 15:49:37 +02:00