Skip to content

Restrict Input Field Sizes to Keep Encrypted Payload On-Chain #46

@ajey35

Description

@ajey35

Issue: Restrict Input Field Sizes to Keep Encrypted Payload On-Chain

Problem

Currently, encrypted invoice data is stored fully on-chain. When users input large amounts of data, the encrypted payload becomes too large, leading to high gas usage and potential transaction failures during gas estimation or execution.

Proposed Solution

Restrict the maximum allowed size of user input fields so that the resulting encrypted payload remains within a safe, predictable size for on-chain storage.

This includes:

  • Defining reasonable character limits for each invoice field
  • Adding frontend validation to enforce these limits
  • Ensuring the encrypted payload size stays within acceptable gas bounds

Scope

  • No change to the current on-chain storage model
  • Focus is strictly on input validation and payload size control

Expected Outcome

  • Reduced gas costs
  • Fewer failed transactions due to payload size
  • More predictable on-chain behavior

Error :

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions