Commit Graph

94 Commits

Author SHA1 Message Date
Lee Clagett 3b24b1d082 Added support for "noise" over I1P/Tor to mask Tx transmission. 2019-07-17 14:22:37 +00:00
moneromooo-monero a4c4a2d8aa
blockchain: keep a rolling long term block weight median 2019-05-02 09:47:01 +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 48e3a341f8
Merge pull request #5211
c9b13fbb tests/trezor: HF9 and HF10 tests (Dusan Klinec)
a1fd1d49 device/trezor: HF10 support added, wallet::API (Dusan Klinec)
d74d26f2 crypto: hmac_keccak added (Dusan Klinec)
2019-03-21 14:44:04 +02:00
Dusan Klinec d74d26f2c9
crypto: hmac_keccak added 2019-03-20 21:11:01 +01:00
Lee Clagett 0c7e7bce18 Adding classes, functions, and utilities for common LMDB operations. 2019-03-19 17:52:26 +00:00
binaryFate 1f2930ce0b Update 2019 copyright 2019-03-05 22:05:34 +01: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
Lee Clagett 973403bc9f Adding initial support for broadcasting transactions over Tor
- Support for ".onion" in --add-exclusive-node and --add-peer
  - Add --anonymizing-proxy for outbound Tor connections
  - Add --anonymous-inbounds for inbound Tor connections
  - Support for sharing ".onion" addresses over Tor connections
  - Support for broadcasting transactions received over RPC exclusively
    over Tor (else broadcast over public IP when Tor not enabled).
2019-01-28 23:56:33 +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 6e100964ea
Merge pull request #4832
9da6c52b unit_tests: add logging unit test (moneromooo-monero)
2018-11-26 20:29:53 +02:00
moneromooo-monero 31d80027b5
tests: add unit tests for get_output_distribution 2018-11-16 19:21:45 +00:00
moneromooo-monero 9da6c52bb2
unit_tests: add logging unit test 2018-11-09 16:57:03 +00:00
moneromooo-monero 1141512811
unit_tests: fix notify test when run from make *test 2018-10-17 21:13:21 +00:00
moneromooo-monero 98c9225823
unit_tests: add a notifier test 2018-10-01 09:14:20 +00:00
Riccardo Spagni a059bcd74e
Merge pull request #4371
55c7cd14 Adding expect<T> - a value-or-error implementation (Lee Clagett)
2018-09-21 20:31:47 +02:00
Lee Clagett 55c7cd1458 Adding expect<T> - a value-or-error implementation 2018-09-12 22:44:34 +00:00
moneromooo-monero 71d67bda74
aligned: aligned memory alloc/realloc/free 2018-09-11 13:37:34 +00:00
moneromooo-monero e895c3def1
make straus cached mode thread safe, and add tests for it 2018-09-11 13:37:31 +00:00
luigi1111 ab85b924c9
Merge pull request #4293
9d65399 is_hdd update (p8p)
2018-09-10 15:07:02 -05:00
luigi1111 0722287774
Merge pull request #4275
2a100fd unit_tests: add tests for incremental keccak (moneromooo-monero)
2018-09-04 13:23:10 -05:00
p8p 9d6539923e
is_hdd update 2018-08-25 04:31:22 -07:00
luigi1111 a5d21be843
Merge pull request #4210
4616cf2 Fixed ZMQ-RPC for transactions and GET_BLOCKS_FAST (vtnerd)
2018-08-22 20:47:28 -05:00
moneromooo-monero 2a100fd81f
unit_tests: add tests for incremental keccak 2018-08-20 08:47:31 +00:00
moneromooo-monero 70271fa788
common: add a class to safely wrap mlock/munlock
This class will allow mlocking small objects, of which there
may be several per page. It adds refcounting so pages are only
munlocked when the last object on that page munlocks.
2018-08-16 11:57:46 +00:00
moneromooo-monero e9ffa91257
store secret keys encrypted where possible
The secret spend key is kept encrypted in memory, and
decrypted on the fly when needed.

Both spend and view secret keys are kept encrypted in a JSON
field in the keys file. This avoids leaving the keys in
memory due to being manipulated by the JSON I/O API.
2018-08-16 11:57:43 +00:00
moneromooo-monero ea37614efe
wallet: wipe seed from memory where appropriate 2018-08-16 09:17:52 +00:00
Lee Clagett 4616cf2641 Fixed ZMQ-RPC for transactions and GET_BLOCKS_FAST 2018-08-02 07:30:20 +00:00
luigi1111 3fde902394
Merge pull request #4097
61caab8 crypto: remove slight bias in key generation due to modulo (moneromooo-monero)
2018-07-27 14:23:54 -05:00
luigi1111 f6d7e87b67
Merge pull request #4075
438d52d remove epee from link lines where it's redundant (moneromooo-monero)
2018-07-19 14:10:20 -05:00
luigi1111 33122ab8a6
Merge pull request #3617
4c00a4d unit_tests: add device unit tests (moneromooo-monero)
2018-07-19 13:32:36 -05:00
moneromooo-monero 61caab8a8c
crypto: remove slight bias in key generation due to modulo 2018-07-05 09:18:01 +01:00
moneromooo-monero 438d52deaf
remove epee from link lines where it's redundant
For some reason, this confuses and kills ASAN on startup
as it thinks const uint8_t ipv4_network_address::ID is
defined multiple times.
2018-06-28 16:45:22 +01: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 b6eb7484d1
Merge pull request #3592
90a16b1 crypto: fix initialization order issue with random mutex (moneromooo-monero)
6a61f52 unit_tests: add ringdb unit tests (moneromooo-monero)
2018-05-31 14:41:17 -05:00
moneromooo-monero 3147468d35
unit_tests: add threadpool unit test 2018-05-20 12:06:10 +01:00
moneromooo-monero b88c9a003e
unit_tests: set default data dir to the source tree at build time 2018-05-15 21:45:34 +01:00
moneromooo-monero 4c00a4d31e
unit_tests: add device unit tests
Annoyingly, its locking semantics are borked since it does not
do any locking
2018-04-12 13:49:05 +01:00
moneromooo-monero 6a61f520e2
unit_tests: add ringdb unit tests 2018-04-11 11:43:39 +01:00
xmr-eric 18216f19dd Update 2018 copyright 2018-01-26 10:03:20 -05:00
moneromooo-monero 1e5491e942
Add a chacha20 variant to go with chacha8 2017-12-25 19:28:03 +00:00
moneromooo-monero b84b3565f3
tests: add multisig unit tests 2017-12-17 16:12:00 +00:00
Riccardo Spagni 6c0953b15a
Merge pull request #2860
3dffe71b new wipeable_string class to replace std::string passphrases (moneromooo-monero)
7a2a5741 utils: initialize easylogging++ in on_startup (moneromooo-monero)
54950829 use memwipe in a few relevant places (moneromooo-monero)
000666ff add a memwipe function (moneromooo-monero)
2017-12-16 23:19:27 +02:00
moneromooo-monero 90b8d9f271
add bulletproofs to the build, with basic unit tests
Based on Java code from Sarang Noether
2017-12-08 13:41:13 +00:00
moneromooo-monero 000666ff78
add a memwipe function
It's meant to avoid being optimized out

memory_cleanse lifted from bitcoin
2017-11-27 22:15:34 +00:00
Cole Lightfighter 4fd6a3d27f Subaddress unit tests
Basic unit test fixture, and initialization of a subaddress account.

Signed-off-by: Cole Lightfighter <cole@onicsla.bz>
2017-10-17 10:59:53 -06:00
Riccardo Spagni 6159a83175
Merge pull request #2608
fe484f30 unit_tests: data dir is now overridden with --data-dir (moneromooo-monero)
2017-10-15 18:54:16 +02:00
Riccardo Spagni cb9b1fcc94
Merge pull request #2582
240f769d tests: add sha256sum unit test (moneromooo-monero)
2017-10-15 18:36:38 +02:00
moneromooo-monero fe484f3049
unit_tests: data dir is now overridden with --data-dir
rather than a raw string without option
2017-10-08 21:19:05 +01:00
Riccardo Spagni 8661f4e868
Merge pull request #2523
540d6fa3 tests: pass data dir as arg (redfish)
2017-10-06 22:51:22 +04:00