From bcd85ad5cb9ce2ee4de8ecf655817ce6aa3c9749 Mon Sep 17 00:00:00 2001 From: Guy Davis Date: Sun, 27 Aug 2023 10:10:37 -0600 Subject: [PATCH] Patch for "Treat Semaphore._waiters as Zero-Length when None" --- scripts/forks/apple_install.sh | 10 ++++++++-- scripts/forks/cactus_install.sh | 6 +++--- scripts/forks/chinilla_install.sh | 10 ++++++++-- scripts/forks/littlelambocoin_install.sh | 10 ++++++++-- scripts/forks/maize_install.sh | 10 ++++++++-- scripts/forks/moon_install.sh | 10 ++++++++-- scripts/forks/one_install.sh | 2 +- scripts/forks/pipscoin_install.sh | 2 +- scripts/forks/staicoin_install.sh | 8 ++++++++ 9 files changed, 53 insertions(+), 15 deletions(-) diff --git a/scripts/forks/apple_install.sh b/scripts/forks/apple_install.sh index 1625bca8..9df1a99c 100644 --- a/scripts/forks/apple_install.sh +++ b/scripts/forks/apple_install.sh @@ -16,10 +16,16 @@ else git submodule update --init mozilla-ca git checkout $HASH chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' apple/wallet/wallet_state_manager.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' apple/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' apple/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' apple/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' apple/full_node/full_node_api.py + /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/cactus_install.sh b/scripts/forks/cactus_install.sh index 2ff51286..554e28a0 100644 --- a/scripts/forks/cactus_install.sh +++ b/scripts/forks/cactus_install.sh @@ -4,8 +4,8 @@ # CACTUS_BRANCH=$1 -# On 2023-08-20 -HASH=9144b99fa71baa9ab84c178b0fe0cf539613514f +# On 2023-08-24 +HASH=5e000ae5c26fd5799a025527720559fb2252b1d3 if [ -z ${CACTUS_BRANCH} ]; then echo 'Skipping Cactus install as not requested.' @@ -16,7 +16,7 @@ else git checkout $HASH chmod +x install.sh # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' cactus/wallet/wallet_state_manager.py + sed -i 's/^ self.log.debug($/ self.log.info(/g' cactus/wallet/wallet_state_manager.py /usr/bin/sh ./install.sh diff --git a/scripts/forks/chinilla_install.sh b/scripts/forks/chinilla_install.sh index 4297eed5..76dfe364 100644 --- a/scripts/forks/chinilla_install.sh +++ b/scripts/forks/chinilla_install.sh @@ -16,10 +16,16 @@ else git submodule update --init mozilla-ca git checkout $HASH chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' chinilla/wallet/wallet_state_manager.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' chinilla/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' chinilla/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' chinilla/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' chinilla/full_node/full_node_api.py + /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/littlelambocoin_install.sh b/scripts/forks/littlelambocoin_install.sh index b73bbc82..ccf6490f 100644 --- a/scripts/forks/littlelambocoin_install.sh +++ b/scripts/forks/littlelambocoin_install.sh @@ -16,10 +16,16 @@ else git submodule update --init mozilla-ca git checkout $HASH chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' littlelambocoin/wallet/wallet_state_manager.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' littlelambocoin/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' littlelambocoin/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' littlelambocoin/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' littlelambocoin/full_node/full_node_api.py + /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/maize_install.sh b/scripts/forks/maize_install.sh index 4af7a2ed..81b2b6f1 100644 --- a/scripts/forks/maize_install.sh +++ b/scripts/forks/maize_install.sh @@ -18,10 +18,16 @@ else git checkout $HASH pwd chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' maize/wallet/wallet_state_manager.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' maize/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' maize/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' maize/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' maize/full_node/full_node_api.py + /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/moon_install.sh b/scripts/forks/moon_install.sh index 4e7c1ed5..0c03fae6 100644 --- a/scripts/forks/moon_install.sh +++ b/scripts/forks/moon_install.sh @@ -17,10 +17,16 @@ else git checkout $HASH pwd chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py - # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' moon/wallet/wallet_state_manager.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' moon/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' moon/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' moon/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' moon/full_node/full_node_api.py + /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/one_install.sh b/scripts/forks/one_install.sh index a234b0d6..c6ae9776 100644 --- a/scripts/forks/one_install.sh +++ b/scripts/forks/one_install.sh @@ -18,7 +18,7 @@ else # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' one/wallet/wallet_state_manager.py + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' one/wallet/wallet_state_manager.py /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/pipscoin_install.sh b/scripts/forks/pipscoin_install.sh index 251c6b63..19c494c8 100644 --- a/scripts/forks/pipscoin_install.sh +++ b/scripts/forks/pipscoin_install.sh @@ -19,7 +19,7 @@ else # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py # Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 - sed -e 's/^ self.log.debug($/ self.log.info(/g' pipscoin/wallet/wallet_state_manager.py + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' pipscoin/wallet/wallet_state_manager.py /usr/bin/sh ./install.sh if [ ! -d /chia-blockchain/venv ]; then diff --git a/scripts/forks/staicoin_install.sh b/scripts/forks/staicoin_install.sh index 6d3eea5e..c52488cd 100644 --- a/scripts/forks/staicoin_install.sh +++ b/scripts/forks/staicoin_install.sh @@ -15,8 +15,16 @@ else cd /staicoin-blockchain git submodule update --init mozilla-ca chmod +x install.sh + # 2022-07-20: Python needs 'packaging==21.3' sed -i 's/packaging==21.0/packaging==21.3/g' setup.py + # 2022-06-17: Log "Added Coins" at info, not debug level. See: https://github.com/Chia-Network/chia-blockchain/issues/11955 + sed -i -e 's/^ self.log.debug($/ self.log.info(/g' stai/wallet/wallet_state_manager.py + # 2023-08-27: Python 3.10.8 broke old blockchain syncing. See: https://github.com/Chia-Network/chia-blockchain/pull/13638 + sed -i 's/waiter_count = len(self.full_node.new_peak_sem._waiters)/new_peak_sem = self.full_node.new_peak_sem\n waiter_count = 0 if new_peak_sem._waiters is None else len(new_peak_sem._waiters)/g' stai/full_node/full_node_api.py + sed -i 's/async with self.full_node.new_peak_sem:/async with new_peak_sem:/g' stai/full_node/full_node_api.py + sed -i 's/if len(self.full_node.compact_vdf_sem._waiters) > 20:/compact_vdf_sem = self.full_node.compact_vdf_sem\n waiter_count = 0 if compact_vdf_sem._waiters is None else len(compact_vdf_sem._waiters)\n if waiter_count > 20:/g' stai/full_node/full_node_api.py + /usr/bin/sh ./install.sh arch_name="$(uname -m)"