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

[Admin] GetIdentity command #2191

Merged
merged 6 commits into from Mar 28, 2022
Merged

[Admin] GetIdentity command #2191

merged 6 commits into from Mar 28, 2022

Conversation

synzhu
Copy link
Contributor

@synzhu synzhu commented Mar 23, 2022

new command to get identity info by flow ID or libp2p peer ID.

@codecov-commenter
Copy link

Codecov Report

Merging #2191 (6ed331a) into master (3ef762e) will decrease coverage by 0.08%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2191      +/-   ##
==========================================
- Coverage   57.56%   57.48%   -0.09%     
==========================================
  Files         642      643       +1     
  Lines       38117    38154      +37     
==========================================
- Hits        21943    21933      -10     
- Misses      13382    13430      +48     
+ Partials     2792     2791       -1     
Flag Coverage Δ
unittests 57.48% <0.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
admin/commands/common/get_identity.go 0.00% <0.00%> (ø)
cmd/scaffold.go 8.05% <0.00%> (-0.03%) ⬇️
...sus/approvals/assignment_collector_statemachine.go 40.38% <0.00%> (-9.62%) ⬇️
...s/hotstuff/votecollector/staking_vote_processor.go 89.47% <0.00%> (-3.51%) ⬇️
fvm/handler/contract.go 75.32% <0.00%> (ø)
engine/collection/synchronization/engine.go 67.93% <0.00%> (ø)
consensus/hotstuff/eventloop/event_loop.go 70.73% <0.00%> (+2.43%) ⬆️

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 3ef762e...6ed331a. Read the comment docs.

@@ -1113,6 +1113,8 @@ func (fnb *FlowNodeBuilder) RegisterDefaultAdminCommands() {
return storageCommands.NewReadResultsCommand(config.State, config.Storage.Results)
}).AdminCommand("read-seals", func(config *NodeConfig) commands.AdminCommand {
return storageCommands.NewReadSealsCommand(config.State, config.Storage.Seals, config.Storage.Index)
}).AdminCommand("get-identity", func(config *NodeConfig) commands.AdminCommand {
return common.NewGetIdentityCommand(config.IdentityProvider)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great to add example curl command lines to the README.md [1] file like the other commands :-)
[1] https://github.com/onflow/flow-go/tree/cd1449feabdaa2be1ebe1c5ccb51eb96f1649b80/admin

Copy link
Contributor

@simonhf simonhf left a comment

Choose a reason for hiding this comment

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

Approving assuming my request for example command lines for the README is okay :-)

Copy link
Member

@zhangchiqing zhangchiqing left a comment

Choose a reason for hiding this comment

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

What’s the use case for this command?

Identity is dynamic for each block, but the command doesn’t take block ID.

Is it for identities only in root block? But if so, they can just open the bootstrap file to look up.

cmd/scaffold.go Outdated Show resolved Hide resolved
Copy link
Member

@zhangchiqing zhangchiqing 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. Just left some minor comments.

admin/commands/common/get_identity.go Outdated Show resolved Hide resolved
admin/commands/common/get_identity.go Outdated Show resolved Hide resolved
admin/commands/common/get_identity.go Show resolved Hide resolved
@synzhu
Copy link
Contributor Author

synzhu commented Mar 28, 2022

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 28, 2022

@bors bors bot merged commit 0761de4 into master Mar 28, 2022
@bors bors bot deleted the smnzhu/peerid branch March 28, 2022 19:02
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

4 participants