Skip to content

Conversation

@valeriyr
Copy link
Contributor

@valeriyr valeriyr commented Nov 17, 2025

Description of change

Replace the function usage in several places, but there are some that still need to be checked:

  1. Indexing.
  2. Replays.

Links to any relevant issues

fixes #9278

@valeriyr valeriyr requested review from Dkwcs and miker83z November 17, 2025 10:10
@valeriyr valeriyr self-assigned this Nov 17, 2025
@vercel
Copy link

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
apps-backend Ignored Ignored Preview Nov 26, 2025 8:36am
apps-ui-kit Ignored Ignored Preview Nov 26, 2025 8:36am
iota-evm-bridge Ignored Ignored Preview Nov 26, 2025 8:36am
iota-multisig-toolkit Ignored Ignored Preview Nov 26, 2025 8:36am
rebased-explorer Ignored Ignored Preview Nov 26, 2025 8:36am
wallet-dashboard Ignored Ignored Preview Nov 26, 2025 8:36am

@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 Nov 17, 2025
@valeriyr valeriyr force-pushed the vm-lang/aa-auth/9278-check-tx-inputs-usage branch 2 times, most recently from aa6978b to e188f74 Compare November 17, 2025 10:32
@valeriyr valeriyr force-pushed the vm-lang/aa-auth/9278-check-tx-inputs-usage branch from e188f74 to 6102764 Compare November 17, 2025 11:16
Copy link
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.

Please also write a comment in the indexer and replay crates where it would be needed to include the MoveAuthenticator inputs. This will be done later.

}
}

fn read_objects_for_signing(
Copy link
Contributor

Choose a reason for hiding this comment

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

In this file, in the function fn index_tx there's:

cert.data()
    .intent_message()
    .value
    .input_objects()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't touched the places related to indexing in this PR because, in terms of the indexer, transaction inputs are always associated with TransactionData, so if this PR works, it is probably better to refactor in a dedicated PR.

@valeriyr
Copy link
Contributor Author

Please also write a comment in the indexer and replay crates where it would be needed to include the MoveAuthenticator inputs. This will be done later.

It is easy to find the places where TransactionDataAPI::input_objects is used. The problem is that it is not always possible to just replace TransactionData::input_objects with SenderSignedData::input_objects because this data will not be interpreted correctly. So the best option will be to check this with the responsible team and create related issues, I think.

@valeriyr valeriyr force-pushed the vm-lang/aa-auth/9278-check-tx-inputs-usage branch from 64d2145 to c99dc43 Compare November 24, 2025 11:47
@github-actions
Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

@valeriyr valeriyr marked this pull request as ready for review November 25, 2025 15:51
@valeriyr valeriyr requested review from a team as code owners November 25, 2025 15:51
@valeriyr valeriyr removed request for a team November 25, 2025 15:51
@valeriyr valeriyr requested review from miker83z and removed request for a team November 25, 2025 15:51
Copy link
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.

Just some nit renamings

/// example) can be duplicated in the transaction and authenticator
/// object lists, we load them independently to make it possible to
/// analyze the inputs in the transaction checkers.
pub fn collect_all_inputs_for_reading(&self) -> IotaResult<Vec<InputObjectKind>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn collect_all_inputs_for_reading(&self) -> IotaResult<Vec<InputObjectKind>> {
pub fn collect_all_input_object_kind_for_reading(&self) -> IotaResult<Vec<InputObjectKind>> {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed in a51f8f4

/// the object to authenticate.
/// 3. The object to authenticate from the sender `MoveAuthenticator`.
pub fn split_inputs_into_groups(
pub fn split_inputs_into_groups_for_reading(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn split_inputs_into_groups_for_reading(
pub fn split_input_objects_into_groups(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in a51f8f4
But I left the _for_reading postfix at least for now. Since we have several input objects set, this postfix shows where the inputs should be used.

/// Merges another SharedInputObject into self.
/// If there is a conflict in mutability, the resulting object will be
/// mutable. Errors if the id or initial_shared_version do not match.
pub fn union(&mut self, other: &SharedInputObject) -> UserInputResult<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn union(&mut self, other: &SharedInputObject) -> UserInputResult<()> {
pub fn left_union(&mut self, other: &SharedInputObject) -> UserInputResult<()> {

Copy link
Contributor

Choose a reason for hiding this comment

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

As an option we can consider merge for the function name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in a51f8f4

/// For shared objects, if either is mutable, the result is mutable.
/// Fails if either is not a shared object, or if the IDs or initial
/// versions do not match.
pub fn union(&mut self, other: &InputObjectKind) -> UserInputResult<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn union(&mut self, other: &InputObjectKind) -> UserInputResult<()> {
pub fn left_union_with_checks(&mut self, other: &InputObjectKind) -> UserInputResult<()> {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed in a51f8f4

Copy link
Contributor

@kodemartin kodemartin left a comment

Choose a reason for hiding this comment

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

lgtm for the changes in iota-analytics-indexer

@valeriyr valeriyr merged commit 330916d into vm-lang/aa-auth/8116-feature-branch Nov 26, 2025
25 of 30 checks passed
@valeriyr valeriyr deleted the vm-lang/aa-auth/9278-check-tx-inputs-usage branch November 26, 2025 08:38
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] Check all codebase places where the input_objects (shared + owned objs) are used and consider usage of authenticator

6 participants