Commit Graph

682 Commits

Author SHA1 Message Date
moneromooo-monero 08635a0875
blockchain: speedup fetching pruned contiguous tx blobs
About twice as fast, very roughly
2019-11-15 13:23:30 +00:00
moneromooo-monero 21d4c21619
blockchain: error out if the builtin hashes data size is wrong 2019-11-12 12:43:08 +00:00
Lee Clagett 5d7ae2d279 Adding support for hidden (anonymity) txpool 2019-11-02 20:36:03 +00:00
Riccardo Spagni e4d1674e8c
0.15.0.0 release engineering 2019-11-02 17:21:52 +02:00
moneromooo-monero eb16755083
blockchain: fix unwanted error when probing the pool for a tx 2019-10-27 19:23:25 +00:00
luigi1111 cf2d4d9a16
Merge pull request #5974
7fcd0b5 blockchain: initialize pow to ff..ff (moneromooo-monero)
2019-10-22 10:13:34 -05:00
luigi1111 8bb3c6a8e6
Merge pull request #5970
ab96181 blockchain: use effective median block weight for penalty from v12 (moneromooo-monero)
2019-10-22 10:09:56 -05:00
luigi1111 84ce43a239
Merge pull request #5966
be82c40 Support median block size > 4 GB (moneromooo-monero)
2019-10-22 10:08:32 -05:00
luigi1111 6f202844b5
Merge pull request #5919
01f660f blockchain: fill in cumulative block weight for alt blocks (moneromooo-monero)
2019-10-22 10:06:10 -05:00
moneromooo-monero be82c40703
Support median block size > 4 GB
add a 128/64 division routine so we can use a > 32 bit median block
size in calculations
2019-10-21 10:41:07 +00:00
moneromooo-monero 7fcd0b55ea
blockchain: initialize pow to ff..ff
as a safety to reject if it somehow does not get initialised
2019-10-16 09:00:30 +00:00
luigi1111 37a72fd6ae
Merge pull request #5941
d37d30f blockchain: tweak fee as a function of median values (moneromooo-monero)
2019-10-14 18:11:13 -05:00
luigi1111 dc48cdc998
Merge pull request #5933
3455efa ban peers sending bad pow outright (moneromooo-monero)
2019-10-14 18:07:54 -05:00
moneromooo-monero ab96181e91
blockchain: use effective median block weight for penalty from v12
It was using the raw block weight median, which was not what was
intended in ArticMine's design
2019-10-11 14:16:09 +00:00
moneromooo-monero 01f660f60f
blockchain: fill in cumulative block weight for alt blocks 2019-10-10 20:26:40 +00:00
luigi1111 bf525793c7
Merge pull request #5915
8330e77 monerod can now sync from pruned blocks (moneromooo-monero)
2019-10-08 15:55:03 -05:00
luigi1111 17f063a50f
Merge pull request #5902
b9da023 blockchain: keep block template timestamp not below recent median (moneromooo-monero)
2019-09-30 18:52:11 -05:00
moneromooo-monero d37d30f79a
blockchain: tweak fee as a function of median values
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
2019-09-28 22:53:41 +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
Howard Chu 81c2ad6d5b
RandomX integration
Support RandomX PoW algorithm
2019-09-25 21:29:42 +01:00
moneromooo-monero 3455efafa8
ban peers sending bad pow outright
PoW is expensive to verify, so be strict
2019-09-25 16:00:43 +00:00
luigi1111 44aa7d5439
Merge pull request #5882
a444f06 blockchain: enforce 10 block age for spending outputs (moneromooo-monero)
2019-09-24 10:27:22 -05:00
luigi1111 ee6e849627
Merge pull request #5877
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)
2019-09-24 10:08:44 -05:00
moneromooo-monero d0663837d2
core: move hardforks into its own lib
So it can be used by others without encumbrance
2019-09-19 11:28:18 +00:00
moneromooo-monero a444f06e53
blockchain: enforce 10 block age for spending outputs
Some custom wallet code apparently ignores this, which causes users
of that code to be fingerprinted
2019-09-17 11:39:25 +00:00
luigi1111 4a39e1a4a5
Merge pull request #5865
11f13da blockchain: fix logging bad number of blocks if first one fails (moneromooo-monero)
19bfe7e simplewallet: fix warnings about useless std::move (moneromooo-monero)
2019-09-14 13:07:35 -05:00
luigi1111 29e0f11305
Merge pull request #5823
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)
2019-09-14 13:04:41 -05:00
moneromooo-monero b9da0234e9
blockchain: keep block template timestamp not below recent median
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
2019-09-11 15:21:52 +00:00
luigi1111 e4f11a68fe
Merge pull request #5819
07cb087 blockchain: Fix alt chain generated coins overflow (iamamyth)
2019-09-04 09:37:32 -05:00
Jesus Ramirez 2cd4fd8972 Changed the use of boost:value_initialized for C++ list initializer 2019-09-02 14:16:29 +02:00
moneromooo-monero 11f13da8b4
blockchain: fix logging bad number of blocks if first one fails 2019-08-28 14:53:29 +00:00
luigi1111 1010a6503e
Merge pull request #5721
c164f90 Remove unnecessary m_check_txin_table, fix const correctness (omartijn)
2019-08-19 17:25:52 -05:00
moneromooo-monero d22dfb7594
blockchain: reject rct signatures in coinbase txes from v12 2019-08-19 16:43:53 +00:00
moneromooo-monero 555dc7c394
core: from v12, require consistent ring size for mixable txes
We're supposed to have a fixed ring size now

Already checked by MLSAG verification, but here seems more intuitive
2019-08-19 16:43:53 +00:00
moneromooo-monero 26072f1393
blockchain: forbid v1 coinbase from v12 2019-08-19 16:43:52 +00:00
iamamyth 07cb087e5d blockchain: Fix alt chain generated coins overflow
Apply the overflow logic used for computing already_generated_coins in
the main chain to alternative chains.
2019-08-18 17:26:58 -07:00
luigi1111 564bb1da3a
Merge pull request #5525
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)
2019-08-14 15:31:52 -05:00
luigi1111 2258551ef9
Merge pull request #5487
df83ed7 consensus: from v12, enforce >= 2 outputs (moneromooo-monero)
2019-08-14 15:26:55 -05:00
luigi1111 c62ba1d08f
Merge pull request #5591
f17dcde Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECT (Doy-lee)
2019-07-24 14:23:11 -05:00
luigi1111 4b76656f5c
Merge pull request #5524
06b8f29 blockchain: keep alternative blocks in LMDB (moneromooo-monero)
2019-07-24 14:04:16 -05:00
luigi1111 e3de4aa68b
Merge pull request #5502
25a7cfd add a few checks where it seems appropriate (moneromooo-monero)
1a66a86 remove unused code (moneromooo-monero)
2019-07-24 13:57:06 -05:00
Riccardo Spagni 4850520b6a
update checkpoints.dat hash 2019-07-18 16:54:43 +02:00
Doyle f17dcde451 Remove unused txs member in NOTIFY_RESPONSE_GET_OBJECT 2019-07-15 13:27:06 +10:00
Martijn Otto c164f9037e
Remove unnecessary m_check_txin_table, fix const correctness 2019-07-03 14:39:52 +02:00
moneromooo-monero 3c071d203f
blockchain: silence an error getting blocks for pruned nodes
This happens often when a pre-pruning node asks a pruned node
for data it does not have
2019-06-16 11:03:41 +00:00
Riccardo Spagni 633f1542e2
prep for 0.14.1 release 2019-06-14 16:16:52 +02:00
Riccardo Spagni 7e417dd408
Merge pull request #5571
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)
2019-06-01 20:22:19 +02:00
moneromooo-monero 35da33bea9
blockchain: do not try to pop blocks down to the genesis block 2019-05-26 17:11:32 +00:00
moneromooo-monero 4b51f9a34f
core: do not commit half constructed batch db txn 2019-05-25 16:24:56 +00:00
Howard Chu b6830db2d4
Fix #5553
Make sure the tip hash still matches the cached block
2019-05-19 03:02:33 +01:00
moneromooo-monero 0605406714
daemon: sort alt chains by height 2019-05-09 09:12:49 +00:00
moneromooo-monero 06b8f29992
blockchain: keep alternative blocks in LMDB
Alternative blocks are cleared on startup unless --keep-alt-blocks
is passed on the command line
2019-05-08 17:36:52 +00:00
Riccardo Spagni f64f59627d
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
2019-05-07 17:36:27 +02:00
moneromooo-monero a4c4a2d8aa
blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +00:00
moneromooo-monero e980938210
fix wide difficulty conversion with some versions of boost 2019-05-01 19:58:09 +00:00
moneromooo-monero 1a66a86f94
remove unused code 2019-04-29 20:52:40 +00:00
moneromooo-monero df83ed74e4
consensus: from v12, enforce >= 2 outputs 2019-04-23 22:09:35 +00:00
Riccardo Spagni 68d131615e
Merge pull request #5448
d009f6dd rpc: fix get_block_hashes.bin from wallet on pruned blockchain (moneromooo-monero)
bb0ef5b1 blockchain: lock the blockchain while pruning (moneromooo-monero)
2019-04-16 22:47:36 +02:00
Riccardo Spagni 0d2aaac15b
Merge pull request #5414
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)
2019-04-16 22:37:02 +02:00
moneromooo-monero d009f6dd61
rpc: fix get_block_hashes.bin from wallet on pruned blockchain
We want to get all blocks here, even pruned ones
2019-04-15 22:27:15 +00:00
moneromooo-monero bb0ef5b1f2
blockchain: lock the blockchain while pruning 2019-04-15 22:27:12 +00:00
moneromooo-monero 5e673c03fe
blockchain_db: fix db txn ending too early
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.
2019-04-14 08:35:38 +00: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
Riccardo Spagni 915d9e5a1f
Merge pull request #5380
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)
2019-04-11 13:02:59 +02:00
Riccardo Spagni bd429033df
Merge pull request #5378
eda2661a Allow pruning before v10 (moneromooo-monero)
2019-04-11 13:02:35 +02:00
Riccardo Spagni 036daa3af9
Merge pull request #5373
aff80e70 blockchain: fix returned height in create_block_template (moneromooo-monero)
2019-04-11 13:00:55 +02:00
Riccardo Spagni 76fbcfe2dd
Merge pull request #5123
089c7637 cryptonote: rework block blob size sanity check (moneromooo-monero)
2019-04-11 12:41:07 +02:00
stoffu 661f1fb8b2
blockchain: remove unused calc of short_term_constraint 2019-04-09 19:39:24 +09:00
Riccardo Spagni 4ac78e1612
Merge pull request #5346
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)
2019-04-06 15:59:43 +02:00
moneromooo-monero 089c7637a6
cryptonote: rework block blob size sanity check
Use the actual block weight limit, assuming that weight is always
greater or equal to size
2019-04-05 09:35:19 +00:00
moneromooo-monero 631ef00e76
blockchain: some debug info when adding txes-from-block fails 2019-04-01 19:24:35 +00:00
Riccardo Spagni 29e4e70f30
Merge pull request #5352
ae6885f6 blockchain: incremental long term block weight cache (moneromooo-monero)
9b687c78 blockchain: simple cache for the long term block weights (moneromooo-monero)
2019-04-01 17:34:02 +02:00
Riccardo Spagni cabd848efa
Merge pull request #5294
77e9815d blockchain: do not try to pop the genesis block (moneromooo-monero)
2019-04-01 17:22:51 +02:00
moneromooo-monero eda2661aa2
Allow pruning before v10
This check is now not needed anymore, and would prevent people
from using --prune-blockchain when starting a new sync
2019-04-01 14:06:49 +00:00
moneromooo-monero aff80e7043
blockchain: fix returned height in create_block_template
It's now needed for CNv4, and was not retained when cached
2019-03-30 20:27:25 +00:00
moneromooo-monero ae6885f6b4
blockchain: incremental long term block weight cache 2019-03-28 18:07:57 +00:00
moneromooo-monero 9b687c7873
blockchain: simple cache for the long term block weights 2019-03-28 18:07:57 +00:00
moneromooo-monero 547a9708de
cryptonote: block parsing + hash calculation speedup
This saves a duplicate serialization step
2019-03-25 13:43:17 +00:00
moneromooo-monero 11604b6da6
blockchain: avoid unneeded block copy 2019-03-25 13:42:32 +00:00
moneromooo-monero 8461df0405
save some database calls when getting top block hash and height 2019-03-25 13:42:25 +00:00
moneromooo-monero 3bbc366147
Avoid repeated (de)serialization when syncing 2019-03-25 13:42:18 +00:00
moneromooo-monero 91f4c7f45f
Make difficulty 128 bit instead of 64 bit
Based on Boolberry work by:
  jahrsg <jahr@jahr.me>
  cr.zoidberg <crypto.zoidberg@gmail.com>
2019-03-24 21:03:19 +00:00
Riccardo Spagni 5ac46c5310
Merge pull request #5256
4b21d38d blockchain: speed up getting N blocks weights/long term weights (moneromooo-monero)
2019-03-21 14:48:40 +02:00
Riccardo Spagni 4c91eb23a0
Merge pull request #5061
1f2930ce Update 2019 copyright (binaryFate)
2019-03-17 17:49:30 +02:00
moneromooo-monero 77e9815db7
blockchain: do not try to pop the genesis block 2019-03-15 10:51:48 +00:00
moneromooo-monero 4ef3c895a4
blockchain: fix ahead of time PoW batch calc 2019-03-10 10:16:13 +00:00
moneromooo-monero 4b21d38dfd
blockchain: speed up getting N blocks weights/long term weights 2019-03-08 12:04:14 +00:00
Riccardo Spagni 49afbd0c53
Merge pull request #5232
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)
2019-03-07 15:17:31 +02:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01:00
moneromooo-monero 88c85c18e0
cryptonote: avoid double parsing blocks when syncing 2019-03-05 11:58:18 +00:00
moneromooo-monero 238401d4e9
core: avoid double parsing blocks after hoh 2019-03-05 11:58:13 +00:00
moneromooo-monero dc5a76095c
blockchain: avoid unneeded block copy 2019-03-05 11:58:10 +00:00
moneromooo-monero 79b4e9f377
save some database calls when getting top block hash and height 2019-03-05 11:58:05 +00:00
moneromooo-monero 9827880877
blockchain: avoid pointless transaction copy and temporary 2019-03-05 11:58:02 +00:00
moneromooo-monero 07d655e438
blockchain: avoid duplicate block hash computation 2019-03-05 11:58:00 +00:00
moneromooo-monero b044d03a51
Avoid repeated (de)serialization when syncing 2019-03-05 11:57:55 +00:00
Riccardo Spagni 082149c580
fix merge errors, update recommended version to 0.14.0.2 2019-03-05 13:46:35 +02:00
Riccardo Spagni f3b368c659
update checkpoints hash 2019-03-05 13:06:36 +02:00
moneromooo-monero ef93b0995c
various: remove unused variables 2019-03-04 22:24:49 +00:00
Riccardo Spagni e1a177f0da
Merge pull request #5092
eec79276 blockchain: fix default genesis block timestamp (moneromooo-monero)
2019-03-04 21:21:08 +02:00
moneromooo-monero 5f67e7f547
blockchain: forbid older BP rct versions from v11 2019-03-04 15:08:12 +00:00
Riccardo Spagni 815c8a48ab
Merge pull request #5174
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)
2019-03-04 17:06:37 +02:00
moneromooo-monero 3dde67d82d
blockchain: add v10 fork heights 2019-03-04 11:56:22 +00:00
moneromooo-monero 356d813799
blockchain: include number of discarded blocks in --reorg-notify 2019-03-04 11:48:44 +00:00
Riccardo Spagni 55305559c1
Merge pull request #5124
b8787f43 ArticMine's new block weight algorithm (moneromooo-monero)
2019-03-04 12:09:13 +02: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
Tom Smeding fec359a641 cryptonote: Fix enum check in expand_transaction_2
This was noticed because GCC warned about using an enum value in a
boolean context.
2019-02-01 16:44:58 +01:00
moneromooo-monero 23813c7160
blockchain: add --reorg-notify
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
2019-01-28 19:32:31 +00:00
moneromooo-monero f6db59b011
notify: handle arbitrary tags 2019-01-28 19:32:28 +00:00
Riccardo Spagni 0daa00e035
Merge pull request #5052
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)
2019-01-28 21:24:55 +02:00
moneromooo-monero eec792764d
blockchain: fix default genesis block timestamp 2019-01-26 21:39:00 +00:00
moneromooo-monero f931e16c6e
add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-01-22 23:17:24 +00:00
moneromooo-monero b750fb27b0
Pruning
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.
2019-01-22 20:30:51 +00:00
Riccardo Spagni 54eb3318e2
Merge pull request #5048
a67b77a9 blockchain: don't propagate exception past dtor (moneromooo-monero)
2019-01-18 19:00:47 +02:00
Riccardo Spagni dc726f4b3b
Merge pull request #5032
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)
2019-01-16 21:40:06 +02:00
Riccardo Spagni a80978e699
Merge pull request #5015
6f2081f8 cryptonote_core: revert extra_tx_map (moneromooo-monero)
2019-01-16 21:32:14 +02:00
Riccardo Spagni 1f71bfc8d0
Merge pull request #4993
b8342dd5 blockchain: fix block rate check for empty blockchains (moneromooo-monero)
2019-01-16 19:07:55 +02:00
Riccardo Spagni 9d57ee9ff6
Merge pull request #4984
008647d7 blockchain_db: speedup tx output gathering (moneromooo-monero)
2019-01-16 19:06:07 +02:00
moneromooo-monero a67b77a9eb
blockchain: don't propagate exception past dtor
Coverity 190660
2019-01-07 16:32:50 +00:00
moneromooo-monero 5ee6f03742
blockchain: fix wrong hf version when popping multiple blocks
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
2019-01-01 18:28:01 +00:00
moneromooo-monero 634d359a84
blockchain: use the version passed as parameter, not a new one 2019-01-01 18:28:01 +00:00
luigi1111 c7af379d29
Merge pull request #4940
9e64a71 blockchain: call deinit in dtor (moneromooo-monero)
2018-12-31 15:44:49 -06:00
luigi1111 6d3caaff70
Merge pull request #4928
affff94 blockchain: fix race between two external mining threads (moneromooo-monero)
2018-12-31 15:28:25 -06:00
moneromooo-monero 6f2081f867
cryptonote_core: revert extra_tx_map
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.
2018-12-25 15:19:41 +00:00
moneromooo-monero b8342dd52c
blockchain: fix block rate check for empty blockchains 2018-12-18 18:47:54 +00:00
moneromooo-monero 008647d7eb
blockchain_db: speedup tx output gathering
We know all the data we'll want for getblocks.bin is contiguous
2018-12-18 11:55:21 +00:00
Riccardo Spagni 83684ea515
Merge pull request #4909
756684bb blockchain: avoid unnecessary DB lookups when syncing (moneromooo-monero)
2018-12-12 11:59:25 +02:00
Riccardo Spagni 0fccc78e39
Merge pull request #4903
dc1c1252 add command pop_blocks (Jason Wong)
2018-12-12 11:58:37 +02:00
moneromooo-monero 9e64a71e7d
blockchain: call deinit in dtor
This ensures the io service that runs in another thread cannot
access data after it's deleted
2018-12-05 00:13:28 +00:00
Riccardo Spagni 81418cb281
Merge pull request #4894
aee7a4e3 wallet_rpc_server: do not use RPC data if the call failed (moneromooo-monero)
1a0733e5 windows_service: fix memory leak (moneromooo-monero)
0dac3c64 unit_tests: do not rethrow a copy of an exception (moneromooo-monero)
5d9915ab cryptonote: fix get_unit for non default settings (moneromooo-monero)
d4f50cb1 remove some unused code (moneromooo-monero)
61163971 a few minor (but easy) performance tweaks (moneromooo-monero)
30023074 tests: slow_memmem now returns size_t (moneromooo-monero)
2018-12-04 17:33:19 +02:00
moneromooo-monero ec1a62b50d
move int-util.h to epee 2018-12-04 15:14:29 +00:00
Riccardo Spagni e7d30780de
Merge pull request #4869
60f36386 Avoid unnecessary temp block and copy ctor (moneromooo-monero)
2018-12-04 17:12:47 +02:00
moneromooo-monero affff949f9
blockchain: fix race between two external mining threads 2018-12-02 13:08:41 +00:00
Jason Wong dc1c12528d add command pop_blocks
add new public method to Blockchain and update according to code review

update after review: better lock/unlock, try catch and coding style
2018-11-28 12:20:28 +01:00
moneromooo-monero 756684bb28
blockchain: avoid unnecessary DB lookups when syncing
Some of the inputs for block in a span will be from other earlier
blocks in that span. Keep track of those outputs so we don't have
to look them up again after those early blocks are added to the
blockchain.
2018-11-27 14:03:06 +00:00
moneromooo-monero fc98f7a0a1
rpc: speedup get_outs.bin 2018-11-26 18:56:23 +00:00
moneromooo-monero 611639710d
a few minor (but easy) performance tweaks
Found by codacy.com
2018-11-23 15:36:48 +00:00
moneromooo-monero 60f36386e4
Avoid unnecessary temp block and copy ctor
block already has a default ctor, and the extra object
churn due to its innards (vectors, etc) is pointless.
2018-11-19 17:57:17 +00:00
moneromooo-monero 31d80027b5
tests: add unit tests for get_output_distribution 2018-11-16 19:21:45 +00:00
moneromooo-monero 0936dae8a4
blockchain: remove "0 is height" shortcut from get_output_distribution
This prevents asking for just 0, and the RPC layer already does this
2018-11-16 10:03:02 +00:00
moneromooo-monero 872c7eb26a
Revert "blockchain: simplify output distribution code"
This reverts commit b2bb9312a7.
2018-11-16 10:02:59 +00:00
Riccardo Spagni c37c70f459
Merge pull request #4806
ac23b10f blockchain: fix innocuous difficulty cache inconsistency (moneromooo-monero)
3b14d972 blockchain: use uint64_t for block height, not size_t (moneromooo-monero)
2018-11-16 11:16:49 +02:00
Riccardo Spagni 0cc3fc3756
Merge pull request #4769
5808530f blockchain: remove unused output_scan_worker parameter (moneromooo-monero)
1426209a blockchain: don't run threads if we have just one function to run (moneromooo-monero)
6f7a5fd4 db_lmdb: slight speedup getting array data from the blockchain (moneromooo-monero)
99fbe100 db_lmdb: save some string copies for readonly db keys/values (moneromooo-monero)
bf31447e tx_pool: speed up take_tx for transactions from blocks (moneromooo-monero)
4f005a77 tx_pool: remove unnecessary get_transaction_hash (moneromooo-monero)
593ef598 perf_timer: call reserve on new timer array (moneromooo-monero)
6ecc99ad core: avoid unnecessary tx/blob conversions (moneromooo-monero)
00cc1a16 unit_tests: notify test special case for the usual weirdo (moneromooo-monero)
2018-11-14 21:35:03 +02:00
moneromooo-monero ac23b10f15
blockchain: fix innocuous difficulty cache inconsistency
This inconsistent state would not actually be used in practice
2018-11-05 14:47:52 +00:00
moneromooo-monero 3b14d9727b
blockchain: use uint64_t for block height, not size_t
for consistency
2018-11-05 14:47:48 +00:00
moneromooo-monero 5808530f54
blockchain: remove unused output_scan_worker parameter 2018-11-04 13:23:05 +00:00
moneromooo-monero 1426209a10
blockchain: don't run threads if we have just one function to run 2018-11-04 13:23:02 +00:00
moneromooo-monero 6ecc99ad1f
core: avoid unnecessary tx/blob conversions 2018-11-01 15:51:19 +00:00
moneromooo-monero a5ca7f4fb5
core: fix unmixable special case allowing ring size below 11 2018-10-27 11:16:25 +00:00
Riccardo Spagni 056a58d13f
Merge pull request #4536
fd62b6e7 blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
2018-10-26 22:20:39 +02:00