Commit graph

7673 commits

Author SHA1 Message Date
Riccardo Spagni
4466f4504e
Merge pull request #5091
123fc2a2 i2p: initial support (Jethro Grassie)
2019-03-04 21:20:34 +02:00
Riccardo Spagni
b0d326bf2a
Merge pull request #5084
9d58749b wallet2: fix hashchain going out of sync on refresh error (moneromooo-monero)
2019-03-04 21:19:12 +02:00
Riccardo Spagni
9d415495bf
Merge pull request #5082
1bc5f9fa bulletproofs: speed up vector_power_sum (moneromooo-monero)
2019-03-04 21:18:53 +02:00
Riccardo Spagni
11daa98c0a
Merge pull request #5081
d78addcb db_lmdb: don't unnecessarily cast to double on the way to uint64_t (moneromooo-monero)
2019-03-04 21:18:24 +02:00
Riccardo Spagni
46fd181cca
Merge pull request #4054
24569454 epee: add SSL support (moneromooo-monero)
2019-03-04 21:17:21 +02:00
Riccardo Spagni
9547e3f451
Merge pull request #5224
807903bb hardfork: fix fork determination for historical heights (moneromooo)
2019-03-04 17:17:34 +02:00
Riccardo Spagni
de6d6c0e29
Merge pull request #5217
fa2fbc39 wallet2: fix mishandling rct outputs in coinbase tx (moneromooo-monero)
2019-03-04 17:15:06 +02:00
Riccardo Spagni
927b2300b3
Merge pull request #5176
5f67e7f5 blockchain: forbid older BP rct versions from v11 (moneromooo-monero)
2019-03-04 17:14:35 +02:00
moneromooo-monero
5f67e7f547
blockchain: forbid older BP rct versions from v11 2019-03-04 15:08:12 +00:00
Riccardo Spagni
09020235bf
Merge pull request #5175
85088d9f db_lmdb: fix missing mdb_dbi_close in migration (moneromooo-monero)
2019-03-04 17:06:58 +02: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
Riccardo Spagni
194c4c0bcb
Merge pull request #5128
a17da720 Print the reason why a notification spec failed to parse (moneromooo-monero)
356d8137 blockchain: include number of discarded blocks in --reorg-notify (moneromooo-monero)
4d598e3d core: add a few more block rate window sizes (moneromooo-monero)
d4fb9641 core: add --block-rate-notify (moneromooo-monero)
28b6dbf2 notify: fix tokenizing being too strict (moneromooo-monero)
2019-03-04 14:58:04 +02:00
moneromooo-monero
0de14396b9
tests: add a CNv4 JIT test 2019-03-04 11:56:55 +00:00
moneromooo-monero
24d281c324
crypto: plug CNv4 JIT into cn_slow_hash
Enabled by setting the MONERO_USE_CNV4_JIT env var to 1
2019-03-04 11:56:55 +00:00
moneromooo-monero
78ab59ea44
crypto: clear cache after generating random program 2019-03-04 11:56:46 +00:00
moneromooo-monero
b9a618848f
performance_tests: add tests for new Cryptonight variants 2019-03-04 11:56:38 +00:00
SChernykh
fff23bf7c6
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-03-04 11:56:29 +00: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
moneromooo-monero
28b6dbf263
notify: fix tokenizing being too strict 2019-03-04 11:48:36 +00:00
moneromooo
807903bbbf
hardfork: fix fork determination for historical heights 2019-03-04 11:19:59 +00:00
Riccardo Spagni
1b4fa00d7c
Merge pull request #5126
f1fb06b1 Fixed path to int-util.h (SChernykh)
9da0892b Adding cnv4-2 tweaks (SChernykh)
f51397b3 Cryptonight variant 4 aka CryptonightR (SChernykh)
2019-03-04 12:10:16 +02: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
Riccardo Spagni
35e0bf2e06
Merge pull request #5122
52964501 ringct: fix v1 ecdhInfo serialization (moneromooo-monero)
2019-03-04 12:08:26 +02:00
Riccardo Spagni
4f06639d63
Merge pull request #5120
45b7df70 wallet_rpc_server: remove detached short payment ids support (moneromooo-monero)
2019-03-04 12:07:40 +02:00
Riccardo Spagni
e62ae67d16
Merge pull request #5118
49b2a48a simplewallet: tell the user to complain to the recipient (moneromooo-monero)
2019-03-04 12:07:02 +02:00
Riccardo Spagni
403fa6b4a3
Merge pull request #5115
fec359a6 cryptonote: Fix enum check in expand_transaction_2 (Tom Smeding)
9bf0e537 cryptonote: Add const-qualifier on comparison functor (Tom Smeding)
5d2fdc2e serialization: Use pos_type instead of streampos (Tom Smeding)
2019-03-04 12:06:42 +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
moneromooo-monero
fa2fbc3917
wallet2: fix mishandling rct outputs in coinbase tx
Reported by cutcoin
2019-03-03 18:55:12 +00:00
moneromooo-monero
85088d9f85
db_lmdb: fix missing mdb_dbi_close in migration
Fixed by hyc
2019-02-21 09:52:30 +00:00
SChernykh
f1fb06b137 Fixed path to int-util.h 2019-02-14 20:46:56 +01:00
SChernykh
9da0892b10 Adding cnv4-2 tweaks
Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
2019-02-14 20:42:50 +01:00
SChernykh
f51397b306 Cryptonight variant 4 aka CryptonightR
It introduces random integer math into the main loop.
2019-02-14 11:29:54 +01:00
cslashm
2dbc487ec0 Add support for V10 protocol with BulletProofV2 and short amount. 2019-02-08 17:02:55 +01:00
cslashm
63cc02c08d Fix dummy decryption in debug mode 2019-02-08 17:02:55 +01:00
cslashm
f0e55cebf7 fix log namespace 2019-02-08 17:02:55 +01:00
cslashm
460da140ec New scheme key destination contrfol
Implies protocol version management.
2019-02-08 17:02:44 +01:00
moneromooo-monero
49b2a48a46
simplewallet: tell the user to complain to the recipient
for long payment ids
2019-02-03 10:34:07 +00:00
moneromooo-monero
529645014c
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-03 10:33:10 +00:00
moneromooo-monero
2456945408
epee: add SSL support
RPC connections now have optional tranparent SSL.

An optional private key and certificate file can be passed,
using the --{rpc,daemon}-ssl-private-key and
--{rpc,daemon}-ssl-certificate options. Those have as
argument a path to a PEM format private private key and
certificate, respectively.
If not given, a temporary self signed certificate will be used.

SSL can be enabled or disabled using --{rpc}-ssl, which
accepts autodetect (default), disabled or enabled.

Access can be restricted to particular certificates using the
--rpc-ssl-allowed-certificates, which takes a list of
paths to PEM encoded certificates. This can allow a wallet to
connect to only the daemon they think they're connected to,
by forcing SSL and listing the paths to the known good
certificates.

To generate long term certificates:

openssl genrsa -out /tmp/KEY 4096
openssl req -new -key /tmp/KEY -out /tmp/REQ
openssl x509 -req -days 999999 -sha256 -in /tmp/REQ -signkey /tmp/KEY -out /tmp/CERT

/tmp/KEY is the private key, and /tmp/CERT is the certificate,
both in PEM format. /tmp/REQ can be removed. Adjust the last
command to set expiration date, etc, as needed. It doesn't
make a whole lot of sense for monero anyway, since most servers
will run with one time temporary self signed certificates anyway.

SSL support is transparent, so all communication is done on the
existing ports, with SSL autodetection. This means you can start
using an SSL daemon now, but you should not enforce SSL yet or
nothing will talk to you.
2019-02-02 20:05:33 +00:00
moneromooo-monero
45b7df703b
wallet_rpc_server: remove detached short payment ids support 2019-02-02 18:53:14 +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
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
Tom Smeding
5d2fdc2e8c serialization: Use pos_type instead of streampos
According to [1], the ios_base::streampos member type is deprecated, and
removed in C++17. This type was an alias for pos_type, which this commit
uses instead.

[1]: https://en.cppreference.com/w/cpp/io/ios_base
2019-02-01 16:44:55 +01:00
Jethro Grassie
123fc2a25a
i2p: initial support 2019-01-30 13:37:45 -05:00
Riccardo Spagni
31bdf7bd11
Merge pull request #4988
973403bc Adding initial support for broadcasting transactions over Tor (Lee Clagett)
2019-01-29 16:47:17 +02:00