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

feat: crypto custom marshaller #177

Merged
merged 2 commits into from
Feb 3, 2021
Merged

feat: crypto custom marshaller #177

merged 2 commits into from
Feb 3, 2021

Conversation

jinsan-line
Copy link

@jinsan-line jinsan-line commented Feb 2, 2021

Related with: https://github.com/line/link/issues/1154

Description

Amino encoding is expensive because of reflection. Especially for account, it's too expensive due to encode and decode so many times. To optimize performance, I'd like to implement custom Amino implementation without reflection. For this, we need to implement cryptos marshaller in tendermint.

Please note that it's not production ready quality but just intend to check the upper bound that we could achieve. we need more test code for production. And also I don't implement for PubKeyMultisigThreshold because it's not used in load test scenario.


For contributor use:

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer

Copy link

@kukugi kukugi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@wetcod wetcod left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@egonspace egonspace left a comment

Choose a reason for hiding this comment

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

I benchmarked and found that the performance was around 328 ns/op vs 801 ns/op.

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.

5 participants