backfill touchups
This commit is contained in:
@@ -51,9 +51,9 @@ Goerli = Blockchain(5, 'Goerli')
|
||||
Polygon = Blockchain(137, 'Polygon') # POS not zkEVM
|
||||
Mumbai = Blockchain(80001, 'Mumbai')
|
||||
BSC = Blockchain(56, 'BSC')
|
||||
Arbitrum = Blockchain(42161, 'Arbitrum', 3, batch_size=1000) # todo configure batch size... does it depend on log count? :(
|
||||
Arbitrum = Blockchain(42161, 'Arbitrum', 3, batch_size=2000) # todo configure batch size
|
||||
Mock = Blockchain(31337, 'Mock', 3, batch_size=10000)
|
||||
Alpha = Blockchain(1337, 'Dexorder Alpha', 3, batch_size=100)
|
||||
Alpha = Blockchain(1337, 'Dexorder Alpha', 3, batch_size=1000)
|
||||
|
||||
current_chain = ContextVar[Blockchain]('current_chain')
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ from dexorder.database.model import Block
|
||||
from dexorder.database.model.block import current_block, latest_block
|
||||
from dexorder.util import hexstr, topic
|
||||
from dexorder.util.async_util import maywait, Maywaitable
|
||||
from dexorder.util.shutdown import fatal
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -342,10 +343,8 @@ class BlockStateRunner:
|
||||
except ValueError as e:
|
||||
if e.args[0].get('code') == -32602:
|
||||
# too many logs were returned in the batch, so decrease the batch size.
|
||||
batch_size = int(chain.batch_size * 0.9)
|
||||
chain.batch_size = batch_size
|
||||
log.info(f'Decreasing batch size for {chain} to {batch_size}')
|
||||
raise Retry
|
||||
fatal(f'Decrease batch size for {chain}')
|
||||
raise
|
||||
for log_event in log_events:
|
||||
try:
|
||||
parsed = event.process_log(log_event) if event is not None else log_event
|
||||
|
||||
Reference in New Issue
Block a user