Commit Graph

1451 Commits

Author SHA1 Message Date
TomZ 7bfabca6fc Mark log-levels 2018-11-21 11:31:54 +01:00
TomZ 5ae14f17ac remove BIP9 warnings
The usage of block-version in ASICBoost means that BIP9 is not really
useful to detect, let alone generate warnings for.
2018-11-20 20:44:07 +01:00
TomZ 830726ef88 Make mining work again.
* Make mining software honor CTOR resorting.
* Fix bugs
2018-11-20 20:44:06 +01:00
TomZ 9d5f9d2142 Fix UTXO throttling feature
On low core-count machines the request to save could end up being
delayed since all threads are busy doing things like validating
transactions.
So when a really big block came in I ended up throttling while there
was no save method running in parallel at all.
This fixes this and also makes throtteling be a per-thread thing
instead of doing it inside the mutex.
2018-11-18 14:42:14 +01:00
TomZ 8f9b160012 Make mapper close more agressive
I expect that it would be bettter to make this configurable
because it is based on what the rest of the system is used for.
2018-11-18 12:27:41 +01:00
TomZ 58a9baba3a On loading, calculate nChainWork 2018-11-18 12:12:38 +01:00
TomZ 02ba17bce7 Enable checkpoint for reecent upgrade 2018-11-18 12:12:38 +01:00
TomZ ded88e733c Use simpler logic
Instead of depending on a hardcoded offset, just use index.
2018-11-17 16:46:49 +01:00
TomZ 75f08fc580 Be more careful when deciding to reorg
When reorgs greater than 6 are detected we refrain from taking
action (rolling back the chain) and wait for either user interaction
or till the chain extends the chain-tip again.
2018-11-17 16:01:46 +01:00
TomZ 71b45cd38c Merge branch 'dev/HFNov2018' 2018-11-15 23:40:56 +01:00
TomZ 1ce0fb9036 Update to actual block height 2018-11-15 23:37:10 +01:00
TomZ 1a4b3a0966 Use the flags for testing the 100 bytes txsize 2018-11-15 23:35:47 +01:00
TomZ c2412a0e59 Add testing for CTOR 2018-11-15 23:35:43 +01:00
TomZ cdec1fa593 Implement CTOR validation 2018-11-15 23:35:43 +01:00
TomZ 9aab378b0a Add checks for 100 bytes min tx size 2018-11-15 23:34:05 +01:00
TomZ 5655a30558 whitespace 2018-11-14 22:59:28 +01:00
TomZ ef279e6bc0 Add assert 2018-11-13 21:50:19 +01:00
TomZ 35225f1400 Update API to make keys by default compressed 2018-11-13 14:30:17 +01:00
TomZ 97c0239f1e Provide proper documentation to this method 2018-11-13 14:30:12 +01:00
TomZ d55c7bfed8 Make UTXO write timebased as well
The current system writes based on the amount of changes, which is a bit
risky as long as we have small blocks as the amount of changes may for
hours be below the "lets write" limit.

So also write every 5 minutes, just to make sure we won't keep data in
memory longer than needed. Also this allows pruning to happen for people
that don't run their node all the time.
2018-11-11 16:47:54 +01:00
TomZ 89eee0d333 Fix semi-mem-leak in the UTXO DB
we only save a subsection of stuff in memory on each round of saving,
but I set the counter to zero on how long to wait for the next save.
This makes us save more often till we actually saved most stuff, avoiding
buildups of caches until we do the periodic big flush.
2018-11-11 16:47:45 +01:00
TomZ cff66cc6cc Rename variable for readability 2018-11-08 18:27:09 +01:00
TomZ 2ef243a43a Add more basic support for the novHF
this adds sigop counting for the new opcodes and
flags enabling based on block-height.
2018-11-08 17:37:22 +01:00
TomZ 695044ffc0 Import new OP_CHECKDATASIG/VERIFY 2018-11-08 10:48:53 +01:00
TomZ b8a6c54a51 Make block-height hard fork detection easy 2018-11-03 19:31:22 +01:00
TomZ 7b76d177e8 Remove chain obfuscation misfeature. 2018-11-02 20:42:45 +01:00
TomZ 1bf8574ad5 Add seeder 2018-10-30 20:57:57 +01:00
TomZ d63b2fd955 Make versioning more modern 2018-10-30 11:21:43 +01:00
TomZ d8dfec2c26 Make test a bit more stable 2018-10-22 13:08:35 +02:00
TomZ e50384f421 Make invalidateblock work a bit better 2018-10-22 00:08:11 +02:00
TomZ 030ee2c99b fix concurrent access 2018-10-21 20:57:09 +02:00
TomZ 90f635e8ec Add a test for a cornercase of appendHeader and fix it. 2018-10-21 20:38:34 +02:00
TomZ fdd693541e Make the UTXO have some limits "configurable"
This change makes the limits be static variables, which means they are
only settable once for a process. The only usecase so far is to use much
smaller limits in testing situations.
2018-10-21 13:21:24 +02:00
TomZ d8adc57786 Make pruning atomic swap the old for the new DB
This allows queries like RPC and mempool-accept to continue
even during a prune (we just use the 'old' DB) and when its
done the last active query will delete the old DB.

This assumes a sane filesystem where you can rename a file that
is in use.
2018-10-21 10:52:40 +02:00
TomZ d616c70678 Fix possible memleak 2018-10-13 21:33:31 +02:00
TomZ 82d2651d4f Fix copy/paste error and add some more sanity checks
Also fix insert() usage in unit test to not hit that new assert
2018-10-13 21:33:17 +02:00
TomZ 669338402c Don't let exceptions change behaviour 2018-10-13 20:50:45 +02:00
TomZ 76383d6961 Reject due to double spend 2018-10-13 00:19:12 +02:00
TomZ d17e297e0a fix misdiagnosed error RPC message 2018-10-12 23:55:49 +02:00
TomZ 66efccc81b Better logging 2018-10-12 23:13:42 +02:00
TomZ 492e1ded3d upgrade some of the most printed wallet debug lines 2018-10-11 21:45:40 +02:00
TomZ 5e91b276d3 Fix off-by one that made unit tests fail on 1-core dockers. 2018-10-11 21:45:40 +02:00
TomZ 9ccb1c1463 Cleanups and fixes 2018-10-11 19:50:09 +02:00
TomZ e033eb6e85 Use scoped var instead of global 2018-10-11 16:26:55 +02:00
TomZ 627a0758a4 fix reindex-required detection 2018-10-11 16:26:47 +02:00
TomZ 1b8c1a586f Allow API server to be disabled via option 2018-10-11 16:26:36 +02:00
TomZ 3fbc2e89f1 Speed up UTXO, replace mutex with lock-free list 2018-10-08 22:30:21 +02:00
TomZ 72edc63afb Fixes in comments 2018-10-08 22:30:21 +02:00
TomZ be1c403586 port unit test and add benchmark 2018-10-08 22:30:21 +02:00
TomZ a2928b91eb Simplify
On all mature operating systems and filesystems creation of a 1GB file
will not actually use that data, only when we start using blocks does
the disk space get used.
As such this is a premature optimization that Core added and I ported to
Flowee which this commit removes.

Additionally, increase the block file size to 1GiB
2018-10-05 20:49:44 +02:00