-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
R4R: Don't serialize Account Number and Sequence Number in signatures #2977
Conversation
This was not needed to be included within the tx body, as its in the state.
c6496be
to
46387b6
Compare
46387b6
to
4aa2730
Compare
fmt.Println(len(cdc.MustMarshalBinaryBare([]sdk.Msg{msg1}))) | ||
fmt.Println(len(cdc.MustMarshalBinaryBare(tx))) | ||
// output: 80 | ||
// 167 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously the benchmark masked the true tx size, since it omitted account number, sequence number, and gas (as they were the default value). This increase is due to gas, but removal of accnum and sequence number will increase space savings.
Codecov Report
@@ Coverage Diff @@
## develop #2977 +/- ##
===========================================
- Coverage 56.29% 56.24% -0.06%
===========================================
Files 120 120
Lines 8406 8387 -19
===========================================
- Hits 4732 4717 -15
+ Misses 3352 3348 -4
Partials 322 322 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the note ExampleTxSendSize
, although I'm still not quite sure why it's a few bytes extra?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add back the testcase? Otherwise LGTM.
Hope this clears up the situation bez: Before gas was 0, so it was being omitted as thats the protobuf default value. I went ahead and changed it to be non-zero so that it would show up in the total size. There were no bytes removed from that test, since that test didn't account for size of account number or sequence number to begin with. (They were both 0), I adapted the test locally to confirm that space was saved if it did account for them previously. |
… signatures * Don't serialize Account Number and Sequence Number in signatures This was not needed to be included within the tx body, as its in the state. * fix lint
This was not needed to be included within the tx body, as its in the
state.
Closes #2952
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests - existing tests suffoce
Updated relevant documentation (
docs/
) - auth spec doesn't exist yetAdded entries in
PENDING.md
with issue #rereviewed
Files changed
in the github PR explorerFor Admin Use: