aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/CMakeLists.txt
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-29 23:30:51 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-22 20:30:51 +0000
commitb750fb27b0f20e9443827732b69a504a76036430 (patch)
tree36fdd03f84ae78dbd217b5bd255bd86e33db1bcc /src/blockchain_utilities/CMakeLists.txt
parentMerge pull request #5008 (diff)
downloadmonero-b750fb27b0f20e9443827732b69a504a76036430.tar.xz
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.
Diffstat (limited to 'src/blockchain_utilities/CMakeLists.txt')
-rw-r--r--src/blockchain_utilities/CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt
index ddf575c29..df74eb695 100644
--- a/src/blockchain_utilities/CMakeLists.txt
+++ b/src/blockchain_utilities/CMakeLists.txt
@@ -92,6 +92,17 @@ monero_private_headers(blockchain_prune_known_spent_data
+set(blockchain_prune_sources
+ blockchain_prune.cpp
+ )
+
+set(blockchain_prune_private_headers)
+
+monero_private_headers(blockchain_prune
+ ${blockchain_prune_private_headers})
+
+
+
set(blockchain_ancestry_sources
blockchain_ancestry.cpp
)
@@ -298,3 +309,25 @@ set_property(TARGET blockchain_prune_known_spent_data
PROPERTY
OUTPUT_NAME "monero-blockchain-prune-known-spent-data")
install(TARGETS blockchain_prune_known_spent_data DESTINATION bin)
+
+monero_add_executable(blockchain_prune
+ ${blockchain_prune_sources}
+ ${blockchain_prune_private_headers})
+
+set_property(TARGET blockchain_prune
+ PROPERTY
+ OUTPUT_NAME "monero-blockchain-prune")
+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})