-
Notifications
You must be signed in to change notification settings - Fork 125
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
Software Design: Introduce nonce caching #318
Comments
Maybe in a first version we can introduce a
This will already be some work to think about how the trait should look, how to configure this and how to pass the |
I agree in general, but before doing all this work, we should probably make sure that a local nonce cache does make sense. At least theoretically. E.g. find out if such a cache could ever be robust enough to be applied in the field. What do you think? |
Yes, I agree and I think even this "simple" approach is more involved that it seems at first glance. |
Yes. I was just thinking about the separation of creating and sending extriniscs. The creation is done without the api, while the sending is done with it. For a cache, those two elements would need to be combined somehow. Otherwise, the cache could never be reverted / updated in case something goes wrong during sending. |
Currently, every
compose_extrinsic!
call, calls the substrate storage. There's already a workaround for this by usingccompose_extrinsic_offline!
, but it sure would be nice, to have a nonce cache that caches the nonce, and updates it with a storage request in case of a failure (e.g. mark it as dirty or something).Complexity: When to revert nonce? What about future?
The text was updated successfully, but these errors were encountered: