Commit Graph

452 Commits

Author SHA1 Message Date
wowario fa50d74571
update checkpoints.dat 2019-03-13 11:43:58 +03:00
wowario 05e391fc54
Build fixes for some platforms 2019-03-11 00:10:05 +03:00
wowario d77ac12218
update checkpoints.dat 2019-03-11 00:10:05 +03:00
wowario 87d457d4ac
support old BP 2019-03-11 00:10:05 +03:00
wowario dee662ce10
update genesis block timestamp date 2019-03-11 00:10:05 +03:00
wowario 2fbe9f7730
add lwma-1 2019-03-11 00:09:55 +03:00
wowario 9b19be69a1
initial commit 2019-03-08 22:37:57 +03:00
moneromooo-monero 41f7e77ca5
blockchain: fix off by one brought by the regtest mode fix 2019-03-08 21:17:42 +03:00
moneromooo-monero 1c745c3b04
blockchain: fix long term block weight for regtest mode 2019-03-08 21:17:42 +03:00
Riccardo Spagni 72a1b05c13
update quick sync checkpoints and hash 2019-03-08 21:17:41 +03:00
moneromooo-monero 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-monero 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-monero 362ecad06c
blockchain: fix long term weight addition on pop/init 2019-03-08 21:17:40 +03:00
moneromooo-monero 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-monero 0470ea5ac0
blockchain: forbid older BP rct versions from v11 2019-03-08 21:17:37 +03:00
moneromooo-monero f94c615fc3
Fix v3/v4 db conversion 2019-03-08 21:15:52 +03:00
Tom Smeding 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-monero 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-monero 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-monero 3974e40efa
blockchain: fix block rate check for empty blockchains 2019-03-08 21:15:50 +03:00
moneromooo-monero 51a7dd045e
core: fix unmixable special case allowing ring size below 11 2019-03-08 21:15:49 +03:00
moneromooo-monero 7942e862b8
blockchain: include number of discarded blocks in --reorg-notify 2019-03-08 21:15:49 +03:00
moneromooo-monero 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-monero 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-monero 3353e6e784
notify: handle arbitrary tags 2019-03-08 21:15:48 +03:00
moneromooo-monero 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-monero 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
Riccardo Spagni f5df0e272e
Revert "Merge pull request #4472"
This reverts commit b26ab0b580.
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 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
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 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
moneromooo-monero be001326d1
remove obsolete daemon selection of fake outs and old tx construction 2018-09-14 10:51:45 +00:00
moneromooo-monero b2bb9312a7
blockchain: simplify output distribution code 2018-09-12 19:20:16 +00:00
moneromooo-monero 9137ad2c63
blockchain: add a testnet v9 a day after v8
So that bulletproofs become mandatory
2018-09-11 13:38:36 +00:00
moneromooo-monero 5ffb2ff9b7
v8: per byte fee, pad bulletproofs, fixed 11 ring size 2018-09-11 13:38:07 +00:00
moneromooo-monero 2a8fcb421b
Bulletproof aggregated verification and tests
Also constrains bulletproofs to simple rct, for simplicity
2018-09-11 13:37:37 +00:00
moneromooo-monero bacf0a1e2f
bulletproofs: add aggregated verification
Ported from sarang's java code
2018-09-11 13:37:32 +00:00
moneromooo-monero 9ce9f8caf6
bulletproofs: add multi output bulletproofs to rct 2018-09-11 13:37:28 +00:00
moneromooo-monero 4e1e9a607e
blockchain: add mainnet v8 height targetting 18 october
and v9 a day later
2018-09-02 16:02:17 +00:00
luigi1111 ec6982f8eb
Merge pull request #4240
83f5587 blockchain: use uint64_t for height, not size_t (moneromooo-monero)
2018-08-22 20:58:55 -05:00
luigi1111 4a4ea78ecd
Merge pull request #4204
b278b83 core: sync database based on bytes added, not blocks added (moneromooo-monero)
2018-08-22 20:43:51 -05:00
moneromooo-monero 82d1b74500
core: cache block template where possible
This avoids constant rechecking of the same things each time
a miner asks for the block template. The tx pool maintains
a cookie to allow users to detect when the pool state changed,
which means the block template needs rebuilding.
2018-08-16 12:44:33 +00:00
luigi1111 fd3b71129b
Merge pull request #4164
8e24533 blockchain: some batch tx scanning speedup (moneromooo-monero)
2018-08-15 17:31:24 -05:00
moneromooo-monero b278b83860
core: sync database based on bytes added, not blocks added
Blocks have a very wide range, whereas actual size is the relevant
quantity to consider when syncing
2018-08-12 16:13:46 +00:00
moneromooo-monero 83f5587167
blockchain: use uint64_t for height, not size_t 2018-08-09 17:09:26 +00:00