Skip to content

Defer owned object double spending transactions - #26886

Merged
mwtian merged 1 commit into
mainfrom
akichidis/defer-double-spend
Jul 21, 2026
Merged

Defer owned object double spending transactions#26886
mwtian merged 1 commit into
mainfrom
akichidis/defer-double-spend

Conversation

@akichidis

@akichidis akichidis commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

Today conflicting transactions on owned object locks result to the drop of transactions from the commit output - when processing on consensus handler - and only the transaction that managed to acquire the locks eventually execute.

This PR will detect, in the same commit, the presence of conflicting transactions and will enforce on execution deferral , by 1 round, the transaction that acquire successfully the locks.

Release plan

  • Initially release without enabling the flag to gather metrics
  • Once satisfied with the observability the feature will get enabled

Test plan

CI/PT/Antithesis

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
multisig-toolkit Building Building Preview, Comment Jul 21, 2026 6:43pm
sui-docs Ready Ready Preview, Comment Jul 21, 2026 6:43pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sui-kiosk Ignored Ignored Preview Jul 21, 2026 6:43pm

Request Review

Comment thread crates/sui-core/src/consensus_handler.rs
@akichidis
akichidis temporarily deployed to sui-typescript-aws-kms-test-env June 5, 2026 09:58 — with GitHub Actions Inactive
@akichidis
akichidis temporarily deployed to sui-typescript-aws-kms-test-env June 5, 2026 10:58 — with GitHub Actions Inactive
@akichidis
akichidis force-pushed the akichidis/defer-double-spend branch from 46a69b9 to 73b4bd6 Compare June 5, 2026 11:07
@akichidis
akichidis temporarily deployed to sui-typescript-aws-kms-test-env June 5, 2026 11:07 — with GitHub Actions Inactive
@akichidis
akichidis temporarily deployed to sui-typescript-aws-kms-test-env June 5, 2026 13:14 — with GitHub Actions Inactive
@akichidis
akichidis marked this pull request as ready for review June 5, 2026 13:25
@akichidis
akichidis requested a review from a team as a code owner June 5, 2026 13:25
@akichidis
akichidis temporarily deployed to sui-typescript-aws-kms-test-env June 5, 2026 13:25 — with GitHub Actions Inactive
// defer it as a penalty.
if let Some(conflict_info) = state
.contested_transaction_digests
.get(transaction.tx().digest())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

every call to tx().digest() is a fresh blake2b hash, lets pull the digest out into a local variable once at the top of this function

Detect transactions that contend for the same owned-object lock within a consensus commit and defer the winning transaction by one consensus round, subject to the existing congestion-control deferral limit.

Attribute contention to sequencing authorities, expose winner and conflict metrics, preserve the first recorded winner author, and cover duplicate winners and multi-author conflicts with regression tests.

Gate the behavior behind defer_owned_object_double_spend at protocol version 132 and update the affected snapshots.
@mwtian
mwtian force-pushed the akichidis/defer-double-spend branch from c22bcb0 to 67a2406 Compare July 21, 2026 18:38
@mwtian
mwtian temporarily deployed to sui-typescript-aws-kms-test-env July 21, 2026 18:38 — with GitHub Actions Inactive
@mwtian
mwtian enabled auto-merge (squash) July 21, 2026 18:39
@mwtian
mwtian merged commit b483aa8 into main Jul 21, 2026
64 of 66 checks passed
@mwtian
mwtian deleted the akichidis/defer-double-spend branch July 21, 2026 19:05
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.

3 participants