feat(consensus): Use DAG of funds to set first_block#852
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:
|
jansegre
left a comment
There was a problem hiding this comment.
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 <jan@hathor.network>
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_blockin theBlockConsensusAlgorithm.first_blockin theBlockConsensusAlgorithm.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged