Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
5d388eb Bump ring size to 16 for v15 & remove set default in wallet cli (j-berman)
|
|
|
|
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.
|
|
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
|
|
591c174 Remove footgun doc comment in miner TX validation (Luke Parker)
|
|
da9aa1f Copyright: Update to 2022 (mj-xmr)
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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
|
|
8ff21e1 doc: update IRC references to Libera (fdov)
|
|
254a133 core: speed up print_coinbase_tx_sum (moneromooo-monero)
|
|
|
|
ed6f053 blockchain: speed up repeated pops (mostly in tests) (moneromooo-monero)
|
|
|
|
The heavy rolling median reset only has to be performed after
all blocks are popped
|
|
It only needs to parse the tx headers, not the full tx data
|
|
bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett)
1572df9 Removing unused namespace alias (Lee Clagett)
|
|
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.
|
|
|
|
|
|
This reverts commit 63c7ca07fba2f063c760f786a986fb3e02fb040e, reversing
changes made to 2218e23e84a89e9a1e4c0be5d50f891ab836754f.
|
|
|
|
it is accessed both when adding and when prevalidating a set
of new hashes from a peer
|
|
|
|
|
|
874487f blockchain: remove some dead code (moneromooo-monero)
|
|
This is already done
|
|
This also removes potential thread safety bug in that function.
|
|
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.
|
|
Based on a patch by TheCharlatan <seb.kung@gmail.com>
|
|
|
|
|
|
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)
|
|
6a37da8 threadpool: guard against exceptions in jobs, and armour plating (moneromooo-monero)
|
|
Those would, if uncaught, exit run and leave the waiter to wait
indefinitely for the number of active jobs to reach 0
|
|
|
|
They are allowed from v12, and MLSAGs are rejected from v13.
|
|
844fb4e94 enforce claiming maximum coinbase amount (moneromooo-monero)
|
|
Claiming a slightly lesser amount does not yield the size gains
that were seen pre rct, so this closes a fingerprinting vector
|
|
|
|
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)
|
|
267ce5b71 avoid a couple needless copies (moneromooo-monero)
|
|
Reporter requested credit to be given to Decred
|
|
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)
|
|
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.
|
|
795e186 blockchain: fix total_height in getblocks.bin response (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.
|
|
|
|
|
|
|
|
|
|
Update copyright year to 2020
|
|
|
|
8958b4e blockchain_db: faster fetching of consecutive txes (moneromooo-monero)
|
|
fcb06f7 cryptonote_core: skip block notify on blockchain switching rollback (xiphon)
|
|
c61abf8 remove empty statements (shopglobal)
|
|
02224e71 Fix check_fee() discrepancy. (UkoeHB)
|
|
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.
|
|
8a27645 blockchain: fix flushing txes from the txpool (moneromooo-monero)
|
|
08635a08 blockchain: speedup fetching pruned contiguous tx blobs (moneromooo-monero)
|
|
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'.
|
|
|
|
Flushes m_invalid_blocks in Blockchain.
|
|
About twice as fast, very roughly
|
|
|
|
|
|
|
|
|
|
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
|
|
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
|
|
|
|
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
|
|
b9da023 blockchain: keep block template timestamp not below recent median (moneromooo-monero)
|
|
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)
|
|
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)
|
|
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
|
|
11f13da blockchain: fix logging bad number of blocks if first one fails (moneromooo-monero)
19bfe7e simplewallet: fix warnings about useless std::move (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)
|
|
|
|
|
|
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.
|
|
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)
|
|
f17dcde Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECT (Doy-lee)
|
|
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)
|
|
|
|
|
|
|
|
This happens often when a pre-pruning node asks a pruned node
for data it does not have
|
|
|
|
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)
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
d009f6dd rpc: fix get_block_hashes.bin from wallet on pruned blockchain (moneromooo-monero)
bb0ef5b1 blockchain: lock the blockchain while pruning (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)
|
|
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.
|
|
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
|
|
|
|
ae6885f6 blockchain: incremental long term block weight cache (moneromooo-monero)
9b687c78 blockchain: simple cache for the long term block weights (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
|
|
|
|
|
|
This saves a duplicate serialization step
|
|
|
|
|
|
|
|
Based on Boolberry work by:
jahrsg <jahr@jahr.me>
cr.zoidberg <crypto.zoidberg@gmail.com>
|
|
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
|
|
1f2930ce Update 2019 copyright (binaryFate)
|
|
|
|
|
|
|
|
082149c5 fix merge errors, update recommended version to 0.14.0.2 (Riccardo Spagni)
f3b368c6 update checkpoints hash (Riccardo Spagni)
e518f2b1 update checkpoints, update README for 0.14.1 release (Riccardo Spagni)
8780d6b4 update readme via cherry-pick (Riccardo Spagni)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eec79276 blockchain: fix default genesis block timestamp (moneromooo-monero)
|
|
|
|
0de14396 tests: add a CNv4 JIT test (moneromooo-monero)
24d281c3 crypto: plug CNv4 JIT into cn_slow_hash (moneromooo-monero)
78ab59ea crypto: clear cache after generating random program (moneromooo-monero)
b9a61884 performance_tests: add tests for new Cryptonight variants (moneromooo-monero)
fff23bf7 CNv4 JIT compiler for x86-64 and tests (SChernykh)
3dde67d8 blockchain: add v10 fork heights (moneromooo-monero)
|
|
|
|
|
|
b8787f43 ArticMine's new block weight algorithm (moneromooo-monero)
|
|
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.
|
|
This was noticed because GCC warned about using an enum value in a
boolean context.
|
|
This will trigger if a reorg is seen. This may be used to do things
like stop automated withdrawals on large reorgs.
%s is replaced by the height at the split point
%h is replaced by the height of the new chain
%n is replaced by the number of new blocks after the reorg
|
|
|
|
b6534c40 ringct: remove unused senderPk from ecdhTuple (moneromooo-monero)
7d375981 ringct: the commitment mask is now deterministic (moneromooo-monero)
99d946e6 ringct: encode 8 byte amount, saving 24 bytes per output (moneromooo-monero)
cdc3ccec ringct: save 3 bytes on bulletproof size (moneromooo-monero)
f931e16c add a bulletproof version, new bulletproof type, and rct config (moneromooo-monero)
|
|
|
|
This makes it easier to modify the bulletproof format
|
|
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
|
|
a67b77a9 blockchain: don't propagate exception past dtor (moneromooo-monero)
|
|
5ee6f037 blockchain: fix wrong hf version when popping multiple blocks (moneromooo-monero)
634d359a blockchain: use the version passed as parameter, not a new one (moneromooo-monero)
94a375d5 hardfork: remove batch transactions setup (moneromooo-monero)
|
|
6f2081f8 cryptonote_core: revert extra_tx_map (moneromooo-monero)
|
|
b8342dd5 blockchain: fix block rate check for empty blockchains (moneromooo-monero)
|
|
008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
|
|
Coverity 190660
|
|
Since we keep track of the hf version in the db, we pick it up
from there instead of doing the full reorg call, which is quite
expensive
|
|
|
|
9e64a71 blockchain: call deinit in dtor (moneromooo-monero)
|
|
affff94 blockchain: fix race between two external mining threads (moneromooo-monero)
|
|
While the lookups are faster, the zeroCommit calls have to be
done again when storing the new outputs in the db, which ends
up making the whole thing slower after all, and the ways this
can be cached aren't very nice code wise, so let's forget it
since the gains aren't very large anyway.
|
|
|