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

Serialization refactor step 1 #255

Merged
merged 7 commits into from
May 9, 2020
Merged

Serialization refactor step 1 #255

merged 7 commits into from
May 9, 2020

Conversation

greg-szabo
Copy link
Member

@greg-szabo greg-szabo commented May 7, 2020

  • Refactor the serializer library. Move all functions into modules and rewrite the annotation to use with. (Looks nicer.)

This is a first step in refactoring serialization outloined in issue #247 .

  • Referenced an issue explaining the need for the change
  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGES.md

Soft-depends on Issue #249 / PR #256 for integration test success.

@greg-szabo greg-szabo mentioned this pull request May 7, 2020
5 tasks
@liamsi
Copy link
Member

liamsi commented May 7, 2020

I haven't reviewed yet, so if you like, you can rebase this on master (and force push) or merge in master.

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

Note that currently all modules under tendermint/src which contain submodules follow the current pattern:

module::submodule in
tendermint/src/module/submodule.rs
submodule is then included in module tree via:
tendermint/src/module.rs
which is then included in module tree via:
tendermint/src/lib.rs

Should we use this pattern here too? Currently all submodules are defined in
tendermint/src/serializers.rs

@greg-szabo
Copy link
Member Author

Step 3 does that but unfortunately the original work had dependencies which would've made this into the "big PR" again, if I implemented it here.

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

Thanks for splitting this up @greg-szabo 👍

I left a few minor comments. The PR looks good so far.

tendermint/src/serializers.rs Outdated Show resolved Hide resolved
tendermint/src/serializers.rs Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
tendermint/src/lib.rs Show resolved Hide resolved
tendermint/src/rpc/endpoint/net_info.rs Outdated Show resolved Hide resolved
tendermint/src/serializers.rs Show resolved Hide resolved
tendermint/tests/serialization.rs Show resolved Hide resolved
tendermint/src/serializers.rs Show resolved Hide resolved
* rename/flatten serializer methods (primitives and time_duration)

* Fix all clippy warnings:

 - `cargo clippy --all --all-targets -- -Dwarnings -Drust-2018-idioms`
@codecov-io
Copy link

Codecov Report

Merging #255 into master will decrease coverage by 0.0%.
The diff coverage is 25.0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #255     +/-   ##
========================================
- Coverage    27.6%   27.6%   -0.1%     
========================================
  Files          99      99             
  Lines        3651    3650      -1     
  Branches     1169    1168      -1     
========================================
- Hits         1010    1009      -1     
  Misses       1831    1831             
  Partials      810     810             
Impacted Files Coverage Δ
tendermint/src/abci/proof.rs 50.0% <ø> (ø)
tendermint/src/block.rs 0.0% <ø> (ø)
tendermint/src/block/commit.rs 54.5% <ø> (ø)
tendermint/src/block/header.rs 22.7% <ø> (ø)
tendermint/src/block/parts.rs 0.0% <ø> (ø)
tendermint/src/block/size.rs 0.0% <ø> (ø)
tendermint/src/channel.rs 0.0% <ø> (ø)
tendermint/src/consensus/state.rs 50.0% <ø> (ø)
tendermint/src/evidence.rs 33.3% <0.0%> (ø)
tendermint/src/lite/types.rs 35.4% <ø> (ø)
... and 6 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 1bb9661...89b13ae. Read the comment docs.

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

Thanks a lot @greg-szabo 👍

@liamsi liamsi merged commit 14f09ba into master May 9, 2020
@greg-szabo greg-szabo deleted the greg/serialization-1 branch May 13, 2020 02:02
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.

3 participants