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

adds publicKey grpc endpoint #147

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions proto/spacemesh/v1/api_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ http:
- selector: spacemesh.v1.DebugService.Accounts
post: "/v1/debug/accounts"
body: "*"
- selector: spacemesh.v1.DebugService.PublicKey
post: "/v1/debug/publicKey"
body: "*"

# GlobalStateService
- selector: spacemesh.v1.GlobalStateService.GlobalStateHash
Expand Down
3 changes: 3 additions & 0 deletions proto/spacemesh/v1/debug.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ service DebugService {
// This includes each account's address, nonce and balance but excludes projection of account state.
rpc Accounts (google.protobuf.Empty) returns (AccountsResponse);

// PublicKey returns this node's public key
Copy link
Member

Choose a reason for hiding this comment

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

Could you expand this comment to explain exactly which public key is returned? go-spacemesh actually uses several public keys. See spacemeshos/go-spacemesh#2269 for more.

// Useful for quickly bootstraping nodes in development
rpc PublicKey (google.protobuf.Empty) returns (PublicKeyResponse);
}
6 changes: 5 additions & 1 deletion proto/spacemesh/v1/debug_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ import "spacemesh/v1/global_state_types.proto";

message AccountsResponse {
repeated Account account_wrapper = 1;
}
}

message PublicKeyResponse {
bytes public_key = 1;
}
77 changes: 62 additions & 15 deletions release/go/spacemesh/v1/debug.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 78 additions & 0 deletions release/go/spacemesh/v1/debug.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 73 additions & 10 deletions release/go/spacemesh/v1/debug_types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.