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

Swap to ThreadPoolExecutor and use chia_rs version of validate_clvm_and_signature() #18213

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
454009b
swap to threadpool executor and chia_rs validate_clvm_and_signature
matt-o-how Jun 20, 2024
43c9f25
flake8 and black
matt-o-how Jun 20, 2024
0c2c3ae
isort
matt-o-how Jun 20, 2024
35eb491
remove mp_context
matt-o-how Jul 8, 2024
03318dd
convert TypeError into ValidationError
matt-o-how Jul 8, 2024
7aed44e
increase amount for test of exceed cost limit
matt-o-how Jul 9, 2024
91057d3
change hard coded expected costs
matt-o-how Jul 9, 2024
72fe562
adjust cost so ttest passes
matt-o-how Jul 10, 2024
1c5a4b1
fix fastforward with rust get_npc() call
matt-o-how Jul 16, 2024
110067a
remove unused imports
matt-o-how Jul 17, 2024
a9a7c67
import Err
matt-o-how Jul 18, 2024
f506ac6
swap get_name_puzzle_conditions to get_conditions_from_spendbundle
matt-o-how Jul 29, 2024
af0f8c0
Fix for latest rust version
matt-o-how Aug 7, 2024
91a0f20
fix fastforwards
matt-o-how Aug 9, 2024
9acc339
isort
matt-o-how Aug 9, 2024
d29b162
no longer pass in new_spend_bytes to pre_validate_spendbundle
matt-o-how Aug 21, 2024
44cd65a
fix benchmarks for new pre_validate_spendbundle params
matt-o-how Aug 21, 2024
c8479b1
checks e.args[0] exists before accessing it
matt-o-how Aug 21, 2024
cbb3917
fix truncated comment
matt-o-how Aug 21, 2024
c96017a
lint fixes
matt-o-how Aug 21, 2024
62e7542
return Err.Unknown
matt-o-how Aug 21, 2024
9eb640f
remove multiprocessing_context
matt-o-how Aug 21, 2024
7bbf6a4
remove oversight
matt-o-how Aug 21, 2024
a8e771e
remove initialisation of multiprocessing_context in mempool_manager f…
matt-o-how Aug 21, 2024
7f109bb
remove unused import
matt-o-how Aug 21, 2024
71f3852
Use underscore for test
matt-o-how Aug 21, 2024
7f73e8c
Use underscore for large test int
matt-o-how Aug 21, 2024
a47454f
remove commented out code
matt-o-how Aug 21, 2024
1298416
rename new_sbc for readability
matt-o-how Aug 21, 2024
791bed3
Use more descriptive comment
matt-o-how Aug 22, 2024
fd5692d
remove imprecise check from test
matt-o-how Aug 22, 2024
c53d78b
add temporary work-around for mempool block creation not taking block…
arvidn Aug 26, 2024
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
Prev Previous commit
Next Next commit
checks e.args[0] exists before accessing it
  • Loading branch information
matt-o-how authored and AmineKhaldi committed Sep 4, 2024
commit c8479b1187843c53b95dc21fb60225c0db5ed7bc
7 changes: 5 additions & 2 deletions chia/full_node/mempool_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,11 @@ async def pre_validate_spendbundle(
self.peak.height,
)
except Exception as e: # take returned TypeError and turn into ValidationError class by
error = Err(e.args[0])
raise ValidationError(error)
if len(e.args) > 0:
error = Err(e.args[0])
raise ValidationError(error)
else:
raise ValidationError
finally:
self._worker_queue_size -= 1

Expand Down
7 changes: 6 additions & 1 deletion chia/types/eligible_coin_spends.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,12 @@ async def process_fast_forward_spends(
)
except TypeError as e:
error = Err(e.args[0])
raise ValueError(f"Mempool item became invalid after singleton fast forward with error {error}.")
if len(e.args) > 0:
error = Err(e.args[0])
raise ValueError(f"Mempool item became invalid after singleton fast forward with error {error}.")
else:
raise ValueError(f"Mempool item became invalid after singleton fast forward with an unspecified error.")

# Update bundle_coin_spends using the collected data
for coin_id in replaced_coin_ids:
mempool_item.bundle_coin_spends.pop(coin_id, None)
Expand Down