2018-04-25 08:13:38 +02:00
|
|
|
# Copyright (c) 2018, The Loki Project
|
2019-04-12 06:36:43 +02:00
|
|
|
# Copyright (c) 2014-2019, The Monero Project
|
2014-11-02 01:55:22 +01:00
|
|
|
#
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without modification, are
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
|
|
# conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
|
|
# of conditions and the following disclaimer in the documentation and/or other
|
|
|
|
# materials provided with the distribution.
|
|
|
|
#
|
|
|
|
# 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
|
|
# used to endorse or promote products derived from this software without specific
|
|
|
|
# prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
|
|
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
|
|
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2015-02-11 00:13:32 +01:00
|
|
|
set(blockchain_import_sources
|
|
|
|
blockchain_import.cpp
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_file.cpp
|
2015-10-16 20:45:35 +02:00
|
|
|
blocksdat_file.cpp
|
2015-02-11 00:13:32 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_import_private_headers
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_file.h
|
2015-10-16 20:45:35 +02:00
|
|
|
blocksdat_file.h
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_serialization.h
|
2015-02-11 00:13:32 +01:00
|
|
|
)
|
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_private_headers(blockchain_import
|
2015-02-11 00:13:32 +01:00
|
|
|
${blockchain_import_private_headers})
|
|
|
|
|
2015-02-16 13:20:55 +01:00
|
|
|
set(blockchain_export_sources
|
|
|
|
blockchain_export.cpp
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_file.cpp
|
2015-10-16 20:45:35 +02:00
|
|
|
blocksdat_file.cpp
|
2015-02-16 13:20:55 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_export_private_headers
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_file.h
|
2015-10-16 20:45:35 +02:00
|
|
|
blocksdat_file.h
|
2015-05-08 22:46:26 +02:00
|
|
|
bootstrap_serialization.h
|
2015-02-16 13:20:55 +01:00
|
|
|
)
|
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_private_headers(blockchain_export
|
2015-02-16 13:20:55 +01:00
|
|
|
${blockchain_export_private_headers})
|
|
|
|
|
|
|
|
|
2018-02-26 17:39:40 +01:00
|
|
|
set(blockchain_blackball_sources
|
|
|
|
blockchain_blackball.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_blackball_private_headers
|
|
|
|
bootstrap_file.h
|
|
|
|
blocksdat_file.h
|
|
|
|
bootstrap_serialization.h
|
|
|
|
)
|
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_private_headers(blockchain_blackball
|
2018-02-26 17:39:40 +01:00
|
|
|
${blockchain_blackball_private_headers})
|
|
|
|
|
2018-02-27 13:54:28 +01:00
|
|
|
set(blockchain_usage_sources
|
|
|
|
blockchain_usage.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_usage_private_headers)
|
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_private_headers(blockchain_usage
|
2018-02-27 13:54:28 +01:00
|
|
|
${blockchain_usage_private_headers})
|
|
|
|
|
|
|
|
|
2018-02-26 17:39:40 +01:00
|
|
|
|
2018-11-24 15:49:04 +01:00
|
|
|
set(blockchain_prune_known_spent_data_sources
|
|
|
|
blockchain_prune_known_spent_data.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_prune_known_spent_data_private_headers)
|
|
|
|
|
2018-12-19 02:25:48 +01:00
|
|
|
loki_private_headers(blockchain_prune_known_spent_data
|
2018-11-24 15:49:04 +01:00
|
|
|
${blockchain_prune_known_spent_data_private_headers})
|
|
|
|
|
|
|
|
|
|
|
|
|
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2018-04-30 00:30:51 +02:00
|
|
|
set(blockchain_prune_sources
|
|
|
|
blockchain_prune.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_prune_private_headers)
|
|
|
|
|
2019-01-30 02:04:20 +01:00
|
|
|
loki_private_headers(blockchain_prune
|
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2018-04-30 00:30:51 +02:00
|
|
|
${blockchain_prune_private_headers})
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-16 17:27:52 +02:00
|
|
|
set(blockchain_ancestry_sources
|
|
|
|
blockchain_ancestry.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_ancestry_private_headers)
|
|
|
|
|
2018-10-10 01:30:31 +02:00
|
|
|
loki_private_headers(blockchain_ancestry
|
2018-07-16 17:27:52 +02:00
|
|
|
${blockchain_ancestry_private_headers})
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-10 20:56:05 +02:00
|
|
|
set(blockchain_depth_sources
|
|
|
|
blockchain_depth.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_depth_private_headers)
|
|
|
|
|
2018-10-10 01:30:31 +02:00
|
|
|
loki_private_headers(blockchain_depth
|
2018-07-10 20:56:05 +02:00
|
|
|
${blockchain_depth_private_headers})
|
|
|
|
|
2018-10-22 18:31:48 +02:00
|
|
|
set(blockchain_stats_sources
|
|
|
|
blockchain_stats.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(blockchain_stats_private_headers)
|
|
|
|
|
2018-11-05 01:27:45 +01:00
|
|
|
loki_private_headers(blockchain_stats
|
2018-10-22 18:31:48 +02:00
|
|
|
${blockchain_stats_private_headers})
|
2018-07-10 20:56:05 +02:00
|
|
|
|
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_add_executable(blockchain_import
|
2015-02-11 00:13:32 +01:00
|
|
|
${blockchain_import_sources}
|
2018-10-09 14:33:39 +02:00
|
|
|
${blockchain_import_private_headers})
|
2015-02-11 00:13:32 +01:00
|
|
|
|
|
|
|
target_link_libraries(blockchain_import
|
2016-09-17 19:59:29 +02:00
|
|
|
PRIVATE
|
2015-02-11 00:13:32 +01:00
|
|
|
cryptonote_core
|
2016-09-17 19:59:29 +02:00
|
|
|
blockchain_db
|
2017-09-14 01:28:23 +02:00
|
|
|
version
|
Change logging to easylogging++
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.
2017-01-01 17:34:23 +01:00
|
|
|
epee
|
2016-09-17 19:59:29 +02:00
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
2018-10-09 14:33:39 +02:00
|
|
|
${EXTRA_LIBRARIES}
|
|
|
|
${Blocks})
|
2015-02-11 00:13:32 +01:00
|
|
|
|
2016-02-18 15:14:31 +01:00
|
|
|
if(ARCH_WIDTH)
|
2016-02-17 21:10:26 +01:00
|
|
|
target_compile_definitions(blockchain_import
|
2016-02-18 15:14:31 +01:00
|
|
|
PUBLIC -DARCH_WIDTH=${ARCH_WIDTH})
|
2016-02-17 21:10:26 +01:00
|
|
|
endif()
|
|
|
|
|
2015-02-11 00:13:32 +01:00
|
|
|
set_property(TARGET blockchain_import
|
|
|
|
PROPERTY
|
2018-02-28 18:10:47 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-import")
|
2017-10-15 23:15:18 +02:00
|
|
|
install(TARGETS blockchain_import DESTINATION bin)
|
2015-02-16 13:20:55 +01:00
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_add_executable(blockchain_export
|
2015-02-16 13:20:55 +01:00
|
|
|
${blockchain_export_sources}
|
|
|
|
${blockchain_export_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_export
|
2016-09-17 19:59:29 +02:00
|
|
|
PRIVATE
|
2015-02-16 13:20:55 +01:00
|
|
|
cryptonote_core
|
2016-09-17 19:59:29 +02:00
|
|
|
blockchain_db
|
2017-09-14 01:28:23 +02:00
|
|
|
version
|
Change logging to easylogging++
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.
2017-01-01 17:34:23 +01:00
|
|
|
epee
|
2016-09-17 19:59:29 +02:00
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
2015-02-16 13:20:55 +01:00
|
|
|
|
|
|
|
set_property(TARGET blockchain_export
|
|
|
|
PROPERTY
|
2018-02-28 18:10:47 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-export")
|
2017-10-15 23:15:18 +02:00
|
|
|
install(TARGETS blockchain_export DESTINATION bin)
|
2016-10-30 21:24:21 +01:00
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_add_executable(blockchain_blackball
|
2018-02-26 17:39:40 +01:00
|
|
|
${blockchain_blackball_sources}
|
|
|
|
${blockchain_blackball_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_blackball
|
|
|
|
PRIVATE
|
|
|
|
wallet
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_blackball
|
|
|
|
PROPERTY
|
2018-10-22 06:43:00 +02:00
|
|
|
OUTPUT_NAME "loki-blockchain-mark-spent-outputs")
|
2018-02-26 17:39:40 +01:00
|
|
|
install(TARGETS blockchain_blackball DESTINATION bin)
|
|
|
|
|
2018-02-27 13:54:28 +01:00
|
|
|
|
2018-04-25 08:13:38 +02:00
|
|
|
loki_add_executable(blockchain_usage
|
2018-02-27 13:54:28 +01:00
|
|
|
${blockchain_usage_sources}
|
|
|
|
${blockchain_usage_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_usage
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_usage
|
|
|
|
PROPERTY
|
2018-04-10 06:51:12 +02:00
|
|
|
OUTPUT_NAME "loki-blockchain-usage")
|
2018-02-27 13:54:28 +01:00
|
|
|
install(TARGETS blockchain_usage DESTINATION bin)
|
|
|
|
|
2018-10-10 01:30:31 +02:00
|
|
|
loki_add_executable(blockchain_ancestry
|
2018-07-16 17:27:52 +02:00
|
|
|
${blockchain_ancestry_sources}
|
|
|
|
${blockchain_ancestry_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_ancestry
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_ancestry
|
|
|
|
PROPERTY
|
2018-10-31 06:39:00 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-ancestry")
|
2018-07-16 17:27:52 +02:00
|
|
|
install(TARGETS blockchain_ancestry DESTINATION bin)
|
|
|
|
|
2018-10-10 01:30:31 +02:00
|
|
|
loki_add_executable(blockchain_depth
|
2018-07-10 20:56:05 +02:00
|
|
|
${blockchain_depth_sources}
|
|
|
|
${blockchain_depth_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_depth
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_depth
|
|
|
|
PROPERTY
|
2018-10-31 06:39:00 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-depth")
|
2018-07-10 20:56:05 +02:00
|
|
|
install(TARGETS blockchain_depth DESTINATION bin)
|
|
|
|
|
2018-11-05 01:27:45 +01:00
|
|
|
loki_add_executable(blockchain_stats
|
2018-10-22 18:31:48 +02:00
|
|
|
${blockchain_stats_sources}
|
|
|
|
${blockchain_stats_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_stats
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_stats
|
|
|
|
PROPERTY
|
2018-11-05 01:27:45 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-stats")
|
2018-10-22 18:31:48 +02:00
|
|
|
install(TARGETS blockchain_stats DESTINATION bin)
|
2018-11-24 15:49:04 +01:00
|
|
|
|
2018-12-19 02:25:48 +01:00
|
|
|
loki_add_executable(blockchain_prune_known_spent_data
|
2018-11-24 15:49:04 +01:00
|
|
|
${blockchain_prune_known_spent_data_sources}
|
|
|
|
${blockchain_prune_known_spent_data_private_headers})
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_prune_known_spent_data
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
p2p
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_prune_known_spent_data
|
|
|
|
PROPERTY
|
2018-12-19 02:25:48 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-prune-known-spent-data")
|
2018-11-24 15:49:04 +01:00
|
|
|
install(TARGETS blockchain_prune_known_spent_data DESTINATION bin)
|
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2018-04-30 00:30:51 +02:00
|
|
|
|
2019-01-30 02:04:20 +01:00
|
|
|
loki_add_executable(blockchain_prune
|
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2018-04-30 00:30:51 +02:00
|
|
|
${blockchain_prune_sources}
|
|
|
|
${blockchain_prune_private_headers})
|
|
|
|
|
|
|
|
set_property(TARGET blockchain_prune
|
|
|
|
PROPERTY
|
Infinite Staking Part 2 (#406)
* Cleanup and undoing some protocol breakages
* Simplify expiration of nodes
* Request unlock schedules entire node for expiration
* Fix off by one in expiring nodes
* Undo expiring code for pre v10 nodes
* Fix RPC returning register as unlock height and not checking 0
* Rename key image unlock height const
* Undo testnet hardfork debug changes
* Remove is_type for get_type, fix missing var rename
* Move serialisable data into public namespace
* Serialise tx types properly
* Fix typo in no service node known msg
* Code review
* Fix == to >= on serialising tx type
* Code review 2
* Fix tests and key image unlock
* Add command to print locked key images
* Update ui to display lock stakes, query in print cmd blacklist
* Modify print stakes to be less slow
* Remove autostaking code
* Refactor staking into sweep functions
It appears staking was derived off stake_main written separately at
implementation at the beginning. This merges them back into a common
code path, after removing autostake there's only some minor differences.
It also makes sure that any changes to sweeping upstream are going to be
considered in the staking process which we want.
* Display unlock height for stakes
* Begin creating output blacklist
* Make blacklist output a migration step
* Implement get_output_blacklist for lmdb
* In wallet output selection ignore blacklisted outputs
* Apply blacklisted outputs to output selection
* Fix broken tests, switch key image unlock
* Fix broken unit_tests
* Begin change to limit locked key images to 4 globally
* Revamp prepare registration for new min contribution rules
* Fix up old back case in prepare registration
* Remove debug code
* Cleanup debug code and some unecessary changes
* Fix migration step on mainnet db
* Fix blacklist outputs for pre-existing DB's
* Remove irrelevant note
* Tweak scanning addresses for locked stakes
Since we only now allow contributions from the primary address we can
skip checking all subaddress + lookahead to speed up wallet scanning
* Define macro for SCNu64 for Mingw
* Fix failure on empty DB
* Add missing error msg, remove contributor from stake
* Improve staking messages
* Flush prompt to always display
* Return the msg from stake failure and fix stake parsing error
* Tweak fork rules for smaller bulletproofs
* Tweak pooled nodes minimum amounts
* Fix crash on exit, there's no need to store on destructor
Since all information about service nodes is derived from the blockchain
and we store state every time we receive a block, storing in the
destructor is redundant as there is no new information to store.
* Make prompt be consistent with CLI
* Check max number of key images from per user to node
* Implement error message on get_output_blacklist failure
* Remove resolved TODO's/comments
* Handle infinite staking in print_sn
* Atoi->strtol, fix prepare_registration, virtual override, stale msgs
2019-02-14 02:12:57 +01:00
|
|
|
OUTPUT_NAME "loki-blockchain-prune")
|
Pruning
The blockchain prunes seven eighths of prunable tx data.
This saves about two thirds of the blockchain size, while
keeping the node useful as a sync source for an eighth
of the blockchain.
No other data is currently pruned.
There are three ways to prune a blockchain:
- run monerod with --prune-blockchain
- run "prune_blockchain" in the monerod console
- run the monero-blockchain-prune utility
The first two will prune in place. Due to how LMDB works, this
will not reduce the blockchain size on disk. Instead, it will
mark parts of the file as free, so that future data will use
that free space, causing the file to not grow until free space
grows scarce.
The third way will create a second database, a pruned copy of
the original one. Since this is a new file, this one will be
smaller than the original one.
Once the database is pruned, it will stay pruned as it syncs.
That is, there is no need to use --prune-blockchain again, etc.
2018-04-30 00:30:51 +02:00
|
|
|
install(TARGETS blockchain_prune DESTINATION bin)
|
|
|
|
|
|
|
|
target_link_libraries(blockchain_prune
|
|
|
|
PRIVATE
|
|
|
|
cryptonote_core
|
|
|
|
blockchain_db
|
|
|
|
p2p
|
|
|
|
version
|
|
|
|
epee
|
|
|
|
${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_THREAD_LIBRARY}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
${EXTRA_LIBRARIES})
|