Age | Commit message (Collapse) | Author | Files | Lines |
|
67ade8005 Add randomized delay when forwarding txes from i2p/tor -> ipv4/6 (Lee Clagett)
|
|
|
|
|
|
7bd66b01b daemon: guard against rare 'difficulty drift' bug with checkpoints and recalculation (stoffu)
|
|
5d882f4f1 blockchain: fix theoretical race getting bulk timestamps (moneromooo-monero)
|
|
5ef0607da Update copyright year to 2020 (SomaticFanatic)
|
|
This fixes the functional tests, since txes would not be mined
after being sent to the daemon (they'd be waiting for the
dandelion timeout first)
|
|
The cache is discarded when a block is popped, but then gets
rebuilt when the difficulty for next block is requested.
While this is all properly locked, it does not take into account
the delay caused by a database transaction being only committed
(and thus its effects made visible to other threads) later on,
which means another thread could request difficulty between
the pop and the commit, which would end up using stale database
view to build the cache, but that cache would not be invalidated
again when the transaction gets committed, which would cause the
cache to not match the new database data.
To fix this, we now keep track of when the cache is invalidated
so we can invalidate it again upon database transaction commit
to ensure it gets calculated again with fresh data next time it
is nedeed.
|
|
4d8d121 Fix D++ block template check (vtnerd)
|
|
795e186 blockchain: fix total_height in getblocks.bin response (moneromooo-monero)
|
|
f037121 cryptonote_core: remove 'We are most likely forked' message (moneromooo-monero)
|
|
5741b4d blockchain: detect and log bad difficulty calculations (moneromooo-monero)
|
|
|
|
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.
|
|
|
|
It's time based and we don't have forks every 6 months anymore
|
|
|
|
|
|
|
|
70609d7 cryptonote_core: take out the time based upgrade warning (moneromooo-monero)
|
|
Update copyright year to 2020
|
|
It doesn't really work anymore since we don't have a fork soon
|
|
ee58362 Used legacy category to match insert_key_images behavior (vtnerd)
|
|
2efbd5f cryptonote: fix reuse of non default tx data when relaying (moneromooo-monero)
|
|
a813c46 cryptonote_core: skip dns checkpoints on startup if not enforced (xiphon)
|
|
688a3e8 Add timelock verification on device (cslashm)
|
|
|
|
|
|
An automatic tx variable is initialized properly on the first
run through the loop, but not the second. Moving the variable
inside the loop ensures the ctor is called again to init it.
|
|
|
|
|
|
fcb06f7 cryptonote_core: skip block notify on blockchain switching rollback (xiphon)
|
|
c61abf8 remove empty statements (shopglobal)
|
|
9bde70e core: mention time being off in hash rate changes message (moneromooo-monero)
|
|
760ecf2 console_handler: do not let exception past the dor (moneromooo-monero)
09c8111 threadpool: lock mutex in create (moneromooo-monero)
e377977 tx_pool: catch theoretical error in get_block_reward (moneromooo-monero)
|
|
054b4c7 protocol: request txpool contents when synced (moneromooo-monero)
|
|
|
|
|
|
ffe7165e wallet: reroll fake outs selection on local tx_sanity_check failure (xiphon)
|
|
02224e71 Fix check_fee() discrepancy. (UkoeHB)
|
|
aa93e388 p2p: remove old debug commands (Aaron Hook)
|
|
- New flag in NOTIFY_NEW_TRANSACTION to indicate stem mode
- Stem loops detected in tx_pool.cpp
- Embargo timeout for a blackhole attack during stem phase
|
|
5de2295 Correct key image check in tx_pool (vtnerd)
|
|
8958b4e blockchain_db: faster fetching of consecutive txes (moneromooo-monero)
|
|
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
|
|
|
|
|
|
for example, in the RPC server
|
|
987c3139 print_coinbase_tx_sum now supports 128 bits sums (moneromooo-monero)
|
|
5985c5af rpc: add bad-blocks to flush_cache RPC (moneromooo-monero)
|
|
Useful for wallet refresh or node sync
|
|
|
|
Cleaning up a little around the code base.
|
|
Coverity 196626
|
|
|
|
67b4a19e simplewallet: noob-friendly help menu (wowario)
|
|
b9fc2066 Add a --keep-fakechain option to keep fakechain databases (JamesWrigley)
|
|
65301c40 core: point out when we hit the block rate visibility limit (moneromooo-monero)
|
|
8a27645 blockchain: fix flushing txes from the txpool (moneromooo-monero)
|
|
08635a08 blockchain: speedup fetching pruned contiguous tx blobs (moneromooo-monero)
|
|
70c9cd3c Change to Tx diffusion (Dandelion++ fluff) instead of flooding (Lee Clagett)
|
|
21d4c216 blockchain: error out if the builtin hashes data size is wrong (moneromooo-monero)
|
|
|
|
M100 = max{300kb, min{100block_median, m_long_term_effective_median_block_weight}}
not
M100 = max{300kb, m_long_term_effective_median_block_weight}
Fix base reward in get_dynamic_base_fee_estimate().
get_dynamic_base_fee_estimate() should match check_fee()
Fee is calculated based on block reward, and the reward penalty takes into account 0.5*max_block_weight (both before and after HF_VERSION_EFFECTIVE_SHORT_TERM_MEDIAN_IN_PENALTY).
Moved median calculation according to best practice of 'keep definitions close to where they are used'.
|
|
|
|
886ed25 blockchain: fix comment wrongly refering to SHA-3 rather than Keccak (moneromooo-monero)
|
|
c96b7ee tx_pool: fix error message assuming incorrectly (moneromooo-monero)
|
|
The tail emission will bring the total above 64 bits
|
|
Flushes m_invalid_blocks in Blockchain.
|
|
About twice as fast, very roughly
|
|
|
|
|
|
|
|
|
|
e4d1674e8 0.15.0.0 release engineering (Riccardo Spagni)
|
|
|
|
This is handy when doing tests that generate a lot of transactions, since that
takes time it's preferable to re-use the database for future runs.
|
|
It causes link errors at least on mac
|
|
|
|
|
|
|
|
|
|
d25acd7 Add hmac over encrypted value during transaction (clashm)
34f28a7 Add display address (clashm)
235b94e Revert PR #5835 (export view key) (clashm)
32febd2 Fix debug feature (clashm)
|
|
174a6ac tx_pool: fix divide by 0 in log (moneromooo-monero)
|
|
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)
|
|
Coverity 205394
|
|
abd3763 cryptonote: fill in tx weight when syncing from pruned blocks (moneromooo-monero)
|
|
88c9d90 protocol: initialize block_weight in block_complete_entry ctor (moneromooo-monero)
fe443bb cryptonote: don't leave block_weight uninitialized (moneromooo-monero)
1ba9baf tx_pool: do not divide by 0 (moneromooo-monero)
|
|
7fcd0b5 blockchain: initialize pow to ff..ff (moneromooo-monero)
|
|
ab96181 blockchain: use effective median block weight for penalty from v12 (moneromooo-monero)
|
|
be82c40 Support median block size > 4 GB (moneromooo-monero)
|
|
01f660f blockchain: fill in cumulative block weight for alt blocks (moneromooo-monero)
|
|
add a 128/64 division routine so we can use a > 32 bit median block
size in calculations
|
|
ec14abd tx_pool: make spent return-by-reference as intended (stoffu)
|
|
as a safety to reject if it somehow does not get initialised
|
|
d37d30f blockchain: tweak fee as a function of median values (moneromooo-monero)
|
|
3455efa ban peers sending bad pow outright (moneromooo-monero)
|
|
It was using the raw block weight median, which was not what was
intended in ArticMine's design
|
|
In case of a 0 tx weight, we use a placeholder value to insert in the
fee-per-byte set. This is used for pruning and mining, and those txes
are pruned, so will not be too large, nor added to the block template
if mining, so this is safe.
CID 204465
|
|
CID 204467
|
|
|
|
|
|
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
|
|
|
|
|
|
b9da023 blockchain: keep block template timestamp not below recent median (moneromooo-monero)
|
|
6bbc646 Fix bug in mempool get_transaction_stats histogram calculation (tomsmeding)
|
|
Use the lesser of the short and long terms medians, rather then
the long term median alone
From ArticMine:
I found a bug in the new fee calculation formula with using only the long term median
It actually needs to be the lesser of the long term median and the old (modified short term median)
short term median with the last 10 blocks calculated as empty
Yes the issue occurs if there is a large long term median and, the short term median then falls and tries to then rise again
The fees are could be not high enough
for example LTM and STM rise to say 2000000 bytes
STM falls back to 300000 bytes
Fees are now based on 2000000 bytes until LTM also falls
So the STM is could prevented from rising back up
STM short term median LTM long term median
|
|
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
|
|
Support RandomX PoW algorithm
|
|
PoW is expensive to verify, so be strict
|
|
a444f06 blockchain: enforce 10 block age for spending outputs (moneromooo-monero)
|
|
f9b3f6e Removed Berkeley DB and db switching logic (JesusRami)
|
|
2cd4fd8 Changed the use of boost:value_initialized for C++ list initializer (JesusRami)
4ad191f Removed unused boost/value_init header (whyamiroot)
928f4be Make null hash constants constexpr (whyamiroot)
|
|
32f725d Properly format multiline logs (moneromooo-monero)
|
|
So it can be used by others without encumbrance
|
|
Some custom wallet code apparently ignores this, which causes users
of that code to be fingerprinted
|
|
As a side effect, colouring on Windows should now work
regardless of version
|
|
|
|
11f13da blockchain: fix logging bad number of blocks if first one fails (moneromooo-monero)
19bfe7e simplewallet: fix warnings about useless std::move (moneromooo-monero)
|
|
2cb22d4 core: make the 'update probably needed soon' message less scary (moneromooo-monero)
|
|
26072f1 blockchain: forbid v1 coinbase from v12 (moneromooo-monero)
555dc7c core: from v12, require consistent ring size for mixable txes (moneromooo-monero)
d22dfb7 blockchain: reject rct signatures in coinbase txes from v12 (moneromooo-monero)
|
|
Such a template would yield an invalid block, though would require
an attacker to have mined a long blockchain with drifting times
(assuming the miner's clock is roughly correct)
Fixed by crCr62U0
|
|
07cb087 blockchain: Fix alt chain generated coins overflow (iamamyth)
|
|
|
|
|
|
The 98th percentile position in the agebytes map was incorrectly
calculated: it assumed the transactions in the mempool all have unique
timestamps at second-granularity. This commit fixes this by correctly
finding the right cumulative number of transactions in the map suffix.
This bug could lead to an out-of-bounds write in the rare case that
all transactions in the mempool were received (and added to the mempool)
at a rate of at least 50 transactions per second. (More specifically,
the number of *unique* receive_time values, which have second-
granularity, must be at most 2% of the number of transactions in the
mempool for this crash to trigger.) If this condition is satisfied, 'it'
points to *before* the agebytes map, 'delta' gets a nonsense value, and
the value of 'i' in the first stats.histo-filling loop will be out of
bounds of stats.histo.
|
|
|
|
7a3e458 improve tx_sanity_check clarification (vicsn)
|
|
884df82 wallet: provide original address for outgoing transfers (xiphon)
|
|
7b9a420 Replace std::random_shuffle with std::shuffle (tomsmeding)
|
|
c164f90 Remove unnecessary m_check_txin_table, fix const correctness (omartijn)
|
|
|
|
We're supposed to have a fixed ring size now
Already checked by MLSAG verification, but here seems more intuitive
|
|
|
|
Apply the overflow logic used for computing already_generated_coins in
the main chain to alternative chains.
|
|
69f9420 core: do not complain about low block rate if disconnected (moneromooo-monero)
|
|
According to [1], std::random_shuffle is deprecated in C++14 and removed
in C++17. Since std::shuffle is available since C++11 as a replacement
and monero already requires C++11, this is a good replacement.
A cryptographically secure random number generator is used in all cases
to prevent people from perhaps copying an insecure std::shuffle call
over to a place where a secure one would be warranted. A form of
defense-in-depth.
[1]: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
|
|
0605406 daemon: sort alt chains by height (moneromooo-monero)
4228ee0 daemon: add optional arguments to alt_chain_info (moneromooo-monero)
880ebfd daemon: add more chain specific info in alt_chain_info (moneromooo-monero)
|
|
df83ed7 consensus: from v12, enforce >= 2 outputs (moneromooo-monero)
|
|
03aa14e tx_sanity_check: don't print an error when not enough outs to check (monermooo-monero)
|
|
f17dcde Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECT (Doy-lee)
|
|
270a3ae Unused private member m_miner_address (JesusRami)
|
|
06b8f29 blockchain: keep alternative blocks in LMDB (moneromooo-monero)
|
|
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
5d6b43b core: fix --prune-blockchain not pruning if no blockchain exists (moneromooo-monero)
|
|
3c071d2 blockchain: silence an error getting blocks for pruned nodes (moneromooo-monero)
|
|
|
|
we don't want to prevent bona fide txes, just obvious bad ones
|
|
|
|
This happens often when a pre-pruning node asks a pruned node
for data it does not have
|
|
|
|
In that case, we'll still keep the "Monero is now disconnected
from the network" near the end of the log
|
|
|
|
f950517a core: update pruning if using --prune-blockchain on a pruned blockchain (moneromooo-monero)
|
|
35da33be blockchain: do not try to pop blocks down to the genesis block (moneromooo-monero)
4b51f9a3 core: do not commit half constructed batch db txn (moneromooo-monero)
|
|
|
|
Avoids a massive amount of spurious warnings if the last update before
the daemon exited was a while ago and the daemon was syncing
|
|
|
|
|
|
Make sure the tip hash still matches the cached block
|
|
|
|
Alternative blocks are cleared on startup unless --keep-alt-blocks
is passed on the command line
|
|
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
|
|
|
|
|
|
|
|
|
|
|
|
It triggers easily on testnet
|
|
d009f6dd rpc: fix get_block_hashes.bin from wallet on pruned blockchain (moneromooo-monero)
bb0ef5b1 blockchain: lock the blockchain while pruning (moneromooo-monero)
|
|
ccb996af rpc: new sanity check on relayed transactions (moneromooo-monero)
|
|
e9fac29a unit_tests/long_term_block_weight: some tweaks that seem to make more sense (stoffu)
467f4c7e tests/block_weight: use integer division when computing median (stoffu)
815d08dc tests/block_weight: remove unused MULTIPLIER_SMALL (stoffu)
661f1fb8 blockchain: remove unused calc of short_term_constraint (stoffu)
|
|
ffdbcfb6 core: don't check block rate nor fork time in regtest mode (moneromooo-monero)
|
|
We want to get all blocks here, even pruned ones
|
|
|
|
The db txn in add_block ending caused the entire overarching
batch txn to stop.
Also add a new guard class so a db txn can be stopped in the
face of exceptions.
Also use a read only db txn in init when the db itself is
read only, and do not save the max tx size in that case.
|
|
This will weed out some transactions with silly rings
|
|
Related to emission, reorgs, getting tx data back, output
distribution and histogram
|
|
113e4877 blockchain_stats: fix sign in formatting function (moneromooo-monero)
adaea3ea various: remove unused variables (moneromooo-monero)
631ef00e blockchain: some debug info when adding txes-from-block fails (moneromooo-monero)
|
|
eda2661a Allow pruning before v10 (moneromooo-monero)
|
|
aff80e70 blockchain: fix returned height in create_block_template (moneromooo-monero)
|
|
089c7637 cryptonote: rework block blob size sanity check (moneromooo-monero)
|
|
|
|
|
|
c84ea299 cryptonote_basic: some more minor speedups (moneromooo-monero)
e40eb2ad cryptonote_basic: speedup calculate_block_hash (moneromooo-monero)
547a9708 cryptonote: block parsing + hash calculation speedup (moneromooo-monero)
11604b6d blockchain: avoid unneeded block copy (moneromooo-monero)
8461df04 save some database calls when getting top block hash and height (moneromooo-monero)
3bbc3661 Avoid repeated (de)serialization when syncing (moneromooo-monero)
|
|
Use the actual block weight limit, assuming that weight is always
greater or equal to size
|
|
|
|
7c440915 Add get_tx_proof support, needed for new sanity check (cslashm)
98fdcb2a Add support for V11 protocol with BulletProofV2 and short amount. New scheme key destination contrfol Fix dummy decryption in debug mode (cslashm)
3a981a33 Add application version compatibility check. (cslashm)
|
|
ae6885f6 blockchain: incremental long term block weight cache (moneromooo-monero)
9b687c78 blockchain: simple cache for the long term block weights (moneromooo-monero)
|
|
1730a44f core: improve block rate monitor trigger probabilities (moneromooo-monero)
|
|
77e9815d blockchain: do not try to pop the genesis block (moneromooo-monero)
|
|
This check is now not needed anymore, and would prevent people
from using --prune-blockchain when starting a new sync
|
|
It's now needed for CNv4, and was not retained when cached
|
|
|
|
|