rpc: add chunked rpc interface#6445
Conversation
Codecov Report
@@ 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
|
cmwaters
left a comment
There was a problem hiding this comment.
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.
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++ { |
There was a problem hiding this comment.
How big is this test genesis file? Does it even loop more than once?
There was a problem hiding this comment.
yeah we don't loop in the test. On the plus side we don't actually handle the test case differently.
There was a problem hiding this comment.
Do we want to create a test where there are more than one chunk?
| doc := []byte(strings.Join(decoded, "")) | ||
|
|
||
| var out types.GenesisDoc | ||
| require.NoError(t, tmjson.Unmarshal(doc, &out), |
There was a problem hiding this comment.
Being able to unmarshal basically ensures that the chunked genesis is the same as the one before right? Although technically they could be different
There was a problem hiding this comment.
yeah, ensures that that we didn't break the JSON encoding.
alexanderbez
left a comment
There was a problem hiding this comment.
Looks great @tychoish. I just a few comments 👍
|
@cmwaters (et al) I added this to the spec: tendermint/spec#299 |
tac0turtle
left a comment
There was a problem hiding this comment.
utACK.
Could you add a changelog and upgrading.md entry.
|
@tychoish what's stopping this from being merged? |
|
@Mergifyio backport release/v0.34.x |
|
Command
|
|
@Mergifyio backport v0.34.x |
(cherry picked from commit d913406) # Conflicts: # light/proxy/routes.go # node/node.go # rpc/core/net.go # rpc/core/routes.go
|
Command
|
|
I don't see the |
|
nope, it wasn't added in this PR. will make an issue |
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