commit 270a35badada9b7fccfeb5c342849d18c9c54411
parent a66bb4e12d092650f89a6c130a531d7a6bd120e7
Author: lash <dev@holbrook.no>
Date: Sun, 6 Aug 2023 14:10:59 +0100
Implement RPC batch limit
Diffstat:
5 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,5 @@
+- 0.8.0
+ * Implement RPC batch limits for syncer
- 0.7.6
* Make rpc dialect work with chain interface
- 0.7.5
diff --git a/eth_monitor/chain.py b/eth_monitor/chain.py
@@ -12,7 +12,8 @@ from chainlib.eth.tx import (
class EthChainInterface(ChainInterface):
- def __init__(self, dialect_filter=None):
+ def __init__(self, dialect_filter=None, batch_limit=1):
+ self.batch_limit = batch_limit
self._block_latest = block_latest
self._block_by_number = block_by_number
self._block_from_src = Block.from_src
diff --git a/eth_monitor/settings.py b/eth_monitor/settings.py
@@ -364,7 +364,7 @@ def process_sync_interface(settings, config):
def process_sync(settings, config):
dialect_filter = settings.get('RPC_DIALECT_FILTER')
- settings.set('SYNCER_INTERFACE', EthChainInterface(dialect_filter=dialect_filter))
+ settings.set('SYNCER_INTERFACE', EthChainInterface(dialect_filter=dialect_filter, batch_limit=settings.get('RPC_BATCH_LIMIT')))
settings = process_sync_range(settings, config)
return settings
#def process_sync(settings, config):
diff --git a/requirements.txt b/requirements.txt
@@ -1,6 +1,6 @@
-chainlib-eth~=0.4.17
-chainlib~=0.4.15
-chainsyncer~=0.7.0
+chainlib-eth~=0.5.0
+chainlib~=0.5.0
+chainsyncer~=0.8.0
leveldir~=0.3.0
-eth-cache~=0.2.0
+eth-cache~=0.3.0
confini~=0.6.3
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-monitor
-version = 0.7.6
+version = 0.8.0
description = Monitor and cache transactions using match filters
author = Louis Holbrook
author_email = dev@holbrook.no
@@ -26,7 +26,7 @@ licence_files =
[options]
include_package_data = True
-python_requires = >=3.7
+python_requires = >=3.8
packages =
eth_monitor
eth_monitor.importers