Skip to content

fix(core): use gas_owner() instead of sender() for gas object creation #7945

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

Merged
merged 2 commits into from
Jul 24, 2025

Conversation

jkrvivian
Copy link
Contributor

@jkrvivian jkrvivian commented Jul 23, 2025

Description of change

  1. Replace transaction.sender() with transaction.gas_owner() when creating mock gas objects in dry_exec_transaction_impl() and simulate_transaction_impl().
    This ensures that gas objects are properly owned by the gas sponsor in sponsored transactions, rather than the transaction sender.

  2. Include the mock gas object in the transaction's gas payment for both dry_exec_transaction_impl() and simulate_transaction_impl(). Previously, it wasn't added, causing misalignment of transaction.gas() in check_objects().

Links to any relevant issues

Fixes #7892

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@jkrvivian jkrvivian self-assigned this Jul 23, 2025
@jkrvivian jkrvivian requested review from a team as code owners July 23, 2025 08:05
@jkrvivian jkrvivian added the node Issues related to the Core Node team label Jul 23, 2025
Copy link

vercel bot commented Jul 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 0:27am
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:27am
iota-evm-bridge ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 0:27am
iota-multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 0:27am
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 0:27am
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview 💬 Add feedback Jul 24, 2025 0:27am

@muXxer muXxer requested a review from Thoralf-M July 23, 2025 09:16
@Thoralf-M
Copy link
Member

resolve_transaction_transfer_with_sponsor test fails

@jkrvivian jkrvivian force-pushed the fix/use-gas_owner-to-gas-obj branch from 01537f7 to ca58b8c Compare July 24, 2025 08:59
@jkrvivian jkrvivian requested a review from a team as a code owner July 24, 2025 08:59
@jkrvivian jkrvivian force-pushed the fix/use-gas_owner-to-gas-obj branch from ca58b8c to c39a4b8 Compare July 24, 2025 09:20
@jkrvivian jkrvivian force-pushed the fix/use-gas_owner-to-gas-obj branch from c39a4b8 to c463ff6 Compare July 24, 2025 12:24
Copy link
Contributor

@TheMrAI TheMrAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remove the commented sections if they are no longer necessary. Otherwise LGTM

@jkrvivian jkrvivian requested a review from muXxer July 24, 2025 12:41
@muXxer muXxer merged commit 1a12382 into develop Jul 24, 2025
39 checks passed
@muXxer muXxer deleted the fix/use-gas_owner-to-gas-obj branch July 24, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-protocol node Issues related to the Core Node team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iota-core: dry run ignores potential gas sponsor
6 participants