moneromooo-monero
f950517a08
core: update pruning if using --prune-blockchain on a pruned blockchain
...
Avoids a massive amount of spurious warnings if the last update before
the daemon exited was a while ago and the daemon was syncing
2019-05-28 09:12:11 +00: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
25a7cfdb4a
add a few checks where it seems appropriate
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
moneromooo-monero
4be18df32a
tx_sanity_check: relax uniqueness check a bit
...
It triggers easily on testnet
2019-04-23 21:59:57 +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
1f01070a0c
Merge pull request #5434
...
ccb996af
rpc: new sanity check on relayed transactions (moneromooo-monero)
2019-04-16 22:41:40 +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
Riccardo Spagni
ce2f46f76b
Merge pull request #5405
...
ffdbcfb6
core: don't check block rate nor fork time in regtest mode (moneromooo-monero)
2019-04-16 22:32:06 +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
ccb996afc6
rpc: new sanity check on relayed transactions
...
This will weed out some transactions with silly rings
2019-04-12 20:22:09 +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
moneromooo-monero
ffdbcfb6b3
core: don't check block rate nor fork time in regtest mode
2019-04-07 13:30:02 +00: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
b8ab510f23
Merge pull request #5332
...
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)
2019-04-01 17:35:12 +02: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
55d7eb06a8
Merge pull request #5317
...
1730a44f
core: improve block rate monitor trigger probabilities (moneromooo-monero)
2019-04-01 17:28:55 +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
cslashm
98fdcb2aa5
Add support for V11 protocol with BulletProofV2 and short amount.
...
New scheme key destination contrfol
Fix dummy decryption in debug mode
2019-03-28 18:26:15 +01: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
1730a44f90
core: improve block rate monitor trigger probabilities
...
The original intent of one false positive a week on average
was not met, since what we really want is not the probability
of having N blocks in T seconds, but either N blocks of fewer
in T seconds, or N blocks or more in T seconds.
Some of this could be cached since it calculates the same fairly
complex floating point values, but it seems pretty fast already.
2019-03-25 00:55:09 +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
moneromooo-monero
e9519e9876
cryptonote: fix calculating coinbase tx hash
...
Also set error flag on exception when handling new txes
to keep tests working
2019-03-21 17:13:01 +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
f75d51abda
core: avoid calculating tx prefix hash when we don't need it
2019-03-05 11:57:57 +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
Riccardo Spagni
8c53ac2dd1
Merge pull request #5132
...
2dbc487e
Add support for V10 protocol with BulletProofV2 and short amount. (cslashm)
63cc02c0
Fix dummy decryption in debug mode (cslashm)
f0e55ceb
fix log namespace (cslashm)
460da140
New scheme key destination contrfol (cslashm)
2019-03-04 14:58:45 +02:00
moneromooo-monero
3dde67d82d
blockchain: add v10 fork heights
2019-03-04 11:56:22 +00:00
moneromooo-monero
a17da7202b
Print the reason why a notification spec failed to parse
2019-03-04 11:48:46 +00:00
moneromooo-monero
356d813799
blockchain: include number of discarded blocks in --reorg-notify
2019-03-04 11:48:44 +00:00
moneromooo-monero
4d598e3d4d
core: add a few more block rate window sizes
...
The 10 minute one will never trigger for 0 blocks, as it's still
fairly likely to happen even without the actual hash rate changing
much, so we add a 20 minute window, where it will (for 0 blocks)
and a one hour window.
2019-03-04 11:48:42 +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
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
cslashm
460da140ec
New scheme key destination contrfol
...
Implies protocol version management.
2019-02-08 17:02:44 +01: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
Tom Smeding
9bf0e53751
cryptonote: Add const-qualifier on comparison functor
...
The original code did not compile with GCC 8.2.1 in C++17 mode, since
comparison functions for std::set's must be invocable as const.
2019-02-01 16:44:56 +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
4e72384318
Merge pull request #5008
...
c6d38718
core: include a dummy encrypted payment id when no payment is used (moneromooo-monero)
b7441c4a
core, wallet: remember original text version of destination address (moneromooo-monero)
a9b1c04a
crptonote_core: do not error out sending unparsable extra field (moneromooo-monero)
2019-01-18 19:12:58 +02: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
moneromooo-monero
c6d387184e
core: include a dummy encrypted payment id when no payment is used
...
For better transaction uniformity, even though this wastes space.
2019-01-18 16:58:50 +00:00
moneromooo-monero
b7441c4a32
core, wallet: remember original text version of destination address
2019-01-18 16:58:47 +00:00
moneromooo-monero
a9b1c04acf
crptonote_core: do not error out sending unparsable extra field
...
extra is arbitrary, and the user may well want to send custom data
2019-01-18 16:58:45 +00: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
69e8567c0e
Merge pull request #4946
...
6644b9b
blockchain_db: remove a couple unused functions (moneromooo-monero)
ce594f5
blockchain_db: allocate known size vector only once (moneromooo-monero)
8332698
db_lmdb: inline check_open, it's trivial and called everywhere (moneromooo-monero)
5511563
db_lmdb: avoid pointless division (moneromooo-monero)
d1efe3d
cryptonote: set tx hash on newly parsed txes when known (moneromooo-monero)
9cc68a2
tx_pool: add a few std::move where it can make a difference (moneromooo-monero)
2018-12-31 16:06:50 -06: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
fe3c8c9682
Merge pull request #4923
...
aba9a9c2
daemon: stop miner before we bring the whole thing down (moneromooo-monero)
2018-12-12 12:00:37 +02:00
Riccardo Spagni
e19a205ff4
Merge pull request #4920
...
e98ae34e
core: fix adding new pre-hoh block when a tx is already in the pool (moneromooo-monero)
2018-12-12 11:59:43 +02: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
Riccardo Spagni
dde1e69723
Merge pull request #4787
...
3dba7f25
protocol: option to pad transaction relay to the next kB (moneromooo-monero)
2018-12-12 11:53:10 +02:00
moneromooo-monero
9cc68a2f74
tx_pool: add a few std::move where it can make a difference
2018-12-05 21:13:37 +00:00
moneromooo-monero
d1efe3d91c
cryptonote: set tx hash on newly parsed txes when known
2018-12-05 21:13:29 +00: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
Riccardo Spagni
c00ac446fd
Merge pull request #4854
...
bd98e99c
Removed a lot of unnecessary includes (Martijn Otto)
2018-12-04 17:08:42 +02:00
moneromooo-monero
affff949f9
blockchain: fix race between two external mining threads
2018-12-02 13:08:41 +00:00
moneromooo-monero
aba9a9c277
daemon: stop miner before we bring the whole thing down
...
This avoids the miner erroring out trying to submit blocks
to a core that's already shut down (and avoids pegging
the CPU while we're busy shutting down).
2018-11-30 15:10:25 +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
e98ae34e4b
core: fix adding new pre-hoh block when a tx is already in the pool
2018-11-26 23:45:01 +00:00
moneromooo-monero
fc98f7a0a1
rpc: speedup get_outs.bin
2018-11-26 18:56:23 +00:00
moneromooo-monero
d4f50cb109
remove some unused code
...
Found by codacy.com
2018-11-23 15:37:36 +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
9827958f5e
Merge pull request #4768
...
cf552c75
tx_pool: allow take_tx to work without m_txs_by_fee_and_receive_time (moneromooo-monero)
2018-11-16 10:59:25 +02:00
Riccardo Spagni
e90ee7548c
Merge pull request #4765
...
09dbd9cb
tx_pool: fix comment about transaction_prefix (moneromooo-monero)
2018-11-16 10:58:42 +02:00
Martijn Otto
bd98e99c80
Removed a lot of unnecessary includes
2018-11-15 17:29:34 +01: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
Riccardo Spagni
299d75b209
Merge pull request #4735
...
73e504c1
rpc: adjust ring size error message now that too high is also possible (moneromooo-monero)
a5ca7f4f
core: fix unmixable special case allowing ring size below 11 (moneromooo-monero)
2018-11-06 21:31:14 +02:00
moneromooo-monero
3dba7f252e
protocol: option to pad transaction relay to the next kB
...
To help protect one's privacy from traffic volume analysis
for people using Tor or I2P. This will really fly once we
relay txes on a timer rather than on demand, though.
Off by default for now since it's wasteful and doesn't bring
anything until I2P's in.
2018-11-06 15:47:05 +00: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
xiphon
b3067962fa
cryptonote_core: avoid gratuitous recalculations in check_block_rate()
2018-11-05 00:13:51 +00:00
Riccardo Spagni
adf4eb8d50
Merge pull request #4688
...
5a2e54a1
Fix prune using receive time as tx_weight (doy-lee)
2018-11-04 20:45:06 +02:00
Riccardo Spagni
5918ef93f8
Merge pull request #4683
...
3a85af40
core: fix handle_incoming_tx* comment about return value (moneromooo-monero)
2018-11-04 20:43:08 +02: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
xiphon
233f00c601
cryptonote_core: fix build error gcc 5.4.0 'sign-compare'
2018-11-01 22:57:08 +00:00
moneromooo-monero
bf31447e9b
tx_pool: speed up take_tx for transactions from blocks
...
This happens for every historical tx when syncing, and the
unnecessary parsing is actually showing up on profile.
Since these are kept cached for just one block, this does
not increase memory usage after syncing.
2018-11-01 15:51:28 +00:00
moneromooo-monero
4f005a77c2
tx_pool: remove unnecessary get_transaction_hash
2018-11-01 15:51:24 +00:00
moneromooo-monero
6ecc99ad1f
core: avoid unnecessary tx/blob conversions
2018-11-01 15:51:19 +00:00
moneromooo-monero
cf552c752d
tx_pool: allow take_tx to work without m_txs_by_fee_and_receive_time
...
This should make it possible to have two daemons running on the
same database again.
2018-10-31 14:45:02 +00:00
moneromooo-monero
09dbd9cbbc
tx_pool: fix comment about transaction_prefix
...
It was leftover from a change that was undone before commit,
but the comment change was let through
2018-10-31 12:15:38 +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
Riccardo Spagni
557c17e206
Merge pull request #4408
...
341b3931
cryptonote_core: warn when the block rate deviates from expectations (moneromooo-monero)
2018-10-26 22:18:41 +02:00
Riccardo Spagni
1c91963dcd
Merge pull request #4308
...
9907ea06
cryptonote: sort tx_extra fields (moneromooo-monero)
2018-10-26 22:18:28 +02:00
doy-lee
5a2e54a1cb
Fix prune using receive time as tx_weight
2018-10-23 10:03:45 +11:00
xiphon
fd62b6e79f
blocks: use auto-generated .c files instead of 'LD -r -b binary'
2018-10-22 01:12:00 +03:00
moneromooo-monero
3a85af403d
core: fix handle_incoming_tx* comment about return value
2018-10-21 17:09:21 +00:00
Riccardo Spagni
5c418c0522
Merge pull request #4522
...
a39c0358
blockchain: add check test options are given for fakechain mode (moneromooo-monero)
2018-10-20 20:40:16 +02:00
Riccardo Spagni
a38299801f
Merge pull request #4666
...
cf75ee72
blockchain: move two new verification errors to the verify category (moneromooo-monero)
2018-10-20 20:38:37 +02:00
Riccardo Spagni
93f2c13a39
Merge pull request #4637
...
c39e0a17
core: don't verify range proofs multiple times (moneromooo-monero)
2018-10-20 20:36:33 +02:00
moneromooo-monero
cf75ee722a
blockchain: move two new verification errors to the verify category
...
Lest we get people get scared again
2018-10-19 21:11:12 +00:00
stoffu
776aefdac1
tx_pool: revert #4592 and move bin2hex conversion to on_get_transaction_pool
2018-10-18 08:01:56 +09:00
moneromooo-monero
c39e0a1706
core: don't verify range proofs multiple times
2018-10-17 16:23:10 +00:00
Riccardo Spagni
c531df734f
Merge pull request #4389
...
6844ae1b
tx_pool: avoid parsing a whole tx if only the prefix is needed (moneromooo-monero)
2018-10-15 13:36:15 +02:00
stoffu
a677492f1b
tx_pool: store hex string instead of raw binary to tx_blob of get_transaction_pool RPC
...
Inspired by https://github.com/masari-project/masari/issues/93
2018-10-15 11:57:02 +09:00
Riccardo Spagni
ac5674524a
Revert "Merge pull request #4472 "
...
This reverts commit 79d46c4d55
, reversing
changes made to c9fc61dbb5
.
2018-10-08 21:39:54 +02:00
moneromooo-monero
a39c035846
blockchain: add check test options are given for fakechain mode
...
Coverity 188616
2018-10-08 11:37:58 +00:00
moneromooo-monero
6844ae1b8d
tx_pool: avoid parsing a whole tx if only the prefix is needed
2018-10-08 10:18:01 +00:00
moneromooo-monero
9907ea0694
cryptonote: sort tx_extra fields
...
This removes some small amount of fingerprinting entropy.
There is no consensus rule to require this since this field
is technically free form, and a transaction is free to have
custom data in it.
2018-10-07 11:13:22 +00:00
xiphon
02d3ef7bda
blocks: use auto-generated .c files instead of 'LD -r -b binary'
2018-10-04 00:01:09 +00:00
Riccardo Spagni
d1d64327b6
Merge pull request #4476
...
fa9e54b6
build: fix gcc false positive 'stringop-overflow' warning (xiphon)
2018-10-02 22:38:32 +02:00
Riccardo Spagni
e2da7c7817
Merge pull request #4467
...
fa942ef6
daemon: silence daemon update warnings on testnet (iDunk5400)
2018-10-02 22:36:57 +02:00
xiphon
fa9e54b6ee
build: fix gcc false positive 'stringop-overflow' warning
2018-09-30 10:58:00 +00:00
Riccardo Spagni
83d8f03c23
Merge pull request #4333
...
73403004
add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc} (moneromooo-monero)
2018-09-29 22:20:44 +02:00
iDunk5400
fa942ef610
daemon: silence daemon update warnings on testnet
2018-09-29 14:42:10 +02:00
Riccardo Spagni
8bf5a00564
Merge pull request #4423
...
357441a2
add checkpoints for testnet and mainnet (Riccardo Spagni)
d9f666d7
update checkpoints.dat (Riccardo Spagni)
6b1b4e83
update version to 13.0 (Riccardo Spagni)
6f153533
update readme with v13.0 (Riccardo Spagni)
2018-09-25 13:33:52 +02:00
Riccardo Spagni
689758d691
Merge pull request #4435
...
c39ad0cd
tx_pool: fix tx removal at startup keeping references (moneromooo-monero)
2018-09-25 13:11:05 +02:00
moneromooo-monero
c39ad0cd72
tx_pool: fix tx removal at startup keeping references
2018-09-25 09:58:37 +00:00
moneromooo-monero
50981c40ce
blockchain: add stagenet v8 and v9, two weeks before mainnet
2018-09-24 20:43:39 +00:00
Riccardo Spagni
d9f666d78c
update checkpoints.dat
2018-09-23 09:51:15 +02:00
Riccardo Spagni
0645dcdbdb
Merge pull request #4378
...
ac934663
rpc: add a "is an update available" flag in get_info (moneromooo-monero)
2018-09-21 20:41:53 +02:00
Riccardo Spagni
d6893aedf6
Merge pull request #4369
...
b2bb9312
blockchain: simplify output distribution code (moneromooo-monero)
befdcbf4
db_lmdb: do not use base for cumulative distribution (moneromooo-monero)
2018-09-21 20:31:21 +02:00
moneromooo-monero
341b3931ed
cryptonote_core: warn when the block rate deviates from expectations
...
The warning threshold is set to allow a false positive every
ten days on average.
2018-09-20 14:01:52 +00:00
Riccardo Spagni
22a6591a70
Merge pull request #4325
...
4e1e9a60
blockchain: add mainnet v8 height targetting 18 october (moneromooo-monero)
2018-09-18 17:39:16 +02:00
Riccardo Spagni
3584a852a3
Merge pull request #4372
...
1660b0e7
tx_pool: make the max tx size a consensus rule from v8 (moneromooo-monero)
2018-09-14 12:56:01 +02:00
moneromooo-monero
be001326d1
remove obsolete daemon selection of fake outs and old tx construction
2018-09-14 10:51:45 +00:00
moneromooo-monero
ac9346637a
rpc: add a "is an update available" flag in get_info
...
Make it easier for a user to be told when to update
2018-09-14 09:28:03 +00:00
moneromooo-monero
1660b0e72c
tx_pool: make the max tx size a consensus rule from v8
2018-09-13 09:43:29 +00:00
moneromooo-monero
b2bb9312a7
blockchain: simplify output distribution code
2018-09-12 19:20:16 +00:00
moneromooo-monero
9137ad2c63
blockchain: add a testnet v9 a day after v8
...
So that bulletproofs become mandatory
2018-09-11 13:38:36 +00:00
moneromooo-monero
5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size
2018-09-11 13:38:07 +00:00
moneromooo-monero
c444b1b229
require canonical multi output bulletproof layout
2018-09-11 13:37:39 +00:00
moneromooo-monero
2a8fcb421b
Bulletproof aggregated verification and tests
...
Also constrains bulletproofs to simple rct, for simplicity
2018-09-11 13:37:37 +00:00
moneromooo-monero
bacf0a1e2f
bulletproofs: add aggregated verification
...
Ported from sarang's java code
2018-09-11 13:37:32 +00:00
moneromooo-monero
9ce9f8caf6
bulletproofs: add multi output bulletproofs to rct
2018-09-11 13:37:28 +00:00
luigi1111
03738fdde1
Merge pull request #4276
...
48a7bc4
tx_pool: fix infinite loop when failing to find a meta record (moneromooo-monero)
2018-09-04 13:25:44 -05:00
luigi1111
5f1bbe3bce
Merge pull request #4268
...
1f2409e
Do memwipe for critical secret keys copied to rct::key (stoffu)
2018-09-04 13:16:04 -05:00
moneromooo-monero
4e1e9a607e
blockchain: add mainnet v8 height targetting 18 october
...
and v9 a day later
2018-09-02 16:02:17 +00:00
luigi1111
ec6982f8eb
Merge pull request #4240
...
83f5587
blockchain: use uint64_t for height, not size_t (moneromooo-monero)
2018-08-22 20:58:55 -05:00
luigi1111
4a4ea78ecd
Merge pull request #4204
...
b278b83
core: sync database based on bytes added, not blocks added (moneromooo-monero)
2018-08-22 20:43:51 -05:00
moneromooo-monero
48a7bc4280
tx_pool: fix infinite loop when failing to find a meta record
2018-08-19 17:47:05 +00:00
stoffu
1f2409e9e2
Do memwipe for critical secret keys copied to rct::key
2018-08-16 22:26:30 +09:00
moneromooo-monero
82d1b74500
core: cache block template where possible
...
This avoids constant rechecking of the same things each time
a miner asks for the block template. The tx pool maintains
a cookie to allow users to detect when the pool state changed,
which means the block template needs rebuilding.
2018-08-16 12:44:33 +00:00
luigi1111
fd3b71129b
Merge pull request #4164
...
8e24533
blockchain: some batch tx scanning speedup (moneromooo-monero)
2018-08-15 17:31:24 -05:00
moneromooo-monero
b278b83860
core: sync database based on bytes added, not blocks added
...
Blocks have a very wide range, whereas actual size is the relevant
quantity to consider when syncing
2018-08-12 16:13:46 +00:00
moneromooo-monero
83f5587167
blockchain: use uint64_t for height, not size_t
2018-08-09 17:09:26 +00:00
luigi1111
dda05f357a
Merge pull request #4108
...
8c05237
blockchain: cache next block difficulty after adding a block (moneromooo-monero)
2018-07-27 14:26:01 -05:00
moneromooo-monero
8e24533a7f
blockchain: some batch tx scanning speedup
2018-07-21 12:05:12 +01:00
luigi1111
61eea83978
Merge pull request #4081
...
d95bc44
blockchain: fix getting invalid block data on failure (moneromooo-monero)
2018-07-19 14:12:30 -05:00
luigi1111
9474567d76
Merge pull request #4076
...
aa0ea0a
blockchain: set the m_verifivation_failed flag in a couple more places (moneromooo-monero)
2018-07-19 14:11:24 -05:00
luigi1111
5cade94189
Merge pull request #4047
...
41b4bf9
tx_pool: cache check_tx_inputs results (moneromooo-monero)
2018-07-19 14:02:20 -05:00
luigi1111
21afa71ba6
Merge pull request #3981
...
45e419b
db: store cumulative rct output distribution in the db for speed (moneromooo-monero)
2018-07-19 13:39:24 -05:00
luigi1111
d518dae4bf
Merge pull request #3973
...
50af357
alt_chain_info can now give more info about a particular alt chain (moneromooo-monero)
2018-07-19 13:37:10 -05:00
luigi1111
025187e6c9
Merge pull request #3854
...
149da42
db_lmdb: enable batch transactions by default (stoffu)
34cb6b4
add --regtest and --fixed-difficulty for regression testing (vicsn)
9e1403e
update get_info RPC and bump RPC version (vicsn)
207b66e
first new functional tests (vicsn)
2018-07-19 13:35:25 -05:00
moneromooo-monero
45e419bd5c
db: store cumulative rct output distribution in the db for speed
...
This gets rid of the temporary precalc cache.
Also make the RPC able to send data back in binary or JSON,
since there can be a lot of data
This bumps the LMDB database format to v3, with migration.
2018-07-13 11:37:04 +01:00
moneromooo-monero
8c0523771f
blockchain: cache next block difficulty after adding a block
...
It's not 100% certain it'll be needed, but it avoids getinfo
needing the blockchain lock and potentially blocking
2018-07-07 19:34:21 +01:00
moneromooo-monero
d95bc44c6b
blockchain: fix getting invalid block data on failure
2018-06-29 15:50:34 +01:00
victorsintnicolaas
34cb6b4b70
add --regtest and --fixed-difficulty for regression testing
...
on_generateblocks RPC call combines functionality from the on_getblocktemplate and on_submitblock RPC calls to allow rapid block creation. Difficulty is set permanently to 1 for regtest.
Makes use of FAKECHAIN network type, but takes hard fork heights from mainchain
Default reserve_size in generate_blocks RPC call is now 1. If it is 0, the following error occurs 'Failed to calculate offset for'.
Queries hard fork heights info of other network types
2018-06-29 10:06:11 +02:00
moneromooo-monero
aa0ea0aafc
blockchain: set the m_verifivation_failed flag in a couple more places
...
when a block being added to the main chain is invalid.
This ensures the peer is banned after a number of these.
2018-06-28 16:57:22 +01:00
moneromooo-monero
84d9e7faec
blockchain: fix build after waiter::wait prototype change
2018-06-28 00:24:39 +01:00
luigi1111
87d7612311
Merge pull request #3986
...
b628503
Remove old logic saved in comments. (jeandudey)
2018-06-27 16:22:03 -05:00
luigi1111
3ad4ecd4ff
Merge pull request #3982
...
08b85a8
cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X (stoffu)
0cf80ba
net_node: resolve host for node addresses given via command line flags (stoffu)
2018-06-27 15:38:23 -05:00
luigi1111
a844844cda
Merge pull request #3716
...
a2b557f
6795bd0
209ec96
ed2c81e
a830db2
57ea902
31a895e
ba8331c
f7f1917
41be339
f025ae9
ef2cb63
dcfd299
5d3e702
2704624
2771a18
0e4c7d0
(moneromooo-monero)
2018-06-27 15:33:01 -05:00
moneromooo-monero
2771a18e85
threadpool: allow leaf functions to run concurrently
...
Decrease the number of worker threads by one to account
for the fact the calling thread acts as a worker thread now
2018-06-26 22:15:22 +01:00
moneromooo-monero
ef2cb63287
blockchain: simplify/speedup handle_get_objects
2018-06-26 22:15:14 +01:00
moneromooo-monero
a830db2577
rpc: rework to avoid repeated calculations in get_blocks.bin
2018-06-26 22:14:23 +01:00
moneromooo-monero
ed2c81ed95
replace std::list with std::vector on some hot paths
...
also use reserve where appropriate
2018-06-26 22:14:21 +01:00
moneromooo-monero
50af3579ee
alt_chain_info can now give more info about a particular alt chain
2018-06-26 08:19:51 +01:00
luigi1111
14372ca95a
Merge pull request #3975
...
2d5921e
blockchain: avoid duplicate db query for height (moneromooo-monero)
2018-06-25 15:24:45 -05:00
luigi1111
c3ec5373b3
Merge pull request #3936
...
d81e042
tx_pool: initialize bitflags padding since it gets written to storage (moneromooo-monero)
2018-06-25 14:53:27 -05:00
moneromooo-monero
41b4bf9d6d
tx_pool: cache check_tx_inputs results
...
This is called a lot when creating a block template, and
does not change until the blockchain changes.
This also avoids tx parsing when cached.
2018-06-24 11:22:26 +01:00
luigi1111
9eb51887b0
Merge pull request #3919
...
ace2eda
blockchain: pop forked blocks only when DB is not read-only (stoffu)
2018-06-20 14:39:09 -05:00
luigi1111
5a221c0e48
Merge pull request #3904
...
4f3a4fb
blockchain: return error when requesting non existent output (moneromooo-monero)
2018-06-20 14:33:08 -05:00
luigi1111
81a2ff768b
Merge pull request #3903
...
2b0c632
tx_pool: hold off parsing a tx blob till we actually need it (moneromooo-monero)
2018-06-20 14:31:33 -05:00
luigi1111
50bc95519e
Merge pull request #3828
...
16e209e
core: lock incoming tx lock when checking the txpool and chain (moneromooo-monero)
2018-06-19 12:41:07 -05:00
luigi1111
cfd66dae4b
Merge pull request #3691
...
db55263
threadpool: allow constructing an object, and misc tweaks (moneromooo-monero)
ce173cb
core: remove threadpool dependency from header (moneromooo-monero)
3147468
unit_tests: add threadpool unit test (moneromooo-monero)
2018-06-17 22:04:39 -05:00
luigi1111
fb2b16f10a
Merge pull request #3732
...
fa0839f
Ensure m_timestamps has the correct number for computing difficulty. (thaerkh)
2018-06-16 14:05:53 -05:00
luigi1111
b3363e8e0a
Merge pull request #3726
...
b5cb1bc
blockchain: avoid exception if asked for a block we do not have (moneromooo-monero)
2018-06-16 14:02:56 -05:00
luigi1111
6be2516140
Merge pull request #3687
...
6b13976
blockchain: log in DEBUG when a block is found, and where (moneromooo-monero)
2018-06-12 12:22:12 -05:00
Jean Pierre Dudey
b628503bad
Remove old logic saved in comments.
...
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-06-11 09:36:05 -04:00
stoffu
08b85a8e00
cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X
2018-06-11 20:17:02 +09:00
moneromooo-monero
2d5921eefa
blockchain: avoid duplicate db query for height
2018-06-09 19:51:27 +01:00
luigi1111
2619d966c6
Merge pull request #3908
...
827ca3f
bump version for 0.12.2 point release (fluffypony)
95ccf50
update checkpoints.dat for point release (fluffypony)
2018-06-08 14:53:54 -05:00
luigi1111
22c8730261
Merge pull request #3450
...
3b941be
core: add get_earliest_ideal_height_for_version() (stoffu)
2018-06-08 14:31:49 -05:00
luigi1111
8a1f0d7d13
Merge pull request #3940
...
f24cbc5
blockchain: fix deadlock with the difficulty cache (moneromooo-monero)
2018-06-07 12:19:43 -05:00
moneromooo-monero
f24cbc5245
blockchain: fix deadlock with the difficulty cache
2018-06-06 10:37:51 +01:00
moneromooo-monero
d81e042306
tx_pool: initialize bitflags padding since it gets written to storage
...
Avoids valgrind reporting uninitialized data usage
2018-06-05 20:26:44 +01:00
stoffu
ace2edacb6
blockchain: pop forked blocks only when DB is not read-only
2018-06-04 20:59:50 +09:00
moneromooo-monero
f0322a083a
blockchain: demote a hash-of-hashes validation warning to debug
...
This data comes from untrusted peers, and validation failures
are therefore normal.
2018-06-02 23:48:12 +01:00
Riccardo Spagni
95ccf508cd
update checkpoints.dat for point release
2018-06-02 14:31:37 +02:00
moneromooo-monero
2b0c632f32
tx_pool: hold off parsing a tx blob till we actually need it
2018-06-02 09:17:41 +01:00
moneromooo-monero
4f3a4fb701
blockchain: return error when requesting non existent output
...
avoids RPC thread dying, causing the wallet to timeout
2018-06-01 21:52:04 +01:00
luigi1111
9bc8f76924
Merge pull request #3525
...
66a659b
blockchain: add scope guard to waiter for threaded txv1 verification (stoffu)
2018-05-30 16:08:50 -05:00
luigi1111
a7ea14dc6a
Merge pull request #3876
...
740da1b
core: fix automatic safe db sync mode switching (moneromooo-monero)
e942d34
protocol: do not switch to unsafe sync mode for just a few blocks (moneromooo-monero)
2018-05-30 15:46:13 -05:00
luigi1111
4267a0bb51
Merge pull request #3731
...
a66f152
Use median timestamp if current time renders a block invalid. (thaerkh)
2018-05-30 15:44:25 -05:00
luigi1111
c534fe8d19
Merge pull request #3251
...
b9389e5
db_lmdb: save pruned and prunable tx data separately (moneromooo-monero)
2018-05-29 17:56:26 -05:00
luigi1111
ed72f35e9a
Merge pull request #3446
...
a6b8d3f
tx_pool: remove old comment from fill_block_template() (stoffu)
2018-05-29 12:57:43 -05:00
luigi1111
764340d112
Merge pull request #3420
...
a6a54fa
blockchain: cache difficulty for next block (moneromooo-monero)
2018-05-29 12:55:19 -05:00
moneromooo-monero
740da1ba95
core: fix automatic safe db sync mode switching
2018-05-28 12:14:04 +01:00
stoffu
a6b8d3fee1
tx_pool: remove old comment from fill_block_template()
2018-05-28 13:41:39 +09:00
moneromooo-monero
b9389e582e
db_lmdb: save pruned and prunable tx data separately
...
This bumps DB version to 2, migration code will run for v1 DBs
2018-05-23 22:48:12 +01:00
Riccardo Spagni
45975fd8eb
update checkpoints
2018-05-23 21:20:15 +02:00
Riccardo Spagni
f794d3b3df
Merge pull request #3787
...
ce63ab09
blockchain: invalidate misc caches when popping blocks (moneromooo-monero)
2018-05-21 21:36:38 +02:00
Riccardo Spagni
709658d166
Merge pull request #3832
...
cb9c7972
Fix output shuffling for multisig (stoffu)
2018-05-21 20:57:52 +02:00
moneromooo-monero
5f8ffca34d
speed up get_output_distribution (and precalc common case)
2018-05-21 19:51:58 +01:00
Riccardo Spagni
791da4343c
Merge pull request #3749
...
872cb4ef
blockchain: pop top if block version disagrees with the ideal fork version (stoffu)
2018-05-21 20:45:35 +02:00
moneromooo-monero
ce173cbb5b
core: remove threadpool dependency from header
2018-05-20 12:06:07 +01:00
stoffu
cb9c7972b6
Fix output shuffling for multisig
2018-05-20 09:38:41 +09:00
moneromooo-monero
16e209e08d
core: lock incoming tx lock when checking the txpool and chain
...
This gets rid of an innocuous race trying to add the same tx
twice to the txpool
2018-05-18 09:39:56 +01:00
Thaer Khawaja
a66f152f75
Use median timestamp if current time renders a block invalid.
2018-05-13 11:58:05 -07:00
moneromooo-monero
b5cb1bc403
blockchain: avoid exception if asked for a block we do not have
...
This can happen if a peer tries to obtain the next span from other
peers if that span is needed for not downloaded yet. Also if the
peer maliciously requests a non existent block hash.
2018-05-09 14:03:07 +01:00
moneromooo-monero
ce63ab09db
blockchain: invalidate misc caches when popping blocks
...
Might be a bit heavy handed, but conservative.
2018-05-09 09:10:56 +01:00
moneromooo-monero
6f859e4328
cryptonote: make sure outPk setup always happens
2018-05-07 19:21:52 +01:00
stoffu
872cb4efd8
blockchain: pop top if block version disagrees with the ideal fork version
2018-05-06 20:50:46 +09:00
Thaer Khawaja
fa0839f2f5
Ensure m_timestamps has the correct number for computing difficulty.
2018-04-29 19:50:55 -07:00
Riccardo Spagni
2ab5b1a21f
Merge pull request #3683
...
dad10775
Only log an error if fork version is higher AND is not known. (Thaer Khawaja)
2018-04-28 16:57:36 +02:00
moneromooo-monero
6b13976330
blockchain: log in DEBUG when a block is found, and where
...
Eases up debugging
2018-04-23 11:43:12 +01:00
moneromooo-monero
ffeeefde60
speedup get_output_histogram for all amounts when min_count > 0
...
This skips the vast majority of "dust" output amounts with just
one instance on the chain. Clocks in at 0.15% of the original
time on testnet.
2018-04-23 10:54:28 +01:00
Thaer Khawaja
dad1077577
Only log an error if fork version is higher AND is not known.
2018-04-22 17:26:44 -07:00
Riccardo Spagni
a95461e76d
Merge pull request #3609
...
08343aba
tx_pool: fix loading with colliding key images (moneromooo-monero)
2018-04-12 13:48:44 +02:00
Riccardo Spagni
226de8e928
Merge pull request #3530
...
eb59f7c5
cryptonote_tx_util: make destinations properly shuffled (stoffu)
2018-04-12 13:46:34 +02:00
Riccardo Spagni
5053f8f40b
Merge pull request #3502
...
11c933e1
fix lambda compile error on openbsd (moneromooo-monero)
2018-04-12 11:14:43 +02:00
moneromooo-monero
08343abaf4
tx_pool: fix loading with colliding key images
...
A key image may be present more than once if all but one of the
txes spending that key image are coming from blocks. When loading
a txpool from storage, we must load the one that's not from a
block first to avoid rejection
2018-04-11 15:27:56 +01:00
stoffu
eb59f7c563
cryptonote_tx_util: make destinations properly shuffled
2018-03-31 18:37:46 +09:00
stoffu
66a659bb03
blockchain: add scope guard to waiter for threaded txv1 verification
2018-03-30 19:22:32 +09:00
moneromooo-monero
11c933e137
fix lambda compile error on openbsd
2018-03-27 14:48:36 +01:00
Riccardo Spagni
dac3895ac1
update block hashes for checkpoints.dat
2018-03-24 08:36:10 +02:00
stoffu
3b941befae
core: add get_earliest_ideal_height_for_version()
2018-03-21 01:53:24 +09:00
moneromooo-monero
a6a54fa883
blockchain: cache difficulty for next block
...
Takes about 10 ms, which takes pretty much all of the get_info
RPC, which is called pretty often from wallets.
Also add a new lock so we don't need to lock the blockchain lock,
which will avoid blocking for a long time when calling the getinfo
RPC while syncing. Users of get_difficulty_for_next_block who need
the lock will have locked it already.
2018-03-19 09:05:40 +00:00
moneromooo-monero
b1398fff40
core: fix use of uninitialised data
2018-03-18 23:37:00 +00:00
moneromooo-monero
bb20f104ba
Move v7 fork to 1546000 to give more update time
2018-03-18 09:29:31 +00:00
Riccardo Spagni
83651630bc
Merge pull request #3418
...
20a00266
blockchain: forbid bulletproof types before v8 (moneromooo-monero)
2018-03-17 16:51:47 +02:00
moneromooo-monero
20a002667c
blockchain: forbid bulletproof types before v8
...
They were already forbidden implicitely, but let's make that
explicit for robustness
2018-03-16 18:18:34 +00:00
Riccardo Spagni
432480fa42
Merge pull request #3414
...
524cbdc1
blockchain: fix log message about per-kB fee (stoffu)
2018-03-16 18:09:34 +02:00
Riccardo Spagni
0f27fc57ac
Merge pull request #3336
...
57c0b1ed
Fix typos in various files (Dimitris Apostolou)
2018-03-16 18:08:07 +02:00
moneromooo-monero
41f727ce42
add RPC to get a histogram of outputs of a given amount
2018-03-16 10:32:26 +00:00
stoffu
524cbdc1e2
blockchain: fix log message about per-kB fee
2018-03-16 10:43:19 +09:00
Dimitris Apostolou
57c0b1ed9f
Fix typos in various files
2018-03-15 18:25:38 +02:00
Jean Pierre Dudey
e1b526b371
Remove the Blockchain::get_all_known_block_ids
function.
...
This function isn't used in the codebase.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-03-14 21:56:19 -04:00
stoffu
8705beaf51
keypair::generate: always require hw::device to avoid possible mistake
2018-03-14 21:00:16 +09:00
stoffu
27a196b126
device: untangle cyclic depenency
...
When #3303 was merged, a cyclic dependency chain was generated:
libdevice <- libcncrypto <- libringct <- libdevice
This was because libdevice needs access to a set of basic crypto operations
implemented in libringct such as scalarmultBase(), while libringct also needs
access to abstracted crypto operations implemented in libdevice such as
ecdhEncode(). To untangle this cyclic dependency chain, this patch splits libringct
into libringct_basic and libringct, where the basic crypto ops previously in
libringct are moved into libringct_basic. The cyclic dependency is now resolved
thanks to this separation:
libcncrypto <- libringct_basic <- libdevice <- libcryptonote_basic <- libringct
This eliminates the need for crypto_device.cpp and rctOps_device.cpp.
Also, many abstracted interfaces of hw::device such as encrypt_payment_id() and
get_subaddress_secret_key() were previously implemented in libcryptonote_basic
(cryptonote_format_utils.cpp) and were then called from hw::core::device_default,
which is odd because libdevice is supposed to be independent of libcryptonote_basic.
Therefore, those functions were moved to device_default.cpp.
2018-03-14 21:00:15 +09:00
Riccardo Spagni
9a63fbcf83
Merge pull request #3371
...
84decbea
core: add v7 for 1539500 on mainnet (moneromooo-monero)
2018-03-14 13:37:25 +02:00
Riccardo Spagni
2e074e2ae7
Merge pull request #3358
...
978663d4
Stagenet: successive forks up to v7 (stoffu)
2018-03-14 13:36:47 +02:00