Skip to content

Conversation

aschran
Copy link
Contributor

@aschran aschran commented Sep 16, 2024

This will not function until consensus adapter/handler side is implemented.

This will not function until consensus adapter/handler side is
implemented.
@aschran aschran requested review from akichidis and mwtian September 16, 2024 19:52
Copy link

vercel bot commented Sep 16, 2024

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 Sep 29, 2024 7:32pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 29, 2024 7:32pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 29, 2024 7:32pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 29, 2024 7:32pm

&self,
request: tonic::Request<HandleTransactionRequestV2>,
// TODO: Do we want to make a new response type for this?
) -> WrappedServiceResponse<HandleCertificateResponseV3> {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems more refactoring will be needed to support soft bundle. Most of the logic here should be shared between handle_transaction_v2 and handle_soft_bundle_transactions_v2 handlers. Or we can take the opportunity to support batched transaction submission with a single handler, which should cover the soft bundle use case as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was not originally planning to support soft bundle for the first prototype. do you think that's worth adding to this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, we can definitely can back and refactor later.

Copy link
Contributor

@lxfind lxfind left a comment

Choose a reason for hiding this comment

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

How does this look like with #19320?

}

#[instrument(level = "trace", skip_all)]
pub async fn handle_transaction_v2(
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem to be the right naming anymore since we are only doing various checks here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have an alternate suggestion for name?

I think actually the existing handle_transaction was poorly named and should have been called sign_transaction. But for the new one I'm adding, handle is more apt because we really are handling the full transaction e2e: sending an unsigned tx through consensus, executing it, and returning the effects. I didn't think temporary confusion of naming overload would be too bad, bc eventually we plan to remove the old version.

@aschran
Copy link
Contributor Author

aschran commented Sep 18, 2024

How does this look like with #19320?

I don't think anything changes here? We aren't acquiring locks for the tx in the RPC handler anymore, that will need to be done on the consensus handler side

@aschran
Copy link
Contributor Author

aschran commented Sep 20, 2024

#19320

How does this look like with #19320?

I don't think anything changes here? We aren't acquiring locks for the tx in the RPC handler anymore, that will need to be done on the consensus handler side

Ok this is now relevant since I added locking, commented on that PR

@aschran aschran requested review from lxfind and mwtian September 20, 2024 14:07
Copy link
Contributor

@mwtian mwtian left a comment

Choose a reason for hiding this comment

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

Lgtm but let's wait for a day or two for reviews from other folks.

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.

4 participants