Skip to content

upstream(iota-adapter-transactional-tests): Port upstream miscellaneous chores (lock_file, simtest, tests) - #12691

Open
Dkwcs wants to merge 2 commits into
vm-lang/upstream/mainnet-1.47.1-1.50.1from
vm-lang/upstream/10837-Port-upstream-miscellaneous-chores
Open

upstream(iota-adapter-transactional-tests): Port upstream miscellaneous chores (lock_file, simtest, tests)#12691
Dkwcs wants to merge 2 commits into
vm-lang/upstream/mainnet-1.47.1-1.50.1from
vm-lang/upstream/10837-Port-upstream-miscellaneous-chores

Conversation

@Dkwcs

@Dkwcs Dkwcs commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

[run-ci]

Description of change

Ports a batch of independent upstream maintenance commits:

  • Exposes a lock-file update entry point that does not require a WalletContext.
  • Adds transactional tests for entry-function argument checks under dry run and dev inspect, for gas smashing and deletion rebates during dry run, and for pass/fail publish and upgrade paths — plus the --dry-run support in the test framework those tests need.

Upstream commits

Commit Description
e980dcbf0bbb9a92f77b5e08fabef75b5619bad7 chore: expose update_lock_file fn that does not depend on wallet context
60e2ea1e68378f177e8168a23399a8a9812d4148 Extra entry, gas, upgrade and publish transactional tests

Skipped

Commit Description Reason
2c50e39af115d3affddf4e297695a4a91d8e4faf Fix simtest determinism — tempfile after version 3.15.0 can pollute the simulator PRNG Already downstream — nothing left to apply.

The skipped commit replaces tempfile::tempdir() with a wrapper that keeps the simulator PRNG clean. IOTA already does exactly that via iota_common::tempdir(), which wraps nondeterministic!(tempfile::tempdir()), applied repo-wide in #11189 (d49476f37c). All three of its changes are in place: iota-common is already a dependency of iota-move-build, BuildConfig::new_for_testing already calls iota_common::tempdir(), and the direct tempfile dependency the patch expects in that crate is already gone.

Downstream adaptations

File Upstream Downstream Adaptation
iota-package-management/src/lib.rs new update_lock_file_for_chain_env takes response: &SuiTransactionBlockResponse update_lock_file_with_package_id (IOTA-only, added in #9151 for multi-package publish) already extracts the object ref one layer up the new function takes original_id: ObjectId, version: u64 instead; response extraction stays where downstream already had it
iota-package-management/src/lib.rs context.config.get_active_env(), &env.alias context.active_env(), env.alias() (getset accessor) use the downstream API
iota-package-management/src/lib.rs version.into() get_new_package_obj_from_response returns ObjectReference, not Sui's ObjectRef tuple, so version is already u64 pass version through
iota-transactional-test-runner/src/args.rs dry_run added after gas_price IotaPublishArgs has an extra downstream field, view_functions same field placed after gas_price; attribute taken verbatim
iota-transactional-test-runner/src/test_adapter.rs dry-run block anchored on dependencies.extend([MOVE_STDLIB_PACKAGE_ID, IOTA_FRAMEWORK_PACKAGE_ID]) dependencies.extend([ObjectId::STD, ObjectId::FRAMEWORK]) block inserted after the downstream line; block contents unchanged
tests/publish/basic.move header year 2025 new file added by this port header year is the current year, 2026
the five .snap files filtered out of the Slipstreamer patch regenerated locally with cargo insta, then compared against the upstream snapshots at 60e2ea1e

Snapshot differences against upstream fall into three expected categories: line numbers shifted by exactly +1 (extra IOTA licence line), error text rendered as prose downstream where Sui prints the Debug of the error enum, and different gas summary figures. Task structure, ordering, per-task pass/fail and the created/mutated/deleted object sets all match upstream. The gas amounts the new tests rely on needed no retuning — the balances in the assertions match upstream exactly.

For whoever ports the [pkg-alt] series: upstream has since deleted update_lock_file and update_lock_file_for_chain_env outright, in 1a19182f375cc27195e17004d46c711fdeec1ae5 [pkg-alt] remove move-package usages. Chasing exact signature parity in this crate buys little, which is why the adaptation above keeps the downstream shape.

Links to any relevant issues

Fixes #10837 .

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

  • cargo nextest run -p iota-adapter-transactional-tests — 324/324 pass, including all five tests touched here.

  • cargo nextest run -p iota-verifier-transactional-tests — 211/211 pass (second consumer of the test runner).

  • cargo check -p iota-graphql-e2e-tests --all-targets — clean (third consumer; running it needs Postgres, so compilation only).

  • cargo check -p iota-package-management, cargo check -p iota --lib — clean; the four existing update_lock_file call sites are unaffected.

  • cargo clippy on both touched crates, cargo +nightly fmt --all, cargo ci-license — clean.

  • Every regenerated snapshot diff was reviewed individually, and additionally compared against the upstream snapshots at 60e2ea1e.

@Dkwcs Dkwcs self-assigned this Aug 17, 2026
@Dkwcs Dkwcs added the vm-language Issues related to the VM & Language Team label Aug 17, 2026
@iota-ci iota-ci added the sc-platform Issues related to the Smart Contract Platform group. label Aug 17, 2026
@Dkwcs
Dkwcs marked this pull request as ready for review August 18, 2026 12:43
@Dkwcs
Dkwcs requested a review from a team as a code owner August 18, 2026 12: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.

2 participants