From 527d0965db18b598c85e8dd3a4f335a6e4491293 Mon Sep 17 00:00:00 2001 From: Alexander Blair Date: Fri, 24 Feb 2017 08:54:55 -0800 Subject: [PATCH] Removing fluffy blocks patch. Moving to commit w/ fixes for the pool state. --- deployment/deploy.bash | 2 +- deployment/fluffy.patch | 77 ----------------------------------------- deployment/leaf.bash | 4 +-- 3 files changed, 3 insertions(+), 80 deletions(-) delete mode 100644 deployment/fluffy.patch diff --git a/deployment/deploy.bash b/deployment/deploy.bash index 48b3a98..00ca863 100644 --- a/deployment/deploy.bash +++ b/deployment/deploy.bash @@ -29,7 +29,7 @@ sudo systemctl enable ntp cd /usr/local/src sudo git clone https://github.com/monero-project/monero.git cd monero -sudo git checkout v0.10.2 +sudo git checkout 1e7f783f6901dc46e90da13926c725d477f4f443 sudo make -j$(nproc) sudo cp ~/nodejs-pool/deployment/monero.service /lib/systemd/system/ sudo useradd -m monerodaemon -d /home/monerodaemon diff --git a/deployment/fluffy.patch b/deployment/fluffy.patch deleted file mode 100644 index e3c658c..0000000 --- a/deployment/fluffy.patch +++ /dev/null @@ -1,77 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cee3d8c..c411f2b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -275,18 +275,21 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}") - - # Can't install hook in static build on OSX, because OSX linker does not support --wrap - # On ARM, having libunwind package (with .so's only) installed breaks static link. --if(APPLE OR (ARM AND STATIC)) -- set(DEFAULT_STACK_TRACE OFF) -- set(LIBUNWIND_LIBRARIES "") --else() -- find_package(Libunwind) -- if(LIBUNWIND_FOUND) -- set(DEFAULT_STACK_TRACE ON) -- else() -- set(DEFAULT_STACK_TRACE OFF) -- set(LIBUNWIND_LIBRARIES "") -- endif() --endif() -+#if(APPLE OR (ARM AND STATIC)) -+# set(DEFAULT_STACK_TRACE OFF) -+# set(LIBUNWIND_LIBRARIES "") -+#else() -+# find_package(Libunwind) -+# if(LIBUNWIND_FOUND) -+# set(DEFAULT_STACK_TRACE ON) -+# else() -+# set(DEFAULT_STACK_TRACE OFF) -+# set(LIBUNWIND_LIBRARIES "") -+# endif() -+#endif() -+ -+set(DEFAULT_STACK_TRACE OFF) -+set(LIBUNWIND_LIBRARIES "") - - option(STACK_TRACE "Install a hook that dumps stack on exception" ${DEFAULT_STACK_TRACE}) - -diff --git a/src/cryptonote_config.h b/src/cryptonote_config.h -index 95cbf74..d444bcc 100644 ---- a/src/cryptonote_config.h -+++ b/src/cryptonote_config.h -@@ -98,7 +98,7 @@ - #define P2P_LOCAL_WHITE_PEERLIST_LIMIT 1000 - #define P2P_LOCAL_GRAY_PEERLIST_LIMIT 5000 - --#define P2P_DEFAULT_CONNECTIONS_COUNT 8 -+#define P2P_DEFAULT_CONNECTIONS_COUNT 256 - #define P2P_DEFAULT_HANDSHAKE_INTERVAL 60 //secondes - #define P2P_DEFAULT_PACKET_MAX_SIZE 50000000 //50000000 bytes maximum packet size - #define P2P_DEFAULT_PEERS_IN_HANDSHAKE 250 -diff --git a/src/cryptonote_core/tx_pool.cpp b/src/cryptonote_core/tx_pool.cpp -index 6ad1390..8a9b7fa 100644 ---- a/src/cryptonote_core/tx_pool.cpp -+++ b/src/cryptonote_core/tx_pool.cpp -@@ -619,7 +619,7 @@ namespace cryptonote - - LOG_PRINT_L2("Filling block template, median size " << median_size << ", " << m_txs_by_fee_and_receive_time.size() << " txes in the pool"); - auto sorted_it = m_txs_by_fee_and_receive_time.begin(); -- while (sorted_it != m_txs_by_fee_and_receive_time.end()) -+ while (sorted_it != m_txs_by_fee_and_receive_time.end() && (bl.tx_hashes.size() < 120)) - { - auto tx_it = m_transactions.find(sorted_it->second); - LOG_PRINT_L2("Considering " << tx_it->first << ", size " << tx_it->second.blob_size << ", current block size " << total_size << "/" << max_total_size << ", current coinbase " << print_money(best_coinbase)); -diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl -index 73e4fa7..0e9e65a 100644 ---- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl -+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl -@@ -1108,7 +1108,7 @@ namespace cryptonote - { - if (peer_id && exclude_context.m_connection_id != context.m_connection_id) - { -- if(m_core.get_testnet() && (support_flags & P2P_SUPPORT_FLAG_FLUFFY_BLOCKS)) -+ if(support_flags & P2P_SUPPORT_FLAG_FLUFFY_BLOCKS) - { - MDEBUG("PEER SUPPORTS FLUFFY BLOCKS - RELAYING THIN/COMPACT WHATEVER BLOCK"); - fluffyConnections.push_back(context.m_connection_id); diff --git a/deployment/leaf.bash b/deployment/leaf.bash index 148fcf4..23a7462 100644 --- a/deployment/leaf.bash +++ b/deployment/leaf.bash @@ -25,8 +25,8 @@ sudo systemctl enable ntp cd /usr/local/src sudo git clone https://github.com/monero-project/monero.git cd monero -sudo git checkout v0.10.2 -sudo make -j 4 +sudo git checkout 1e7f783f6901dc46e90da13926c725d477f4f443 +sudo make -j$(nproc) sudo cp ~/nodejs-pool/deployment/monero.service /lib/systemd/system/ sudo useradd -m monerodaemon -d /home/monerodaemon wget -O /tmp/blockchain.raw https://downloads.getmonero.org/blockchain.raw