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

Compress serialization keys #762

Merged
merged 5 commits into from
Jan 16, 2020

Conversation

limebell
Copy link
Member

This patch compresses keys in RawTransaction, RawBlock, BlockDigest and BlockHeader into 1 byte.

The patch decreases about 35% for empty blocks.

@limebell limebell self-assigned this Jan 15, 2020
@limebell limebell added the storage Related to storage (Libplanet.Store) label Jan 15, 2020
Copy link
Contributor

@dahlia dahlia left a comment

Choose a reason for hiding this comment

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

As the block hashes and fields have changed, we need to mention this backward incompatibility in the Behavioral Changes section.

Libplanet/Tx/RawTransaction.cs Outdated Show resolved Hide resolved
Libplanet.Tests/Libplanet.Tests.csproj Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 15, 2020

Codecov Report

Merging #762 into master will increase coverage by 0.01%.
The diff coverage is 98.32%.

@@            Coverage Diff             @@
##           master     #762      +/-   ##
==========================================
+ Coverage   86.39%   86.41%   +0.01%     
==========================================
  Files         224      224              
  Lines       19221    19225       +4     
==========================================
+ Hits        16606    16613       +7     
- Misses       1407     1411       +4     
+ Partials     1208     1201       -7
Impacted Files Coverage Δ
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.73% <100%> (-0.01%) ⬇️
Libplanet.Tests/Tx/TransactionTest.cs 91.52% <100%> (-0.2%) ⬇️
Libplanet.Tests/Net/SwarmTest.cs 96.32% <100%> (+0.29%) ⬆️
Libplanet/Blocks/RawBlock.cs 100% <100%> (ø) ⬆️
Libplanet/Action/PolymorphicAction.cs 96.07% <100%> (ø) ⬆️
Libplanet/Blocks/Block.cs 84.22% <100%> (+0.38%) ⬆️
Libplanet.Tests/Blocks/BlockTest.cs 98.24% <100%> (-0.03%) ⬇️
Libplanet/Blocks/BlockDigest.cs 76.31% <100%> (+7.35%) ⬆️
Libplanet/Action/AccountStateDeltaImpl.cs 100% <100%> (ø) ⬆️
Libplanet.Tests/Common/Action/BattleResult.cs 41.07% <100%> (ø) ⬆️
... and 5 more

@limebell limebell requested a review from dahlia January 15, 2020 11:18
earlbread
earlbread previously approved these changes Jan 16, 2020
longfin
longfin previously approved these changes Jan 16, 2020
@longfin longfin merged commit 4d79c4f into planetarium:master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage Related to storage (Libplanet.Store)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants