1086 Commits

Author SHA1 Message Date
moneromooo-monero
cc618f2fe4
blockchain: fix off by one brought by the regtest mode fix 2019-03-04 09:31:06 +00:00
Riccardo Spagni
5aac057dc6
Merge pull request #5205
49896e5c blockchain: fix long term block weight for regtest mode (moneromooo-monero)
2019-03-03 18:34:08 +02:00
moneromooo-monero
49896e5c63
blockchain: fix long term block weight for regtest mode 2019-02-27 19:49:11 +00:00
moneromooo-monero
3dfef479d8
core: fix adding new pre-hoh block when a tx is already in the pool 2019-02-24 15:58:30 +00:00
Riccardo Spagni
392f0858c6
update quick sync checkpoints and hash 2019-02-20 18:17:07 +02:00
moneromooo-monero
395eb9217a
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-02-19 15:21:57 +00:00
moneromooo-monero
0c0f6034c0
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-02-18 15:43:08 +00:00
moneromooo-monero
1d62855044
blockchain: fix long term weight addition on pop/init 2019-02-18 12:46:32 +00: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
moneromooo-monero
bd7f82515b
blockchain: forbid older BP rct versions from v11 2019-02-15 10:20:23 +00:00
moneromooo-monero
f9d820ada1
Fix v3/v4 db conversion 2019-02-15 01:21:37 +00: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
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
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
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
4a7917ef6b
blockchain: fix block rate check for empty blockchains 2019-02-12 12:16:25 +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
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
1504424887
Merge pull request #4667
14515ef2 blockchain: move two new verification errors to the verify category (moneromooo-monero)
2018-10-20 20:44:38 +02:00
Riccardo Spagni
37c6636199
Merge pull request #4638
a23c80df core: don't verify range proofs multiple times (moneromooo-monero)
2018-10-20 20:43:09 +02:00
moneromooo-monero
14515ef230
blockchain: move two new verification errors to the verify category
Lest we get people get scared again
2018-10-19 21:11:31 +00:00
stoffu
d7ff707b52
tx_pool: revert #4592 and move bin2hex conversion to on_get_transaction_pool 2018-10-18 10:10:36 +09:00
moneromooo-monero
a23c80dfce
core: don't verify range proofs multiple times 2018-10-17 16:23:31 +00:00
stoffu
e3e1f83694
tx_pool: store hex string instead of raw binary to tx_blob of get_transaction_pool RPC
Inspired by https://github.com/masari-project/masari/issues/93
2018-10-15 20:09:32 +09:00
Riccardo Spagni
f5df0e272e
Revert "Merge pull request #4472"
This reverts commit b26ab0b5803af4ffe23de11a45e43877301a4902.
2018-10-08 21:42:38 +02:00
Riccardo Spagni
b26ab0b580
Merge pull request #4472
02d3ef7b blocks: use auto-generated .c files instead of 'LD -r -b binary' (xiphon)
2018-10-06 11:15:43 +02:00
Riccardo Spagni
ca9b2493ee
Merge pull request #4476
fa9e54b6 build: fix gcc false positive 'stringop-overflow' warning (xiphon)
2018-10-02 22:45:48 +02:00
Riccardo Spagni
4701a78ad1
Merge pull request #4467
fa942ef6 daemon: silence daemon update warnings on testnet (iDunk5400)
2018-10-02 22:45:45 +02:00
moneromooo-monero
7340300460
add --block-notify to monerod and --tx-notify to monero-wallet-{cli,rpc}
Those take a command line of the form "A [B]", with A being the
name (and optional path, if not in the caller's CWD, but fully
qualified path is recommended, avoids possible security issues)
to a program, and optional arguments. Any occurence of the two
character string "%s" will be replaced by the hash of the block
or transaction which triggered the notification.

Tokenization is barebones. If you want things like pipes, calls
to paths with spaces, etc, then use a script (though exec time
will suffer).

block-notify is called when a new block is added onto the chain.

tx-notify is called when a new transaction happens with the
wallet as source and/or destination.

It is the notification program's responsibility to determine what
to do in those cases.

Note that this is asynchronous, so it is very possible that:
- the notification programs will be run out of order
- several events happen before the notification for the first one

A Windows port would be nice if someone wants to make one.
2018-09-29 08:44:18 +00:00
Riccardo Spagni
8bf5a00564
Merge pull request #4423
357441a2 add checkpoints for testnet and mainnet (Riccardo Spagni)
d9f666d7 update checkpoints.dat (Riccardo Spagni)
6b1b4e83 update version to 13.0 (Riccardo Spagni)
6f153533 update readme with v13.0 (Riccardo Spagni)
2018-09-25 13:33:52 +02:00
Riccardo Spagni
689758d691
Merge pull request #4435
c39ad0cd tx_pool: fix tx removal at startup keeping references (moneromooo-monero)
2018-09-25 13:11:05 +02:00
moneromooo-monero
c39ad0cd72
tx_pool: fix tx removal at startup keeping references 2018-09-25 09:58:37 +00:00
moneromooo-monero
50981c40ce
blockchain: add stagenet v8 and v9, two weeks before mainnet 2018-09-24 20:43:39 +00:00
Riccardo Spagni
d9f666d78c
update checkpoints.dat 2018-09-23 09:51:15 +02:00
Riccardo Spagni
0645dcdbdb
Merge pull request #4378
ac934663 rpc: add a "is an update available" flag in get_info (moneromooo-monero)
2018-09-21 20:41:53 +02:00
Riccardo Spagni
d6893aedf6
Merge pull request #4369
b2bb9312 blockchain: simplify output distribution code (moneromooo-monero)
befdcbf4 db_lmdb: do not use base for cumulative distribution (moneromooo-monero)
2018-09-21 20:31:21 +02:00
Riccardo Spagni
22a6591a70
Merge pull request #4325
4e1e9a60 blockchain: add mainnet v8 height targetting 18 october (moneromooo-monero)
2018-09-18 17:39:16 +02:00
Riccardo Spagni
3584a852a3
Merge pull request #4372
1660b0e7 tx_pool: make the max tx size a consensus rule from v8 (moneromooo-monero)
2018-09-14 12:56:01 +02:00
moneromooo-monero
be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
moneromooo-monero
ac9346637a
rpc: add a "is an update available" flag in get_info
Make it easier for a user to be told when to update
2018-09-14 09:28:03 +00:00