Consolidate accountSpecifier terminology #1683
Replies: 5 comments
-
i'll add some context here. myself and @mrnerdhair came up with this name in december. CAIP10 defines an originally @mrnerdhair suggested naming them the issue is related to unchained, and UTXO chains. we call unchained with x/y/zpubs for UTXO chains, which is closer to an account, rather than an address. for account based chains (ethereum and cosmos so far), the account is the address. an ethereum or cosmos account specifier, as we know it, does conform to caip10.
in their current form, an "account specifier" of form this comment above doesn't provide suggestion, but rather history and context as to how we got to this place, and some key requirements (encoding of chain id, and some sort of account... specifier/id) that's required to be able to call unchained, and uniquely identify accounts across chains. |
Beta Was this translation helpful? Give feedback.
-
to add some further thoughts that might get us closer to a solution we need to think in the cross chain domain.
my preference would be to settle on the term and type an the |
Beta Was this translation helpful? Give feedback.
-
This is all sort of a dumpster fire. What we really need, though, isn't necessarily to solve for the philosophical definition of an "account", but for the specific information needed to query Unchained for the transactions associated with one. We could, for example, go strict CAIP-10 everywhere -- except that then we'd have to send Unchained a whole set of individual receipt and change addresses instead of one string, and that's not OK. So I still say we go with |
Beta Was this translation helpful? Give feedback.
-
Thanks for the replies frens! First of all @0xdef1cafe , this is really great context you've provided, I didn't know that this terminology was created to accommodate for unchained expecting a format that's not compliant to the CAIP10 spec, which makes sense given we effectively need to augment the CAIP10 with more information that's in the spec. So in reality, what we need for unchained is effectively a All the insights on "what's an account" are also very helpful, and I agree we shouldn't try to think in terms of crazy account abstractions - our current slice does a good job at that with our current requirements - if all we need is to have unchained-compliant account specifier strings. The rationale to that, as noted in the previous comment, is that there exists multiple different ways to abstract accounts, from the 0 abstraction "address === account", to the most recent EIP-4337 or smart contract wallets a la Gnosis Safe, and within that spectrum lays a whole lot of different ways to define an "account". I like the approach of an |
Beta Was this translation helpful? Give feedback.
-
@gomesalexandre just make sure you understand we have this mapping in the portfolio. we can use CAIP10s for UTXO chains, but it means we have to store the balance for each account address, under some top level identifier, and aggregate it to be able to display a useful balance to the user. @mrnerdhair i think we need to approach this from a developer and user perspective, not a bean counter one. a user with a UTXO account expects to see the aggregated balances of all the account addresses under that xpub, and a developer expects to be able to make a similar call. @kaladinlight might be able to weigh in on the option of sending a different type of request to unchained, but ultimately, we still need some top level "account" type identifier to aggregate these account address balances into one. i also disagree that the same term can't be used in two different contexts. the AccountId in the context of hdwallet makes sense, and it also makes sense in a different context in web. |
Beta Was this translation helpful? Give feedback.
-
Currently, we have some discrepancies in what we call an accountSpecifier.
In
accountSpecifiers
slice, they're in the form of a {[chainId: ChainId]: PubKey(ish)}, e.g:'cosmos:cosmoshub-4': 'cosmosmypubkey'
'eip155:1': '0xgomespubkey'
'bip122:000000000019d6689c085ae165831e93': 'ypubMyYPub'
What's an account specifier then? a CAIP10? The value of this object i.e an AssetId/xpub/ypub/zpub?
It seems like the source of the confusion came from the fact that (x|y|z)pubs are not AssetIds as per the CAIP19 spec and from there, we just started referring to accountSpecifiers.
Also, given the shape of our accountSpecifiers slice, we refer to them alternatively as their key:value, or value, e.g:
value e.g "pubKeyish"
Here, we map on
accountSpecifiers
and destructure anaccountSpecifier
(?) from the value:web/src/context/TransactionsProvider/TransactionsProvider.tsx
Lines 45 to 46 in 0e63e45
key:value
Here, we reconstruct what we call an accountSpecifier with key:value using selectAccountSpecifierStrings:
web/src/state/slices/accountSpecifiersSlice/selectors.ts
Lines 12 to 16 in 0e63e45
As a temporary terminology, we've gone with
pubKeyIsh
:But this is just bringing more confusion.
We should really have just one format of what we call an accountSpecifier, whichever it is, and we should make it clear whether or not that's a caip10, or a pubKeyish (what's a pubKeyish?), and stick to this spec whenever we refer to accountSpecifiers.
@elmutt and @DaoDev44 I know that you guys have had a lot of issues with this terminology during the Cosmos work and had some insights on consolidating/unifying what we call account specifiers, so happy to read about the outcome of these discussions here.
Beta Was this translation helpful? Give feedback.
All reactions