Skip to content

rpc: add chunked rpc interface - #6445

Merged
tychoish merged 12 commits into
tendermint:masterfrom
tychoish:rpc-genesis-chunks
May 24, 2021
Merged

tychoish merged 12 commits into
tendermint:masterfrom
tychoish:rpc-genesis-chunks

Conversation

@tychoish

@tychoish tychoish commented May 10, 2021 •

Copy link
Copy Markdown
Contributor

I think there may be additional testing that would be useful, and I
think we should also update documentation and specs, maybe, but I'm
not sure the full scope or ordering of that work relative to this PR.

Resolves #6354

@codecov

codecov Bot commented May 10, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #6445 (5d9d10b) into master (0781ca3) will decrease coverage by 0.20%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #6445      +/-   ##
==========================================
- Coverage   60.91%   60.71%   -0.21%     
==========================================
  Files         288      289       +1     
  Lines       27070    27156      +86     
==========================================
- Hits        16490    16488       -2     
- Misses       8888     8962      +74     
- Partials     1692     1706      +14     
Impacted Files Coverage Δ
light/rpc/client.go 9.70% <0.00%> (-0.04%) ⬇️
node/node.go 49.76% <0.00%> (-0.16%) ⬇️
rpc/core/env.go 47.05% <0.00%> (-14.48%) ⬇️
rpc/core/net.go 39.34% <0.00%> (-11.72%) ⬇️
rpc/core/routes.go 0.00% <0.00%> (ø)
rpc/core/types/responses.go 33.33% <ø> (ø)
privval/signer_listener_endpoint.go 80.00% <0.00%> (-9.42%) ⬇️
types/tx.go 82.97% <0.00%> (-4.26%) ⬇️
privval/socket_listeners.go 78.72% <0.00%> (-4.26%) ⬇️
privval/signer_endpoint.go 75.75% <0.00%> (-3.04%) ⬇️
... and 15 more

@cmwaters cmwaters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This all looks good to me. I think the first thing you should do is open a PR in the spec repo looking to add this rpc endpoint. Then we can merge this one / add more tests if you feel like some edge cases are missing. After that we can update the docs - which I think is mainly updating the swagger.yml file.

Comment thread light/proxy/routes.go Resolved
Comment thread rpc/client/rpc_test.go Outdated
require.NoError(t, err)

decoded := make([]string, 0, first.TotalChunks)
for i := first.ChunkNumber; i < first.TotalChunks+1; i++ {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How big is this test genesis file? Does it even loop more than once?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah we don't loop in the test. On the plus side we don't actually handle the test case differently.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to create a test where there are more than one chunk?

Comment thread rpc/client/rpc_test.go
doc := []byte(strings.Join(decoded, ""))

var out types.GenesisDoc
require.NoError(t, tmjson.Unmarshal(doc, &out),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Being able to unmarshal basically ensures that the chunked genesis is the same as the one before right? Although technically they could be different

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, ensures that that we didn't break the JSON encoding.

@alexanderbez alexanderbez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great @tychoish. I just a few comments 👍

Comment thread rpc/core/env.go Resolved
Comment thread rpc/core/env.go Resolved
Comment thread rpc/core/env.go Resolved
Comment thread rpc/core/env.go Resolved
Comment thread rpc/core/types/responses.go Resolved
@alexanderbez alexanderbez added the C:rpc Component: JSON RPC, gRPC label May 11, 2021
@tychoish

Copy link
Copy Markdown
Contributor Author

@cmwaters (et al) I added this to the spec: tendermint/spec#299

Comment thread rpc/core/env.go Resolved
Comment thread rpc/core/net.go Resolved

@tac0turtle tac0turtle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

utACK.

Could you add a changelog and upgrading.md entry.

@alexanderbez

Copy link
Copy Markdown
Contributor

@tychoish what's stopping this from being merged?

@tychoish
tychoish merged commit d913406 into tendermint:master May 24, 2021
@tac0turtle

Copy link
Copy Markdown
Contributor

@Mergifyio backport release/v0.34.x

@mergify

mergify Bot commented Jul 14, 2021

Copy link
Copy Markdown
Contributor

Command backport release/v0.34.x: failure

No backport have been created

  • Backport to branch release/v0.34.x failed: Branch not found

@tac0turtle

Copy link
Copy Markdown
Contributor

@Mergifyio backport v0.34.x

mergify Bot pushed a commit that referenced this pull request Jul 14, 2021
(cherry picked from commit d913406)

# Conflicts:
#	light/proxy/routes.go
#	node/node.go
#	rpc/core/net.go
#	rpc/core/routes.go
@mergify

mergify Bot commented Jul 14, 2021

Copy link
Copy Markdown
Contributor

Command backport v0.34.x: success

Backports have been created

tac0turtle added a commit that referenced this pull request Jul 14, 2021
* rpc: add chunked rpc interface (#6445)

(cherry picked from commit d913406)

# Conflicts:
#	light/proxy/routes.go
#	node/node.go
#	rpc/core/net.go
#	rpc/core/routes.go

* fix conflicts

Co-authored-by: Sam Kleinman <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
@cmwaters

Copy link
Copy Markdown
Contributor

I don't see the /genesis_chunked endpoint in the RPC documentation (https://docs.tendermint.com/master/rpc/). Is there something we're missing?

@tac0turtle

tac0turtle commented Jul 14, 2021 •

Copy link
Copy Markdown
Contributor

nope, it wasn't added in this PR.

will make an issue

iammadab referenced this pull request in dashpay/tenderdash Oct 13, 2021
* rpc: add chunked rpc interface (#6445)

(cherry picked from commit d913406)

* fix conflicts

Co-authored-by: Sam Kleinman <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
(cherry picked from commit da9eefd)
williambanfield pushed a commit that referenced this pull request Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C:rpc Component: JSON RPC, gRPC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc: genesis endpoint

4 participants