-
Notifications
You must be signed in to change notification settings - Fork 1
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
docs: add a draft of kuai proposal #5
base: main
Are you sure you want to change the base?
Conversation
b47cd2c
to
4807b3a
Compare
039ce94
to
8656500
Compare
Add a draft of kuai proposal to elaborate on the motivation, design and schedule.
8656500
to
3dbad76
Compare
This is cool! The abstractions data/code/token seems to sit on different levels:
If so I'd suggest stating the different abstraction levels explicitly in the documentation. I also think "data" and "code" are pretty bad names ... I believe better choices exist, e.g. Store / Contract / Token would read clearer to me. I have a question about the "MultiCoin Token" - why the prefix "MultiCoin"? Is "MultiCoin Token" a model of one token, or it is a model of an aggregation of tokens? Is a "MultiCoin Token" held by a user or issuer? |
Is the ABI means interface about DApp? Because the |
Renaming
Relation between I would take JavaScript Built-in Objects Map, Reflect and Date as analogues to clarify their relationship in abstractions.
With a set of standardized interfaces, we can build a model tree of a DApp, as briefly mentioned in the draft. flowchart BT
cell_a_0_model --> dapp_a_sub_model
cell_a_1_model --> dapp_a_sub_model
cell_a_n_model --> dapp_a_sub_model
dapp_a_sub_model --> dapp_a_model
cell_b_0_model --> dapp_b_model
cell_b_1_model --> dapp_b_model
cell_b_n_model --> dapp_b_model
dapp_b_model --> dapp_a_model
This idea is from actor model so the structure of an application is similar. Actor model is a programming paradigm for concurrent computation, states will not be stored in a single point, but distributed to various actors so computation could be performed in many actors. Actor model follows several fundamental rules
From the perspective of the model tree and CKB's cell model, states/cells will not be stored in a single
States/cells are arranged isolatedly into different pieces and can only be changed by messages, the updates are sequenced and data conflicts are avoided naturally. One more interesting point is that model tree could be server-agnostic. As mentioned in the draft, if DApp_A relies on DApp_B, e.g. Swap DApp relies on Token DApp, model tree of DApp_B will be a part of DApp_A's model tree, illustrated in the diagram above, and DApp_A have to rebuild the model tree of DApp_B to interact with it. In actor model, DApp_B's model tree could be rebuilt locally or remotely because the interactions are transferred by messages, thus DApp_A could request the server of DApp_B to output Take a concrete example, there's a Swap DApp to swap Token A and Token B. Now user wants to swap X token a with Y token b from Swap DApp
If there's a special DApp Pool of Token A and B in the example above, it would be built on the top of |
Ideally, a
It's too detailed so I haven't considered it. |
Does a |
Will all data be stored in the blockchain? Who will pay for the capacity? |
Of course, some classic patterns, or say aggregation services/schema&sql will be provided by In the "Swap DApp requests Token A DApp to take an action transfer X from swap_pool to user and return a
|
Data are stored on the chain and the spender of capacity should be decided by DApps. But the |
Hi, I would like to learn, the Cell of CKB and JIG have a big difference is that Cell is able to verify rule on-chain, JIG's Code actually just store the code in |
I didn't think about it too much and haven't clearly learned Marlowe so we can have a discussion about it. For now, there would be some DSL, as the |
I think I've got the point after reading the part of Executing a marlowe contract In Marlowe some instructions like |
1. rename models to `Store`, `Contract` and `Token` 2. complement details added in #5 3. add some promising features
The draft of the proposal has been updated by docs: update draft of kuai proposal
and please review it again. |
1. rename models to `Store`, `Contract` and `Token` 2. complement details added in #5 3. add some promising features
1a5a59b
to
db791f4
Compare
Do users need to sign transaction via MetaMask? |
I understand that it depends on whether Kuai will integrate Omnilock, which we can probably discuss in the detailed design phase |
If If |
Capacity managementUnlike most UTxO systems, the economic model of CKB has a concept of "state rent", where the data written on-chain need 1 byte/CKB, which makes capacity management difficult. Message is also the stateAFAIK, message is also a kind of state, right? Maybe Kuai provides the channel for these messages, but these messages may need to exist in a different actor (Cell), which means dApp user might need to write data to the Cell, and wouldn't this action of sending a message cause a UTxO concurrency problem? |
Minor typos in the draft of Kuai: |
Most of them will be fixed by github suggestions above, except
which intentionally means
So I prefer to turn it into
It may be still clumsy, and feel free to revise it. |
@zhengjianhui @pygman @Daryl-L This proposal is a good starting point for the kuai project, please have a review |
Webpage of run network has been removed. Using link of web archive instead Signed-off-by: Chen Yu <[email protected]>
Add a draft of kuai proposal to elaborate on the motivation, design and schedule.
Preview: https://github.com/ckb-js/topics/blob/add-draft-of-kuai-proposal/README.md