Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 3.02 KB

cip-130.md

File metadata and controls

45 lines (33 loc) · 3.02 KB
CIP No. Title Author Status Type Created
130
Aligning Gas Limit with Transaction Size
Chenxing Li (@ChenxingLi)
Draft
Spec Breaking
2024-01-10

Simple Summary

The Conflux block packaging process has two constraints – gas limit and transaction size limit. Within the existing constraints and gas planning, size-dominated transactions can use up the block's capacity at a lower cost than gas-dominated transactions.

This CIP aims to fix this misalignment by introducing an additional rule for transactions.

Abstract

This CIP proposes a new rule: a transaction's gas limit should be no less than 100 times the byte size of its call data. Transactions not meeting this criterion will be deemed invalid, and blocks containing such transactions will also be considered invalid. This change aims to rectify the pricing imbalance, ensuring fair resource allocation and efficient block utilization within the Conflux network.

Motivation

The Conflux protocol currently operates under constraints of a 30 million gas limit and a 300KB transaction size limit, which reveals an exchange rate between transaction data size and gas limit. pricing misalignment: 1 byte of transaction data equates to 100 gas.

However, current gas planning charges less than 100 gas per byte in transaction calldata. This discrepancy can lead to 'inscription'-like transactions, which record calldata without execution, occupying block capacity at a disproportionately lower cost.

Specification

At the given block height, transactions do not satisfy tx.gas_limit < tx.calldata * 100 will be regared invalid.

Rationale

N/A

Backwards Compatibility

This CIP is Spec Breaking.

Test Cases

N/A

Implementation

N/A

Security Considerations

N/A

Copyright

Copyright and related rights waived via CC0.