Skip to content

Charge extra gas when doing serialization and deserialization #10681

Open
@robert-zaremba

Description

Summary

We should charge extra gas when doing serialization.

Epic: #8917

Problem Definition

Today we only charge gas for doing storage operations and loops. For simple operations we only charge gas for a known expensive operations, like signature validation. Serialization is also known to be expensive (especially the "text mode" like JSON). And if there is lot of back and forth then we underprice the transactions.

Proposal

Add a codec wrapper (GasCodec) which will charge gas for every marshaling and unmarshaling.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions