Skip to content

Conversation

@yanggu0t
Copy link
Collaborator

@yanggu0t yanggu0t commented Oct 1, 2025

Thank you for contributing to Mesh! We appreciate your effort and dedication to improving this project. To ensure that your contribution is in line with the project's guidelines and can be reviewed efficiently, please fill out the template below.

Remember to follow our Contributing Guide before submitting your pull request.

Summary

Enhances transaction evaluation by adding support for additional UTxOs and transactions across multiple providers.

Implemented Providers

  • Blockfrost: Migrated to /utils/txs/evaluate/utxos endpoint with additionalUtxo support
  • Koios: Added additionalUtxoSet parameter
  • Maestro: Added additional_utxos parameter
  • Ogmios: Added additionalUtxo parameter

Not Yet Implemented

  • UTxO RPC: TODO placeholder added
  • Yaci: TODO placeholder added

Affect components

Please indicate which part of the Mesh Repo

  • @meshsdk/common
  • @meshsdk/contract
  • @meshsdk/core
  • @meshsdk/core-csl
  • @meshsdk/core-cst
  • @meshsdk/hydra
  • @meshsdk/provider
  • @meshsdk/react
  • @meshsdk/svelte
  • @meshsdk/transaction
  • @meshsdk/wallet
  • Mesh playground (i.e. https://meshjs.dev/)
  • Mesh CLI

Type of Change

Please mark the relevant option(s) for your pull request:

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Related Issues

#499

Checklist

Please ensure that your pull request meets the following criteria:

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary
  • I have updated the documentation, if necessary
  • All new and existing tests pass (i.e. npm run test)
  • The build is pass (i.e. npm run build)

Additional Information

If you have any additional information or context to provide, such as screenshots, relevant issues, or other details, please include them here.

@twwu123
Copy link
Collaborator

twwu123 commented Oct 1, 2025

While the PR is quite close, it unfortunately has a misunderstanding on the purpose of additionalUtxos and additionalTxs.

These two fields are there for transaction chaining, which means they are additional context that doesn't exist on-chain.

We should not be fetching this information, because the entire idea is that this information is not available on-chain, and must be provided separately, via this field.

The implementation for this should be very simple, no fetching required.

  1. The outputs of additionalTxs should be parsed into the UTxO type, and added to additionalUtxos to create the context.
  2. This additional context should be sent along with the txCbor in the evaluateTx request.

@yanggu0t
Copy link
Collaborator Author

yanggu0t commented Oct 1, 2025

Thanks for the feedback! I've updated the implementation - switched to offline CBOR parsing instead of fetching. Should be good now 👍

@twwu123
Copy link
Collaborator

twwu123 commented Oct 1, 2025

Thank you! Will have a quick check and merge after.

@yanggu0t
Copy link
Collaborator Author

yanggu0t commented Oct 1, 2025

Ok, I’ll test all of them again because I found a small issue with the Blockfrost provider

@twwu123
Copy link
Collaborator

twwu123 commented Oct 1, 2025

If it's at all possible could you add some test cases in the mesh-provider package? It should be possible to run the tests if you set up the .env correctly.

@yanggu0t
Copy link
Collaborator Author

yanggu0t commented Oct 2, 2025

Updated the additionalUtxoSet format and added test coverage for koios,blockfrost,maestro,ogmios providers

@twwu123
Copy link
Collaborator

twwu123 commented Oct 6, 2025

Thanks a lot @yanggu0t, I've updated the test case to test for transaction chaining properly.

Essentially what I wanted was to evaluate a transaction that uses an input that doesn't exist on-chain. But this input is provided separately.

@yanggu0t yanggu0t force-pushed the feautre-update/evaluator-additional-txs-utxos branch from ade5796 to 62abb3b Compare October 8, 2025 10:13
@twwu123 twwu123 merged commit ab3feb3 into main Oct 8, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants