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

add key manager ID check #2501

Merged
merged 1 commit into from
Jan 9, 2020
Merged

Conversation

matevz
Copy link
Member

@matevz matevz commented Dec 23, 2019

PR for #2459:

  • adds a check whether key manager ID of the newly registered runtime points to a valid key manager in the registry.

@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from 325e900 to 760fb08 Compare December 23, 2019 12:33
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

Please avoid loading all runtimes into memory, instead do something like #2464 (e.g., introduce a RuntimeLookup interface which is implemented by ImmutableState).

@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from dbb9fce to a05687e Compare December 24, 2019 12:37
@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from a05687e to eb691fa Compare January 6, 2020 12:14
@matevz matevz changed the title consensus/tendermint/apps: add key manager ID check add key manager ID check Jan 6, 2020
@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch 2 times, most recently from d50676b to 0229df9 Compare January 6, 2020 15:53
@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from af9f9f6 to 499554c Compare January 7, 2020 15:41
@codecov
Copy link

codecov bot commented Jan 7, 2020

Codecov Report

Merging #2501 into master will increase coverage by 0.23%.
The diff coverage is 76.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2501      +/-   ##
==========================================
+ Coverage      67%   67.23%   +0.23%     
==========================================
  Files         328      328              
  Lines       30072    30119      +47     
==========================================
+ Hits        20149    20250     +101     
+ Misses       7399     7367      -32     
+ Partials     2524     2502      -22
Impacted Files Coverage Δ
go/consensus/tendermint/apps/keymanager/genesis.go 63.82% <0%> (ø) ⬆️
go/registry/tests/tester.go 88.12% <100%> (+0.33%) ⬆️
.../consensus/tendermint/apps/registry/state/state.go 80.96% <100%> (+0.13%) ⬆️
...consensus/tendermint/apps/registry/transactions.go 37.63% <100%> (+0.67%) ⬆️
go/consensus/tendermint/apps/registry/genesis.go 61.45% <46.66%> (+0.34%) ⬆️
go/registry/api/api.go 42.51% <55.55%> (+0.41%) ⬆️
go/consensus/tendermint/roothash/roothash.go 63.67% <0%> (-6%) ⬇️
go/oasis-node/cmd/debug/storage/storage.go 42.54% <0%> (-3.32%) ⬇️
go/consensus/tendermint/tendermint.go 64.22% <0%> (-0.72%) ⬇️
go/roothash/api/commitment/pool.go 70.5% <0%> (-0.59%) ⬇️
... and 15 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 5d0fead...142cbc3. Read the comment docs.

@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from 499554c to 783d1ad Compare January 8, 2020 08:53
.changelog/2459.feature.md Outdated Show resolved Hide resolved
go/consensus/tendermint/apps/registry/transactions.go Outdated Show resolved Hide resolved
go/registry/api/api.go Outdated Show resolved Hide resolved
go/registry/api/api.go Outdated Show resolved Hide resolved
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

Looks good, this is exactly what I had in mind with the RuntimeLookup interface. One minor thing and then I think it should be ready to merge.

go/registry/api/api.go Outdated Show resolved Hide resolved
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

Looks good, some more minor nits and don't forget to squash before merge.

go/scheduler/tests/tester.go Outdated Show resolved Hide resolved
go/scheduler/tests/tester.go Outdated Show resolved Hide resolved
go/registry/api/api.go Outdated Show resolved Hide resolved
go/scheduler/tests/tester.go Outdated Show resolved Hide resolved
@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from 4806fd8 to fcb209c Compare January 9, 2020 13:23
@matevz matevz force-pushed the matevz/feature/km-runtimeid-check branch from fcb209c to 142cbc3 Compare January 9, 2020 13:27
@matevz matevz merged commit 397353d into master Jan 9, 2020
@matevz matevz deleted the matevz/feature/km-runtimeid-check branch January 9, 2020 13:39
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.

3 participants