Skip to content

fix(iota-core,iota-protocol-config): do not lock immutable objects in post-consensus conflict resolution (#12602) - #12661

Open
filipdulic wants to merge 2 commits into
developfrom
consensus/bug/12602-immutable-object-locks
Open

fix(iota-core,iota-protocol-config): do not lock immutable objects in post-consensus conflict resolution (#12602)#12661
filipdulic wants to merge 2 commits into
developfrom
consensus/bug/12602-immutable-object-locks

Conversation

@filipdulic

@filipdulic filipdulic commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description of change

Under the P-COOL flow, post-consensus conflict resolution derives its owned-object lock set from the raw transaction bytes, where ImmOrOwnedMoveObject covers immutable objects too. An immutable object's reference never changes and the per-epoch lock table is insert-only, so the first transaction reading e.g. a CoinMetadata locks it for the rest of the epoch — every later reader is dropped with ObjectLockConflict.

The fix, gated behind a new pcool_skip_immutable_object_locks feature flag (rides the existing version-33 arm, which is unreleased — devnet still advertises 32; set for all chains, inert without enable_pcool_flow):

  • The main path acquires locks from the object set the post-consensus deny checks already load, which excludes immutable inputs. No new reads.
  • An already-executed transaction derives its lock set from its own effects (old_object_metadata): every consumed owned input appears there, immutable inputs never do, and effects are identical on every validator regardless of execution progress.
  • The conflict probe stays on the raw byte-derived set — an immutable reference can never be found in any lock tier.
  • handle_transaction_validation_checks now reports transaction-owned and authenticator-owned references separately. Existing callers (certificate-flow signing, soft locks) consume only the transaction set, so behavior outside P-COOL is unchanged. The authenticator list is provably empty today (validation only admits immutable or shared authenticator inputs); it exists so post-consensus locking keeps covering those inputs if that rule ever changes.

Links to any relevant issues

fixes #12602

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

Unit: the repro (two readers of one immutable object), a flag-off counterpart pinning the old behavior, and the already-executed branch — including a failed execution and an owned input the Move call never mutates. E2E: reading the IOTA CoinMetadata twice within one epoch, on both schedulers. Protocol-config snapshots regenerated (one line per chain).

Release Notes

  • Protocol: Adds pcool_skip_immutable_object_locks (protocol version 33): immutable transaction inputs no longer acquire owned-object locks in post-consensus conflict resolution. Inert unless the P-COOL flow is enabled.
  • Nodes (Validators and Full nodes): Fixes transactions being rejected with ObjectLockConflict against an immutable input (e.g. a CoinMetadata) for the remainder of an epoch under the P-COOL flow.
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • gRPC:

🤖 Generated with Claude Code

https://claude.ai/code/session_01QHZ8T9kqPKHyM6s7gDuSpr

@filipdulic filipdulic added the consensus Issues related to the Core Consensus team label Aug 13, 2026
@filipdulic filipdulic changed the title fix(iota-core,iota-protocol-config): fix(iota-core,iota-protocol-config): do not lock immutable objects in post-consensus conflict resolution (#12602) Aug 13, 2026
@filipdulic
filipdulic force-pushed the consensus/bug/12602-immutable-object-locks branch 2 times, most recently from c109c6e to e7ccaae Compare August 13, 2026 11:36
@filipdulic
filipdulic marked this pull request as ready for review August 13, 2026 12:06
@filipdulic
filipdulic requested review from a team as code owners August 13, 2026 12:06
Comment thread crates/iota-core/src/unit_tests/post_consensus_validation_tests.rs Outdated
Comment thread crates/iota-core/src/post_consensus_validation.rs Outdated
Comment thread crates/iota-core/src/authority.rs Outdated
@filipdulic
filipdulic force-pushed the consensus/bug/12602-immutable-object-locks branch from e7ccaae to e377cd8 Compare August 14, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus Issues related to the Core Consensus team core-protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Immutable objects acquire a permanent owned-object lock under the P-COOL flow

4 participants