Closed vgonkivs closed 3 months ago
Can I work on this issue @vgonkivs? Also, in case a value isn't provided, do we take 2s as the default value?
Hey, @AryanGodara. Yes, sure you can take it. Thank you 🙂. Yes, the default value for maxAwaitingTime should be 2 seconds.
Hey, @AryanGodara. Yes, sure you can take it. Thank you 🙂. Yes, the default value for maxAwaitingTime should be 2 seconds.
Thanks @vgonkivs :D I'll be pushing a PR for this shortly!
Making a comment here, and this is a broader comment about configuration options in celestia-node / go-header:
Not everything deserves to be a configurable parameter. IMO, it's not worth the additional code to allow something as granular as a context timeout on a head request inside the syncer to be configurable. We should set a good constant and keep to it, and if it proves ineffective, then we bump it or try to figure out why requests are taking so long.
We should be a bit more picky about what deserves configurability vs what we can just hardcode. It is unlikely anyone external to the development team will try to configure this param.
Closing as unplanned
Agreed. @AryanGodara, I suggest looking at https://github.com/celestiaorg/go-header/issues/149 instead
We should add additional field to the syncer config struct - maxAwaitingTime that specifies max time for processing
Head
request in case we are getting it from the network. This field should be configurable on the startup.