Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store l2_gas consumption for transaction receipts #2413

Open
kkovaacs opened this issue Nov 27, 2024 · 2 comments
Open

Store l2_gas consumption for transaction receipts #2413

kkovaacs opened this issue Nov 27, 2024 · 2 comments

Comments

@kkovaacs
Copy link
Contributor

l2_gas consumption has been added to pathfinder_common::receipt::ExecutionReceipt recently but we're not serializing it into storage so when retrieving from storage we always get 0.

In Starknet 0.13.4 the feeder gateway will return L2 gas consumption in transaction receipts:

get_transaction_receipt: the execution_resources property of receipts will also contain the triplet of consumed resources (l1_gas_consumed, l2_gas_c onsumed, l1_data_gas_consumed)

Adding this will require adding a new variant to TransactionsWithReceiptsForBlock enum variant like we did for issue #2384.

@kkovaacs kkovaacs added this to the Starknet 0.13.4 milestone Nov 27, 2024
@vbar
Copy link
Contributor

vbar commented Nov 27, 2024

Adding this will require adding a new variant to TransactionsWithReceiptsForBlock enum variant like we did for issue #2384.

As #2384 is unreleased (more-or-less :-) ), shouldn't both changes be combined into a single update?

@kkovaacs
Copy link
Contributor Author

As #2384 is unreleased (more-or-less :-) ), shouldn't both changes be combined into a single update?

Yes, we probably should. That is technically a breaking change but I think we can allow such breaking changes on main for short periods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants