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

temp: comment out infura mode check so I can debug a bit #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions dank_mids/ENVIRONMENT_VARIABLES.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
# Validate some stuffs

# NOTE: The other modes are (probably) bugging out right now. More investigation needed. For now you use infura mode.
if not OPERATION_MODE.infura:
raise ValueError("Dank mids must be run in infura mode for now")
#if not OPERATION_MODE.infura:
# raise ValueError("Dank mids must be run in infura mode for now")

if OPERATION_MODE.infura:
for process_pool in {MULTICALL_DECODER_PROCESSES, BROWNIE_DECODER_PROCESSES, BROWNIE_ENCODER_PROCESSES}:
Expand Down
2 changes: 2 additions & 0 deletions dank_mids/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def reduce_batch_size(self, num_calls: int) -> None:

def _reduce_chunk_size(self, num_calls: int, chunk_name: Literal["multicall", "jsonrpc"]) -> None:
new_chunk_size = round(num_calls * 0.99) if num_calls >= 100 else num_calls - 1
# TODO: remove this later
logger.info('potential new %s batch size %s', chunk_name, new_chunk_size)
if new_chunk_size < 30:
logger.warning(f"your {chunk_name} batch size is really low, did you have some connection issue earlier? You might want to restart your script. {chunk_name} chunk size will not be further lowered.")
return
Expand Down