Skip to content

upstream(core): Add input object notify in the writeback cache#11170

Open
jkrvivian wants to merge 2 commits intocore-protocol/upstream-changes/mainnet-1.48.4-1.49.2from
core-protocol/upstream-1.48.4-1.49.2/ed703
Open

upstream(core): Add input object notify in the writeback cache#11170
jkrvivian wants to merge 2 commits intocore-protocol/upstream-changes/mainnet-1.48.4-1.49.2from
core-protocol/upstream-1.48.4-1.49.2/ed703

Conversation

@jkrvivian
Copy link
Copy Markdown
Contributor

Description of change

Adds a notify_read_input_objects method to the ObjectCacheRead trait and implements it in WritebackCache. This allows transactions to wait until their input objects become available, replacing the need for polling in the transaction manager. The write_object_entry method now notifies waiters when objects are written.

Links to any relevant issues

Part of #11101

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

@jkrvivian jkrvivian added the node Issues related to the Core Node team label Apr 8, 2026
@jkrvivian jkrvivian self-assigned this Apr 8, 2026
@jkrvivian jkrvivian added the node Issues related to the Core Node team label Apr 8, 2026
@jkrvivian jkrvivian requested review from a team as code owners April 8, 2026 08:55
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

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

6 Skipped Deployments
Project Deployment Actions Updated (UTC)
apps-backend Ignored Ignored Preview Apr 14, 2026 1:00pm
apps-ui-kit Ignored Ignored Preview, Comment Apr 14, 2026 1:00pm
iota-evm-bridge Ignored Ignored Preview Apr 14, 2026 1:00pm
iota-multisig-toolkit Ignored Ignored Preview Apr 14, 2026 1:00pm
rebased-explorer Ignored Ignored Preview Apr 14, 2026 1:00pm
wallet-dashboard Ignored Ignored Preview, Comment Apr 14, 2026 1:00pm

Request Review

Copy link
Copy Markdown
Contributor

@bingyanglin bingyanglin left a comment

Choose a reason for hiding this comment

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

We should port the whole PR MystenLabs/sui#21995 instead of this single commit?

Copy link
Copy Markdown
Contributor

@semenov-vladyslav semenov-vladyslav left a comment

Choose a reason for hiding this comment

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

Two major concerns:

  • how and where is notify_read_input_objects used?
  • does MarkerValue::SharedDeleted correspond MarkerValue::ConsensusStreamEnded or not?

}
}

fn write_marker_value(
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.

It looks like the upstream's MarkerValue::ConsensusStreamEnded corresponds to MarkerValue::SharedDeleted. Should we add MystenLabs/sui@ed70303#diff-79208930f46fbe9a7259e6ec37d86d02b4f61b1537dad95fa2278c57225f087cR595 here?

if is_available {
results[*idx] = Some(());
}
}
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.

Should there be else if branch eg. else if self.get_last_shared_object_deletion_info(..)

.unwrap();

assert_eq!(result.len(), 1);
}
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.

The upstream commit has tests for ConsensusStreamEnded marker. I am not sure, but it looks like it corresponds to MarkerValue::SharedDeleted. Should we add corresponding tests?

_receiving_keys: &'a std::collections::HashSet<InputKey>,
_epoch: &'a EpochId,
) -> BoxFuture<'a, Vec<()>> {
unimplemented!("PassthroughCache does not support notify_read_input_objects")
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.

How and where is notify_read_input_objects used? Can we guarantee that passthrough cache is not used when it's called?

@jkrvivian
Copy link
Copy Markdown
Contributor Author

jkrvivian commented Apr 14, 2026

We should port the whole PR MystenLabs/sui#21995 instead of this single commit?

This PR ported the entire upstream PR. We ported the merged commit.

Now I get it, it's the missing piece that @semenov-vladyslav mentioned!

@jkrvivian jkrvivian force-pushed the core-protocol/upstream-1.48.4-1.49.2/ed703 branch from 22f2b45 to 3e2c5ed Compare April 14, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-protocol node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants