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

Expose consensus blocks and scheduler API via internal gRPC #2484

Merged
merged 4 commits into from
Dec 19, 2019

Conversation

kostko
Copy link
Member

@kostko kostko commented Dec 17, 2019

Fixes #2482

TODO

  • See if we need to add any other accessors.
  • Add tests.

@kostko kostko force-pushed the kostko/feature/consensus-accessors branch from 1fdbfdd to e79af06 Compare December 17, 2019 13:28
@codecov
Copy link

codecov bot commented Dec 17, 2019

Codecov Report

Merging #2484 into master will increase coverage by 0.08%.
The diff coverage is 66.87%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2484      +/-   ##
==========================================
+ Coverage   66.99%   67.07%   +0.08%     
==========================================
  Files         321      323       +2     
  Lines       29503    29761     +258     
==========================================
+ Hits        19765    19962     +197     
- Misses       7304     7324      +20     
- Partials     2434     2475      +41
Impacted Files Coverage Δ
go/consensus/genesis/genesis.go 50% <ø> (+16.66%) ⬆️
go/genesis/tests/helpers/helpers.go 100% <ø> (ø)
go/scheduler/api/api.go 88% <ø> (ø) ⬆️
go/consensus/api/api.go 50% <ø> (ø) ⬆️
...o/consensus/tendermint/apps/scheduler/scheduler.go 71.15% <0%> (ø) ⬆️
go/consensus/tendermint/apps/scheduler/genesis.go 45.97% <0%> (ø) ⬆️
.../storage/mkvs/urkel/interop/cmd/protocol_server.go 13.46% <0%> (ø) ⬆️
go/storage/mkvs/urkel/db/badger/badger.go 73.92% <100%> (+0.05%) ⬆️
go/consensus/tendermint/apps/scheduler/query.go 76.66% <100%> (ø) ⬆️
go/consensus/tendermint/api/api.go 73.07% <100%> (+4.18%) ⬆️
... and 34 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 98ae5c2...49040b3. Read the comment docs.

@kostko kostko force-pushed the kostko/feature/consensus-accessors branch 5 times, most recently from 025c8d2 to f35116e Compare December 19, 2019 09:57
@kostko kostko marked this pull request as ready for review December 19, 2019 09:57
@kostko kostko changed the title go/consensus: Add block accessors Expose consensus blocks and scheduler API via internal gRPC Dec 19, 2019
go/common/persistent/persistent.go Outdated Show resolved Hide resolved
go/scheduler/tests/tester.go Show resolved Hide resolved
@kostko kostko force-pushed the kostko/feature/consensus-accessors branch from f35116e to c9e8ead Compare December 19, 2019 10:49
@kostko kostko force-pushed the kostko/feature/consensus-accessors branch from c9e8ead to eb6965c Compare December 19, 2019 12:30
go/consensus/tests/tester.go Outdated Show resolved Hide resolved
Apparently Tendermint's pubsub can return a nil subscription and a nil
error when the node is just shutting down while subscribe is being
called.

Do something more sensible and return context.Canceled in this case
instead of dereferencing a nil pointer.
The default is 1 GiB per badger instance and we use a few instances so
this resulted in some nice memory usage.
@kostko kostko force-pushed the kostko/feature/consensus-accessors branch from eb6965c to 49040b3 Compare December 19, 2019 13:07
@kostko kostko merged commit 2785878 into master Dec 19, 2019
@kostko kostko deleted the kostko/feature/consensus-accessors branch December 19, 2019 13: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.

Add consensus block and transaction metadata accessors
3 participants