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

Basic consensus light client support #2881

Merged
merged 5 commits into from
May 6, 2020
Merged

Conversation

kostko
Copy link
Member

@kostko kostko commented May 3, 2020

Initial implementation of #2440, required for #2880.

TODO

@kostko kostko force-pushed the kostko/feature/tm-light-client branch 2 times, most recently from c62db02 to c33045c Compare May 3, 2020 20:17
@kostko kostko force-pushed the kostko/feature/tm-light-client branch 3 times, most recently from c2c0d08 to 608d347 Compare May 5, 2020 12:07
@codecov
Copy link

codecov bot commented May 5, 2020

Codecov Report

Merging #2881 into master will increase coverage by 0.18%.
The diff coverage is 68.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2881      +/-   ##
==========================================
+ Coverage   67.56%   67.74%   +0.18%     
==========================================
  Files         350      352       +2     
  Lines       34036    34215     +179     
==========================================
+ Hits        22995    23179     +184     
+ Misses       8079     8074       -5     
  Partials     2962     2962              
Impacted Files Coverage Δ
go/consensus/api/api.go 50.00% <ø> (ø)
go/storage/mkvs/checkpoint/file.go 76.78% <50.00%> (-1.20%) ⬇️
go/consensus/tendermint/tendermint.go 66.03% <54.54%> (-0.12%) ⬇️
go/storage/mkvs/checkpoint/checkpoint.go 76.47% <55.55%> (-23.53%) ⬇️
go/consensus/tendermint/full.go 58.82% <58.82%> (ø)
go/consensus/api/grpc.go 61.73% <62.33%> (+1.27%) ⬆️
go/oasis-node/cmd/node/node.go 54.31% <66.66%> (+0.24%) ⬆️
go/storage/mkvs/checkpoint/restorer.go 95.91% <71.42%> (-4.09%) ⬇️
go/worker/consensusrpc/worker.go 93.54% <93.54%> (ø)
go/common/node/node.go 70.53% <100.00%> (+0.53%) ⬆️
... and 46 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 892cc0b...20107f5. Read the comment docs.

@kostko kostko force-pushed the kostko/feature/tm-light-client branch from 608d347 to 504db8e Compare May 5, 2020 15:20
@kostko kostko force-pushed the kostko/feature/tm-light-client branch from 504db8e to e8d1621 Compare May 6, 2020 08:20
@kostko kostko force-pushed the kostko/feature/tm-light-client branch 3 times, most recently from 624a5c0 to 2ddcbd7 Compare May 6, 2020 08:28
@kostko kostko marked this pull request as ready for review May 6, 2020 09:14
A public consensus services worker enables any full consensus node to expose
light client services to other nodes that may need them (e.g., they are needed
to support light clients).

The worker can be enabled using --worker.consensusrpc.enabled and is disabled
by default. Enabling the public consensus services worker exposes the light
consensus client interface over publicly accessible gRPC.
@kostko kostko force-pushed the kostko/feature/tm-light-client branch from 2ddcbd7 to 20107f5 Compare May 6, 2020 09:16
func (m *Metadata) EncodedHash() hash.Hash {
var hh hash.Hash

hh.From(m)
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't need to be now, and we do this all over the place, but at some point we should add func NewFrom(v interface{}) Hash.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, good idea! I'll do this in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in #2890.

@kostko kostko merged commit 6c55f94 into master May 6, 2020
@kostko kostko deleted the kostko/feature/tm-light-client branch May 20, 2020 08:55
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.

2 participants