-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Connector Aware Estimation #3736
Comments
I have not done a proof of concept here yet, so this may evolve. |
@petertonysmith94 I think I was overdoing it in our previous discussion, something simple like this would work by moving the connector level logic from submission -> preparation. But have a look and see what you think, I will pick up any progress made next week :) |
We will now be working on this in tandem with #3669. |
Okay, I'm now blocked on this until The WIP PR is looking pretty solid and includes e2e tests using an associated predicate account that requires an external signer (very similar to the EVM/SVM predicates). I'm having trouble testing solana locally with the connectors repo (phantom doesn't support localnet + the predicate bytecode I'm deploying locally doesn't seem to be matching up). My preference is to wait for I've asked the |
When I wrote that message both of them were on |
TLDR
Connector Aware Estimation is the process of giving the SDK more awareness of the account level semantics earlier in the transaction flow to reduce round trips to the network.
Problem
Let's imagine the following transaction flow for non-native wallets:
In the first stage, the SDK estimates the transaction as normal.
Once it hands off to the connector, and we introduce the non-native account, we must add the predicate to the transaction. Therefore meaning the transaction must be re-prepared.
This is obvious redundancy that could be mitigated by giving the SDK the context earlier in the flow:
Potential Solution
prepareTransaction
function to the connector interface, that can alter a transaction request with any of it's own specifics, such as adding the non-native predicate.connector.prepareTransaction()
at the estimation and funding SDK entry points.connector.sendTransaction()
calls.Notes
prepareForSend
- Inverted Submission Flow #3665The text was updated successfully, but these errors were encountered: