update config (#56)

* update config

* use evmos testnet binary all the time
This commit is contained in:
Bo QIU 2024-04-16 21:24:50 +08:00 committed by GitHub
parent 052e10cf8b
commit 6ca05090c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 169 additions and 21 deletions

View File

@ -1,37 +1,187 @@
network_dir = "network" # This is a TOML config file.
network_listen_address = "0.0.0.0" # For more information, see https://github.com/toml-lang/toml
#######################################################################
### Network Config Options ###
#######################################################################
# Data directory where node's keyfile is stored.
# network_dir = "network"
# IP address to listen on.
# network_listen_address = "0.0.0.0"
# The address to broadcast to peers about which address we are listening on. Empty indicates
# that no discovery address has been set.
# network_enr_address = "" # network_enr_address = ""
# The tcp port to broadcast to peers in order to reach back for libp2p services.
# network_enr_tcp_port = 1234 # network_enr_tcp_port = 1234
# The udp port to broadcast to peers in order to reach back for discovery.
# network_enr_udp_port = 1234 # network_enr_udp_port = 1234
network_libp2p_port = 1234
network_discovery_port = 1234 # The TCP port that libp2p listens on.
# network_libp2p_port = 1234
# UDP port that discovery listens on.
# network_discovery_port = 1234
# Target number of connected peers.
# network_target_peers = 50
# List of nodes to initially connect to
network_boot_nodes = ["/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmPxGNWu9eVAQPJww79J32pTJLKGcpjRMb4Qb8xxKkyuG1","/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAm93Hd5azfhkGBbkx1zero3nYHvfjQYM2NtiW4R3r5bE2g"] network_boot_nodes = ["/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmPxGNWu9eVAQPJww79J32pTJLKGcpjRMb4Qb8xxKkyuG1","/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAm93Hd5azfhkGBbkx1zero3nYHvfjQYM2NtiW4R3r5bE2g"]
network_libp2p_nodes = []
network_private = false
network_disable_discovery = false
db_dir = "db" # List of libp2p nodes to initially connect to.
# network_libp2p_nodes = []
rpc_enabled = true # Indicates if the user has set the network to be in private mode. Currently this
rpc_listen_address = "0.0.0.0:5678" # prevents sending client identifying information over identify.
# rpc_listen_address_admin = "127.0.0.1:5679" # network_private = false
log_config_file = "log_config" # Disables the discovery protocol from starting.
# network_disable_discovery = false
#######################################################################
### Log Sync Config Options ###
#######################################################################
# RPC endpoint to sync event logs on EVM compatible blockchain.
blockchain_rpc_endpoint = "https://rpc-testnet.0g.ai" blockchain_rpc_endpoint = "https://rpc-testnet.0g.ai"
# Flow contract address to sync event logs.
log_contract_address = "0x22C1CaF8cbb671F220789184fda68BfD7eaA2eE1" log_contract_address = "0x22C1CaF8cbb671F220789184fda68BfD7eaA2eE1"
mine_contract_address = "0x8B9221eE2287aFBb34A7a1Ef72eB00fdD853FFC2"
# Block number to sync event logs from blockchain. Generally, this is
# the block number when flow contract deployed.
log_sync_start_block_number = 512567 log_sync_start_block_number = 512567
# Number of blocks to confirm a transaction.
# confirmation_block_count = 12
# Maximum number of event logs to poll at a time.
log_page_size = 999 log_page_size = 999
# miner_id = "<hex64_without_0x_prefix>" # Maximum data size to cache in memory (by default, 100MB).
# miner_key = "" # max_cache_data_size = 104857600
# TTL to cache data in memory.
# cache_tx_seq_ttl = 500
# The number of retries after a RPC request times out.
# rate_limit_retries = 100
# The nubmer of retries for rate limited responses.
# timeout_retries = 100
# The duration to wait before retry, in ms.
# initial_backoff = 500
# The duration between each paginated getLogs RPC call, in ms.
# This is set to avoid triggering the throttling mechanism in the RPC server.
# recover_query_delay = 50
# The counter assumed the finalized block behind the latest block.
# default_finalized_block_count = 100
# Remove finalized block trigger interval.
# remove_finalized_block_interval_minutes = 30
# Watch_loop (eth_getLogs) trigger interval.
# watch_loop_wait_time_ms = 500
#######################################################################
### RPC Config Options ###
#######################################################################
# Whether to provide RPC service.
# rpc_enabled = true
# HTTP server address to bind for public RPC.
rpc_listen_address = "0.0.0.0:5678"
# HTTP server address to bind for admin and debug RPC.
# rpc_listen_address_admin = "127.0.0.1:5679"
# Maximum data size of RPC request body (by default, 100MB).
# max_request_body_size = 104857600
# Number of chunks for a single segment.
# rpc_chunks_per_segment = 1024
# Maximum file size that allowed to cache in memory (by default, 10MB).
# rpc_max_cache_file_size = 10485760
#######################################################################
### Chunk Pool Config Options ###
#######################################################################
# Maximum number of threads to upload segments of a single file simultaneously.
# chunk_pool_write_window_size = 4
# Maximum data size of cached segment in pool (by default, 4MB).
# chunk_pool_max_cached_chunks_all = 4194304
# Maximum number of threads to upload segments for all files simultaneously.
# chunk_pool_max_writings = 16
# Expiration time to cache uploaded segments in memory.
# chunk_pool_expiration_time_secs = 300
#######################################################################
### DB Config Options ###
#######################################################################
# Directory to store data.
# db_dir = "db"
#######################################################################
### Misc Config Options ###
#######################################################################
# Log configuration file.
# log_config_file = "log_config"
# Log directory.
# log_directory = "log"
#######################################################################
### Mine Config Options ###
#######################################################################
# Mine contract address for incentive.
mine_contract_address = "0x8B9221eE2287aFBb34A7a1Ef72eB00fdD853FFC2"
# Miner ID registered in contract, which is mandatory for incentive.
# The value should be a hex string of length 64 without 0x prefix.
miner_id = ""
# Miner key is used to sign blockchain transaction for incentive.
# The value should be a hex string of length 64 without 0x prefix.
#
# Note, the corresponding address should have enough tokens to pay
# transaction gas fee.
miner_key = ""
#######################################################################
### File Sync Config Options ###
#######################################################################
# [sync] # [sync]
# Enable file sync among peers automatically. When enabled, each node will store
# all files, and sufficient disk space is required.
# auto_sync_enabled = false # auto_sync_enabled = false
# Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8 # max_sync_files = 8
# Timeout to terminate a file sync when automatically sync from other peers.
# If timeout, terminated file sync will be triggered later.
# find_peer_timeout = "30s" # find_peer_timeout = "30s"
# Enable to start a file sync via RPC (e.g. `admin_startSyncFile`).
# sync_file_by_rpc_enabled = true # sync_file_by_rpc_enabled = true
# Enable to start a file sync automatically when a file announcement P2P message received.
# sync_file_on_announcement_enabled = false # sync_file_on_announcement_enabled = false

View File

@ -1 +1 @@
debug debug,hyper=info,h2=info

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from test_framework.blockchain_node import BlockChainNodeType
from test_framework.test_framework import TestFramework from test_framework.test_framework import TestFramework
from config.node_config import MINER_ID, GENESIS_PRIV_KEY from config.node_config import MINER_ID, GENESIS_PRIV_KEY
from utility.submission import create_submission, submit_data from utility.submission import create_submission, submit_data
@ -65,4 +64,4 @@ class MineTest(TestFramework):
if __name__ == "__main__": if __name__ == "__main__":
MineTest(blockchain_node_type=BlockChainNodeType.Evmos).main() MineTest().main()

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from test_framework.blockchain_node import BlockChainNodeType
from test_framework.test_framework import TestFramework from test_framework.test_framework import TestFramework
from config.node_config import MINER_ID, GENESIS_PRIV_KEY from config.node_config import MINER_ID, GENESIS_PRIV_KEY
from utility.submission import create_submission, submit_data from utility.submission import create_submission, submit_data
@ -86,4 +85,4 @@ class MineTest(TestFramework):
if __name__ == "__main__": if __name__ == "__main__":
MineTest(blockchain_node_type=BlockChainNodeType.Evmos).main() MineTest().main()

View File

@ -77,7 +77,7 @@ def run_all(test_dir: str, test_subdirs: list[str]=[], slow_tests: set[str]={},
build_from_github( build_from_github(
dir=tmp_dir, dir=tmp_dir,
binary_name=EVMOS_BINARY, binary_name=EVMOS_BINARY,
github_url="https://github.com/0glabs/0g-evmos.git", github_url="-b testnet https://github.com/0glabs/0g-evmos.git",
build_cmd="make install; cp $(go env GOPATH)/bin/evmosd .", build_cmd="make install; cp $(go env GOPATH)/bin/evmosd .",
compiled_relative_path=[], compiled_relative_path=[],
) )