-
Notifications
You must be signed in to change notification settings - Fork 72
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
soroban-cli: Add Auth-next signing support #749
Conversation
b8270af
to
f4b7ecd
Compare
7af7882
to
ede4461
Compare
@dmkozh When I'm testing this, I keep getting TxInsufficientFee for any txn which involves auth-next signing... |
Yes, as we don't support enforcing preflight yet, there are some gaps in terms of what we can meter in recording mode. Signature verification requires some additional instructions (though IIUC this didn't get to the stage where this is enforced). Also tx size will be increased a bit due to signatures. This should only need a small fee increase though and IIRC preflight already adds about 15% on top of the computed fee. So not sure what else could be missing. |
It could be that the transaction is quite small, so 15% is not enough for the extra signature in my case. What is the formula for increasing the size due to the signatures? Is it just adding those bytes onto the |
The increased tx size needs to be passed to the fee computation library. It will be reflected in the final non-refundable resource fee. To be more specific, it will be included in tx size fee and historical fee. But really if you want to compute fees outside of the rust library, you should rather port the whole library (https://github.com/stellar/rs-soroban-env/blob/main/soroban-env-host/src/fees.rs) |
4396f6a
to
92f07bb
Compare
abda5b8
to
cac6610
Compare
4e09c43
to
c463c0f
Compare
c463c0f
to
ec8ed6a
Compare
Fixes #683
Adds support for SorobanAuthorizationEntry (i.e. auth-next) multi-party signing in the soroban-cli.
Usage
Notes
To get this to work, I've had to change the rpc
simulateTransaction
endpoint. Now, if the txn includes anySorobanAuthorizationEntries
, the simulation runs in enforcing auth mode. This means that the nonce the user sent will be used, generating the correct footprint and fees.Todo
simulateTransaction
updateS...
format