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

Fix hanging CI #1715

Merged
merged 2 commits into from
Oct 23, 2024
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
2 changes: 1 addition & 1 deletion src/agent0/hyperfuzz/system_fuzz/invariant_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def _check_lp_share_price(
loop_counter = 0
while True:
if loop_counter > 24:
logging.warning("Check block number has not been mined in a reasonable amount of time")
raise AssertionError("Check block number has not been mined in a reasonable amount of time")
curr_block = interface.get_block_number(interface.get_current_block())
if curr_block < check_block_number:
loop_counter += 1
Expand Down
7 changes: 5 additions & 2 deletions src/agent0/hyperfuzz/system_fuzz/run_fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ def run_fuzz_bots(

trades.append(agent_trade)

# Check invariance on every iteration
if check_invariance:
# Check invariance on every iteration if we're not doing lp_share_price_test.
# Only check invariance if a trade was executed for lp_share_price_test.
# This is because the lp_share_price_test requires a trade to be executed
# in order to mine a block, as it waits for the pending block to be mined.
if check_invariance and (not lp_share_price_test or (lp_share_price_test and len(agent_trade) > 0)):
latest_block = pool.interface.get_block("latest")
latest_block_number = latest_block.get("number", None)
if latest_block_number is None:
Expand Down
Loading