From 8fb41eed44e03122555a02126fc2627df67bec9b Mon Sep 17 00:00:00 2001 From: wiz Date: Tue, 10 May 2022 21:52:07 +0900 Subject: [PATCH] [ops] Reduce electrs loop time from 5 seconds to 1 second --- production/install | 1 + production/mempool-config.liquid.json | 2 +- production/mempool-config.liquidtestnet.json | 2 +- production/mempool-config.mainnet.json | 2 +- production/mempool-config.signet.json | 2 +- production/mempool-config.testnet.json | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/production/install b/production/install index 4db418693..0fc9becb6 100755 --- a/production/install +++ b/production/install @@ -1016,6 +1016,7 @@ osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_ELECTRS_HOME} && cargo run --releas echo "[*] Patching Bitcoin Electrs code for FreeBSD" osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_HOME}/.cargo/registry/src/github.com-1ecc6299db9ec823/sysconf-0.3.4\" && patch -p1 < \"${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/freebsd/sysconf.patch\"" osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/new_index/\" && sed -i .bak -e s/Snappy/None/ db.rs && rm db.rs.bak" +osSudo "${BITCOIN_USER}" sh -c "cd \"${BITCOIN_ELECTRS_HOME}/src/bin/\" && sed -i .bak -e s/from_secs(5)/from_secs(1)/ electrs.rs && rm electrs.rs.bak" echo "[*] Building Bitcoin Electrs release binary" osSudo "${BITCOIN_USER}" sh -c "cd ${BITCOIN_ELECTRS_HOME} && cargo run --release --bin electrs -- --version" diff --git a/production/mempool-config.liquid.json b/production/mempool-config.liquid.json index 1d3e30731..70ab56625 100644 --- a/production/mempool-config.liquid.json +++ b/production/mempool-config.liquid.json @@ -6,7 +6,7 @@ "MINED_BLOCKS_CACHE": 144, "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", - "WEBSOCKET_REFRESH_RATE_MS": 2000 + "POLL_RATE_MS": 1000 }, "SYSLOG" : { "MIN_PRIORITY": "debug" diff --git a/production/mempool-config.liquidtestnet.json b/production/mempool-config.liquidtestnet.json index 8805f4045..b3c4dfaaf 100644 --- a/production/mempool-config.liquidtestnet.json +++ b/production/mempool-config.liquidtestnet.json @@ -6,7 +6,7 @@ "MINED_BLOCKS_CACHE": 144, "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", - "WEBSOCKET_REFRESH_RATE_MS": 2000 + "POLL_RATE_MS": 1000 }, "SYSLOG" : { "MIN_PRIORITY": "debug" diff --git a/production/mempool-config.mainnet.json b/production/mempool-config.mainnet.json index f7fd676df..1cfeab20d 100644 --- a/production/mempool-config.mainnet.json +++ b/production/mempool-config.mainnet.json @@ -7,7 +7,7 @@ "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", "CLEAR_PROTECTION_MINUTES": 5, - "POLL_RATE_MS": 2000, + "POLL_RATE_MS": 1000, "INDEXING_BLOCKS_AMOUNT": -1, "USE_SECOND_NODE_FOR_MINFEE": true }, diff --git a/production/mempool-config.signet.json b/production/mempool-config.signet.json index ce0f4f7e0..c1333f45a 100644 --- a/production/mempool-config.signet.json +++ b/production/mempool-config.signet.json @@ -7,7 +7,7 @@ "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", "INDEXING_BLOCKS_AMOUNT": -1, - "POLL_RATE_MS": 2000 + "POLL_RATE_MS": 1000 }, "SYSLOG" : { "MIN_PRIORITY": "debug" diff --git a/production/mempool-config.testnet.json b/production/mempool-config.testnet.json index d4874553a..79190c2de 100644 --- a/production/mempool-config.testnet.json +++ b/production/mempool-config.testnet.json @@ -7,7 +7,7 @@ "SPAWN_CLUSTER_PROCS": 0, "API_URL_PREFIX": "/api/v1/", "INDEXING_BLOCKS_AMOUNT": -1, - "POLL_RATE_MS": 2000 + "POLL_RATE_MS": 1000 }, "SYSLOG" : { "MIN_PRIORITY": "debug"