-
Notifications
You must be signed in to change notification settings - Fork 29
feat(consensus): Use DAG of funds to set first_block #852
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
Conversation
ffb6b3c
to
73daf24
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #852 +/- ##
==========================================
- Coverage 84.89% 84.89% -0.01%
==========================================
Files 322 323 +1
Lines 24970 24984 +14
Branches 3833 3834 +1
==========================================
+ Hits 21199 21210 +11
Misses 3034 3034
- Partials 737 740 +3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems correct, but it still needs a migration to fix metadata already in storage.
73daf24
to
bc642ea
Compare
|
Branch | feat/consensus-first-block-dag-funds |
Testbed | ubuntu-22.04 |
Click to view all benchmark results
Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Lower Boundary nanoseconds (ns) (Limit %) | Upper Boundary nanoseconds (ns) (Limit %) |
---|---|---|---|---|
sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 101,372,999,750.68 (-0.37%) | 91,578,261,343.89 (90.34%) | 111,928,986,086.97 (90.57%) |
bc642ea
to
ecc04bc
Compare
I've included a dummy impossible migration to help anyone running on |
ecc04bc
to
31b5e82
Compare
2b85c10
to
345253e
Compare
203b2ba
to
3a38194
Compare
Co-authored-by: Jan Segre <[email protected]>
345253e
to
9822bdb
Compare
Format:
In total 205 transactions will have their This is everything that changes in the mainnet up to block No changes in almost the last 1M blocks. All the changes reduce the height, as expected. Some reduce by almost 1K block, they seem to be grouped, those seem like exceptional cases. The consensus itself is not affected, as expected. The most one can observe with this change is an increase in the confirmed block count of said transactions, but since they have been confirmed for more than 1M blocks, this has no practical effect. However some databases that keep track of the |
Motivation
When setting the metadata
first_block
, the consensus algorithm currently traverses only the DAG of verifications (i.e., the parents). This PR changes this behavior and begin to traverse the DAG of funds as well (i.e., the inputs).Acceptance Criteria
first_block
in theBlockConsensusAlgorithm
.first_block
in theBlockConsensusAlgorithm
.Checklist
master
, confirm this code is production-ready and can be included in future releases as soon as it gets merged