celestiaorg / celestia-node

Celestia Data Availability Nodes
Apache License 2.0
932 stars 926 forks source link

share: Define reasonable timeout for `SharesAvailable` for `full` and `light` #10

Closed Wondertan closed 1 year ago

Wondertan commented 3 years ago

Background

To validate a block's availability, we need to randomly sample some of its parts by requesting them from the network. Network requests must have a timeout not to wait for a response infinitely. Also, the nature of the IPFS software does not specify any timeout for data requests for its users, thus not to wait endlessly, we have to specify an adequate limit for sample response time.

Current state

I defined a random timeout for the request in 1 min that is not backed up by any rationale.

Proposed solution

I am not entirely about the proper way for finding ideal timings here, but I think we need to bench medium, numbers over a real-world environment and add on top slightly more additional time for inaccuracies.

liamsi commented 3 years ago

This is also related to https://github.com/lazyledger/lazyledger-core/issues/87 as DA validation will be done by some validators to decide on a block proposal.

Bidon15 commented 2 years ago

Relies on share-exchange protocol Reasonable timeout should be defined properly after we get the telemetry data to analyse and decide

Still relevant post-mainnet status of 12/07/2022