Skip to content

Commit

Permalink
fix: increase arbi transactions batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Sep 5, 2023
1 parent 4d4b0df commit 979481b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/exporters/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
from yearn.exceptions import BatchSizeError
from yearn.outputs.postgres.utils import (cache_address, cache_chain,
cache_token, last_recorded_block)
from yearn.prices.incidents import INCIDENTS
from yearn.prices.magic import _get_price
from yearn.typing import Block
from yearn.yearn import Yearn


sentry_sdk.set_tag('script','transactions_exporter')

warnings.simplefilter("ignore", BrownieEnvironmentWarning)
Expand All @@ -39,7 +37,7 @@
Network.Mainnet: 5_000,
Network.Fantom: 100_000,
Network.Gnosis: 2_000_000,
Network.Arbitrum: 1_000_000,
Network.Arbitrum: 1_500_000,
Network.Optimism: 4_000_000,
}[chain.id]

Expand Down Expand Up @@ -99,7 +97,7 @@ def process_and_cache_user_txs(last_saved_block=None):
value_usd = usd,
gas_used = row.gas_used,
gas_price = row.gas_price
)
)
if start_block == end_block:
logger.info(f'{len(df)} user txs exported to postrges [block {start_block}]')
else:
Expand Down Expand Up @@ -175,4 +173,4 @@ def _check_for_infinite_loop(cached_thru: Optional[Block], cached_thru_from_last
return
if cached_thru and cached_thru > chain.height - BATCH_SIZE:
return
raise BatchSizeError(f'Stuck in infinite loop, increase transactions exporter batch size for {Network(chain.id).name}.')
raise BatchSizeError(f'Stuck in infinite loop, increase transactions exporter batch size for {Network.name()}.')

0 comments on commit 979481b

Please sign in to comment.