Commit Graph

7834 Commits

Author SHA1 Message Date
luigi1111
330212888a
Merge pull request #9383
9f83e74 Daemon RPC: /getblocks.bin return chain's top_block_hash in resp (j-berman)
2024-07-16 19:00:39 -04:00
luigi1111
4ed5bc5436
Merge pull request #9382
356829a Daemon RPC: high_height_ok req boolean field /getblocks.bin (j-berman)
2024-07-16 19:00:06 -04:00
luigi1111
8dbbc47804
Merge pull request #9379
6c28bdb wallet2: move get_rpc_status func to RPC server definition file (j-berman)
2024-07-16 18:58:08 -04:00
luigi1111
cfd7f5222d
Merge pull request #9370
9fc48f4 Fix ZMQ Tx Pruning (Lee Clagett)
2024-07-16 18:56:44 -04:00
luigi1111
66c5917876
Merge pull request #9353
32f3245 cryptonote_protocol: prevent duplicate txs in fluff queue (0xFFFC0000)
2024-07-16 18:51:30 -04:00
luigi1111
e3cfaed278
Merge pull request #9346
0fad1a8 src: update checkpoints to match v0.18.3.4 (selsta)
2024-07-16 18:49:44 -04:00
luigi1111
c2fceb2939
Merge pull request #9344
a026d5a wallet2: validate fetched block height and parent hash (Oscar Mira)
c634c26 wallet2: use start_height consistently as const in process_parsed_blocks (Oscar Mira)
2024-07-16 18:48:43 -04:00
luigi1111
baf6df06c2
Merge pull request #9343
302fa9b wallet: fetch pool txs in pruned form (jeffro256)
2024-07-16 18:46:04 -04:00
luigi1111
040bccc22f
Merge pull request #9338
4a376d6 copyright: fix vector.h typo (hinto.janaiyo)
d61e8e9 workflows: delete copyright.yml (plowsof)
341771a copyright: bump to 2024 (copyCat)
2024-07-16 18:42:49 -04:00
luigi1111
85cf0b01fa
Merge pull request #9289
025021d BlockchainDB: shorter fixup() (jeffro256)
2024-07-16 18:40:46 -04:00
luigi1111
99e33996f4
Merge pull request #9288
262ef47 BlockchainDB: remove lock/unlock methods (jeffro256)
2024-07-16 18:32:42 -04:00
luigi1111
f145cb37a4
Merge pull request #9278
18fbe54 add sum of amounts for unspent_outputs (SNeedlewoods)
2024-07-16 18:31:59 -04:00
luigi1111
1ce9960ec6
Merge pull request #9215
3837bb8 remove repetitive word (cuinix)
2024-07-16 18:31:27 -04:00
luigi1111
d7eece3cae
Merge pull request #8619
e71c8bf wallet: background sync with just the view key (j-berman)
2024-07-16 18:29:47 -04:00
jeffro256
7fdaf61d41
Blockchain: fix temp fails causing alt blocks to be permanently invalid 2024-07-11 00:43:38 -05:00
Oscar Mira
a026d5ac44
wallet2: validate fetched block height and parent hash 2024-07-05 05:45:28 +02:00
Oscar Mira
c634c261c2
wallet2: use start_height consistently as const in process_parsed_blocks 2024-07-04 13:01:12 +02:00
j-berman
9f83e7434d Daemon RPC: /getblocks.bin return chain's top_block_hash in resp 2024-06-24 17:58:20 -07:00
j-berman
6c28bdb856 wallet2: move get_rpc_status func to RPC server definition file 2024-06-24 17:44:23 -07:00
Lee *!* Clagett
88afcdb8fa Fix ZMQ DaemonInfo:
* top_block_hash was never set in handler
  * wide_difficulty was never sent in JSON
  * wide_cumulative_difficulty was never sent in JSON
2024-06-24 19:57:20 -04:00
j-berman
356829a198 Daemon RPC: high_height_ok req boolean field /getblocks.bin
Behavior before: when start_height > chain tip, response fails

Behavior after: when req.high_height_ok is true && req.start_height
> chain tip, server rerturns a successful response that includes
chain height
2024-06-24 16:47:06 -07:00
0xFFFC0000
445319d3f1
src: update internal data structure to boost::bimap.
startup speed up 2-5x because this PR changing
O(n^2) operation to O(nlogn).
2024-06-21 07:22:19 +00:00
Lee Clagett
9fc48f4a8a Fix ZMQ Tx Pruning 2024-06-18 21:26:28 -04:00
0xFFFC0000
32f32453f1
cryptonote_protocol: prevent duplicate txs in fluff queue
1. Fix duplicate transaction #9335
2. Add test for cases where there are duplicate transaction in fluff

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-06-05 16:33:15 +00:00
Lee *!* Clagett
d64a5f70d2 Fix lmdb txn commit code 2024-06-04 18:55:39 -04:00
selsta
0fad1a8d08
src: update checkpoints to match v0.18.3.4 2024-05-29 15:59:56 +02:00
jeffro256
302fa9b5df
wallet: fetch pool txs in pruned form 2024-05-28 11:19:46 -05:00
j-berman
e71c8bf190 wallet: background sync with just the view key
- When background syncing, the wallet wipes the spend key
from memory and processes all new transactions. The wallet saves
all receives, spends, and "plausible" spends of receives the
wallet does not know key images for.
- When background sync disabled, the wallet processes all
background synced txs and then clears the background sync cache.
- Adding "plausible" spends to the background sync cache ensures
that the wallet does not need to query the daemon to see if any
received outputs were spent while background sync was enabled.
This would harm privacy especially for users of 3rd party daemons.
- To enable the feature in the CLI wallet, the user can set
background-sync to reuse-wallet-password or
custom-background-password and the wallet automatically syncs in
the background when the wallet locks, then processes all
background synced txs when the wallet is unlocked.
- The custom-background-password option enables the user to
open a distinct background wallet that only has a view key saved
and can be opened/closed/synced separately from the main wallet.
When the main wallet opens, it processes the background wallet's
cache.
- To enable the feature in the RPC wallet, there is a new
`/setup_background_sync` endpoint.
- HW, multsig and view-only wallets cannot background sync.
2024-05-24 23:11:58 -07:00
koe
ddf3af1f0c add key exchange round booster to multisig_account 2024-05-21 15:27:08 -05:00
selsta
a28c38c946
wallet2: correct variable usage in get_multisig_seed 2024-05-21 19:22:39 +02:00
copyCat
341771ac3e copyright: bump to 2024 2024-05-21 16:29:33 +00:00
luigi1111
af4fd61fe7
Merge pull request #9316
697986d net_node: update seed nodes (selsta)
2024-05-20 23:44:44 -05:00
luigi1111
e6acde1a07
Merge pull request #9310
6d4f7b8 wallet2: fix stagenet get_approximate_blockchain_height (selsta)
2024-05-20 23:41:06 -05:00
luigi1111
a3c67ab5ad
Merge pull request #9307
f9d9dd8 simplewallet: change boost::filesystem::complete to absolute. (0xFFFC0000)
2024-05-20 23:39:58 -05:00
luigi1111
6c346eca03
Merge pull request #9305
de9c461 common: support boost filesystem copy_options. Co-authored-by: selsta <selsta@sent.at> (0xFFFC0000)
2024-05-20 23:38:20 -05:00
luigi1111
fc452bd546
Merge pull request #9282
b27fda2 src: update checkpoints to match latest release (selsta)
2024-05-20 23:36:28 -05:00
luigi1111
b208eed32a
Merge pull request #9270
267e31f Add drop_and_recreate in privatefile class. When creating a private file we need to delete the file if exist. (0xFFFC0000)
2024-05-20 23:35:48 -05:00
luigi1111
58b1e931f7
Merge pull request #9268
463228b Skip privacy networks (on tx sends) that don't have outgoing connections (Lee *!* Clagett)
2024-05-20 23:34:39 -05:00
luigi1111
812535390f
Merge pull request #9259
427ba77 wallet2: ensure transfers and sweeps use same fee calc logic rnd2 (j-berman)
2024-05-20 23:32:48 -05:00
luigi1111
eb35250895
Merge pull request #9257
d6609b8 serialization: do any N-tuple (jeffro256)
2024-05-20 23:31:17 -05:00
luigi1111
6462d3760d
Merge pull request #9232
7194506 Blockchain: remove old fee calc logic (jeffro256)
2024-05-20 23:18:07 -05:00
luigi1111
1e5ad57e2e
Merge pull request #9211
9b946ae Removed default cryptonote address (SyntheticBird45)
2024-05-20 23:16:59 -05:00
luigi1111
9d960f056e
Merge pull request #9198
e151ff7 update blake2b test vectors (koe)
fa47c7b add blake2b to src/crypto (koe)
2024-05-20 23:13:25 -05:00
luigi1111
689381dff9
Merge pull request #9194
9d101d5 serialization: protect blob serialization from undefined behavior (jeffro256)
2024-05-20 23:12:28 -05:00
luigi1111
cdd7fc09b4
Merge pull request #9151
ff49444 @tobtoht: undo rebase changes tx.dsts -> tx_dsts (jeffro256)
38f354e Enforce Tx unlock_time is Zero by Relay Rule (jeffro256)
2024-05-20 23:11:09 -05:00
luigi1111
69ffc1aa85
Merge pull request #9064
4689ad2 trezor: support c++17 and protobuf v25, libusb fix (Dusan Klinec)
2024-05-20 22:48:35 -05:00
luigi1111
d95414aa22
Merge pull request #8920
236e5d4 update TimingsDatabase to support csv format and incremental updating (koe)
2024-05-20 22:47:33 -05:00
luigi1111
3a47cdad13
Merge pull request #7852
8d94d08 replace 'multisig()' with 'get_multisig_status()' using multisig_account_status and including '.kex_is_done' member (koe)
2024-05-20 22:35:57 -05:00
selsta
697986d948
net_node: update seed nodes
Also remove port for I2P seed nodes
2024-05-12 15:24:28 +02:00
0xFFFC0000
de9c461a98
common: support boost filesystem copy_options.
Co-authored-by: selsta <selsta@sent.at>
2024-04-30 23:20:10 +00:00
selsta
6d4f7b89c3
wallet2: fix stagenet get_approximate_blockchain_height 2024-04-28 21:15:38 +02:00
0xFFFC0000
f9d9dd88bb
simplewallet: change boost::filesystem::complete to absolute. 2024-04-27 14:23:39 +00:00
0xFFFC0000
267e31f5b7
Add drop_and_recreate in privatefile class.
When creating a private file we need to delete the file if exist.
2024-04-22 14:32:12 +00:00
cuinix
3837bb853f remove repetitive word
Signed-off-by: cuinix <915115094@qq.com>
2024-04-20 19:17:46 +08:00
jeffro256
025021dee0
BlockchainDB: shorter fixup()
Instead of hard-coding all missing key images into the code and inserting if missing,
we simply pop all blocks after height 202611. This makes the `monerod` binary about
0.35% smaller.
2024-04-11 14:34:56 -05:00
jeffro256
262ef473db
BlockchainDB: remove lock/unlock methods 2024-04-11 12:12:35 -05:00
Dusan Klinec
4689ad2d3c
trezor: support c++17 and protobuf v25, libusb fix
- fix If there is no protobuf version installed, if fails
- passphrase test fix, wallet keys init was missing
2024-04-10 18:19:22 +02:00
selsta
b27fda269e
src: update checkpoints to match latest release 2024-04-06 00:53:05 +02:00
jeffro256
ff49444ee8
@tobtoht: undo rebase changes tx.dsts -> tx_dsts 2024-04-05 13:12:34 -05:00
SNeedlewoods
18fbe54729 add sum of amounts for unspent_outputs 2024-03-30 13:18:12 +01:00
Lee *!* Clagett
463228b961 Skip privacy networks (on tx sends) that don't have outgoing connections 2024-03-29 13:01:58 -04:00
j-berman
427ba7702f wallet2: ensure transfers and sweeps use same fee calc logic rnd2
Looks like the logic from #8882 was accidentally removed in #8861
(regressing to the behavior noted in the #8882 description).
This commit brings that logic back.
2024-03-22 14:05:17 -07:00
koe
e151ff711f update blake2b test vectors 2024-03-21 09:51:40 -05:00
jeffro256
d6609b83d6
serialization: do any N-tuple 2024-03-19 14:49:36 -05:00
jeffro256
c4e1c5a640
ringct: fix trunc_amount field name change
Caused in commit 05231400ce, PR #9035.
2024-03-11 20:21:22 -05:00
jeffro256
9d101d5ea0
serialization: protect blob serialization from undefined behavior
There is currently no compiler protection when someone tries to
do (for example) `BLOB_SERIALIZER(std::vector<int>)`. You just
get runtime allocation errors. This has already eaten up dev time
before, so this PR adds a static assertion that the type must be
trivially copyable, as defined by the C++ standard. Types can
override this if applicable if they use `BLOB_SERIALIZER_FORCED`.
2024-03-10 14:15:48 -05:00
jeffro256
7194506792
Blockchain: remove old fee calc logic 2024-03-10 13:30:46 -05:00
luigi1111
1bec71279e
Merge pull request #9225
a01d7cc Fixed mempool pruning (SChernykh)
2024-03-08 20:27:34 -05:00
luigi1111
769202bc52
Merge pull request #9219
e6f4875 wallet2: adjust fee during backlog, fix set priority (selsta)
2024-03-08 20:26:58 -05:00
SyntheticBird45
9b946ae527 Removed default cryptonote address
- Removed `localhost:8080` default value to address string in wallet rpc
- Added an error response in case string is empty

fixed indentation

removed if and errors, default to localhost and port based on nettype

Forgot ":"

forgot ; and m_

removed wallet_rpc_server_error_codes.h
2024-03-08 21:32:26 +01:00
SChernykh
a01d7ccbfd Fixed mempool pruning
- Fixed undefined behavior after a call to `remove_tx_from_transient_lists` (it used an invalid iterator)
- Fixed `txCompare` (it wasn't strictly weak ordered)
2024-03-08 21:04:16 +01:00
luigi1111
d6d55b507a
Merge pull request #9222
66e5081 get_block_template_backlog: better sorting logic (SChernykh)
2024-03-08 13:45:41 -05:00
luigi1111
c23951f339
Merge pull request #9218
7815023 tx_memory_pool: make double spends a no-drop offense (jeffro256)
2024-03-08 10:43:20 -05:00
SChernykh
66e5081eae get_block_template_backlog: better sorting logic
std::sort is unstable, so it can return random sets of transactions when mempool has many transactions with the same fee/byte. It can result in p2pool mining empty blocks sometimes because it doesn't pick up "new" transactions immediately.
2024-03-08 14:50:01 +01:00
selsta
e6f4875219
wallet2: adjust fee during backlog, fix set priority 2024-03-08 14:13:58 +01:00
luigi1111
6ade592adf
Merge pull request #9195
2a2da79 free function serialization DSL (jeffro256)
2024-03-07 21:37:05 -05:00
jeffro256
7815023117
tx_memory_pool: make double spends a no-drop offense
Nodes who see different txs in a double spend attack will drop each other, splitting the network.
Issue found by @boog900.
2024-03-07 09:23:51 -06:00
jeffro256
38f354e89f
Enforce Tx unlock_time is Zero by Relay Rule
Related to https://github.com/monero-project/research-lab/issues/78

Added a relay rule that enforces the `unlock_time` field is equal to 0 for non-coinbase transactions.

UIs changed:
* Removed `locked_transfer` and `locked_sweep_all` commands from `monero-wallet-cli`

APIs changed:
* Removed `unlock_time` parameters from `wallet2` transfer methods
* Wallet RPC transfer endpoints send error codes when requested unlock time is not 0
* Removed `unlock_time` parameters from `construct_tx*` cryptonote core functions
2024-02-24 14:27:17 -06:00
jeffro256
2a2da79943
free function serialization DSL
Example usage for Seraphis types (in global or `sp` namespace):

```
BEGIN_SERIALIZE_OBJECT_FN(sp::SpCoinbaseEnoteCore)
    FIELD_F(onetime_address)
    VARINT_FIELD_F(amount)
END_SERIALIZE()

BEGIN_SERIALIZE_OBJECT_FN(sp::SpEnoteCore)
    FIELD_F(onetime_address)
    FIELD_F(amount_commitment)
END_SERIALIZE()
```
2024-02-24 11:24:47 -06:00
tobtoht
cdab0d489c
cmake: require libsodium 2024-02-24 16:26:43 +01:00
luigi1111
b12766a652
Merge pull request #9189
f7670c9 cryptonote_core: early out on out of bounds scaling parameter (selsta)
2024-02-24 10:16:54 -05:00
luigi1111
72d87cd10a
Merge pull request #9160
c50ade5 Daemon-specific proxy for the wallet-rpc. (0xFFFC0000)
2024-02-24 10:11:51 -05:00
luigi1111
3078e44847
Merge pull request #9155
ed50938 Zero initialize rctSigBase elements (Lee *!* Clagett)
2024-02-24 10:07:54 -05:00
luigi1111
486ae9f1cf
Merge pull request #9138
cd7ccfb Disable/fix ports with I2P (Lee Clagett)
2024-02-24 10:05:25 -05:00
luigi1111
7904879326
Merge pull request #9137
8d25418 daemon: warn user on specifiying ZMQ args with --no-zmq (jeffro256)
2024-02-24 10:04:56 -05:00
luigi1111
c12ee59ebd
Merge pull request #9125
0c545f6 epee/test: remove levin_protocol_handler and core_proxy tests (jeffro256)
2024-02-24 09:59:50 -05:00
luigi1111
2dc918402c
Merge pull request #9006
47042ce wallet2: call on_reorg callback in handle_reorg (j-berman)
2024-02-24 09:57:55 -05:00
koe
fa47c7b7d6 add blake2b to src/crypto 2024-02-21 19:39:11 -06:00
jeffro256
b13c5f6669
wallet: feature: transfer amount with fee included
To transfer ~5 XMR to an address such that your balance drops by exactly 5 XMR, provide a `subtractfeefrom` flag to the `transfer` command. For example:

    transfer 76bDHojqFYiFCCYYtzTveJ8oFtmpNp3X1TgV2oKP7rHmZyFK1RvyE4r8vsJzf7SyNohMnbKT9wbcD3XUTgsZLX8LU5JBCfm 5 subtractfeefrom=all

If my walet balance was exactly 30 XMR before this transaction, it will be exactly 25 XMR afterwards and the destination address will receive slightly
less than 5 XMR. You can manually select which destinations fund the transaction fee and which ones do not by providing the destination index.
For example:

    transfer 75sr8AAr... 3 74M7W4eg... 4 7AbWqDZ6... 5 subtractfeefrom=0,2

This will drop your balance by exactly 12 XMR including fees and will spread the fee cost proportionally (3:5 ratio) over destinations with addresses
`75sr8AAr...` and `7AbWqDZ6...`, respectively.

Disclaimer: This feature was paid for by @LocalMonero.
2024-02-20 17:08:06 -06:00
selsta
f7670c9387
cryptonote_core: early out on out of bounds scaling parameter 2024-02-21 00:02:27 +01:00
0xFFFC0000
c50ade514f
Daemon-specific proxy for the wallet-rpc.
1. Daemon-specific proxy is exclusive with global proxy (--proxy).
2. If you set global proxy (--proxy) you cannot set daemon-specific proxy.
3. If you don't set global proxy, you can set proxy (or not set) proxy for
each daemon connection with the proxy field in jsonrpc to the wallet-rpc.
2024-02-18 18:36:52 +00:00
jeffro256
49ca1ad6ae
variant: split into variant and optional_variant
Upstreaming https://github.com/UkoeHB/monero/pull/28
2024-02-16 19:12:13 -06:00
jeffro256
62fdacca07
variant: visit lambda and value-initialize by index 2024-02-14 02:01:44 -06:00
jeffro256
8d25418df0
daemon: warn user on specifiying ZMQ args with --no-zmq
Resolves https://github.com/monero-project/monero/issues/9127
2024-02-07 00:04:46 -06:00
Lee *!* Clagett
ed50938af4 Zero initialize rctSigBase elements 2024-02-06 12:47:47 -05:00
Lee Clagett
cd7ccfbdab Disable/fix ports with I2P 2024-01-30 13:40:05 -05:00
luigi1111
eb904d709a
Merge pull request #9090
430b102 Cleanup scoped_ptr in src/common/dns_utils.cpp and header include: 	* No need for entire new class (Fix #8732). 	* Fix stdint.h header include in contrib/epee/include/net/http_base.h. (0xFFFC0000)
2024-01-18 18:06:23 -05:00
luigi1111
e9a4deef81
Merge pull request #9079
eed975d Fix missing checks for IsObject in ZMQ jsonrpc reading (Lee Clagett)
2024-01-18 18:03:18 -05:00
luigi1111
8ee57110b0
Merge pull request #9077
2525200 serialization: remove container wrappers and serialize directly (jeffro256)
2024-01-18 18:02:31 -05:00
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