From cd555d0096f27113332b467d226527c5afb5a136 Mon Sep 17 00:00:00 2001 From: sponnet Date: Tue, 12 Dec 2023 14:55:35 +0100 Subject: [PATCH 1/2] updated default config file --- build/files/config.json | 332 ++++++++++++++++++++++++++-------------- dappnode_package.json | 2 +- docker-compose.yml | 2 +- 3 files changed, 219 insertions(+), 117 deletions(-) diff --git a/build/files/config.json b/build/files/config.json index 47a68b0..e75e2e9 100644 --- a/build/files/config.json +++ b/build/files/config.json @@ -4,128 +4,230 @@ "validator_key_file": "validator_key.json", "node_key_file": "node_key.json", "rpc": { - "addr": "0.0.0.0:3030", - "cors_allowed_origins": [ - "*" - ], - "polling_config": { - "polling_interval": { - "secs": 0, - "nanos": 500000000 - }, - "polling_timeout": { - "secs": 10, - "nanos": 0 - } - }, - "limits_config": { - "json_payload_max_size": 10485760 + "addr": "0.0.0.0:3030", + "prometheus_addr": null, + "cors_allowed_origins": [ + "*" + ], + "polling_config": { + "polling_interval": { + "secs": 0, + "nanos": 500000000 + }, + "polling_timeout": { + "secs": 10, + "nanos": 0 } + }, + "limits_config": { + "json_payload_max_size": 10485760 + }, + "enable_debug_rpc": false, + "experimental_debug_pages_src_path": null }, "telemetry": { - "endpoints": [ - "https://explorer.mainnet.near.org/api/nodes" - ] + "endpoints": [ + "https://explorer.mainnet.near.org/api/nodes" + ], + "reporting_interval": { + "secs": 10, + "nanos": 0 + } }, "network": { - "addr": "0.0.0.0:24567", - "external_address": "", - "boot_nodes": "ed25519:86EtEy7epneKyrcJwSWP7zsisTkfDRH5CFVszt4qiQYw@35.195.32.249:24567,ed25519:BFB78VTDBBfCY4jCP99zWxhXUcFAZqR22oSx2KEr8UM1@35.229.222.235:24567,ed25519:Cw1YyiX9cybvz3yZcbYdG7oDV6D7Eihdfc8eM1e1KKoh@35.195.27.104:24567,ed25519:33g3PZRdDvzdRpRpFRZLyscJdbMxUA3j3Rf2ktSYwwF8@34.94.132.112:24567,ed25519:CDQFcD9bHUWdc31rDfRi4ZrJczxg8derCzybcac142tK@35.196.209.192:24567", - "max_num_peers": 40, - "minimum_outbound_peers": 5, - "ideal_connections_lo": 30, - "ideal_connections_hi": 35, - "peer_recent_time_window": { - "secs": 600, - "nanos": 0 - }, - "safe_set_size": 20, - "handshake_timeout": { - "secs": 20, - "nanos": 0 - }, - "reconnect_delay": { - "secs": 60, - "nanos": 0 - }, - "skip_sync_wait": false, - "ban_window": { - "secs": 10800, - "nanos": 0 - }, - "blacklist": [], - "ttl_account_id_router": { - "secs": 3600, - "nanos": 0 - }, - "peer_stats_period": { - "secs": 5, - "nanos": 0 - } + "addr": "0.0.0.0:24567", + "boot_nodes": "ed25519:86EtEy7epneKyrcJwSWP7zsisTkfDRH5CFVszt4qiQYw@35.195.32.249:24567,ed25519:BFB78VTDBBfCY4jCP99zWxhXUcFAZqR22oSx2KEr8UM1@35.229.222.235:24567,ed25519:Cw1YyiX9cybvz3yZcbYdG7oDV6D7Eihdfc8eM1e1KKoh@35.195.27.104:24567,ed25519:33g3PZRdDvzdRpRpFRZLyscJdbMxUA3j3Rf2ktSYwwF8@34.94.132.112:24567,ed25519:CDQFcD9bHUWdc31rDfRi4ZrJczxg8derCzybcac142tK@35.196.209.192:24567", + "whitelist_nodes": "", + "max_num_peers": 300, + "minimum_outbound_peers": 5, + "ideal_connections_lo": 100, + "ideal_connections_hi": 190, + "peer_recent_time_window": { + "secs": 600, + "nanos": 0 + }, + "safe_set_size": 20, + "archival_peer_connections_lower_bound": 10, + "handshake_timeout": { + "secs": 20, + "nanos": 0 + }, + "skip_sync_wait": false, + "ban_window": { + "secs": 10800, + "nanos": 0 + }, + "blacklist": [], + "ttl_account_id_router": { + "secs": 3600, + "nanos": 0 + }, + "peer_stats_period": { + "secs": 5, + "nanos": 0 + }, + "monitor_peers_max_period": { + "secs": 60, + "nanos": 0 + }, + "peer_states_cache_size": 1000, + "peer_expiration_duration": { + "secs": 604800, + "nanos": 0 + }, + "public_addrs": [], + "allow_private_ip_in_public_addrs": false, + "trusted_stun_servers": [ + "stun.l.google.com:19302", + "stun1.l.google.com:19302", + "stun2.l.google.com:19302", + "stun3.l.google.com:19302", + "stun4.l.google.com:19302" + ], + "experimental": { + "inbound_disabled": false, + "connect_only_to_boot_nodes": false, + "skip_sending_tombstones_seconds": 0, + "tier1_enable_inbound": true, + "tier1_enable_outbound": true, + "tier1_connect_interval": { + "secs": 60, + "nanos": 0 + }, + "tier1_new_connections_per_attempt": 50 + } }, "consensus": { - "min_num_peers": 3, - "block_production_tracking_delay": { - "secs": 0, - "nanos": 100000000 - }, - "min_block_production_delay": { - "secs": 1, - "nanos": 300000000 - }, - "max_block_production_delay": { - "secs": 3, - "nanos": 0 - }, - "max_block_wait_delay": { - "secs": 6, - "nanos": 0 - }, - "reduce_wait_for_missing_block": { - "secs": 0, - "nanos": 100000000 - }, - "produce_empty_blocks": true, - "block_fetch_horizon": 50, - "state_fetch_horizon": 5, - "block_header_fetch_horizon": 50, - "catchup_step_period": { - "secs": 0, - "nanos": 100000000 - }, - "chunk_request_retry_period": { - "secs": 0, - "nanos": 400000000 - }, - "header_sync_initial_timeout": { - "secs": 10, - "nanos": 0 - }, - "header_sync_progress_timeout": { - "secs": 2, - "nanos": 0 - }, - "header_sync_stall_ban_timeout": { - "secs": 120, - "nanos": 0 - }, - "header_sync_expected_height_per_second": 10, - "sync_check_period": { - "secs": 10, - "nanos": 0 - }, - "sync_step_period": { - "secs": 0, - "nanos": 10000000 - }, - "doomslug_step_period": { - "secs": 0, - "nanos": 100000000 - } + "min_num_peers": 3, + "block_production_tracking_delay": { + "secs": 0, + "nanos": 100000000 + }, + "min_block_production_delay": { + "secs": 1, + "nanos": 300000000 + }, + "max_block_production_delay": { + "secs": 3, + "nanos": 0 + }, + "max_block_wait_delay": { + "secs": 6, + "nanos": 0 + }, + "produce_empty_blocks": true, + "block_fetch_horizon": 50, + "block_header_fetch_horizon": 50, + "catchup_step_period": { + "secs": 0, + "nanos": 100000000 + }, + "chunk_request_retry_period": { + "secs": 0, + "nanos": 400000000 + }, + "header_sync_initial_timeout": { + "secs": 10, + "nanos": 0 + }, + "header_sync_progress_timeout": { + "secs": 2, + "nanos": 0 + }, + "header_sync_stall_ban_timeout": { + "secs": 120, + "nanos": 0 + }, + "state_sync_timeout": { + "secs": 60, + "nanos": 0 + }, + "header_sync_expected_height_per_second": 10, + "sync_check_period": { + "secs": 10, + "nanos": 0 + }, + "sync_step_period": { + "secs": 0, + "nanos": 10000000 + }, + "doomslug_step_period": { + "secs": 0, + "nanos": 100000000 + }, + "sync_height_threshold": 1 }, "tracked_accounts": [], - "tracked_shards": [0], - "archive": false, + "tracked_shards": [ + 0 + ], + "log_summary_style": "colored", + "log_summary_period": { + "secs": 10, + "nanos": 0 + }, + "enable_multiline_logging": false, "gc_blocks_limit": 2, - "view_client_threads": 4 -} + "gc_fork_clean_step": 100, + "gc_num_epochs_to_keep": 5, + "view_client_threads": 4, + "epoch_sync_enabled": false, + "view_client_throttle_period": { + "secs": 30, + "nanos": 0 + }, + "trie_viewer_state_size_limit": 50000, + "store": { + "path": null, + "enable_statistics": false, + "enable_statistics_export": true, + "max_open_files": 10000, + "col_state_cache_size": 3221225472, + "block_size": 16384, + "trie_cache": { + "default_max_bytes": 50000000, + "per_shard_max_bytes": { + "s3.v1": 3000000000 + }, + "shard_cache_deletions_queue_capacity": 100000 + }, + "view_trie_cache": { + "default_max_bytes": 50000000, + "per_shard_max_bytes": {}, + "shard_cache_deletions_queue_capacity": 100000 + }, + "enable_receipt_prefetching": true, + "sweat_prefetch_receivers": [ + "token.sweat", + "vfinal.token.sweat.testnet" + ], + "sweat_prefetch_senders": [ + "oracle.sweat", + "sweat_the_oracle.testnet" + ], + "background_migration_threads": 8, + "flat_storage_creation_enabled": true, + "flat_storage_creation_period": { + "secs": 1, + "nanos": 0 + }, + "state_snapshot_enabled": false, + "state_snapshot_compaction_enabled": false + }, + "state_sync_enabled": true, + "state_sync": { + "sync": { + "ExternalStorage": { + "location": { + "GCS": { + "bucket": "state-parts" + } + }, + "num_concurrent_requests": 25, + "num_concurrent_requests_during_catchup": 5 + } + } + }, + "transaction_pool_size_limit": 100000, + "s3_credentials_file": null + } \ No newline at end of file diff --git a/dappnode_package.json b/dappnode_package.json index f8f997c..410955d 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,6 +1,6 @@ { "name": "nearbp.avado.dnp.dappnode.eth", - "version": "0.0.33", + "version": "0.0.34", "upstream": "1.36.0", "description": "Near Validator (mainnet)", "autoupdate": true, diff --git a/docker-compose.yml b/docker-compose.yml index 267773c..6bfa38c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.4' services: nearbp.avado.dnp.dappnode.eth: build: ./build - image: 'nearbp.avado.dnp.dappnode.eth:0.0.33' + image: 'nearbp.avado.dnp.dappnode.eth:0.0.34' restart: always volumes: - 'data:/root/.near' From 3e339ff6966844886b436bf9a26382b44e3dde3e Mon Sep 17 00:00:00 2001 From: sponnet Date: Tue, 12 Dec 2023 14:57:10 +0100 Subject: [PATCH 2/2] don't overwrite config if it already exists --- build/files/entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/files/entrypoint.sh b/build/files/entrypoint.sh index 01ecf06..65d944e 100644 --- a/build/files/entrypoint.sh +++ b/build/files/entrypoint.sh @@ -31,10 +31,11 @@ if [ ! -f /root/.near/config.json ]; then cd /root/.near/data /app/s5cmd --no-sign-request=true cp $SNAPSHOT_BUCKET . echo "Download of snapshot complete." -fi -echo "Copying default config to node" -cp /app/config.json.default /root/.near/config.json + echo "Copying default config to node" + cp /app/config.json.default /root/.near/config.json + +fi echo "List items in /root/.near" ls -l /root/.near