Howard Chu
c746f45d3e
Add hash of top block to /getheight RPC
2019-04-01 01:02:58 +01:00
Howard Chu
b8c2e21cba
Fix startup errors with SSL cert generation
...
Use SSL API directly, skip boost layer
2019-03-08 15:15:24 +00:00
Howard Chu
2a94ec22aa
ITS#8969 tweak mdb_page_split
...
Bump up number of keys for which we use fine-grained splitpoint search
2019-01-30 23:45:48 +00:00
Howard Chu
efec3ed235
Resync to upstream mdb.master
2019-01-17 19:49:26 +00:00
Howard Chu
60b35c91b9
Add --restore-date param
...
Estimate restore height from given date
Check date format early, error out early if invalid
2018-12-14 19:11:35 +00:00
Howard Chu and moneromooo-monero
f6187cd811
epee: speed up parse_hexstr_to_binbuff a little
2018-11-15 23:34:15 +00:00
Howard Chu
a43daebf57
Add stats utility
...
Report statistics from a blockchain DB
2018-10-23 19:43:31 +01:00
Howard Chu
7c790f11f2
Fix rtxn usage in BlockchainLMDB::get_estimated_batch_size
...
Should only stop the rtxn if we actually started it
Fixes Coverity 184960
2018-10-02 16:14:20 +01:00
Howard Chu
fe1256471a
Fixup RENAME_DB() macro
...
Make sure target DB's record is on a writable page
2018-09-25 21:01:03 +01:00
Howard Chu
e9bce045a4
Fix missing std::runtime_error def in difficulty.cpp
2018-09-16 19:35:07 +00:00
Howard Chu
b85acb4cb8
Fix RPC crashes that didn't check for an open wallet
2018-06-15 20:18:41 +01:00
hyc
18cd6837b6
Fix mdb_load append option
...
Use MDB_CURRENT to avoid seeking to new key when appending DUPs.
Reinit cursor on new batch, if appending DUPs.
2018-05-08 06:29:13 +01:00
hyc
9705032618
ITS#8831 move flag init into readhdr
...
Avoid stomping on flags from 1st readhdr invocation
2018-05-08 06:13:21 +01:00
Howard Chu
1d79c14dbb
Revert bb19386b
...
The requirement for CMake 3.2.0 was introduced erroneously
in commit e29282d208 and is no
longer present
2018-03-21 17:16:06 +00:00
Howard Chu
522be96fe4
Fix generating version.cpp
...
Also removes BYPRODUCT dependency on CMake 3.2
2018-03-21 16:33:52 +00:00
Howard Chu
f2bb8085ec
Fix #3297 use the password_prompter helper
2018-02-20 02:25:20 +00:00
Howard Chu
b372ec4375
ITS#8324 More for Win32 NTDLL junk
...
Use GetProcAddress at runtime, avoid buildtime NTDLL link issues
2018-02-18 21:56:55 +00:00
Howard Chu
f3b74e75b0
Fix refresh height estimation
...
Since commit b0426d4c refresh height for a newly created wallet
connected to a sync'd daemon was off by a month. Now we only use
the 1 month safety margin if we're unable to talk to a daemon.
2018-02-16 14:17:36 +00:00
Howard Chu
f689a77e56
Fix #602 Turn on socket keepalive
2018-02-11 23:32:37 +00:00
Howard Chu
84a8b2da14
Don't create readtxn until after txn_safe gate check
2018-01-31 18:18:01 +00:00
Howard Chu
294adc8341
Additional fix for core_tests
...
Reset thread-local info if it doesn't match the current env.
Only happens when a process opens/closes env multiple times in the
same process, doesn't affect monerod.
2017-12-28 20:24:08 +00:00
Howard Chu
d52b732efb
Fix stale readcursor flags
...
Reset thread-specific flags when a write txn is started.
Also remove some redundant start-readtxn code.
2017-12-28 00:59:04 +00:00
Howard Chu
8198f031f3
Add mdb_drop tool
2017-11-19 19:48:01 +00:00
Howard Chu
987eb662bf
More missed readline dependencies thru scoped_message_writer
2017-11-14 22:43:52 +00:00
Howard Chu
29cee4ec4f
Fix 383ff4f689
...
Missed a crypto::null_pkey in PR#2629
2017-11-14 20:36:21 +00:00
Howard Chu
b85e82bf6a
Fix e89994e98f
...
Missed an input_line() change
2017-11-14 20:34:32 +00:00
Howard Chu
95e784ad00
Fix 437421ce42
...
Missing an error argument for an exception
2017-11-14 20:29:05 +00:00
Howard Chu and moneromooo-monero
0d9c0db996
Do not build against epee_readline if it was not built
2017-11-14 17:06:37 +00:00
Howard Chu
7c7d36725a
Increase LMDB maxreaders if large number of threads in use
2017-11-02 16:33:48 +00:00
Howard Chu
6738753b30
Use max_concurrency as-is
...
Don't try to 2nd guess user
2017-11-02 16:33:48 +00:00
Howard Chu
2540d162be
Add -a append option to mdb_load
...
To allow reloading of custom-sorted DBs from mdb_dump
2017-09-20 18:50:38 +01:00
hyc
8b1acc9a86
Fix OpenSSL 1.1 detection for static builds
2017-09-20 01:38:43 +01:00
Howard Chu
d2d8a41c47
Use actual batch size for resize estimates
...
And optimize import startup:
Remember start_height position during initial count_blocks pass
to avoid having to reread entire file again to arrive at start_height
2017-09-17 22:08:40 +01:00
Howard Chu
5112b28d38
Readline is now supported directly
...
Remove rlwrap info
2017-09-16 17:54:22 +01:00
Howard Chu
6d0ca7d11f
Tweak concurrency limits
...
Create capacity for 2x max, but lie about it
2017-09-15 00:28:48 +01:00
Howard Chu
510d0d4753
Use a threadpool
...
Instead of constantly creating and destroying threads
2017-09-14 21:42:48 +01:00
Howard Chu
edda20146e
ITS#8728 fix MDB_VL32 freeing overflow page
...
Fix #2420
2017-09-09 15:10:23 +01:00
Howard Chu
81fb2f5347
Silence more stupid gcc warnings
2017-09-08 11:36:49 +01:00
Howard Chu
1181848748
Use latest height for fork date estimate
2017-09-02 11:44:12 +01:00
Howard Chu and moneromooo-monero
3d19ab7067
Revert "Cleanup test impact of moving blockchain_db_types()"
...
This reverts commit 3dd34a49ef .
2017-08-29 13:28:16 +01:00
Howard Chu
ea15e72d73
tx_pool: fix crash in stats
...
if tx receive_time == now. supersedes #2322
2017-08-23 14:22:25 +01:00
Howard Chu
3dd34a49ef
Cleanup test impact of moving blockchain_db_types()
2017-08-22 15:11:28 +01:00
Howard Chu
c22d22e2db
Cleanup test impact of adding safesyncmode() method
2017-08-22 15:11:09 +01:00
Howard Chu
c656dd0ede
Fix refresh counter display
...
Suspend readline when refreshing
2017-08-22 08:30:04 +01:00
Howard Chu
c088d38a57
Simplify readline support
...
And don't use std::mutex
2017-08-22 08:30:04 +01:00
Howard Chu
0c6c3eb3f2
Silence stupid fallthru warning in gcc 7
2017-08-21 10:16:10 +01:00
Howard Chu
9a859844f4
Toggle SAFE syncmode on and off automatically
...
If monerod is started with default sync mode, set it to SAFE after
synchronization completes. Set it back to FAST if synchronization
restarts (e.g. because another peer has a longer blockchain).
If monerod is started with an explicit sync mode, none of this
automation takes effect.
2017-08-20 16:30:28 +01:00
Howard Chu
80344740bd
More DB support cleanup
...
Hide DB types from db_types.h - no reason to recompile dependencies
when DB types change.
Also remove lingering in-memory DB references, they've been
obsolete since 9e82b694da
2017-08-20 13:57:36 +01:00
Howard Chu
4c7f8ac04f
DB cleanup
...
Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp
should ever be including DB-specific headers any more.
2017-08-19 18:11:38 +01:00
Howard Chu
9c6eb75c65
ITS#8704 add MDB_PREVSNAPSHOT flag to mdb_env_open
...
used to open the previous snapshot, in case the latest one
is corrupted
2017-08-12 12:21:25 +01:00
Howard Chu
33d17c37e8
Don't hardcode /tmp
2017-07-11 12:38:51 +01:00
Howard Chu
8db68a57f5
Fix #2164 histogram output
...
When there are more than 50txs, the timestamp for the last
bin was printed incorrectly. Subtracting "now" was omitted by mistake
in 3fc22e7b78
2017-07-10 15:51:03 +01:00
Howard Chu
a0d2c745c7
Fix issue #2119 SEGV
...
Due to bad refactoring in PR #2073 .
timeout_handler() doesn't work as a virtual function.
2017-07-01 23:35:16 +01:00
Howard Chu
464afd4d2d
Ensure DNSResolver destructor runs on exit
...
Plugs a noisy but benign memory leak
2017-06-28 22:21:06 +01:00
Howard Chu
07c4276cbe
Don't issue a new timedsync while one is already in progress
...
A timedsync is issued every minute on a connection, but the input
tineout is 2 minutes. This means a new sync request could be issued
while a slow sync request was already in progress. The additional
request will further clog the network on a slow connection, and
cause a premature timeout.
2017-06-15 16:54:03 +01:00
Howard Chu
cf3a376cb5
Don't timeout a slow operation that's making progress
...
If we got at least MIN_BYTES_WANTED (default 512) during any network
poll, reset the timeout to allow more time for data to arrive.
2017-06-15 16:54:03 +01:00
Howard Chu
340830de5b
Fix PR#2039
...
Missed a crypto -> cncrypto rename
2017-06-15 16:54:03 +01:00
Howard Chu
1dd524151d
Fix #1991 asm multiply again
...
Tweak temp variables and constraints. Was working before if not inlined
but newer gcc tends to inline it.
2017-06-08 21:46:40 +01:00
Howard Chu
3fc22e7b78
Add histogram to poolstats
2017-06-04 22:48:14 +01:00
Howard Chu
d09620b0e2
Fix PR#2039
...
Missed a crypto -> cncrypto rename
2017-06-04 22:48:13 +01:00
Howard Chu
5414970dcd
Speedup print_pool_stats
...
Since we're just counting txs, there's no reason to deserialize all the blobs.
2017-06-01 17:34:03 +01:00
Howard Chu
d17c0fc2d0
Don't copy blockchain for coinbase_tx_sum
...
Changed Blockchain::for_all_blocks() to for_blocks_range()
Operate on blockchain in-place instead of building a copy first.
2017-06-01 14:14:24 +01:00
Howard Chu
fa489a26ef
Fix PR#2039
...
Missed a crypto -> cncrypto rename
2017-05-31 15:34:31 +01:00
Howard Chu and moneromooo-monero
45e9838bb1
unbound: update some EVP APIs to new names
...
Replace EVP_VerifyInit with EVP_DigestInit, and EVP_VerifyUpdate
with EVP_DigestUpdate. Reported/requested by hyc, changed by mooo.
2017-05-17 22:33:16 +01:00
Howard Chu
710b2e80c6
Silence clang++ warnings
...
Using defined(foo) in a macro expansion is undefined.
2017-04-23 23:44:19 +01:00
hyc
5e5b8512d6
Fix obsolete OpenSSL API usage
...
EVP_dss1() was deprecated and EVP_sha1() is the direct replacement.
Upstream libunbound already has this patch. Note that I haven't
added a test for HAVE_EVP_DSS1 since that was deprecated quite a
long time ago in OpenSSL, there's really no reason to support it.
2017-04-12 23:56:23 +01:00
hyc
6c72d6a058
Fix Android recognition
...
The official macro is __ANDROID__; ANDROID may or may not be defined.
2017-04-12 23:55:29 +01:00
hyc
e65d66fe04
Fix ARM64 identification
...
The actual arch flag the compiler recognizes is "armv8-a".
This is true for both gcc and clang.
2017-04-12 23:54:33 +01:00
hyc
a467321800
Clean up ARMv8-a aes_expand_key()
...
The inline asm was lying about its parameters
2017-04-12 23:53:08 +01:00
hyc
a3d779013d
Fix block_longhash_worker thread
...
Wasn't getting its stack size initialized; crashes on Android
with a default stack size of 1MB.
2017-04-12 23:51:18 +01:00
Howard Chu
110b683152
Resolve #92 add ability to create wallets thru RPC
...
Reviewed and squashed. Open/Create is only allowed if no walletfile
was specified at startup.
2017-04-11 01:22:44 +01:00
Howard Chu
d3aaf74080
Partial fix #1876 , check thread in block_txn_start()
...
Don't allow use of existing batch txn if it's from the wrong thread
2017-03-19 12:27:03 +00:00
Howard Chu
3964b30f2d
Add dependency for blocksdat.o
...
To make sure it gets regenerated whenever checkpoints.dat changes
Likewise for blocks.o and testnet_blocks.o
2017-03-04 22:02:10 +00:00
Howard Chu
e4437b2551
Fix double-import
...
Incomplete ifdef cleanup in 9e82b694da
2017-03-03 21:45:14 +00:00
Howard Chu
eb62dcc871
Remove redundant num_txs() method
...
Cleanup of bf1348b7e2
2017-03-03 16:52:45 +00:00
Howard Chu
296641e047
Fix #1824 don't end batch that we didn't start
2017-03-03 16:50:53 +00:00
Howard Chu
80749e59a8
More for PR #1724
...
Fix unit_tests build (get_output_key API change)
2017-02-21 13:53:13 +00:00
Howard Chu
86d8a33a4b
BerkeleyDB code isn't usable any more, drop from dependencies
2017-02-21 13:33:43 +00:00
Howard Chu
bed2d9f231
Get rid of directory lock
...
We don't need it any more. Fixes issue #1633
2017-02-18 22:22:24 +00:00
Howard Chu
2e9136767e
Handle map resizes from other processes
2017-02-18 22:22:24 +00:00
Howard Chu
bf1348b7e2
Can't cache num_txs or num_outputs either
...
Same reason as 3ff54bdd7a
2017-02-18 21:01:24 +00:00
Howard Chu
dc53e9eef2
Add a few read txns to streamline
...
Slight perf gain, but mainly to reduce spam at loglevel 3
2017-02-18 21:01:24 +00:00
Howard Chu
424b76a4e5
Fix spurious synchronization status msgs
...
Only update target height if it's actually greater than the current target.
Only display "synchronized" when current height equals target.
2017-02-15 14:41:42 +00:00
Howard Chu
27c3a0ea9f
ITS#8582 keep mutex at end of struct
...
since it's variable size on Linux/glibc
2017-02-07 15:12:05 +00:00
Howard Chu
edfd7f6e07
Workaround VL32 cursor refcounting miscount
...
Don't try to deref cursor page if txn's pagelist is empty
2017-01-31 10:38:12 +00:00
Howard Chu
843769f88f
Tweak some msg loglevels
2017-01-16 20:42:59 +00:00
Howard Chu
990e08f090
Fix PR#1506, off by one in chain height
2017-01-16 10:00:06 +00:00
Howard Chu
f3fdefe001
Fix multiple definition clash on ARMv7 build
...
Broken by d1d6e27ab6
2016-12-23 18:05:11 +00:00
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