0xSpaceShard / starknet-devnet-rs

A local testnet for Starknet... in Rust
https://0xspaceshard.github.io/starknet-devnet-rs/
MIT License
100 stars 56 forks source link

L2 ResourceBounds have to be removed #507

Closed marioiordanov closed 2 weeks ago

marioiordanov commented 1 month ago

Describe the bug (observed vs expected behavior)

Reported in https://spaceshard.slack.com/archives/C03QYDV8CQP/p1718818838586149

Sending transaction with ResourceBounds :

resourceBounds: {
          l2_gas: {
            max_amount: "0x12",
            max_price_per_unit: "0x13",
          },
          l1_gas: {
            max_amount: "0x64",
            max_price_per_unit: "0x64",
          },
};

succeeds on devnet, but not on testnet.

After discussion with starkware team, for now this fields shouldn't be populated.

Solution: remove l2 fields from calculation in function is_max_fee_zero_value for v3 transactions

Not reproducible on testnet

mikiw commented 2 weeks ago

From my understanding "l2_gas should only contain 0x0" so we indeed need to take it into consideration so "remove l2 fields from calculation in function is_max_fee_zero_value for v3 transactions" is not enough we also need to check is l2 fields are zero, and if they aren't we need to raise error