diff --git a/.gitignore b/.gitignore index c9df1c7..4fe13c8 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,4 @@ test/ /*.crt /*.key /test-cert-gen +/pkg/config/config.yml diff --git a/pkg/config/config.go b/pkg/config/config.go index ea914bb..1f0bd23 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -22,8 +22,8 @@ type ChiaConfig struct { OutboundRateLimitPercent uint8 `yaml:"outbound_rate_limit_percent"` NetworkOverrides *NetworkOverrides `yaml:"network_overrides"` SelectedNetwork *string `yaml:"selected_network"` - AlertsURL string `yaml:"ALERTS_URL"` - ChiaAlertsPubkey string `yaml:"CHIA_ALERTS_PUBKEY"` + AlertsURL string `yaml:"ALERTS_URL,omitempty"` + ChiaAlertsPubkey string `yaml:"CHIA_ALERTS_PUBKEY,omitempty"` PrivateSSLCA CAConfig `yaml:"private_ssl_ca"` ChiaSSLCA CAConfig `yaml:"chia_ssl_ca"` DaemonSSL SSLConfig `yaml:"daemon_ssl"` @@ -40,12 +40,16 @@ type ChiaConfig struct { Wallet WalletConfig `yaml:"wallet"` DataLayer DataLayerConfig `yaml:"data_layer"` Simulator SimulatorConfig `yaml:"simulator"` + // Simulator Fork Settings + HardForkHeight uint32 `yaml:"HARD_FORK_HEIGHT"` + SoftFork4Height uint32 `yaml:"SOFT_FORK4_HEIGHT"` + SoftFork5Height uint32 `yaml:"SOFT_FORK5_HEIGHT"` } // PortConfig common port settings found in many sections of the config type PortConfig struct { Port uint16 `yaml:"port,omitempty"` - RPCPort uint16 `yaml:"rpc_port"` + RPCPort uint16 `yaml:"rpc_port,omitempty"` } // CAConfig config keys for CA @@ -56,10 +60,10 @@ type CAConfig struct { // SSLConfig common ssl settings found in many sections of the config type SSLConfig struct { - PrivateCRT string `yaml:"private_crt"` - PrivateKey string `yaml:"private_key"` - PublicCRT string `yaml:"public_crt"` - PublicKey string `yaml:"public_key"` + PrivateCRT string `yaml:"private_crt,omitempty"` + PrivateKey string `yaml:"private_key,omitempty"` + PublicCRT string `yaml:"public_crt,omitempty"` + PublicKey string `yaml:"public_key,omitempty"` } // Peer is a host/port for a peer @@ -110,7 +114,7 @@ type NetworkConstants struct { // NetworkConfig specific network configuration settings type NetworkConfig struct { AddressPrefix string `yaml:"address_prefix"` - DefaultFullNodePort uint16 `yaml:"default_full_node_port"` + DefaultFullNodePort uint16 `yaml:"default_full_node_port,omitempty"` } // LoggingConfig configuration settings for the logger @@ -171,6 +175,7 @@ type SeederSOA struct { type CrawlerConfig struct { StartRPCServer bool `yaml:"start_rpc_server"` PortConfig `yaml:",inline"` + PrunePeerDays uint32 `yaml:"prune_peer_days"` SSL SSLConfig `yaml:"ssl"` } @@ -398,6 +403,7 @@ type DataLayerConfig struct { DatabasePath string `yaml:"database_path"` ServerFilesLocation string `yaml:"server_files_location"` ClientTimeout uint16 `yaml:"client_timeout"` + ConnectTimeout uint16 `yaml:"connect_timeout"` ProxyURL string `yaml:"proxy_url,omitempty"` HostIP string `yaml:"host_ip"` HostPort uint16 `yaml:"host_port"` diff --git a/pkg/config/initial-config.yml b/pkg/config/initial-config.yml index 4c4eadc..0bd84e2 100644 --- a/pkg/config/initial-config.yml +++ b/pkg/config/initial-config.yml @@ -1,5 +1,5 @@ -# This is the default chia config as of 2.4.0 -# https://github.com/Chia-Network/chia-blockchain/blob/2.4.0/chia/util/initial-config.yaml +# This is the default chia config as of 2.4.3 +# https://github.com/Chia-Network/chia-blockchain/blob/2.4.3/chia/util/initial-config.yaml min_mainnet_k_size: 32 # Send a ping to all peers after ping_interval seconds @@ -25,69 +25,6 @@ network_overrides: &network_overrides GENESIS_CHALLENGE: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 GENESIS_PRE_FARM_POOL_PUZZLE_HASH: "d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc" GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af" - testnet2: - MIN_PLOT_SIZE: 18 - GENESIS_CHALLENGE: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: "d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc" - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af" - testnet3: - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - GENESIS_CHALLENGE: ca7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015af - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc - MIN_PLOT_SIZE: 18 - MEMPOOL_BLOCK_BUFFER: 10 - testnet4: - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - GENESIS_CHALLENGE: dd7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015af - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc - MIN_PLOT_SIZE: 18 - MEMPOOL_BLOCK_BUFFER: 10 - EPOCH_BLOCKS: 768 - DIFFICULTY_STARTING: 30 - testnet5: - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - GENESIS_CHALLENGE: ee7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015af - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc - MIN_PLOT_SIZE: 18 - MEMPOOL_BLOCK_BUFFER: 10 - EPOCH_BLOCKS: 768 - DIFFICULTY_STARTING: 30 - testnet7: - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - GENESIS_CHALLENGE: 117816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015af - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc - MIN_PLOT_SIZE: 18 - MEMPOOL_BLOCK_BUFFER: 50 - EPOCH_BLOCKS: 768 - DIFFICULTY_STARTING: 30 - testnet10: - AGG_SIG_ME_ADDITIONAL_DATA: ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2 - DIFFICULTY_CONSTANT_FACTOR: 10052721566054 - DIFFICULTY_STARTING: 30 - EPOCH_BLOCKS: 768 - GENESIS_CHALLENGE: ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2 - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc - MEMPOOL_BLOCK_BUFFER: 10 - MIN_PLOT_SIZE: 18 - SOFT_FORK2_HEIGHT: 3000000 - SOFT_FORK4_HEIGHT: 4465000 - # planned 2.0 release is July 26, height 2965036 on testnet - # 1 week later - HARD_FORK_HEIGHT: 2997292 - # November 2023 - HARD_FORK_FIX_HEIGHT: 3426000 - # another 2 weeks later - PLOT_FILTER_128_HEIGHT: 3061804 - # 3 years later - PLOT_FILTER_64_HEIGHT: 8010796 - # 3 years later - PLOT_FILTER_32_HEIGHT: 13056556 testnet11: AGG_SIG_ME_ADDITIONAL_DATA: 37a90eb5185a9c4439a91ddc98bbadce7b4feba060d50116a067de66bf236615 DIFFICULTY_CONSTANT_FACTOR: 10052721566054 @@ -102,12 +39,23 @@ network_overrides: &network_overrides SUB_SLOT_ITERS_STARTING: 67108864 # Forks activated from the beginning on this network HARD_FORK_HEIGHT: 0 - HARD_FORK_FIX_HEIGHT: 0 SOFT_FORK4_HEIGHT: 641500 SOFT_FORK5_HEIGHT: 1340000 PLOT_FILTER_128_HEIGHT: 6029568 PLOT_FILTER_64_HEIGHT: 11075328 PLOT_FILTER_32_HEIGHT: 16121088 + testneta: + AGG_SIG_ME_ADDITIONAL_DATA: b0a306abe27407130586c8e13d06dc057d4538c201dbd36c8f8c481f5e51af5c + DIFFICULTY_CONSTANT_FACTOR: 10052721566054 + DIFFICULTY_STARTING: 30 + EPOCH_BLOCKS: 768 + GENESIS_CHALLENGE: b0a306abe27407130586c8e13d06dc057d4538c201dbd36c8f8c481f5e51af5c + GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 08296fc227decd043aee855741444538e4cc9a31772c4d1a9e6242d1e777e42a + GENESIS_PRE_FARM_POOL_PUZZLE_HASH: 08296fc227decd043aee855741444538e4cc9a31772c4d1a9e6242d1e777e42a + MEMPOOL_BLOCK_BUFFER: 10 + MIN_PLOT_SIZE: 18 + NETWORK_TYPE: 1 + SUB_SLOT_ITERS_STARTING: 67108864 config: mainnet: address_prefix: "xch" @@ -115,27 +63,14 @@ network_overrides: &network_overrides testnet0: address_prefix: "txch" default_full_node_port: 58444 - testnet1: - address_prefix: "txch" - testnet2: - address_prefix: "txch" - testnet3: - address_prefix: "txch" - testnet4: - address_prefix: "txch" - testnet7: - address_prefix: "txch" - default_full_node_port: 58444 - testnet10: + testnet11: address_prefix: "txch" default_full_node_port: 58444 - testnet11: + testneta: address_prefix: "txch" default_full_node_port: 58444 selected_network: &selected_network "mainnet" -ALERTS_URL: https://download.chia.net/notify/mainnet_alert.txt -CHIA_ALERTS_PUBKEY: 89b7fd87cb56e926ecefb879a29aae308be01f31980569f6a75a69d2a9a69daefd71fb778d865f7c50d6c967e3025937 # public ssl ca is included in source code # Private ssl ca is used for trusted connections between machines user owns @@ -198,6 +133,7 @@ seeder: crawler: start_rpc_server: True rpc_port: 8561 + prune_peer_days: 90 # Peers older than this many days will be removed from the crawler database ssl: private_crt: "config/ssl/crawler/private_crawler.crt" private_key: "config/ssl/crawler/private_crawler.key" @@ -681,7 +617,8 @@ data_layer: # The location where the server files will be stored. server_files_location: "data_layer/db/server_files_location_CHALLENGE" # The timeout for the client to download a file from a server - client_timeout: 15 + client_timeout: 45 + connect_timeout: 5 # If you need use a proxy for download data you can use this setting sample # proxy_url: http://localhost:8888 @@ -734,3 +671,8 @@ simulator: # Should we use real time in the simulated chain? # most tests don't need this, however it is pretty important when writing ChiaLisp use_current_time: True + + # Fork Settings + HARD_FORK_HEIGHT: 0 + SOFT_FORK4_HEIGHT: 0 + SOFT_FORK5_HEIGHT: 0