feat(chain_sync): add retry logic with exponential backoff for RPC connections and block imports
- Add retry mechanism with exponential backoff for block broadcast loop - Implement max 5 retries with 2s base delay for RPC connection failures - Reset retry count on successful connection - Add 20s wait period after max retries before resetting counter - Add retry logic for block import with 3 attempts and 1s base delay - Handle non-200 HTTP responses as exceptions to trigger retries - Improve error logging
This commit is contained in:
@@ -36,6 +36,9 @@ class ChainSettings(BaseSettings):
|
||||
|
||||
block_time_seconds: int = 2
|
||||
|
||||
# Block production toggle (set false on followers)
|
||||
enable_block_production: bool = True
|
||||
|
||||
# Block production limits
|
||||
max_block_size_bytes: int = 1_000_000 # 1 MB
|
||||
max_txs_per_block: int = 500
|
||||
|
||||
Reference in New Issue
Block a user