-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
74 lines (67 loc) · 1.78 KB
/
config.py
File metadata and controls
74 lines (67 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
"""
Configuration file for Base Blockchain Latency Test
This file contains configuration options for the latency tester.
Modify these values to customize the test behavior.
"""
# Base RPC Endpoints
ENDPOINTS = {
"mainnet": "wss://mainnet.base.org",
"testnet": "wss://goerli.base.org",
"sepolia": "wss://sepolia.base.org",
"local": "ws://localhost:8545"
}
# Default Configuration
DEFAULT_CONFIG = {
"endpoint": ENDPOINTS["mainnet"],
"duration": 300, # 5 minutes in seconds
"max_blocks": None, # None = no limit
"timeout": 1.0, # WebSocket message timeout in seconds
"log_level": "INFO" # DEBUG, INFO, WARNING, ERROR
}
# Test Scenarios
TEST_SCENARIOS = {
"quick": {
"duration": 30,
"description": "Quick 30-second test"
},
"standard": {
"duration": 300,
"description": "Standard 5-minute test"
},
"extended": {
"duration": 1800,
"description": "Extended 30-minute test"
},
"custom": {
"duration": 600,
"max_blocks": 100,
"description": "Custom test with block limit"
}
}
# WebSocket Subscription Parameters
SUBSCRIPTION_CONFIG = {
"new_heads": {
"method": "eth_subscribe",
"params": ["newHeads"]
},
"logs": {
"method": "eth_subscribe",
"params": ["logs", {}]
},
"pending_transactions": {
"method": "eth_subscribe",
"params": ["newPendingTransactions"]
}
}
# Logging Configuration
LOGGING_CONFIG = {
"format": "%(asctime)s - %(levelname)s - %(message)s",
"date_format": "%Y-%m-%d %H:%M:%S"
}
# Output Configuration
OUTPUT_CONFIG = {
"show_detailed_measurements": True,
"show_block_hashes": True,
"show_timestamps": True,
"precision": 2 # Decimal places for latency values
}