Commit Graph

6971 Commits

Author SHA1 Message Date
Riccardo Spagni 1a0fa56189 Merge pull request #5153
32ebc95d CMakeLists.txt: detect and use -pthread compiler flag (moneromooo-monero)
be2d061b miner: fix build with boost 1.69 (moneromooo-monero)
1de62cb1 mlocker: fix access to global lock map after dtor on exit (moneromooo-monero)
5544bb83 mlocker: fix dtor ordering problem (moneromooo-monero)
2019-02-18 11:14:50 +02:00
Riccardo Spagni fe1ccd8d13 Merge pull request #5151
4b32859d CNv4 JIT compiler for x86-64 and tests (SChernykh)
2019-02-18 11:14:26 +02:00
SChernykh 4b32859d2f CNv4 JIT compiler for x86-64 and tests
Minimalistic JIT code generator for random math sequence in CryptonightR.

Usage:
- Allocate writable and executable memory
- Call v4_generate_JIT_code with "buf" pointed to memory allocated on the previous step
- Call the generated code instead of "v4_random_math(code, r)", omit the "code" parameter
2019-02-17 23:56:23 +01:00
moneromooo-monero 32ebc95df7 CMakeLists.txt: detect and use -pthread compiler flag
The cmake thread detection just ain't enough to always work
2019-02-17 10:54:43 +00:00
moneromooo-monero be2d061b94 miner: fix build with boost 1.69 2019-02-17 10:52:54 +00:00
moneromooo-monero 1de62cb136 mlocker: fix access to global lock map after dtor on exit
as the lock, it now leaks
2019-02-17 10:52:48 +00:00
moneromooo-monero 5544bb8359 mlocker: fix dtor ordering problem
leak the mutex instead, it's a one off
2019-02-17 10:52:46 +00:00
Riccardo Spagni cf27e26beb Merge pull request #5149
7aa0cc58 blockchain: fix m_long_term_block_weight_height initialization (moneromooo-monero)
2019-02-15 15:09:14 +02:00
moneromooo-monero 7aa0cc58e2 blockchain: fix m_long_term_block_weight_height initialization
Also check return of that function, it can now return error
2019-02-15 13:01:56 +00:00
Riccardo Spagni 9d6d102c94 Merge pull request #5148
bd7f8251 blockchain: forbid older BP rct versions from v11 (moneromooo-monero)
2019-02-15 13:39:35 +02:00
moneromooo-monero bd7f82515b blockchain: forbid older BP rct versions from v11 2019-02-15 10:20:23 +00:00
Riccardo Spagni a0c202aec4 Merge pull request #5147
f9d820ad Fix v3/v4 db conversion (moneromooo-monero)
2019-02-15 08:01:39 +02:00
moneromooo-monero f9d820ada1 Fix v3/v4 db conversion 2019-02-15 01:21:37 +00:00
Riccardo Spagni b9b54dffbe Merge pull request #5144
0b0fb709 Build fixes for some platforms (moneromooo-monero)
3ac3366a blockchain: add v10 fork heights (moneromooo-monero)
c2b8037a Adding cnv4-2 tweaks (Lee Clagett)
1b77e80a Cryptonight variant 4 aka CryptonightR (SChernykh)
b980fec4 slow-hash: some more big endian fixes (xiphon)
cd22a02d slow-hash: fix for big endian (moneromooo-monero)
96f53815 Small function declaration cleanup in slow-hash.c (Pol Mauri)
612ecb13 Add support for V10 protocol with BulletProofV2 and short amount. (cslashm)
823b38bc Fix dummy decryption in debug mode (cslashm)
377de050 fix log namespace (cslashm)
ff9853b4 New scheme key destination contrfol (cslashm)
041af954 cryptonote: Fix enum check in expand_transaction_2 (Tom Smeding)
1767c817 simplewallet: tell the user to complain to the recipient (moneromooo-monero)
c2d0e9a1 ringct: fix v1 ecdhInfo serialization (moneromooo-monero)
0b18fa54 ringct: the commitment mask is now deterministic (moneromooo-monero)
6ba3a116 ringct: encode 8 byte amount, saving 24 bytes per output (moneromooo-monero)
77f8f454 ringct: save 3 bytes on bulletproof size (moneromooo-monero)
f7f67600 add a bulletproof version, new bulletproof type, and rct config (moneromooo-monero)
5b07e0c9 core: include a dummy encrypted payment id when no payment is used (moneromooo-monero)
2eff9b12 core, wallet: remember original text version of destination address (moneromooo-monero)
e10d12b6 simplewallet: disable long payment ids by default (moneromooo-monero)
b84b350f blockchain: fix wrong hf version when popping multiple blocks (moneromooo-monero)
1c7650f4 simplewallet: remove ability to transfer with detached short payment ids (moneromooo-monero)
4a7917ef blockchain: fix block rate check for empty blockchains (moneromooo-monero)
34d2850f ignore child process when exec (Jethro Grassie)
5f89caea wallet2: fix ring reuse breaking when using histogram (moneromooo-monero)
db1e0a53 core: fix unmixable special case allowing ring size below 11 (moneromooo-monero)
66772f12 blockchain: include number of discarded blocks in --reorg-notify (moneromooo-monero)
af1ade4e core: add a few more block rate window sizes (moneromooo-monero)
fb0dbab9 notify: fix tokenizing being too strict (moneromooo-monero)
0ac22d0e core: add --block-rate-notify (moneromooo-monero)
7d2f817f blockchain: add --reorg-notify (moneromooo-monero)
1168e8d5 cryptonote_core: warn when the block rate deviates from expectations (moneromooo-monero)
842a5d8b notify: handle arbitrary tags (moneromooo-monero)
ebc60a09 ArticMine's new block weight algorithm (moneromooo-monero)
2019-02-14 21:30:42 +02:00
moneromooo-monero 0b0fb709c3 Build fixes for some platforms 2019-02-14 19:25:58 +00:00
moneromooo-monero 3ac3366a6e blockchain: add v10 fork heights 2019-02-14 14:56:19 +00:00
Lee Clagett c2b8037a42 Adding cnv4-2 tweaks 2019-02-14 14:44:27 +00:00
SChernykh 1b77e80a78 Cryptonight variant 4 aka CryptonightR
It introduces random integer math into the main loop.
2019-02-14 14:44:27 +00:00
xiphon b980fec41c slow-hash: some more big endian fixes 2019-02-14 14:44:27 +00:00
moneromooo-monero cd22a02db3 slow-hash: fix for big endian 2019-02-14 14:44:25 +00:00
Pol Mauri 96f5381574 Small function declaration cleanup in slow-hash.c
- These functions are declared twice in slow-hash.c. Remove one of the copies.
- The declarations have the wrong return type, should be void, not int.

Function definitions here: https://github.com/monero-project/monero/blob/1e74586ee99e4bd89626d2eb4d23883cd91f0f81/src/crypto/aesb.c#L151-L180
Test plan: make release-test
2019-02-14 14:44:03 +00:00
cslashm 612ecb13ef Add support for V10 protocol with BulletProofV2 and short amount. 2019-02-14 14:44:03 +00:00
cslashm 823b38bcab Fix dummy decryption in debug mode 2019-02-14 14:44:03 +00:00
cslashm 377de05001 fix log namespace 2019-02-14 14:44:03 +00:00
cslashm ff9853b4b9 New scheme key destination contrfol
Implies protocol version management.
2019-02-14 14:44:03 +00:00
Tom Smeding 041af9545f 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-14 14:44:03 +00:00
moneromooo-monero 1767c8172f simplewallet: tell the user to complain to the recipient
for long payment ids
2019-02-14 14:43:59 +00:00
moneromooo-monero c2d0e9a1ce ringct: fix v1 ecdhInfo serialization
The change made for v2 broke v1, and we have no way to know which
version we're serializing here. However, since we don't actually
care about space savings in this case, we continue serialiazing
both mask and amount.
2019-02-14 14:43:56 +00:00
moneromooo-monero 0b18fa54c4 ringct: the commitment mask is now deterministic
saves space in the tx and is safe

Found by knaccc
2019-02-12 12:16:47 +00:00
moneromooo-monero 6ba3a11637 ringct: encode 8 byte amount, saving 24 bytes per output
Found by knaccc
2019-02-12 12:16:45 +00:00
moneromooo-monero 77f8f45459 ringct: save 3 bytes on bulletproof size
Found by luigi1111
2019-02-12 12:16:43 +00:00
moneromooo-monero f7f6760052 add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-02-12 12:16:40 +00:00
moneromooo-monero 5b07e0c9f4 core: include a dummy encrypted payment id when no payment is used
For better transaction uniformity, even though this wastes space.
2019-02-12 12:16:38 +00:00
moneromooo-monero 2eff9b12d8 core, wallet: remember original text version of destination address 2019-02-12 12:16:35 +00:00
moneromooo-monero e10d12b658 simplewallet: disable long payment ids by default
unless --long-payment-id-support is used
2019-02-12 12:16:32 +00:00
moneromooo-monero b84b350fd4 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-02-12 12:16:30 +00:00
moneromooo-monero 1c7650f416 simplewallet: remove ability to transfer with detached short payment ids
It seemed like a good idea at the time
2019-02-12 12:16:27 +00:00
moneromooo-monero 4a7917ef6b blockchain: fix block rate check for empty blockchains 2019-02-12 12:16:25 +00:00
Jethro Grassie 34d2850fac ignore child process when exec 2019-02-12 12:16:22 +00:00
moneromooo-monero 5f89caea90 wallet2: fix ring reuse breaking when using histogram 2019-02-12 12:16:20 +00:00
moneromooo-monero db1e0a5323 core: fix unmixable special case allowing ring size below 11 2019-02-12 12:16:17 +00:00
moneromooo-monero 66772f1235 blockchain: include number of discarded blocks in --reorg-notify 2019-02-12 12:16:13 +00:00
moneromooo-monero af1ade4eee 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-02-12 12:16:11 +00:00
moneromooo-monero fb0dbab934 notify: fix tokenizing being too strict 2019-02-12 12:16:09 +00:00
moneromooo-monero 0ac22d0e1c core: add --block-rate-notify
This runs a command whenever the block rate deviates too much
from the expectation
2019-02-12 12:16:06 +00:00
moneromooo-monero 7d2f817f5e 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-02-12 12:16:04 +00:00
moneromooo-monero 1168e8d5d5 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.
2019-02-12 12:16:02 +00:00
moneromooo-monero 842a5d8bbe notify: handle arbitrary tags 2019-02-12 12:15:59 +00:00
moneromooo-monero ebc60a098d 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.
2019-02-12 12:15:54 +00:00
Riccardo Spagni ab6c17cc15 Merge pull request #4716
0406724c Makefile: fix building without a git tree (moneromooo-monero)
2018-10-26 22:14:27 +02:00