Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best Attestation Data strategy - exit hard timeout loop immediately upon receiving the first response #297

Open
oleg-ssvlabs opened this issue Feb 11, 2025 · 0 comments

Comments

@oleg-ssvlabs
Copy link

Description
I was reviewing how soft and hard timeouts work in the Best Attestation Data strategy and noticed a potential improvement in the flow.

From my understanding, the current behavior is as follows:

  • When the soft timeout is reached: If at least one response is received, the hard timeout loop will not be entered. This means that the first available response will be returned from the AttestationData() method. This suggests that the application considers a single response sufficient and it is not worth to wait for additional responses(time is the price to pay) that could improve response quality evaluation and selection of the best one.
  • When the soft timeout is reached and no response is received: The application enters the hard timeout loop. However, once the first response is received, the application does not immediately exit the loop. Instead, it continues waiting until the hard timeout is reached or all responses/errors have been collected.

Proposed Improvement
When the application enters the hard timeout loop and at least one response is received, it should immediately exit the loop rather than waiting for all responses/errors or hard timeout. I think it aligns better with the implementation logic.

Please let me know if I understood the flow correctly.
Thank you

@oleg-ssvlabs oleg-ssvlabs changed the title Best Attestation Data strategy - exit hard timeout loop when at least once response received Best Attestation Data strategy - exit hard timeout loop immediately upon receiving the first response” Feb 11, 2025
@oleg-ssvlabs oleg-ssvlabs changed the title Best Attestation Data strategy - exit hard timeout loop immediately upon receiving the first response” Best Attestation Data strategy - exit hard timeout loop immediately upon receiving the first response Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant