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

Use NodeID2 in map hasher #2401

Merged
merged 1 commit into from
Mar 15, 2021
Merged

Conversation

pav-kv
Copy link
Contributor

@pav-kv pav-kv commented Mar 12, 2021

MapHasher is the penultimate user of the NodeID type, which is being
removed soon. Since the maps are deprecated/experimental, we are free to
change the hasher interface to use a better NodeID2 type.

Part of #2378.

@pav-kv pav-kv requested review from pphaneuf and mhutchinson March 12, 2021 23:11
@pav-kv pav-kv requested a review from a team as a code owner March 12, 2021 23:11
@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #2401 (592f4f6) into master (74e8305) will increase coverage by 0.03%.
The diff coverage is 61.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2401      +/-   ##
==========================================
+ Coverage   65.56%   65.60%   +0.03%     
==========================================
  Files         106      106              
  Lines        7702     7696       -6     
==========================================
- Hits         5050     5049       -1     
+ Misses       2120     2116       -4     
+ Partials      532      531       -1     
Impacted Files Coverage Δ
merkle/maphasher/maphasher.go 71.87% <33.33%> (+3.12%) ⬆️
merkle/coniks/hasher/coniks.go 82.35% <69.23%> (+3.10%) ⬆️
experimental/batchmap/tmap.go 77.96% <100.00%> (-0.37%) ⬇️
merkle/smt/hasher.go 100.00% <100.00%> (ø)
log/operation_manager.go 88.35% <0.00%> (+1.05%) ⬆️

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 74e8305...592f4f6. Read the comment docs.

Copy link
Contributor

@mhutchinson mhutchinson left a comment

Choose a reason for hiding this comment

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

Cool. This does shine a light on github.com/google/trillian/storage/tree being a weird package; storage doesn't feel like something that should be on the API for clients to be leaning on.

My other concern with this is that this will need importing into trillian-examples and seeing what delta it causes for the maps there. However, that isn't going to happen until the pending update (google/trillian-examples#257) is applied, so I guess this will fall on me to maintain.

@pav-kv
Copy link
Contributor Author

pav-kv commented Mar 15, 2021

storage/tree needs decomposing into merkle (the core/algorithm bits), and storage-specific things. I will do this as part of this same refactoring. Previously some bits were moved here to avoid circular dependencies.

@pav-kv pav-kv merged commit 88f457e into google:master Mar 15, 2021
@pav-kv pav-kv deleted the map_hasher_use_nodeid2 branch March 15, 2021 10:54
mhutchinson added a commit to mhutchinson/trillian-examples that referenced this pull request Mar 15, 2021
This includes google/trillian#2401 which changes the usage of NodeID2, and thus requires some changes to the examples here to stay in sync.
mhutchinson added a commit to google/trillian-examples that referenced this pull request Mar 15, 2021
This includes google/trillian#2401 which changes the usage of NodeID2, and thus requires some changes to the examples here to stay in sync.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants