-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Give NiPoSTBuilder more time to create the PoST (#4893)
## Motivation Closes #4797 ## Changes Phase 2 of the BuildNiPoST step in publishing an ATX is restricted with a deadline of `nextPoetRoundStart`. This deadline doesn't need to be this strict. This PR adapts deadlines to the following: - Phase 0 (submitting challenge to PoET): timeout `poetRoundStart` - unchanged - Phase 1 (fetching proof from PoET): before the deadline was the end of the round round it submitted to + a grace period of 1 hour; this effectively means there is only a 1 hour window to fetch the proof from PoET before the node gives up. Now instead it will fetch with a deadline until the end of the next PoET round. This means that if the node doesn't manage to publish its ATX before next PoET round starts, it won't be able to publish one next epoch (unchanged) but will still try to publish one for the current epoch, even if its late. It will still miss at most 1 epoch (when its late). - Phase 2 (publishing the ATX): before timeout was `nextPoetRoundStart`, with the intention to publish the ATX and have enough time left to register for the next PoET round. This is a very short window (just the time between the end of one PoET round and the start of the next one). If the node doesn't manage to generate a PoST proof within that time it gives up on publishing an ATX and misses out on rewards it could get by instead giving up on registering on the next PoET round. This gives the last phase ~ 2 weeks of time instead of just a few hours, but if the node takes longer than `nextPoetRoundStart` it will not be able to submit a challenge for the next PoET round in time. This is because the new challenge contains the ID of the ATX that is being built right now. In that case the node will skip publishing an ATX for one epoch. ## Test Plan existing tests pass or have been adapted ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed ## DevOps Notes <!-- Please uncheck these items as applicable to make DevOps aware of changes that may affect releases --> - [x] This PR does not require configuration changes (e.g., environment variables, GitHub secrets, VM resources) - [x] This PR does not affect public APIs - [x] This PR does not rely on a new version of external services (PoET, elasticsearch, etc.) - [x] This PR does not make changes to log messages (which monitoring infrastructure may rely on)
- Loading branch information
Showing
3 changed files
with
74 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters