-
Notifications
You must be signed in to change notification settings - Fork 107
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
merge-queue: embarking main (d2e58df), #3401 and #3492 together #3514
Closed
Conversation
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
Co-authored-by: teor <teor@riseup.net>
#3408) * Fix some outdated TODO comments * refactor(coinbase expiry): Simplify the code so consensus rule is clear * Fix the formatting of an error message * Remove a redundant comment Co-authored-by: Marek <mail@marek.onl> Co-authored-by: Marek <mail@marek.onl>
The documentation was exactly the same as the documentation from the trait.
Simulate a block being added to the chain with a random block time based on the previous block time and the target spacing time.
Store the block time so that it's ready for a future chain that allows obtaining the chain tip's block time.
Allow obtaining the bes chain tip's block time.
Prevent any data races by returning both values so that they refer to the same chain tip.
Returns all the target spacings defined for a network.
Isolate the code to calculate the height estimation in a new type, so that it's easier to understand and doesn't decrease the readability of the `chain_tip.rs` file.
This is more of an extension method than a trait method. It uses the `NetworkChainTipHeightEstimator` to actually perform the estimation, but obtains the initial information from the current best chain tip.
There was an extra closing bracket in the summary line.
Prepare to allow mocking the block time of the best tip as well as the block height.
Add a separate `watch` channel to send the best tip block times from a `MockChainTipSender` to a `MockChainTip`. The `best_tip_height_and_block_time` implementation will only return a value if there's a height and a block time value for the best tip.
Use Euclidean division to force the division result to round down instead of rounding towards zero. This fixes an off-by-one error when estimating a height that is lower than the current height, because the fractionary result was being discarded, and it should have forced the height to go one block back.
Detect situations that might cause the block height estimate to underflow, and return the genesis height instead.
The implementation of `chrono::Duration::num_seconds` adds one to the number of seconds if it's negative. This breaks the division calculation, so it has to be compensated for.
Generate pairs of block heights and check that it's possible to estimate the larger height from the smaller height and a displaced time difference.
Codecov Report
@@ Coverage Diff @@
## main #3514 +/- ##
==========================================
+ Coverage 78.34% 78.72% +0.38%
==========================================
Files 267 274 +7
Lines 31526 32454 +928
==========================================
+ Hits 24698 25550 +852
- Misses 6828 6904 +76 |
The pull request #3492 is mergeable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎉 This combination of pull requests has been checked successfully 🎉
Branch main (d2e58df), #3401 and #3492 are embarked together for merge.
This pull request has been created by Mergify to speculatively check the mergeability of #3492.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.
Required conditions of queue
medium
for merge:check-success=Build (+stable) on ubuntu-latest
check-neutral=Build (+stable) on ubuntu-latest
check-skipped=Build (+stable) on ubuntu-latest
check-success=Build (+stable) zebra-chain w/o features on ubuntu-latest
check-neutral=Build (+stable) zebra-chain w/o features on ubuntu-latest
check-skipped=Build (+stable) zebra-chain w/o features on ubuntu-latest
check-success=Test (+stable) on ubuntu-latest
check-neutral=Test (+stable) on ubuntu-latest
check-skipped=Test (+stable) on ubuntu-latest
check-success=Test (+stable) on macOS-latest
check-neutral=Test (+stable) on macOS-latest
check-skipped=Test (+stable) on macOS-latest
#approved-reviews-by>=1
[🛡 GitHub branch protection]#changes-requested-reviews-by=0
[🛡 GitHub branch protection]check-success=Test (+stable) on ubuntu-latest
check-success=Test (+stable) on macOS-latest
check-success=Test (+stable) on windows-latest
check-success=Coverage (+nightly)
More informations about Mergify merge queue can be found in the documentation.
Mergify commands
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the queue rulesAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com