| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Hide LMDB-specific stuff behind blockchain_db.h. Nobody besides blockchain_db.cpp
should ever be including DB-specific headers any more.
|
| |
|
|
| |
Use to load the database when the primary meta page is corrupted
|
| | |
|
| |
|
|
| |
Avoids exception spam for the "nope, not found" case
|
| |
|
|
|
| |
Changed Blockchain::for_all_blocks() to for_blocks_range()
Operate on blockchain in-place instead of building a copy first.
|
| |
|
|
|
|
|
| |
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).
poolstate.bin is now obsolete.
|
| |
|
|
| |
Don't allow use of existing batch txn if it's from the wrong thread
|
| |
|
|
| |
Cleanup of bf1348b7e2b2c72a6d40b23567afaa46b53e6cb7
|
| | |
|
| |\
| |
| |
| | |
0288310e blockchain_db: add "raw" blobdata getters for block and transaction (moneromooo-monero)
|
| | |
| |
| |
| | |
This speeds up operations such as serving blocks to syncing peers
|
| |\ \
| | |
| | |
| | | |
cca95c1c blockchain_db: do not throw on expected partial results getting keys (moneromooo-monero)
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
When scanning for outputs used in a set of incoming blocks,
we expect that some of the inputs in their transactions will
not be found in the blockchain, as they could be in previous
blocks in that set. Those outputs will be scanned there at
a later point. In this case, we add a flag to control wehther
an output not being found is expected or not.
|
| | | |
|
| | |
| |
| |
| | |
Same reason as 3ff54bdd7a8b5e08e4e8ac17b7fff23ad3a82312
|
| |/
|
|
| |
Slight perf gain, but mainly to reduce spam at loglevel 3
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The recent change to not keep separate track of the blockchain
height caused the reported height to jump early in the lmdb
transaction (when the block data is added to the blocks table),
rather than at the end, after everything succeeded. Since the
block data is added before the transaction data, this caused
the transaction data to be saved with a height one more than
its expected value.
Fix this by saving the block data last. This should have no
side effects.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.
To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:
This one is (mostly) silent, only outputting fatal errors:
MONERO_LOGS=*:FATAL
This one is very verbose:
MONERO_LOGS=*:TRACE
This one is totally silent (logwise):
MONERO_LOGS=""
This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):
MONERO_LOGS=*:WARNING,verify:FATAL
Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE
Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:
MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE
Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.
Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.
The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
|
| |\
| |
| |
| |
| |
| |
| |
| | |
3ff54bdd Check for correct thread before ending batch transaction (Howard Chu)
eaf8470b Must wait for previous batch to finish before starting new one (Howard Chu)
c903c554 Don't cache block height, always get from DB (Howard Chu)
eb1fb601 Tweak default db-sync-mode to fast:async:1 (Howard Chu)
0693cff9 Use batch transactions when syncing (Howard Chu)
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Faster throughput while avoiding corruption. I.e., makes
running with --db-sync-mode safe more tolerable.
|
| |/
|
|
|
| |
This is a normal occurence in many cases, and there is no need
to spam the log with those when it is.
|
| |
|
|
| |
Will be useful to debug
|
| |
|
|
|
|
|
| |
m_num_outputs keeps track of the number of outputs, which should
be the same as the size of both the output_txs and output_amounts
databases. If one goes out of sync, we need to throw to abort
whatever it is we were doing.
|
| |
|
|
|
|
| |
Add consts in a few places where it makes sense, avoid unnecessary
memory reallocation where we know the full size needed at the outset,
simplify and avoid memory copy.
|
| |
|
|
|
|
| |
For safety, though it seems to have been the case already.
Also add a comment about the necessary layout identity.
|
| |
|
|
|
|
|
| |
25% of the outputs are selected from the last 5 days (if possible),
in order to avoid the common case of sending recently received
outputs again. 25% and 5 days are subject to review later, since
it's just a wallet level change.
|
| |\
| |
| |
| | |
d2e11f3 db_lmdb: do not error if dropping a non existent hard fork table (moneromooo-monero)
|
| | | |
|
| |/
|
|
|
|
| |
Message observed while synchronizing a node from scratch.
"LMDB memory map needs resized"
Proposing a change to:
"LMDB memory map needs to be resized"
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since this queries block heights for blocks that may or may not
exist, queries for non existing blocks would throw an exception,
and that would slow down the loop a lot. 7 seconds to go through
a 30 hash list.
Fix this by adding an optional return block height to block_exists
and using this instead. Actual errors will still throw an
exception.
This also cuts down on log exception spam.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since these are needed at the same time as the output pubkeys,
this is a whole lot faster, and takes less space. Only outputs
of 0 amount store the commitment. When reading other outputs,
a fake commitment is regenerated on the fly. This avoids having
to rewrite the database to add space for fake commitments for
existing outputs.
This code relies on two things:
- LMDB must support fixed size records per key, rather than
per database (ie, all records on key 0 are the same size, all
records for non 0 keys are same size, but records from key 0
and non 0 keys do have different sizes).
- the commitment must be directly after the rest of the data
in outkey and output_data_t.
|
| |
|
|
|
| |
It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
|
| |
|
|
|
|
|
| |
- we need to drop the new m_tx_indices database
- we reset the version to current version
This fixes the core tests failing to initialize.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
11dc091 Fake outs set is now decided by the wallet (moneromooo-monero)
1593553 new unlocked parameter to output_histogram (moneromooo-monero)
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This constrains the number of instances of any amount
to the unlocked ones (as defined by the default unlock time
setting: outputs with non default unlock time are not
considered, so may be counted as unlocked even if they are
not actually unlocked).
|
| |/
|
|
|
| |
This db is now dropped unconditionally, so may or may not be there
in the first place.
|
| | |
|
| |
|
|
|
|
| |
It's not really needed, it used to be an optimization for when
that code was not using the db and needed to recalculate things
fast on startup.
|
| |
|
|
|
| |
Delete old indices and recreate them, rather than updating them
Maybe not quite as slow as before.
|
| |
|
|
| |
Migrate from DB version 0 to version 1 on startup
|