Commit Graph

1531 Commits

Author SHA1 Message Date
luigi1111 1f27fdf6a5
Merge pull request #8588
802c4bb Move update_checkpoints() to a later stage (SChernykh)
2022-09-26 15:00:59 -05:00
SChernykh 802c4bb0e4 Move update_checkpoints() to a later stage
update_checkpoints() makes a few DNS requests and can take up to 20-30 seconds to complete (3-6 seconds on average). It is currently called from core::handle_incoming_block() which holds m_incoming_tx_lock, so it blocks all incoming transactions and blocks processing while update_checkpoints() is running. This PR moves it to until after a new block has been processed and relayed, to avoid full monerod locking.
2022-09-22 13:06:39 +02:00
SChernykh 6adf03cdc5 Second thread pool for IO 2022-09-20 10:22:12 +02:00
j-berman 864a78ee5f wallet2: check wallet compatibility with daemon's hard fork version 2022-09-12 21:23:08 -06:00
luigi1111 3178bbe083
Merge pull request #8552
93db74a rpc: skip bootstrap nodes that are lower than last checkpoint (selsta)
2022-09-09 12:55:40 -05:00
selsta 93db74a91e
rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:09:39 +02:00
selsta 09ee78197c
build: prepare v0.18.1.1 2022-09-06 20:22:29 +02:00
luigi1111 b9e8504cfb
Merge pull request #8467
fac7c43 continue pool pruning even if a tx can't be found (j-berman)
2022-08-09 17:43:32 -05:00
luigi1111 dc2f548a68
Merge pull request #8470
309f6ba build: prepare v0.18.1.0 (selsta)
2022-08-09 15:00:16 -05:00
luigi1111 5c33f40cd8
Merge pull request #8455
099fc1f Fixed get_block_template_backlog performance (SChernykh)
2022-08-08 20:29:56 -05:00
selsta 309f6ba3f5
build: prepare v0.18.1.0 2022-07-28 23:14:02 +02:00
j-berman fac7c43644 continue pool pruning even if a tx can't be found 2022-07-26 17:28:02 -07:00
SChernykh 099fc1f8a9 Fixed get_block_template_backlog performance
Before the fix, it processed all transactions in the mempool which could be very slow when mempool grows to several MBs in size. I observed `get_block_template_backlog` taking up to 15 seconds of CPU time under high mempool load.

After the fix, only transactions that can potentially be mined in the next block will be processed (a bit more than the current block median weight).
2022-07-22 13:50:21 +02:00
j-berman 8cc3c9af4d Publish submitted txs via zmq 2022-07-21 11:53:31 -07:00
luigi1111 f982163fc9
Merge pull request #8425
fe5d1be build: prepare v0.18.0.0 (selsta)
2022-07-15 11:23:54 -04:00
selsta fe5d1bef56
build: prepare v0.18.0.0 2022-07-13 22:07:31 +02:00
anon c7b2944f89 multisig: fix critical vulnerabilities in signing 2022-06-30 12:56:40 -05:00
j-berman b9d2c788bc fix backoff delay logic when re-relaying txs 2022-05-12 08:39:51 -07:00
luigi1111 e13244ea9c
Merge pull request #8178
5d388eb Bump ring size to 16 for v15 & remove set default in wallet cli (j-berman)
2022-04-25 10:18:26 -05:00
j-berman 5d388eb74d Bump ring size to 16 for v15 & remove set default in wallet cli 2022-04-18 14:36:28 -07: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 627f04c19a
Merge pull request #8212
591c174 Remove footgun doc comment in miner TX validation (Luke Parker)
2022-04-06 00:14:44 -04:00
luigi1111 04e490c8da
Merge pull request #8205
0d6fce8 Compil. time: cryptonote_core minus portable_storage header (mj-xmr)
2022-04-06 00:11:14 -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 a0d80b1f95
plug bulletproofs plus into consensus 2022-04-05 18:50:17 +00:00
Luke Parker 591c174235
Remove footgun doc comment in miner TX validation
This comment suggests this check is unnecessary, when it is completely necessary as miner TXs can have multiple outputs *which is a statement directly, and incorrectly, contradicted by this comment*. While I don't ever see someone removing this code and getting their edits merged into Monero, someone inexperienced who thinks they're cleaning old code may break their own work, and then there's really just zero benefit to keeping this around.
2022-03-10 14:08:30 -06:00
mj-xmr 0d6fce8995
Compil. time: cryptonote_core minus portable_storage header 2022-03-04 12:48:35 +01:00
mj-xmr da9aa1f7f8
Copyright: Update to 2022 2022-03-04 06:59:20 +01:00
luigi1111 5eaa4434e8
Merge pull request #7877
e08abaa multisig key exchange update and refactor (koe)
2022-03-02 18:51:54 -05:00
koe e08abaa43f multisig key exchange update and refactor 2022-02-22 16:37:42 -06:00
luigi1111 9a17f53489
Merge pull request #8070
a4ebec9 Add python method (Howard Chu)
0221b01 Add calcpow RPC (Howard Chu)
2021-11-26 23:01:08 -06:00
Howard Chu 0221b01519
Add calcpow RPC
Calculate PoW hash for a block candidate
2021-11-20 18:52:05 +00:00
selsta 82828bfcb6
cryptonote_core: fix unused lambda warning 2021-11-16 05:21:56 +01:00
moneromooo-monero bbe3b276b8
tx_pool: full tx revalidation on fork boundaries
avoids mining txes after a fork that are invalid by this fork's
rules, but were valid by the previous fork rules at the time
they were verified and added to the txpool.
2021-11-01 20:56:38 +00:00
selsta 48a0997d8c
blockchain: fix pedantic assert 2021-10-11 19:09:45 +02:00
luigi1111 298c9a357f
Merge pull request #7891
dfee15e RPC and ZeroMQ APIs to support p2pool (SChernykh)
2021-09-23 22:10:03 -05: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
luigi1111 7848a467c5
Merge pull request #7616
4ced092 daemon: allow proxy configuration (anon, selsta, tobtoht)
2021-09-09 15:09:51 -04:00
anon 4ced092aae daemon: allow proxy configuration
Co-authored-by: selsta <selsta@sent.at>
Co-authored-by: tobtoht <thotbot@protonmail.com>
2021-08-20 21:24:29 +02:00
luigi1111 9903b35345
Merge pull request #7754
8ff21e1 doc: update IRC references to Libera (fdov)
2021-07-10 17:59:23 -04:00
luigi1111 3366bd81eb
Merge pull request #7612
254a133 core: speed up print_coinbase_tx_sum (moneromooo-monero)
2021-06-24 13:59:44 -05:00
fdov 8ff21e1e84
doc: update IRC references to Libera 2021-06-20 21:44:45 +02:00
luigi1111 667d3dd4c2
Merge pull request #7684
ed6f053 blockchain: speed up repeated pops (mostly in tests) (moneromooo-monero)
2021-06-10 11:46:27 -05:00
luigi1111 381f8f5e24
Merge pull request #7709
a1c4307 Warnings: unused variable in core/blockchain.cpp (mj-xmr)
2021-06-01 22:06:54 -05:00
mj-xmr a1c4307128
Warnings: unused variable in core/blockchain.cpp 2021-05-08 12:04:19 +02:00
mj-xmr 581c3af03a
Warnings: unused var at cryptonote_tx_utils.cpp 2021-05-02 18:00:29 +02:00
moneromooo-monero ed6f05357c
blockchain: speed up repeated pops (mostly in tests)
The heavy rolling median reset only has to be performed after
all blocks are popped
2021-04-26 14:07:35 +00:00
luigi1111 63c7ca07fb
Merge pull request #7136
23aae55 Remove payload copy in all outgoing p2p messages (Lee Clagett)
2021-04-16 12:45:30 -05: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
moneromooo-monero 254a1338ad
core: speed up print_coinbase_tx_sum
It only needs to parse the tx headers, not the full tx data
2021-03-18 11:16:08 +00:00
moneromooo-monero f9b5b521e8
fix serialization being different on mac
On Mac, size_t is a distinct type from uint64_t, and some
types (in wallet cache as well as cold/hot wallet transfer
data) use pairs/containers with size_t as fields. Mac would
save those as full size, while other platforms would save
them as varints. Might apply to other platforms where the
types are distinct.

There's a nasty hack for backward compatibility, which can
go after a couple forks.
2021-03-05 23:42:33 +00:00
luigi1111 6556c33f13
Merge pull request #7355
bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett)
1572df9 Removing unused namespace alias (Lee Clagett)
2021-02-18 14:06:47 -05: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 bd129849f0 Remove copies from foreach loops (thanks to Clang) 2021-01-28 23:42:40 -05:00
Lee Clagett 679d05567d Remove payload copy in all outgoing p2p messages 2021-01-19 02:22:32 +00:00
luigi1111 e45619e61e Revert "Merge pull request #7136"
This reverts commit 63c7ca07fb, reversing
changes made to 2218e23e84.
2021-04-16 13:52:44 -05:00
Lee Clagett 23aae5571b Remove payload copy in all outgoing p2p messages 2021-01-16 22:53:28 +00:00
moneromooo-monero 1e27f7101e
blockchain: lock access to m_blocks_hash_of_hashes
it is accessed both when adding and when prevalidating a set
of new hashes from a peer
2021-01-02 22:19:54 +00:00
moneromooo-monero 0aa541b361
protocol: more sanity checks in new chain block hashes 2020-12-31 23:33:18 +00:00
moneromooo-monero 1eb14af1a3
rpc: limit the number of txes for get_blocks.bin 2020-12-29 04:31:58 +00:00
Alexander Blair 4f401f6fca
Merge pull request #7025
b10878f10 Change Dandelion++ fluff probability to 20%, and embargo timeout to 39s (Lee Clagett)
2020-12-01 14:23:49 -08:00
luigi1111 850edfe419
Merge pull request #7021
d73cb95 Fix timeout checks for forwarded and Dandelion++ stem txes (Lee Clagett)
2020-11-29 01:59:35 -06:00
luigi1111 36d31ba0be
Merge pull request #7018
a9cd5d9 cryptonote_core: dandelion - use local height or median height if syncing (xiphon)
2020-11-29 01:58:13 -06:00
luigi1111 4d298d4f11
Merge pull request #6924
874487f blockchain: remove some dead code (moneromooo-monero)
2020-11-29 01:44:26 -06:00
luigi1111 999e797cea
Merge pull request #6922
a25bc71 Make Blockchain::get_fee_quantization_mask() compile time (SChernykh)
2020-11-29 01:40:59 -06:00
xiphon a9cd5d914e cryptonote_core: dandelion - use local height or median height if syncing 2020-11-25 01:27:42 +00:00
Lee Clagett b10878f108 Change Dandelion++ fluff probability to 20%, and embargo timeout to 39s
A 20% fluff probability increases the precision of a spy connected to
every node by 10% on average, compared to a network using 0% fluff
probability. The current value (10% fluff) should increase precision by
~5% compared to baseline.

This decreases the expected stem length from 10 to 5. The embargo
timeout was therefore lowered to 39s; the fifth node in a stem is
expected to have a 90% chance of being the first to timeout, which is
the same probability we currently have with an expected stem length of
10 nodes.
2020-11-17 21:45:37 -05:00
Lee Clagett d73cb95dfa Fix timeout checks for forwarded and Dandelion++ stem txes 2020-11-15 00:08:10 -05:00
moneromooo-monero 874487fed8
blockchain: remove some dead code
This is already done
2020-10-20 16:50:36 +00:00
SChernykh a25bc71f3f Make Blockchain::get_fee_quantization_mask() compile time
This also removes potential thread safety bug in that function.
2020-10-20 14:16:09 +02:00
Nathan Dorfman f1836ac28a cryptonote_core: Fix missing override warnings 2020-10-19 18:23:07 -06:00
Alexander Blair 8e3f46dd0a
Merge pull request #6881
11b20229c tx_pool: silence spammy harmless warning till we fix the bug (moneromooo-monero)
2020-10-18 23:25:54 -07:00
Alexander Blair 543d600042
Merge pull request #6875
a12a8174e Dandelion++: skip desynced peers in stem phase (xiphon)
2020-10-18 23:25:08 -07:00
moneromooo-monero 88fde0309a
blockchain: fix sync at v14 boundary
Miners with MLSAG txes which they'd already verified included
a couple in that block, but the consensus rules had changed
in the meantime, so that block is technically invalid and any
node which did not already have those two txes in their txpool
could not sync. Grandfather them in, since it has no effect in
practice.
2020-10-18 11:52:33 +00:00
moneromooo-monero 11b20229c9
tx_pool: silence spammy harmless warning till we fix the bug 2020-10-12 14:07:40 +00:00
xiphon a12a8174e0 Dandelion++: skip desynced peers in stem phase 2020-10-12 13:44:06 +00:00
moneromooo-monero 4971219c2c
blockchain: deterministic UNIX time unlock checks
Based on a patch by TheCharlatan <seb.kung@gmail.com>
2020-09-15 11:40:28 +00:00
selsta f240b1dd88
build: prepare v0.17 2020-09-14 16:52:42 +02:00
moneromooo-monero fc2cb224a9
blockchain: fix pow skipping for old blocks without precalc hash 2020-09-07 01:57:19 +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
luigi1111 ee0b02d0db
Merge pull request #6757
6a37da8 threadpool: guard against exceptions in jobs, and armour plating (moneromooo-monero)
2020-09-03 12:25:59 -05:00
moneromooo-monero 6a37da837e
threadpool: guard against exceptions in jobs, and armour plating
Those would, if uncaught, exit run and leave the waiter to wait
indefinitely for the number of active jobs to reach 0
2020-09-01 14:33:33 +00:00
moneromooo-monero d20ff4f648
functional_tests: add a large (many randomx epochs) p2p reorg test 2020-08-27 15:13:04 +00:00
moneromooo-monero 9d42649d58
core: fix mining from a block that's not the current top 2020-08-27 15:13:00 +00:00
moneromooo-monero 82ee01699c
Integrate CLSAGs into monero
They are allowed from v12, and MLSAGs are rejected from v13.
2020-08-27 12:44:04 +00:00
Alexander Blair 0c101f1236
Merge pull request #6767
07442a605 Fix build with Boost 1.74 (moneromooo-monero)
2020-08-27 03:07:32 -07:00
Alexander Blair b04da25e4d
Merge pull request #6760
844fb4e94 enforce claiming maximum coinbase amount (moneromooo-monero)
2020-08-27 03:01:28 -07:00
moneromooo-monero 844fb4e940
enforce claiming maximum coinbase amount
Claiming a slightly lesser amount does not yield the size gains
that were seen pre rct, so this closes a fingerprinting vector
2020-08-21 12:36:53 +00:00
moneromooo-monero 55363c5941
Avoid some temporary strings when reading off the database 2020-08-17 14:02:27 +00:00
Alexander Blair d73b1b6560
Merge pull request #6727
13eee1d6a rpc: reject wrong sized txid (moneromooo-monero)
92e6b7df2 easylogging++: fix crash with reentrant logging (moneromooo-monero)
6dd95d530 epee: guard against exceptions in RPC handlers (moneromooo-monero)
90016ad74 blockchain: guard against exceptions in add_new_block/children (moneromooo-monero)
2020-08-16 12:55:25 -07:00
Alexander Blair bc48494731
Merge pull request #6661
267ce5b71 avoid a couple needless copies (moneromooo-monero)
2020-08-16 12:45:37 -07:00
Alexander Blair c6c4ead44e
Merge pull request #6614
fb31167b1 Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' command (rbrunner7)
2020-08-16 12:44:03 -07:00
moneromooo-monero 07442a6059
Fix build with Boost 1.74
Thanks iDunk for testing
2020-08-16 16:23:26 +00:00
Alexander Blair c108c5e2f0
Merge pull request #6354
67ade8005 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 (Lee Clagett)
2020-08-09 06:42:49 -07:00
moneromooo-monero 90016ad744
blockchain: guard against exceptions in add_new_block/children
Reporter requested credit to be given to Decred
2020-07-30 22:52:11 +00:00
rbrunner7 fb31167b12 Wallet, daemon: From 'help_advanced' back to 'help', and new 'apropos' command 2020-07-24 07:12:11 +02:00