Skip to content

fix(package-resolver): make pure_input_layouts more lenient #6976

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 5 commits into from
May 26, 2025

Conversation

kodemartin
Copy link
Contributor

Description of change

This patch handles gracefully the cases where we try to resolve input layouts for arguments of a Move function that does not exist in any published package.

Currently the resolution yields an error leading to errors while to create the response for transactions that have failed due to functions not found in the Indexer JSON-RPC.

This is observed with the following request:

curl --request POST https://indexer.mainnet.iota.cafe --header 'Content-Type: application/json' --data-raw '{"jsonrpc":"2.0","id":3,"method":"iota_getTransactionBlock","params":["Gdbwf3TeMuwoZbFtDJR1VogRoZJUhEJX9co3mgpr4aSc",{"showInput":true,"showEffects":true,"showEvents":true,"showBalanceChanges":true,"showObjectChanges":true}]}' | jq .

which leads to the error that is reported in #6861

Links to any relevant issues

Fixes #6861

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)

Added an integration test in iota-indexer that tries to create the transaction response from the serialized transaction that has been observed failing in mainnet.

Infrastructure QA (only required for crates that are maintained by @iotaledger/infrastructure)

The problem is limited to the response parsing, and does not affect ingestion or deployment

  • Verification of API backward compatibility.

This patch allows function-resolution failures while resolving types of
pure inputs. This enables callers to have information on the values
passed to non-existent functions which lead to failed transactions.
@kodemartin kodemartin requested review from a team as code owners May 23, 2025 05:20
Copy link

vercel bot commented May 23, 2025

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

Name Status Preview Comments Updated (UTC)
apps-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2025 6:08am
apps-ui-kit ✅ Ready (Inspect) Visit Preview May 26, 2025 6:08am
rebased-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2025 6:08am
wallet-dashboard ✅ Ready (Inspect) Visit Preview May 26, 2025 6:08am

@iota-ci iota-ci added infrastructure Issues related to the Infrastructure Team sc-platform Issues related to the Smart Contract Platform group. labels May 23, 2025
@kodemartin kodemartin removed request for a team May 23, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Issues related to the Infrastructure Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[https://indexer.mainnet.iota.cafe] iotax_queryTransactionBlocks no longer works
4 participants