Howard Chu
69b59186f3
Add ARMv8-A AES support
...
More than twice as fast as plain C code. Note that both ARMv7 and
ARMv8 can be further improved with better use of NEON.
Also tweak ARMv7 multiplier
2016-09-16 01:45:49 +01:00
Howard Chu
b8c03a5f10
Remove blocks_per_sync limits
...
The code used to cap at 5000 blocks per sync. It also treated 0 as 1.
Remove these checks; if specified as 0 do no periodic syncs at all.
Then the user is responsible for syncing in some external process.
2016-08-31 00:00:19 +01:00
Howard Chu
5bba2fdbb0
More for PR#999
2016-08-29 15:58:56 +01:00
Howard Chu
dc411ea3b7
Change default db-sync-mode to fast, not fastest
2016-08-28 16:20:22 +01:00
Howard Chu
7442dd084a
More for Issue #855
...
Plug rpage leak in cursor_set
2016-08-11 21:04:36 +01:00
hyc and luigi1111
709c7247cd
Better fix ( #4 )
2016-08-09 18:54:20 -05:00
Howard Chu
d6f5d543a5
Fix Issue #855
...
Use the same size dirty list for both 64 and 32 bit.
2016-06-07 23:38:47 +01:00
Howard Chu
f1e70d15ca
Only log 1/N skipped blocks
2016-04-29 16:50:51 +01:00
Howard Chu
cebb97c913
Move refresh height to keys file from cache file
2016-04-29 15:33:28 +01:00
Howard Chu
590c43988c
Make fast_refresh interruptible
2016-04-29 15:33:28 +01:00
Howard Chu
687855d658
Set refresh height earlier
...
Do it before the generate() call so the value actually gets stored.
2016-04-29 15:33:28 +01:00
Howard Chu
2fb00c0666
Fix 19fe8ae3ef
...
Don't prompt for restore-height on generate-new-wallet
2016-04-29 04:51:02 +01:00
Howard Chu
2b0fa05f0d
Another take on migration
...
Delete old indices and recreate them, rather than updating them
Maybe not quite as slow as before.
2016-04-24 17:46:50 +01:00
Howard Chu
19fe8ae3ef
Add --restore-height option
...
For specifying the block height from which to start a restore
2016-04-17 15:25:46 +01:00
Howard Chu
b6e42c3276
Speed up new wallet refresh
...
Use the current blockchain height as the refresh_from_block_height.
2016-04-17 15:25:46 +01:00
Howard Chu
b7140daea2
Add GET_HASHES_FAST rpc, use it in wallet
...
When m_refresh_from_block_height has been set, only hashes will be
retrieved up to that height, instead of full blocks. The same will
be done for "refresh <height>" when the specified height is beyond
the current local blockchain.
2016-04-17 15:25:46 +01:00
Howard Chu
66b1e13aa7
mdb_drop optimization
...
If we know there are no sub-DBs and no overflow pages, skip leaf scan.
2016-04-09 20:44:05 +01:00
Howard Chu
c14f9efd52
Migration
...
Migrate from DB version 0 to version 1 on startup
2016-04-08 03:11:05 +01:00
Howard Chu
aaaf9e2e6d
Fix get_tick_count() on Windows
...
GetTickCount used in 52056dcfc4
only has ~10-16ms resolution. Use higher rez timer to get 1ms rez.
2016-04-06 03:41:52 +01:00
Howard Chu
d7ea7d9a23
Merge branch 'performance' into master
2016-04-05 21:13:16 +01:00
Howard Chu
372acee723
Cleanup
...
drop obsolete remove_output()
fix get_output_key(global), fix crash in blockchain_dump
2016-04-05 21:05:24 +01:00
Howard Chu
591e421875
Cleanup and clarify
...
Try to rationalize the variable names, document usage.
2016-04-05 20:57:45 +01:00
Howard Chu
b2f1c58805
Use cursors in some remove functions
...
Helps when they're called repeatedly in one txn
2016-04-05 20:57:31 +01:00
Howard Chu
118dd69dd5
Use DUPFIXED for block_info and output_txs
...
Saves another ~150MB or so on the full blockchain
2016-04-05 20:55:16 +01:00
Howard Chu
6225716f3c
More outputs consolidation
...
Also bumped DB VERSION to 1
Another significant speedup and space savings:
Get rid of global_output_indices, remove indirection from output to keys
This is the change warptangent described on irc but never got to finish.
2016-04-05 20:55:12 +01:00
Howard Chu
7c5abdc3a3
Use DUPFIXED for output_keys
...
Saves another 90MB on 200000 block import.
Had to bring back compare_uint64 for this, but it's safe since
this table is always 64-bit aligned.
2016-04-05 20:54:42 +01:00
Howard Chu
8e9d8e3364
Use DUPFIXED for tx_indices
...
Small space savings, no measurable speedup
2016-04-05 20:54:39 +01:00
Howard Chu
a12f9365f8
Use DUPFIXED for block_heights
...
Only a small savings...
2016-04-05 20:54:07 +01:00
Howard Chu
38c2277d6f
Use DUPFIXED for spent_keys
2016-04-05 20:54:07 +01:00
Howard Chu
8d252a4214
Consolidated block info
2016-04-05 20:53:59 +01:00
Howard Chu
efbdde2c66
Detect map resize failures
2016-03-30 20:37:28 +01:00
Howard Chu
8757e46b78
add blockhashing blob to getblocktemplate
2016-03-30 16:54:36 +01:00
Howard Chu
db1b2db4d5
Reduce log noise
2016-03-19 12:59:05 +00:00
Howard Chu
9b3e43c327
Fix issue #706
2016-03-19 12:57:47 +00:00
Howard Chu
a74348e115
Add destructor for readtxns
...
Only if we created the readtxn. Was missing cleanups from exceptions before.
2016-03-16 11:34:13 +00:00
Howard Chu
6b0a903177
Small cleanups
...
Only one return and TXN_POSTFIX_RDONLY() per function
Only log rtxn_start if the rtxn wasn't already active
2016-03-15 13:35:31 +00:00
Howard Chu
01c1512f22
More for 92dd4ec6d6
...
Make sure we stop the right txn too
2016-03-15 13:35:23 +00:00
Howard Chu
92dd4ec6d6
Hack for read/write txn mixup
...
save the thread ID of the writer thread so we don't try to use
the writetxn from reader threads
2016-03-14 20:19:46 +00:00
Howard Chu
2abdb2c9fd
avoid some val copies
2016-03-14 09:40:49 +00:00
Howard Chu
66c2fc7b70
Need to link boost::chrono in more places now
2016-03-11 16:17:08 +00:00
Howard Chu
52056dcfc4
WIN32 thread_id is OS-dependent not compiler-dependent
2016-03-11 15:46:09 +00:00
Howard Chu
b937a2c915
Use boost::thread instead of std::thread
...
and all other associated IPC
2016-03-11 15:09:50 +00:00
Howard Chu
87d39f39b3
WIN32: Need getpid() declaration
2016-03-11 13:32:50 +00:00
Howard Chu
8941ce0398
More for bdec7cb
...
More uses of db error helper
2016-03-09 18:24:16 +00:00
Howard Chu
ee7a8b87f9
Get rid of lmdb_cur
...
We don't need it now with per-txn cursors.
2016-03-03 19:06:27 +00:00
Howard Chu
d57ec7595c
Fix language
2016-03-03 00:34:19 +00:00
Howard Chu
f5affbef26
More for df239428c0
...
Let ARMv7 work again
2016-03-03 00:13:13 +00:00
Howard Chu
7db89ed2ee
ARMv7: fix unaligned accesses
...
And cleanup some key comparators
2016-02-25 13:57:00 +00:00
Howard Chu
8cc7a36f0b
read txn/cursor stuff
...
Could wrap more later.
2016-02-23 20:47:15 +00:00
Howard Chu
11d555cebe
Fix crash in std::map for connections_map
...
Use boost::unordered_map instead.
2016-02-18 21:31:30 +00:00
Howard Chu
014f8868f2
std::condvar is broken on Win32 with gcc/g++ 4.8 too
...
Use boost...
2016-02-18 21:31:21 +00:00
Howard Chu
7c86c5997d
Use boost::thread instead of std::thread
...
std::thread crashes on (at least) ARMv6 g++ 4.8/4.9
2016-02-18 21:30:10 +00:00
Howard Chu
9218cad640
Fix cffc411c90
...
Don't include bdb header unless defined(BERKELEY_DB)
2016-02-17 20:41:34 +00:00
Howard Chu
8860b7497f
MDB_VL32 - increase max write txn size
2016-02-17 20:41:34 +00:00
Howard Chu
02abe3590d
Use MDB_PREV_MULTIPLE
...
in get_global_output_indices
2016-02-17 16:14:50 +00:00
Howard Chu
7a4755d3a4
Fixup after lmdb master resync
2016-02-17 16:14:38 +00:00
Howard Chu
3b13a7473e
Shutup about VERSION 0
2016-02-17 05:06:19 +00:00
Howard Chu
1537477c9f
Use cursor in get_output_key
2016-02-17 04:05:29 +00:00
Howard Chu
f2faf8cdd9
Use MDB_APPEND mode where possible
...
When keys are contiguous and monotonically increasing, this gets
denser page utilization (doesn't leave padding in page splits).
Can't be used for keys that are inserted in random order (e.g. hashes)
In total this only saves around 1.5% of space compared to original
DB code. The previous patch accounted for 0.8% savings on its own;
the blocks tables just aren't that big.
2016-02-17 04:05:29 +00:00
Howard Chu
090b548c3b
Use cursors in write txns
...
Saves a bit of seek overhead. LMDB frees them automatically
in txn_(commit|abort) so they need no cleanup.
2016-02-17 04:05:29 +00:00
Howard Chu
ed08d2152e
Keep a running blocksize count
...
Used in batch size estimation, avoids rereading already processed
blocks during import
2016-02-17 04:05:28 +00:00
Howard Chu
0fc93345ea
Win32 import batchsize tweaks
...
Reduce frequency of resizes: bump minimum increase from 128MB to 512MB
Use a bigger safety margin at small batch sizes
2016-02-17 04:05:28 +00:00
Howard Chu
31e4e8c3a3
Resync with master
2016-02-16 23:38:04 +00:00
Howard Chu
d8f9bb380c
Keep a running blocksize count
...
Used in batch size estimation, avoids rereading already processed
blocks during import
2016-02-15 00:22:09 +00:00
Howard Chu
bf22109d16
Win32 import batchsize tweaks
...
Reduce frequency of resizes: bump minimum increase from 128MB to 512MB
Use a bigger safety margin at small batch sizes
2016-02-14 19:31:52 +00:00
Howard Chu
f98fe467e9
MDB_VL32 change overflow page scan
...
Just check the requested page, don't worry about any other pages
2016-01-28 13:59:02 +00:00
Howard Chu
7e65cc0aba
MDB_VL32 Fix off-by-one in mdb_midl_shrink
2016-01-28 04:15:45 +00:00
Howard Chu
222e30ec97
MDB_VL32 Fix another 32bit overflow
2016-01-27 14:14:27 +00:00
Howard Chu
3ca6e853f6
Tweak mdb_strerror msg buffer
2016-01-27 14:14:11 +00:00
Howard Chu
78ad970a2c
MDB_VL32 Fix d2a5f72f73
...
VirtualAlloc is not for MDB_VL32
2016-01-27 14:14:02 +00:00
Howard Chu
1cff3974d8
WIN64 needs off_t redefined too
2016-01-20 01:26:26 +00:00
Howard Chu
d2a5f72f73
Fix --db-sync-mode on Windows64
...
only "fastest" mode was working, others would SEGV.
2016-01-16 16:11:11 +00:00
Howard Chu
4cf6e2b2c3
Fix 30f92f5630
...
Needed to add the corresponding (dummy) method to unit test hardfork
2016-01-16 16:10:16 +00:00
Howard Chu
30f92f5630
Fix hf when import with verify off
...
Delete the hf tables, so the next open will rescan and regenerate
2016-01-15 17:26:19 +00:00
Howard Chu
0b6be4114d
There has never been any such function "fnctl"
...
It was only a typo of fcntl. Get rid of this test.
2016-01-12 21:19:15 +00:00
Howard Chu
e98a3f26e2
Fix da0bce34
...
Windows doesn't define a default linker
2016-01-12 21:11:09 +00:00
Howard Chu
8ce12a978e
Fix arm asm
...
About 10% faster than plain C mul128 on raspi1B
2016-01-11 23:16:02 +00:00
Howard Chu
94de39fbad
Tweak arm6 flags
2016-01-11 23:14:06 +00:00
Howard Chu
fcf31f3ff3
Cleanup symbol clashes, stdlib header
2016-01-11 23:09:50 +00:00
Howard Chu
d26e7d0b3a
ARMv7 optimization flags are too aggressive
2016-01-03 12:58:08 +00:00
Howard Chu
a561afa18b
ARM chars are unsigned
2016-01-03 11:57:35 +00:00
Howard Chu
da0bce3472
Use CMAKE_LINKER, not hardcoded "ld"
2016-01-03 08:22:38 +00:00
Howard Chu
28b82718ff
Avoid cmake-3.x block comment syntax
2016-01-03 08:22:06 +00:00
Howard Chu
26aac68095
Fix release flags
...
flags were being accumulated instead of being set.
Win32 was getting -O2 -DNDEBUG -Ofast -DNDEBUG etc...
Also for Win32, stay compatible to WinXP
2016-01-02 21:53:02 +00:00
Howard Chu
ee6f2cb71f
IP_TOS not supported before Windows7
2016-01-02 03:10:41 +00:00
Howard Chu
462658df4f
Get rid of doubly-defined NDEBUG
2016-01-02 02:01:58 +00:00
Howard Chu
10ae0032d8
isblank doesn't need a special case test
2015-12-31 05:34:29 +00:00
Howard Chu
a090ee97f9
Fix 3edbf57b62
...
The test for isblank was being ignored
2015-12-31 05:31:42 +00:00
hyc
b39aae7aa5
Tweak 45800a25e9
...
trivial cleanup
2015-12-29 00:11:35 +00:00
Howard Chu
b773e66877
MDB_VL32 - resync with master
...
WIN32 - close file mapping handle in env_close
cursor_unref - ignore cursor with empty stack
2015-12-28 20:46:48 +00:00
hyc
fc341325a7
Remove assert from status command
...
Crashes every time...
2015-12-27 08:44:18 +00:00
Howard Chu
ba4e217c90
Update liblmdb, unify 32/64 sources
2015-12-25 08:56:03 +00:00
hyc
9428d53d6f
Strip redundant includes
...
In particular, <boost/program_options.hpp> blows up daemon.cpp.obj,
making it too big to compile in debug mode on Win32. Even on a
release build it drops daemon.cpp.o on Linux from 31MB to 20MB.
This has no effect on the final linked binary size.
2015-12-21 16:23:59 +00:00
Howard Chu
cfe15b81bd
Also set stacksize for Win32 not on MSVC
2015-12-20 18:41:36 +00:00
Howard Chu
d98d5e79cb
Fix data refs in read-only txns
...
Data is only guaranteed to be valid within the lifetime of a txn.
You cannot use data returned from LMDB after the txn ends.
Also, fixed a missing txn.commit BlockchainLMDB::get_tx_unlock_time()
2015-12-10 01:45:40 +00:00