Commit Graph

196 Commits

Author SHA1 Message Date
wowario 642beba4af
broadcast donation sub-address 2024-03-09 15:58:10 +03:00
j-berman f137a35984 Enforce restricted # pool txs served via RPC + optimize chunked reqs [release-v0.18]
- `/getblocks.bin` respects the `RESTRICTED_TX_COUNT` (=100) when
returning pool txs via a restricted RPC daemon.
- A restricted RPC daemon includes a max of `RESTRICTED_TX_COUNT` txs
in the `added_pool_txs` field, and returns any remaining pool hashes
in the `remaining_added_pool_txids` field. The client then requests
the remaining txs via `/gettransactions` in chunks.
- `/gettransactions` no longer does expensive no-ops for ALL pool txs
if the client requests a subset of pool txs. Instead it searches for
the txs the client explicitly requests.
- Reset `m_pool_info_query_time` when a user:
  (1) rescans the chain (so the wallet re-requests the whole pool)
  (2) changes the daemon their wallets points to (a new daemon would
      have a different view of the pool)
- `/getblocks.bin` respects the `req.prune` field when returning
pool txs.
- Pool extension fields in response to `/getblocks.bin` are optional
with default 0'd values.
2023-07-09 08:38:18 +02:00
rbrunner7 23f782b211 wallet2, RPC: Optimize RPC calls for periodic refresh from 3 down to 1 call [release-v0.18] 2023-07-09 08:30:53 +02:00
selsta 93db74a91e
rpc: skip bootstrap nodes that are lower than last checkpoint 2022-09-06 22:09:39 +02:00
j-berman 8cc3c9af4d Publish submitted txs via zmq 2022-07-21 11:53:31 -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 04e490c8da
Merge pull request #8205
0d6fce8 Compil. time: cryptonote_core minus portable_storage header (mj-xmr)
2022-04-06 00:11:14 -04: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 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
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 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
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
xiphon a9cd5d914e cryptonote_core: dandelion - use local height or median height if syncing 2020-11-25 01:27:42 +00:00
Lee Clagett d73cb95dfa Fix timeout checks for forwarded and Dandelion++ stem txes 2020-11-15 00:08:10 -05:00
Nathan Dorfman f1836ac28a cryptonote_core: Fix missing override warnings 2020-10-19 18:23:07 -06:00
xiphon a12a8174e0 Dandelion++: skip desynced peers in stem phase 2020-10-12 13:44:06 +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
Lee Clagett e5214a2ca2 Adding ZMQ/Pub support for txpool_add and chain_main events 2020-05-04 02:06:35 +00:00
Alexander Blair 36d50d93f2
Merge pull request #6534
7bd66b01b daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation (stoffu)
2020-07-19 03:36:39 -07:00
Alexander Blair a0d179e528
Merge pull request #6512
5ef0607da Update copyright year to 2020 (SomaticFanatic)
2020-07-19 03:32:59 -07:00
stoffu 7bd66b01bf
daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation
On startup, it checks against the difficulty checkpoints, and if any mismatch is found, recalculates all the blocks with wrong difficulties. Additionally, once a week it recalculates difficulties of blocks after the last difficulty checkpoint.
2020-06-09 10:40:51 +09:00
moneromooo-monero f0371210e9
cryptonote_core: remove "We are most likely forked" message
It's time based and we don't have forks every 6 months anymore
2020-05-19 16:27:24 +00:00
SomaticFanatic 5ef0607da6 Update copyright year to 2020
Update copyright year to 2020
2020-05-06 22:36:54 -04:00
luigi1111 1f505a5eac
Merge pull request #6468
a813c46 cryptonote_core: skip dns checkpoints on startup if not enforced (xiphon)
2020-05-06 00:22:20 -05:00
xiphon a813c46a1b cryptonote_core: skip dns checkpoints on startup if not enforced 2020-04-20 18:56:22 +00:00
luigi1111 096e2135dd
Merge pull request #6214
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
2020-03-31 13:32:55 -05:00
Lee Clagett babf25d2ec Allow unrestricted rpc calls to get full txpool info 2020-03-30 17:52:42 +00:00
moneromooo-monero 054b4c7f41
protocol: request txpool contents when synced
A newly synced Alice sends a (typically quite small) list of
txids in the local tpxool to a random peer Bob, who then uses
the existing tx relay system to send Alice any tx in his txpool
which is not in the list Alice sent
2020-03-22 16:03:31 +00:00
Aaron Hook aa93e38862 p2p: remove old debug commands 2020-03-20 22:09:44 -07:00
Alexander Blair 4371ac4265
Merge pull request #6225
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
2020-02-28 19:48:11 -08:00
Alexander Blair 4da37daf67
Merge pull request #6211
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
2020-02-28 19:36:16 -08:00
moneromooo-monero 987c3139dc
print_coinbase_tx_sum now supports 128 bits sums
The tail emission will bring the total above 64 bits
2019-12-12 01:56:59 +00:00
moneromooo-monero 5985c5afe8
rpc: add bad-blocks to flush_cache RPC
Flushes m_invalid_blocks in Blockchain.
2019-12-02 18:53:30 +00:00
Lee Clagett 70c9cd3c9c Change to Tx diffusion (Dandelion++ fluff) instead of flooding 2019-11-04 09:23:20 +00:00
Lee Clagett 5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
moneromooo-monero a4dc575ccb
rpc: add a flush_cache RPC
This allows flushing internal caches (for now, the bad tx cache,
which will allow debugging a stuck monerod after it has failed to
verify a transaction in a block, since it would otherwise not try
again, making subsequent log changes pointless)
2019-10-25 18:41:54 +00:00
moneromooo-monero 8330e772f1
monerod can now sync from pruned blocks
If the peer (whether pruned or not itself) supports sending pruned blocks
to syncing nodes, the pruned version will be sent along with the hash
of the pruned data and the block weight. The original tx hashes can be
reconstructed from the pruned txes and theur prunable data hash. Those
hashes and the block weights are hashes and checked against the set of
precompiled hashes, ensuring the data we received is the original data.
It is currently not possible to use this system when not using the set
of precompiled hashes, since block weights can not otherwise be checked
for validity.

This is off by default for now, and is enabled by --sync-pruned-blocks
2019-09-27 00:10:37 +00:00
Jesus Ramirez 270a3ae58b Unused private member m_miner_address 2019-05-29 10:12:47 -04:00
moneromooo-monero 064ab12340
functional_tests: add more blockchain related tests
Related to emission, reorgs, getting tx data back, output
distribution and histogram
2019-04-11 11:07:58 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero 238401d4e9
core: avoid double parsing blocks after hoh 2019-03-05 11:58:13 +00:00
moneromooo-monero f75d51abda
core: avoid calculating tx prefix hash when we don't need it 2019-03-05 11:57:57 +00:00
moneromooo-monero d4fb9641e0
core: add --block-rate-notify
This runs a command whenever the block rate deviates too much
from the expectation
2019-03-04 11:48:39 +00:00
moneromooo-monero b8787f4302
ArticMine's new block weight algorithm
This curbs runaway growth while still allowing substantial
spikes in block weight

Original specification from ArticMine:

here is the scaling proposal
Define: LongTermBlockWeight
Before fork:
LongTermBlockWeight = BlockWeight
At or after fork:
LongTermBlockWeight = min(BlockWeight, 1.4*LongTermEffectiveMedianBlockWeight)
Note: To avoid possible consensus issues over rounding the LongTermBlockWeight for a given block should be calculated to the nearest byte, and stored as a integer in the block itself. The stored LongTermBlockWeight is then used for future calculations of the LongTermEffectiveMedianBlockWeight and not recalculated each time.
Define:   LongTermEffectiveMedianBlockWeight
LongTermEffectiveMedianBlockWeight = max(300000, MedianOverPrevious100000Blocks(LongTermBlockWeight))
Change Definition of EffectiveMedianBlockWeight
From (current definition)
EffectiveMedianBlockWeight  = max(300000, MedianOverPrevious100Blocks(BlockWeight))
To (proposed definition)
EffectiveMedianBlockWeight  = min(max(300000, MedianOverPrevious100Blocks(BlockWeight)), 50*LongTermEffectiveMedianBlockWeight)
Notes:
1) There are no other changes to the existing penalty formula, median calculation, fees etc.
2) There is the requirement to store the LongTermBlockWeight of a block unencrypted in the block itself. This  is to avoid possible consensus issues over rounding and also to prevent the calculations from becoming unwieldy as we move away from the fork.
3) When the  EffectiveMedianBlockWeight cap is reached it is still possible to mine blocks up to 2x the EffectiveMedianBlockWeight by paying the corresponding penalty.

Note: the long term block weight is stored in the database, but not in the actual block itself,
since it requires recalculating anyway for verification.
2019-03-04 09:33:58 +00:00