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

Fix stuck post init on no VRF nonce #317

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Fix stuck post init on no VRF nonce #317

merged 1 commit into from
Dec 6, 2024

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Dec 6, 2024

Closes #316

The problem is that the default ComputeBatchSize is just too large for small inits on testnet or fasnat presets. To avoid an initialization that didn't find a VRF nonce to run much longer than it needs to when searching for a nonce outside of the initialization range the actual used ComputeBatchSize is limited to the total size of the initialization. Larger values don't make sense, since a nonce should statistically be found with ~ 99.97% probability during initialization every subsequent batch of the same size as the PoST should have another 99.97% of containing a valid nonce. Failing to find a nonce more than 2x outside of the init range is statistically impossible, so there is no need to have a batch size bigger than the total init size 🙂

@fasmat fasmat requested a review from poszu December 6, 2024 17:04
@fasmat fasmat self-assigned this Dec 6, 2024
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.9%. Comparing base (3cf63ad) to head (582280b).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop    #317   +/-   ##
=======================================
  Coverage     59.8%   59.9%           
=======================================
  Files           30      30           
  Lines         2291    2294    +3     
=======================================
+ Hits          1372    1375    +3     
  Misses         781     781           
  Partials       138     138           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fasmat fasmat merged commit 4d5baa3 into develop Dec 6, 2024
16 checks passed
@fasmat fasmat deleted the fix-316 branch December 6, 2024 17:12
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

Successfully merging this pull request may close these issues.

post initialization gets stuck when no vrf is found
2 participants