Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for "Treat Semaphore._waiters as Zero-Length when None" #921

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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