-
Notifications
You must be signed in to change notification settings - Fork 212
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
Smart wallet middleware #4398
Comments
@turadg to split out read-write as a separate issue |
I'd like to keep using the checklist here, so I'm re-opening this. In particular, our initial choice of marshaller for the wallet state publishes purses etc. so it needs work, as discussed in #5701 (comment) |
tldr: It looks like the Some of the "actions" and "schema" stuff is still fuzzy to me; here's hoping it becomes clear as we code it up. DetailWe have keplr @samsiegart asked: how do I map something like We know address. agoric-sdk/golang/cosmos/proto/agoric/swingset/msgs.proto Lines 14 to 17 in 21eb21d
That raises a question of the agoric-sdk/golang/cosmos/proto/agoric/swingset/msgs.proto Lines 60 to 61 in 21eb21d
on receipt, the go code seems to do: agoric-sdk/golang/cosmos/x/swingset/keeper/msg_server.go Lines 99 to 103 in 2f9eb8b
then I think we get to: agoric-sdk/packages/cosmic-swingset/src/block-manager.js Lines 104 to 105 in 98d3580
|
marshaling public + private stuff@samsiegart I broke ground on the problem, starting with a failing test: https://github.com/Agoric/agoric-sdk/blob/dc-smartwallet-marshal/packages/wallet/api/test/test-union-marshal.js b4db2c4 backgroundThe design sketch above includes:
The notifier records include things like brands that are also published by the AMM, and we want to recognize them as equal. See also Jan 21 discussion |
Currently we have The related Wallet Legibility doc has an example: It looks like marshalData1 = JSON.stringify({
body: [
'applyMethod',
{"@qclass":"slot", index: 0},
'deposit',
[
{
amount: {“@qclass”:”bigint”, digits: “3000000”},
brand: {"@qclass": "slot", index:1 },
}
]
],
slots: [[‘purse’, ["MyPurse"]], [‘brand’, ["IST"], {decimalPlaces:6}]],
}); |
wallet.proto is the evolution and replacement of WalletAction and
WalletSpendAction.
…--
Michael FIG
Software Engineer, Agoric
On Sun, Jul 31, 2022, 17:29 Dan Connolly ***@***.***> wrote:
Currently we have MsgWalletAction and MsgWalletSpendAction with a single
action field (aside from owner); I wonder how this relates to the json,
trivial, zoe, capdata, and unsafe from an internal wallet.proto I just
found.
The related *Wallet Legibility* doc has an example:
E(purse.actions).deposit(myPayment) becomes ['applyMethod', receiver,
purse.actions, 'deposit', [myPayment]].
It looks like receiver and purse.actions are supposed to collapse, and
myPayment is actually an amount:
marshalData1 = JSON.stringify({
body: [
'applyMethod',
***@***.***":"slot", index: 0},
'deposit',
[
{
amount: ***@***.***”:”bigint”, digits: “3000000”},
brand: ***@***.***": "slot", index:1 },
}
]
],
slots: [[‘purse’, ["MyPurse"]], [‘brand’, ["IST"], {decimalPlaces:6}]],
});
—
Reply to this email directly, view it on GitHub
<#4398 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADPUHEQYEKCNZHVCVKWY4DVW4D7LANCNFSM5M4E5SOA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
road not taken: needs pipelining / shorteningone of @michaelfig 's ideas turns out to be a bridge too far. See also #5933 |
I started asking @erights about a puzzle in this space, and he asked for a diagram. got started using http://www.webgraphviz.com/ but it's time for a meeting... so this is WIP
|
As noted in #3901 , we found the continuing invitation pattern sufficient for voting and for submitting oracle price updates. I'm not inclined to track this issue further. If there's anything important left in here, here's hoping we can scope it more clearly. |
What is the Problem Being Solved?
The existing Wallet UI is very close to using a model that is possible to implement via CosmJS-based middleware directly to the on-chain backend. This issue is to track the pieces needed for an end-to-end.
Description of the Design
On-chain, per-account state is accessible via Cosmos queries, events, and simple marshalled eventual sends can be made via transactions.
x/swingset
storage API.MsgWalletAction
Cosmos transaction to do a semantic operation (i.e. only one message needed per UI action)MsgWalletAction
is also published as a Cosmos event, but is designed only to report success or failure to the (single) calling UI initiating it (if any)NOTE: the wallet backend implementation is specifically not included in this item. For now, the backend will be a stub that produces:
Security Considerations
Key management is important. Will need to be reviewed by our security experts.
Test Plan
Integration testing, probably manual for now.
The text was updated successfully, but these errors were encountered: