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

Adding DAA score #1596

Merged
merged 5 commits into from
Mar 14, 2021
Merged

Adding DAA score #1596

merged 5 commits into from
Mar 14, 2021

Conversation

someone235
Copy link
Collaborator

This is part of #1259


// SerializeUint64 serializes a uint64
func SerializeUint64(value uint64) []byte {
var keyBytes [8]byte
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace the 8 here with uint64Length?

externalapi.DomainHashSize)
}

numHashes := len(hashesBytes) / externalapi.DomainHashSize
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #1596 (2957778) into v0.10.0-dev (3d668cc) will decrease coverage by 0.09%.
The diff coverage is 56.08%.

Impacted file tree graph

@@               Coverage Diff               @@
##           v0.10.0-dev    #1596      +/-   ##
===============================================
- Coverage        60.05%   59.95%   -0.10%     
===============================================
  Files              514      515       +1     
  Lines            20236    20369     +133     
===============================================
+ Hits             12152    12212      +60     
- Misses            6175     6227      +52     
- Partials          1909     1930      +21     
Impacted Files Coverage Δ
domain/consensus/consensus.go 64.62% <ø> (ø)
...ain/consensus/database/binaryserialization/hash.go 23.52% <20.00%> (-76.48%) ⬇️
...us/datastructures/daablocksstore/daablocksstore.go 48.57% <48.57%> (ø)
...ersselectedchainstore/headersselectedchainstore.go 68.22% <50.00%> (-5.57%) ⬇️
...nsensus/processes/difficultymanager/blockwindow.go 82.85% <50.00%> (+0.50%) ⬆️
...n/consensus/database/binaryserialization/common.go 57.14% <57.14%> (ø)
...s/processes/difficultymanager/difficultymanager.go 81.81% <75.75%> (-7.08%) ⬇️
domain/consensus/factory.go 91.07% <100.00%> (+0.13%) ⬆️
...nsensus/processes/blockprocessor/blockprocessor.go 100.00% <100.00%> (ø)
...nsensus/processes/pruningmanager/pruningmanager.go 59.12% <100.00%> (+0.27%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d668cc...2957778. Read the comment docs.

@@ -126,6 +127,7 @@ func (f *factory) NewConsensus(dagParams *dagconfig.Params, db infrastructuredat
headersSelectedTipStore := headersselectedtipstore.New()
finalityStore := finalitystore.New(200, preallocateCaches)
headersSelectedChainStore := headersselectedchainstore.New(pruningWindowSizeForCaches, preallocateCaches)
daaBlocksStore := daablocksstore.New(pruningWindowSizeForCaches, preallocateCaches)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe split the cache size to 2:

  1. DAA score at size: pruningWindowSizeForCaches.
  2. Derge Set for FinalityWindow only.

@someone235 someone235 merged commit ec446ac into v0.10.0-dev Mar 14, 2021
@someone235 someone235 deleted the daa-score branch March 14, 2021 07:44
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.

None yet

2 participants