Commit Graph
100 Commits
Author SHA1 Message Date
moneromooo-monero fa43b54780 tests: handle any cmake detected python interpreter 2019-03-07 16:46:02 +00:00
moneromooo-monero f024a10b68 db_lmdb: make mdb_block_info format conversion more future proof
If mdb_block_info changes again, the v2 to v3 conversion would
convert to an incorrect format.
2019-03-05 12:06:23 +00:00
moneromooo-monero ceb72be329 p2p: avoid busy loop when we have nothing to connect to 2019-03-05 12:00:45 +00:00
moneromooo-monero c4851024ce wallet_rpc_server: avoid repeated string allocations when parsing 2019-03-05 11:58:22 +00:00
moneromooo-monero 88c85c18e0 cryptonote: avoid double parsing blocks when syncing 2019-03-05 11:58:18 +00:00
moneromooo-monero 9feda0eeba cryptonote: speed up calculating coinbase tx prunable hash
It's a hash of an empty buffer, so we can avoid keccak
2019-03-05 11:58:16 +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
moneromooo-monero b747e836c8 wallet2: don't calculate prefix hash when we don't need it 2019-03-05 10:28:55 +00:00
moneromooo-monero e69477bf25 db: speedup block addition
by avoiding repeated (de)serialization
2019-03-05 10:28:52 +00:00
moneromooo-monero 108c625b3f CryptonightR: define out i386/x86_64 specific code on other archs 2019-03-05 10:24:24 +00:00
moneromooo-monero 1b8757dddc slow-hash: fix build on arm 2019-03-05 10:24:24 +00:00
moneromooo-monero 23abe60705 check load_t_from_json return values 2019-03-04 22:38:06 +00:00
moneromooo-monero e396146aee default initialize rpc structures 2019-03-04 22:38:03 +00:00
moneromooo-monero ef93b0995c various: remove unused variables 2019-03-04 22:24:49 +00:00
moneromooo-monero 5f67e7f547 blockchain: forbid older BP rct versions from v11 2019-03-04 15:08:12 +00: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
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-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 8298f42e9d miner: it can now autodetect the optimal number of threads 2019-02-23 12:22:32 +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
moneromooo-monero 5c81a9f1a1 wallet_rpc_server: add a validate_address RPC 2019-02-14 21:01:11 +00:00
moneromooo-monero 1f5680c8db simplewallet: add help for ask-password options 2019-02-14 09:21:22 +00:00
moneromooo-monero c7c74cafec simplewallet: mark confirm-missing-payment-id as obsolete 2019-02-14 09:21:22 +00: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
moneromooo-monero 7c3ade4410 network_throttle: use circular_buffer where appropriate 2019-02-01 21:33:13 +00:00
moneromooo-monero fcd0007952 unit_tests: remove leftover debug print 2019-02-01 19:14:55 +00:00
moneromooo-monero 6a3608d3d2 cryptonote_protocol_handler: pad tx messages when using tor/i2p 2019-01-30 23:17:45 +00:00
moneromooo-monero 1c9d5285d1 blockchain_prune: don't prune before v10
This uses system time since it doesn't see the p2p network,
so is not 100% accurate
2019-01-30 16:32:14 +00:00
moneromooo-monero dc0b86ab4b block_queue: fix late sanity check off by one 2019-01-28 22:17:43 +00:00
moneromooo-monero acfff8d0ce rpc: fix internal daemon calls in restricted rpc getting partial data 2019-01-28 19:35:20 +00: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
moneromooo-monero ff95921668 notify: warn if the spec contains one of '"\
These aren't processed as a shell does, so this may surprise users
2019-01-28 19:32:25 +00:00
moneromooo-monero 13852678e1 common: set MONERO_DEFAULT_LOG_CATEGORY for notify and spawn 2019-01-28 19:32:22 +00:00
moneromooo-monero 1eef056588 performance_tests: better stats, and keep track of timing history 2019-01-28 15:45:37 +00:00
moneromooo-monero eec792764d blockchain: fix default genesis block timestamp 2019-01-26 21:39:00 +00:00
moneromooo-monero b6534c40e6 ringct: remove unused senderPk from ecdhTuple
This was an early ringct field, which was never used in production
2019-01-22 23:17:42 +00:00
moneromooo-monero 7d37598158 ringct: the commitment mask is now deterministic
saves space in the tx and is safe

Found by knaccc
2019-01-22 23:17:39 +00:00
moneromooo-monero 99d946e619 ringct: encode 8 byte amount, saving 24 bytes per output
Found by knaccc
2019-01-22 23:17:31 +00:00
moneromooo-monero cdc3ccec5f ringct: save 3 bytes on bulletproof size
Found by luigi1111
2019-01-22 23:17:27 +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
moneromooo-monero 9d58749b85 wallet2: fix hashchain going out of sync on refresh error 2019-01-19 16:47:13 +00:00
moneromooo-monero 1bc5f9fa4b bulletproofs: speed up vector_power_sum
found by sarang
2019-01-19 00:18:34 +00:00
moneromooo-monero d78addcbc0 db_lmdb: don't unnecessarily cast to double on the way to uint64_t 2019-01-19 00:03:04 +00: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
moneromooo-monero 464097e592 blockchain_ancestry: allow getting ancestry of a single output
This involved a reorg of the code, to factor and speedup some bits,
as well as using the cache for all modes, and making both modes
usable in the same run.
2019-01-16 20:13:12 +00:00
moneromooo-monero a6216d1ac2 blockchain_db: allow getting output keys without commitment
Since the commitment has to be calculated for non rct outputs,
it slows down a lot unnecessarily if we don't need it
2019-01-16 20:13:08 +00:00
moneromooo-monero 1ef79b430f simplewallet: disable long payment ids by default
unless --long-payment-id-support is used
2019-01-16 20:06:04 +00:00
moneromooo-monero 21777daf6e epee: speedup word/number matching
Number matching semantics are slightly changed: since this is used
as a filter to check whether a number is signed and/or floating
point, we can speed this up further. strto* functions are called
afterwards and will error out where necessary. We now also accept
numbers like .4 which were not accepted before.

The strto* calls on a boost::string_ref will not access unallocated
memory since the parsers always stop at the first bad character,
and the original string is zero terminated.

in arbitrary time measurement units for some arbitrary test case:

match_number2: 235 -> 70
match_word2: 330 -> 108
2019-01-16 19:59:40 +00:00
moneromooo-monero 0debe7d7d3 wallet2: remember which output keys map to which key images
This allows filling in transfer_details when a cold signed tx
gets seen in a block next
2019-01-16 19:58:13 +00:00
moneromooo-monero 96e35506e9 wallet2: fix incorrect patch for determining fork rules
Half of the patch was correct, but half was introducing another bug,
where a wallet asking for a fork that the daemon does not know about
yet would decide to use those rules.
2019-01-13 14:48:16 +00:00
moneromooo-monero 2112060d03 wallet2: fix duplicate tx notifications for pool txes 2019-01-13 14:47:42 +00:00
moneromooo-monero 11227e0ba2 mnemonics: compare canonical words (lowercase) 2019-01-11 16:45:48 +00:00
moneromooo-monero 8258a9e7a9 wallet: do not check txpool in background mode
This avoids the constant message about needed to run refresh
to enter a password.
Also mention the txpool when asking for the password if the
reason is a pool tx.
2019-01-09 11:21:39 +00:00
moneromooo-monero 584126d15b i18n: filter LANG/LC_LANG for valid characters, and handle @
If there are more valid characters, add them in, I did not find
an actual list.
2019-01-08 16:03:30 +00:00
moneromooo-monero 0a29660f5c message_store: init me field
Coverity 190651
2019-01-07 16:41:34 +00:00
moneromooo-monero a67b77a9eb blockchain: don't propagate exception past dtor
Coverity 190660
2019-01-07 16:32:50 +00:00
moneromooo-monero 524bf750c0 core_tests: add a --list_tests command line switch 2019-01-07 14:42:19 +00:00
moneromooo-monero 050ee52162 wallet_api: fix usage of LOG_ERROR 2019-01-07 11:57:10 +00:00
moneromooo-monero 53fcd15953 simplewallet: don't subtract 1 to estimate blockchain height
in case it returns 0, and other uses don't, plus it's a estimation anyway.
2019-01-02 00:55:19 +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
moneromooo-monero 94a375d559 hardfork: remove batch transactions setup
This is now default, so it spares us the warnings
2019-01-01 18:28:01 +00:00
moneromooo-monero 5dc590cbdb wallet2: speedup output tracking
It can get heavy for large wallets
2018-12-31 23:57:54 +00:00
moneromooo-monero db3f2a91fa wallet: optionally keep track of owned outputs uses 2018-12-31 23:57:51 +00:00
moneromooo-monero d1b3990d40 p2p: don't stop the idle thread when no gray peers are found 2018-12-30 19:32:38 +00:00
moneromooo-monero 9092fc4bfd wallet: do not display daemon controlled text if untrusted 2018-12-30 01:32:57 +00:00
moneromooo-monero b82efa32e7 epee: speed up json parsing 2018-12-27 14:28:30 +00:00
moneromooo-monero 8bd716777e simplewallet: remove ability to transfer with detached short payment ids
It seemed like a good idea at the time
2018-12-27 00:45:04 +00:00
moneromooo-monero 65ce387c93 daemon: add a +hex option to print_block 2018-12-26 17:55:28 +00:00
moneromooo-monero d24c325c7d daemon: print human friendly timestamp too 2018-12-26 14:01:18 +00:00
moneromooo-monero 434a147b57 blocks: fix checkpoint code generation on OpenBSD
Its od outputs small decimals with leading 0, which means octal in C
2018-12-25 19:11:39 +00: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 d7354c7864 wallet_rpc_server: add all field to export_key_images
To use if you want all key images, not just the ones for
recently imported outputs
2018-12-24 13:00:29 +00:00
moneromooo-monero 85665003a7 epee: better network buffer data structure
avoids pointless allocs and memcpy
2018-12-23 16:46:07 +00:00
moneromooo-monero 5e10dee3ea simplewallet: fix show_transfers colouring, and add red for failed
Also add the type back, as it was somehow weirdly split into
two different fields, one being a union...
2018-12-23 15:15:55 +00:00
moneromooo-monero 68f095f059 message_store: fix error message adding const char * with offset 2018-12-22 15:52:10 +00:00
moneromooo-monero 306a124494 core_tests: rename invalid multisig tests to read "invalid" 2018-12-22 01:31:43 +00:00
moneromooo-monero de9dcdd179 wallet2: finalize_multisig now rejects non N-1/N multisig wallets 2018-12-21 23:41:16 +00:00