Skip to content

feat: only the sponsor MoveAuthenticator should be executed on the pre-consensus phase for a sponsored transaction#11508

Merged
valeriyr merged 3 commits into
developfrom
vm-lang/11262-sponsor-move-auth-only-on-preconsensus
May 20, 2026
Merged

feat: only the sponsor MoveAuthenticator should be executed on the pre-consensus phase for a sponsored transaction#11508
valeriyr merged 3 commits into
developfrom
vm-lang/11262-sponsor-move-auth-only-on-preconsensus

Conversation

@valeriyr
Copy link
Copy Markdown
Contributor

@valeriyr valeriyr commented May 12, 2026

Description of change

Only the sponsor MoveAuthenticator should be executed on the pre-consensus phase for a sponsored transaction.

Links to any relevant issues

fixes #11262

Release Notes

  • Protocol: Enables a flow in which, if a transaction has both a MoveAuthenticator for a sender and a sponsor, then during the pre-consensus phase only the sponsor Authenticator Function is executed. Two new fields are added to the AuthContext, namely sender_auth_digest and sponsor_auth_digest, representing the digests of both signature fields.
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • gRPC:

@valeriyr valeriyr self-assigned this May 12, 2026
@iota-ci iota-ci added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels May 12, 2026
@valeriyr valeriyr changed the title feat: only the sponsor MoveAuthenticator is executed on the pre-consensus phase feat: only the sponsor MoveAuthenticator should be executed on the pre-consensus phase for a sponsored transaction May 12, 2026
Comment thread crates/iota-types/src/signature.rs Outdated
}

pub fn digest(&self) -> GenericSignatureDigest {
GenericSignatureDigest::new(default_hash(self))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How can we make sure that this and MoveAuthenticator::digest() will always return the same value, even if we modify the implementation of one of the two?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GenericSignatureDigest was removed; digests for authentication are calculated in the following function:

pub fn compute_auth_digests(&self) -> IotaResult<(Digest, Option<Digest>)> {

@valeriyr valeriyr force-pushed the vm-lang/11262-sponsor-move-auth-only-on-preconsensus branch 8 times, most recently from 6ee4fa6 to fa9a71b Compare May 15, 2026 07:53
Comment thread crates/iota-e2e-tests/tests/abstract_account_tests.rs
Comment on lines -6366 to +6372
.read_api()
.get_owned_objects(publisher, None, None, None)
.coin_read_api()
.get_coins(publisher, None, None, None)
.await?
.data
.first()
.unwrap()
.object()
.unwrap()
.object_id;
.coin_object_id;
Copy link
Copy Markdown
Contributor Author

@valeriyr valeriyr May 15, 2026

Choose a reason for hiding this comment

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

Used coin_read_api to filter for Coin objects only; get_owned_objects
returns all owned objects (including non-coin ones like UpgradeCap) and the
ordering may place non-coin objects first.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense, good change 👍

Copy link
Copy Markdown
Contributor

@miker83z miker83z left a comment

Choose a reason for hiding this comment

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

LGTM!

@valeriyr valeriyr marked this pull request as ready for review May 18, 2026 11:00
@valeriyr valeriyr requested review from a team as code owners May 18, 2026 11:00
Comment thread crates/iota-types/src/transaction.rs Outdated
@valeriyr valeriyr force-pushed the vm-lang/11262-sponsor-move-auth-only-on-preconsensus branch from c7aa4e1 to ed823a3 Compare May 18, 2026 23:19
Copy link
Copy Markdown
Member

@Thoralf-M Thoralf-M left a comment

Choose a reason for hiding this comment

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

Approving the changes in iota-types

valeriyr added 2 commits May 19, 2026 10:51
…nsus phase

refactor: remove GenericSignatureDigest

feat: implement tests

fix: make CI happy

fix(iota): gas coins resolving in `setup_move_authenticator_account`

fix(iota-e2e-tests): disable pre_consensus_sponsor_only_move_authentication for tests with disabled AA sponsorship

fix(iota-protocol-config): move pre_consensus_sponsor_only_move_authentication to the protocol version 27

feat: improve tests
@valeriyr valeriyr force-pushed the vm-lang/11262-sponsor-move-auth-only-on-preconsensus branch from ed823a3 to 008b271 Compare May 19, 2026 07:59
Copy link
Copy Markdown
Member

@lzpap lzpap left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment thread crates/iota-protocol-config/src/lib.rs Outdated
Comment thread crates/iota-protocol-config/src/lib.rs Outdated
@valeriyr valeriyr force-pushed the vm-lang/11262-sponsor-move-auth-only-on-preconsensus branch from d75c94e to 577ca7d Compare May 19, 2026 15:19
@valeriyr valeriyr merged commit 34824a6 into develop May 20, 2026
34 checks passed
@valeriyr valeriyr deleted the vm-lang/11262-sponsor-move-auth-only-on-preconsensus branch May 20, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AA] Make sponsored txs execute the sender authenticator only at post-consensus phase

9 participants