Skip to content

Implement transfers out of ConsensusV2 #21683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged

Conversation

aschran
Copy link
Contributor

@aschran aschran commented Apr 1, 2025

We need to write ConsensusStreamEnded marker any time a consensus object is transferred out of consensus. (Right now this is only done when it's deleted or wrapped but not otherwise.)

Stacked on #21665


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Apr 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2025 1:42pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 1:42pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2025 1:42pm

Copy link
Contributor

@mystenmark mystenmark left a comment

Choose a reason for hiding this comment

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

Reviewed top commit only, since this appears to be a stack.

One suggestion + approved.

)),
IDOperation::None,
) => Some((*id, self.lamport_version, *object_digest)),
_ => None,
Copy link
Contributor

Choose a reason for hiding this comment

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

consider

match (
     &change.input_state,
     &change.output_state,
     &change.id_operation,
 ) {
     (
         ObjectIn::Exist((_, Owner::ConsensusV2 { .. })),
         ObjectOut::ObjectWrite((object_digest, Owner::ConsensusV2 { .. })),
         IDOperation::None,
     ) => None,
     (
         ObjectIn::Exist((_, Owner::ConsensusV2 { .. })),
         ObjectOut::ObjectWrite((object_digest, _)),
         IDOperation::None,
     ) => Some((*id, self.lamport_version, *object_digest)),
     _ => None,
 }

as a more future proof alternative

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate on how this is more future-proof? If we introduce a new Owner type, there's no way of knowing in advance whether it will be a consensus type or a fastpath type.

We need to write ConsensusStreamEnded marker any time a consensus object is transferred out of consensus. (Right now this is only done when it's deleted or wrapped but not otherwise.)

Stacked on #21665
@aschran aschran force-pushed the aschran/cov2-write-marker branch from b8e1207 to c86069b Compare April 3, 2025 13:39
@aschran aschran temporarily deployed to sui-typescript-aws-kms-test-env April 3, 2025 13:40 — with GitHub Actions Inactive
@aschran aschran merged commit b883ff6 into main Apr 4, 2025
47 checks passed
@aschran aschran deleted the aschran/cov2-write-marker branch April 4, 2025 14:50
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.

2 participants