Commit Graph

1183 Commits

Author SHA1 Message Date
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 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 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