Skip to content

Optimization: Avoid compressing transaction data twice #356

@Thegaram

Description

@Thegaram

Describe the feature

In the Galileo upgrade, we introduced a new rollup fee formula that includes the compressed transaction size as one of its parameters. This was added in scroll-tech/scroll-revm#65 and #355.

In Feynman, we're using zstd(tx.data) (for the compression ratio), while in Galileo we're using zstd(rlp(tx)) (for the compressed size). Because the compressed data is different, we cannot combine this into a single operation, and must compress twice.

To avoid compressing twice, we should only compute compression_ratio for Feynman transactions, and only compute compressed_size for Galileo transactions.

Additional context

See here and here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions