Skip to content

Commit

Permalink
Patch for "Treat Semaphore._waiters as Zero-Length when None"
Browse files Browse the repository at this point in the history
  • Loading branch information
guydavis committed Aug 27, 2023
1 parent 9eee525 commit bcd85ad
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 15 deletions.
10 changes: 8 additions & 2 deletions scripts/forks/apple_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions scripts/forks/cactus_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand All @@ -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

Expand Down
10 changes: 8 additions & 2 deletions scripts/forks/chinilla_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/forks/littlelambocoin_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/forks/maize_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions scripts/forks/moon_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/forks/one_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/forks/pipscoin_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions scripts/forks/staicoin_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit bcd85ad

Please sign in to comment.