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

Add --pool-size arg to start command #291

Merged
merged 2 commits into from
Feb 9, 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/commands/create_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@click.option(
'--pool-size',
help='Number of processes in a pool.',
# do not prompt
envvar='POOL_SIZE',
type=int,
)
@click.command(help='Creates the validator keys from the mnemonic.')
Expand Down
8 changes: 8 additions & 0 deletions src/commands/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@
envvar='LOG_LEVEL',
help='The log level.',
)
@click.option(
'--pool-size',
help='Number of processes in a pool.',
envvar='POOL_SIZE',
type=int,
)
@click.command(help='Start operator service')
# pylint: disable-next=too-many-arguments,too-many-locals
def start(
Expand All @@ -223,6 +229,7 @@ def start(
hot_wallet_password_file: str | None,
max_fee_per_gas_gwei: int,
database_dir: str | None,
pool_size: int | None,
) -> None:
vault_config = VaultConfig(vault, Path(data_dir))
if network is None:
Expand Down Expand Up @@ -253,6 +260,7 @@ def start(
database_dir=database_dir,
log_level=log_level,
log_format=log_format,
pool_size=pool_size,
)

try:
Expand Down
5 changes: 2 additions & 3 deletions src/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def set(
database_dir: str | None = None,
log_level: str | None = None,
log_format: str | None = None,
pool_size: int | None = None,
) -> None:
self.vault = Web3.to_checksum_address(vault)
vault_dir.mkdir(parents=True, exist_ok=True)
Expand Down Expand Up @@ -168,9 +169,7 @@ def set(
self.validators_fetch_chunk_size = decouple_config(
'VALIDATORS_FETCH_CHUNK_SIZE', default=100, cast=int
)
self.pool_size = decouple_config(
'POOL_SIZE', default=None, cast=lambda x: int(x) if x else None
)
self.pool_size = pool_size
self.execution_timeout = decouple_config('EXECUTION_TIMEOUT', default=30, cast=int)
self.execution_transaction_timeout = decouple_config(
'EXECUTION_TRANSACTION_TIMEOUT', default=300, cast=int
Expand Down
2 changes: 0 additions & 2 deletions src/exits/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@


class ExitSignatureTask(BaseTask):
keystore: BaseKeystore

def __init__(self, keystore: BaseKeystore):
self.keystore = keystore

Expand Down
3 changes: 0 additions & 3 deletions src/validators/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@


class ValidatorsTask(BaseTask):
keystore: BaseKeystore
deposit_data: DepositData

def __init__(
self,
keystore: BaseKeystore,
Expand Down