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

DB: Replace Proto Marshaller with SSZ Marshaller #5188

Closed
nisdas opened this issue Mar 24, 2020 · 3 comments · Fixed by #5351
Closed

DB: Replace Proto Marshaller with SSZ Marshaller #5188

nisdas opened this issue Mar 24, 2020 · 3 comments · Fixed by #5351
Assignees
Labels
Enhancement New feature or request

Comments

@nisdas
Copy link
Member

nisdas commented Mar 24, 2020

As of our latest state benchmarks now utilising the fast_ssz library,

BenchmarkMarshalState_FullStateProto/proto-8        1000           4158728 ns/op         5210114 B/op          3 allocs/op
BenchmarkMarshalState_FullStateProto/fast_ssz
BenchmarkMarshalState_FullStateProto/fast_ssz-8                     1000           3468476 ns/op         4849664 B/op          1 allocs/op
BenchmarkUnmarshalState_FullState/Proto_Unmarshal
BenchmarkUnmarshalState_FullState/Proto_Unmarshal-8                 1000          13735450 ns/op        17919463 B/op     133409 allocs/op
BenchmarkUnmarshalState_FullState/Fast_SSZ_Unmarshal
BenchmarkUnmarshalState_FullState/Fast_SSZ_Unmarshal-8              1000           8812379 ns/op         8445362 B/op     133303 allocs/op

There is a sizable improvement especially in unmarshal. Given the node is read heavy, with us reading the state much more often than writing to it, this will have a sizeable improvement in the performance of our node.

This issue is to track the replacement of replacing the encoder with ssz instead of protobufs in our db.

@nisdas nisdas added Enhancement New feature or request Testnet labels Mar 24, 2020
@prestonvanloon prestonvanloon changed the title Replace Proto Marshaller with SSZ Marshaller DB: Replace Proto Marshaller with SSZ Marshaller Mar 25, 2020
@prestonvanloon
Copy link
Member

Note: this is a breaking change and must not merge directly to master except through the v0.11 branch.

@prestonvanloon
Copy link
Member

Assigning to @nisdas. I noticed you were working on this in some branch already.

@prestonvanloon prestonvanloon self-assigned this Apr 1, 2020
@prestonvanloon
Copy link
Member

I'll take a look at this as well. It shouldn't be too difficult to require this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants