@@ -422,12 +422,21 @@ type P2PConfig struct {
422422 // Maximum size of a message packet payload, in bytes
423423 MaxPacketMsgPayloadSize int `mapstructure:"max_packet_msg_payload_size"`
424424
425+ // Maximum num of keys a state sync request ask for
426+ KeysPerRequest int `mapstructure:"keys_per_request"`
427+
425428 // Rate at which packets can be sent, in bytes/second
426429 SendRate int64 `mapstructure:"send_rate"`
427430
428431 // Rate at which packets can be received, in bytes/second
429432 RecvRate int64 `mapstructure:"recv_rate"`
430433
434+ // Interval to send pings
435+ PingInterval time.Duration `mapstructure:"ping_interval"`
436+
437+ // Maximum wait time for pongs
438+ PongTimeout time.Duration `mapstructure:"pong_timeout"`
439+
431440 // Set true to enable the peer-exchange reactor
432441 PexReactor bool `mapstructure:"pex"`
433442
@@ -468,8 +477,11 @@ func DefaultP2PConfig() *P2PConfig {
468477 MaxNumOutboundPeers : 10 ,
469478 FlushThrottleTimeout : 10 * time .Millisecond ,
470479 MaxPacketMsgPayloadSize : 1024 * 1024 , // 1 MB
480+ KeysPerRequest : 2500 , // would be around 250K for account node
471481 SendRate : 50 * 1024 * 1024 , // 50 MB/s
472482 RecvRate : 50 * 1024 * 1024 , // 50 MB/s
483+ PingInterval : 60 * time .Second ,
484+ PongTimeout : 45 * time .Second ,
473485 PexReactor : true ,
474486 SeedMode : false ,
475487 AllowDuplicateIP : false ,
0 commit comments