-
Notifications
You must be signed in to change notification settings - Fork 373
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
Transaction Chaining Method #1508
Comments
I recommend utilizing the current transaction batch/composition logics, which appear to be the "gno way" approach. This can be accomplished by creating batch-oriented contracts accessible to all through You can find the pull request for the I recommend delaying the discussion of creating a pseudolanguage for advanced transaction parsing within the mempool. Let's first identify the limitations of the current system. After that, we can focus on improving and expanding the mempool. It's important to keep the mempool simple, fast, and efficient. Here are some suggestions to proceed:
|
Does manfred's answer satisfy your question/problems? Are there action items on this issue? @notJoon |
@thehowl Oh, yes I think it's best to make it a function for now. no follow up action-item yet. should I close this issue or leave it open? |
Let's close it :) can always open a new one should you have a usecase where MsgRun does not satisfy your needs. |
Description
Transaction chaining is an action that executes the latter transaction based on the result of the previous transaction.
For example with GnoSwap, we have a feature called “One-click Staking”, which composed of two transactions. The first transaction is about adding a pool, then based on the result of the first transaction, the second transaction of staking will be followed. This is similar to method chaining or the pipe operation(
|
) in UNIX.Adding the transaction chaining feature would allow dApps to provide user-friendly and convinient features, like the One-click Staking mentioned above. I think it's a useful feature in situations where chain actions are needed.
To implement enhanced transaction chaining, the following conditions must be satisfied:
Below is the pseudocode for implementing chain transactions:
As an aside, if introducing new syntax, adopting Elixir's pipe operator might not be a bad idea. But it’s cumbersome to implement, so may not feasible.
A way of implementing this feature has not been decided yet (I believe there are various options for this that I’m not aware of), so I’m open to any ideas/opinions from others on this. If you have any good suggestions, please leave them in the comments below. Thank you.
Additional notes
In the Cosmos SDK, I've seen that messages are processed atomically, and I think extending this functionality would allow for pipelining.
cc: @dongwon8247 @r3v4s @mconcat
The text was updated successfully, but these errors were encountered: