Skip to content

Remove protos, replace with custom byte serialization#1170

Merged
ilblackdragon merged 27 commits intostagingfrom
remove-protos-fix-nearlib
Aug 16, 2019
Merged

Remove protos, replace with custom byte serialization#1170
ilblackdragon merged 27 commits intostagingfrom
remove-protos-fix-nearlib

Conversation

@ilblackdragon
Copy link
Copy Markdown
Member

@ilblackdragon ilblackdragon commented Aug 14, 2019

Fixes #1166
Fixes #1083

@evgenykuzyakov evgenykuzyakov added the C-housekeeping Category: Refactoring, cleanups, code quality label Aug 15, 2019
@ilblackdragon
Copy link
Copy Markdown
Member Author

Serialization benchmarks:

test deserialize_account ... bench:          49 ns/iter (+/- 9)
test deserialize_block   ... bench:   2,536,574 ns/iter (+/- 313,831)
test deserialize_tx      ... bench:       2,400 ns/iter (+/- 285)
test serialize_account   ... bench:         271 ns/iter (+/- 87)
test serialize_block     ... bench:     128,271 ns/iter (+/- 17,350)
test serialize_tx        ... bench:         591 ns/iter (+/- 302)

Copy link
Copy Markdown
Contributor

@evgenykuzyakov evgenykuzyakov left a comment

Choose a reason for hiding this comment

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

Also, run clippy on it. A lot of things would popup like .map(|a| a.into())

Comment thread chain/client/src/view_client.rs Outdated
Comment thread chain/network/src/codec.rs Outdated
Comment thread chain/network/src/codec.rs Outdated
Comment thread core/nbor/src/de/mod.rs Outdated
Comment thread core/primitives/src/block.rs
Comment thread core/primitives/src/rpc.rs Outdated
Comment thread core/primitives/src/rpc.rs Outdated
Comment thread runtime/runtime/src/state_viewer.rs Outdated
Comment thread test-utils/state-viewer/src/main.rs Outdated
Comment thread test-utils/testlib/src/user/runtime_user.rs Outdated
@maxzaver
Copy link
Copy Markdown
Contributor

Moving borsh to https://github.com/nearprotocol/borsh

@ilblackdragon ilblackdragon force-pushed the remove-protos-fix-nearlib branch from 9f91ab4 to 9b0224c Compare August 16, 2019 20:46
@ilblackdragon
Copy link
Copy Markdown
Member Author

Latest bench with BORsh:

test deserialize_account ... bench:          37 ns/iter (+/- 3)
test deserialize_block   ... bench:   2,120,731 ns/iter (+/- 433,084)
test deserialize_tx      ... bench:       2,027 ns/iter (+/- 168)
test serialize_account   ... bench:           0 ns/iter (+/- 0)
test serialize_block     ... bench:     338,078 ns/iter (+/- 28,825)
test serialize_tx        ... bench:         228 ns/iter (+/- 24)

@ilblackdragon ilblackdragon merged commit 5490abb into staging Aug 16, 2019
@ilblackdragon ilblackdragon deleted the remove-protos-fix-nearlib branch August 16, 2019 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-housekeeping Category: Refactoring, cleanups, code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants