Commit Graph
4891 Commits
Author SHA1 Message Date
selstaandwowario eaa36e8f26 wallet api: don't truncate address in subaddress_account
Same behaviour as subaddress.cpp now.
2019-03-08 21:17:41 +03:00
moneromooo-moneroandwowario 1e5f2e4c58 core: fix adding new pre-hoh block when a tx is already in the pool 2019-03-08 21:17:41 +03:00
Riccardo Spagniandwowario 39875ebdd4 bump version, update readme to reflect, update checkpoints 2019-03-08 21:17:41 +03:00
Riccardo Spagniandwowario 72a1b05c13 update quick sync checkpoints and hash 2019-03-08 21:17:41 +03:00
Dusan Klinecandwowario 9fad3c060b wallet: fix payment ID decryption for construction data 2019-03-08 21:17:40 +03:00
moneromooo-moneroandwowario b117840c81 blockchain: remove buggy long term block weight cache
It seems to be buggy on reorgs, and prevents the use of
a blockchain with two nodes.
We'll speed this up again if/when the need arises.
2019-03-08 21:17:40 +03:00
moneromooo-moneroandwowario 0622741c03 blockchain: fix block template creation race
If two create_block_template are called at nearly the same time,
and a block is added at nearly the same time, this could happen:

- the blockchain top block is B0
- thread 1 enters create_block_template, takes blockchain lock
- thread 1 creates a fresh block referencing prev block B0
- thread 1 releases blockchain lock
- thread 0 adds a new block
- thread 0 enters create_block_template
- thread 0 updates block template
- thread 1 takes txpool lock and continues creating block template
- thread 1 overwrites block template with previous data
2019-03-08 21:17:40 +03:00
moneromooo-moneroandwowario 362ecad06c blockchain: fix long term weight addition on pop/init 2019-03-08 21:17:40 +03:00
stoffuandwowario b45b4e58f4 rpc: fix wrongly formatted JSON for pruned tx
Fix for #4399.
Also unifies code for serializing pruned tx to binary/json into one.

(Cherry-picked from #4586)
2019-03-08 21:17:40 +03:00
moneromooo-moneroandwowario 4bcb105e6c db_lmdb: fix missing mdb_dbi_close in migration
Fixed by hyc
2019-03-08 21:17:40 +03:00
moneromooo-moneroandwowario 32745e0696 miner: fix build with boost 1.69 2019-03-08 21:17:39 +03:00
moneromooo-moneroandwowario 93c2e6f521 blockchain: fix m_long_term_block_weight_height initialization
Also check return of that function, it can now return error
2019-03-08 21:17:39 +03:00
moneromooo-moneroandwowario 0470ea5ac0 blockchain: forbid older BP rct versions from v11 2019-03-08 21:17:37 +03:00
moneromooo-moneroandwowario f94c615fc3 Fix v3/v4 db conversion 2019-03-08 21:15:52 +03:00
xiphonandwowario ebb1580493 slow-hash: some more big endian fixes 2019-03-08 21:15:52 +03:00
moneromooo-moneroandwowario d2abdff997 slow-hash: fix for big endian 2019-03-08 21:15:52 +03:00
Pol Mauriandwowario baf9984f32 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-03-08 21:15:52 +03:00
cslashmandwowario 356ea85da7 Add support for V10 protocol with BulletProofV2 and short amount. 2019-03-08 21:15:52 +03:00
cslashmandwowario e1b8e3d7b4 Fix dummy decryption in debug mode 2019-03-08 21:15:52 +03:00
cslashmandwowario d56c1d68f9 fix log namespace 2019-03-08 21:15:52 +03:00
cslashmandwowario 6314a4e78a New scheme key destination contrfol
Implies protocol version management.
2019-03-08 21:15:51 +03:00
Tom Smedingandwowario 02db718dfe cryptonote: Fix enum check in expand_transaction_2
This was noticed because GCC warned about using an enum value in a
boolean context.
2019-03-08 21:15:51 +03:00
moneromooo-moneroandwowario a315729e98 simplewallet: tell the user to complain to the recipient
for long payment ids
2019-03-08 21:15:51 +03:00
moneromooo-moneroandwowario 423cf4406d 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-03-08 21:15:51 +03:00
moneromooo-moneroandwowario 33a76e92f4 ringct: the commitment mask is now deterministic
saves space in the tx and is safe

Found by knaccc
2019-03-08 21:15:51 +03:00
moneromooo-moneroandwowario 7ad2500f68 ringct: encode 8 byte amount, saving 24 bytes per output
Found by knaccc
2019-03-08 21:15:51 +03:00
moneromooo-moneroandwowario 7057806c49 ringct: save 3 bytes on bulletproof size
Found by luigi1111
2019-03-08 21:15:51 +03:00
moneromooo-moneroandwowario b5c9aed261 add a bulletproof version, new bulletproof type, and rct config
This makes it easier to modify the bulletproof format
2019-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 817be97f39 core: include a dummy encrypted payment id when no payment is used
For better transaction uniformity, even though this wastes space.
2019-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 73574c7380 core, wallet: remember original text version of destination address 2019-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 2a616c8b15 simplewallet: disable long payment ids by default
unless --long-payment-id-support is used
2019-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 8fdc0d4cb3 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-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 66d1424200 simplewallet: remove ability to transfer with detached short payment ids
It seemed like a good idea at the time
2019-03-08 21:15:50 +03:00
moneromooo-moneroandwowario 3974e40efa blockchain: fix block rate check for empty blockchains 2019-03-08 21:15:50 +03:00
Jethro Grassieandwowario ad6a732f24 ignore child process when exec 2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario abb4728cf7 wallet2: fix ring reuse breaking when using histogram 2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario 51a7dd045e core: fix unmixable special case allowing ring size below 11 2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario 7942e862b8 blockchain: include number of discarded blocks in --reorg-notify 2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario eb982caad1 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-08 21:15:49 +03:00
moneromooo-moneroandwowario eb5a2cbdd2 notify: fix tokenizing being too strict 2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario cdf2e30825 core: add --block-rate-notify
This runs a command whenever the block rate deviates too much
from the expectation
2019-03-08 21:15:49 +03:00
moneromooo-moneroandwowario 7eab7b6a72 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-03-08 21:15:48 +03:00
moneromooo-moneroandwowario bc19bcb2f6 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-03-08 21:15:48 +03:00
moneromooo-moneroandwowario 3353e6e784 notify: handle arbitrary tags 2019-03-08 21:15:48 +03:00
moneromooo-moneroandwowario eaf602bceb 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-03-08 21:15:48 +03:00
moneromooo-moneroandwowario d5c079ef1e wallet2: extend fake out picks away from the gamma pick
in order to unbias selection from blocks with few txes
2019-03-08 21:15:48 +03:00
Riccardo Spagniandwowario ba1fd08e41 update version to 0.13.0.4 2019-03-08 21:15:47 +03:00
Lee Clagettandwowario 6246aada9d Providing user supplied default constructor for expect<void> 2019-03-08 21:15:47 +03:00
moneromooo-moneroandwowario 89c74b5710 blockchain: move two new verification errors to the verify category
Lest we get people get scared again
2019-03-08 21:15:47 +03:00
moneromooo-moneroandwowario 650594ab63 rpc: fix output distribution caching ignoring chain changes
0 is placeholder for whole chain, so we should compare chain
height changes rather than chain-height-or-zero. Even this isn't
totally foolproof if a blocks are popped and the same number
added again, but it is much better as it prevents the data from
slowly going out of sync.
2019-03-08 21:15:47 +03:00