-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add primary key to account #2085
Comments
Signed-off-by: Aleksandr Petrosyan <[email protected]>
Signed-off-by: Aleksandr Petrosyan <[email protected]>
relevant RFC |
My plan
Out of scopeThe following are left to other issues:
Why is this change necessary?Pros
Cons
Record of my thoughtsRecord of my thoughts
|
Do we necessarily have to exclude
I think we need this, but it must remain optional
so every account will have to have a unique primary key, but secondary keys can be used by multiple accounts
we can leave this for later
what is meant by this? |
does it have to be derived? it can be any string set by the user, but when setting it we have to make sure it's unique in the blockchain |
obviously in this case offline creation can fail if user sets a non-unique account alias |
Added the Record of my thoughts section to the bottom of #2085 (comment) |
So, implicitly an account is going to be identified by it's public key unless an optional alias ( Consequently I've got some further questions:
|
we consider this so improbable that for all intents and purposes is impossible
I'd prefer not
I'd say no, let's keep it simple. User can only define an alias when registering account.
yes |
Seems all entities referencing an account must rely on the key based identification exclusively though (assets, permission tokens, maybe smth else) to prevent unregistering + registering with same alias kind of 'attack'. Alternatively, aliases might be made exclusive no matter whether the associated account is unregistered or not (which does not seem memory effective though).
If that's optional I guess we still should allow an account to set that after registering, right? The other question is how an account is going to be addressed 'by default' (alias alternative), just the primary public key? |
if that is a problem, then that is a problem even with the current accounts, no? We've had a similar problem with permission tokens. I've opened #4329 for this
why? it's optional but you have to decide at the time of registering whether or not to set an alias. If that is really required we can always add that functionality. To keep it simple let's just allow defining aliases at the time of registering |
right, seems so even now, though I was rather referring to a scenario of taking over an asset or entity ownership (apparently) via registering an account with the alias used by the initial account
agree |
Prerequisite
|
Replies to comments1. Need to exclude domain ID?This question brought insight. See "K" and "KD" comparison in the table 2. Impacts of account ID without domain ID?The basic idea to absorb those impacts would be to consider the data access flow separately from the organizational chart. for example:
- world.domains: Map<DomainId, Domain>
- domain.accounts: Set<AccountId>
- domain.assets: Set<AssetId>
- world.accounts: Map<AccountId, Account>
- account.domain: DomainId
- account.assets: Set<AssetId>
- account.portfolio(): Map<AssetId, Balance>
- world.assets: Map<AssetId, Asset>
- asset.domain: DomainId
- asset.distribution: Map<AccountId, Balance> where:
3. Primary and secondary keys?I have no idea about secondary keys at the moment. 4. Is uniqueness enough?Yeah, that's exactly why I'm cautious about this change. 5. Identified by keys unless has aliases?In the user interface, that will be true. 6. Deny aliases of KD format?Yeah, KD-format ID and KD-format alias will never be distinguished. 7. Same key for different IDs?8. Multiple aliases?Feasible. Aliases are optional, which means they are mapped to IDs internally 9. Remove or modify aliases?Feasible. Keys of the alias-to-id map will be checked if they collide 10. Alias transfer, or hijacking?An alias released by someone else can be retrieved at the next block time. |
|
After reviewing the original requirements, I found the new account IDs required more than just uniqueness.
The problem is that for such account that does not require registration, there is no clue to the "account signatories" other than its ID (address) Role of
|
If |
I have looked into the comments and thoughts, but don't have any comments/objections. |
Register account that does not require registration?It may seem contradictory that registration is required for shared accounts when no registration is required, so let me explain.
There is a gap between being the object of a transaction (2) and being the subject that exercises authority (3).
// inside chain
- account_personal
- id: PublicKey as AccountId // required for authentication
- signatories: []
- signature_check_condition: None
- account_shared
- id: PublicKeyLike as AccountId
- signatories: [PublicKey] // required for authentication
- signature_check_condition // required for authentication That's why additional registration (or "activation") is required for shared accounts. Also, this is the reason why PoC
Reference |
If we go forward with this, I'd like to have a more solid basis for rejecting other candidates. For example, I suggested implementing multi-signature using triggers, but I'm not sure if that's a good way to go. Impacts on the existing codebase
|
MotivationCurrently, new participants cannot take any action without having their accounts registered by others, which is not what a public blockchain does.
The rest is detailed here #2085 (comment) |
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
BREAKING CHANGE: - change `AccountId` from "name@domain" to "multihash@domain" - make account signatory single - make transaction signature single - remove query `FindAccountsByName` closes issue hyperledger-iroha#2085 Signed-off-by: Shunkichi Sato <[email protected]>
Refactor the accounts to only optionally have an alias.
We still need to retain the current semantics of account structure, but most data should be stored in a separate location: hash-table keyed by the account's ss58 (or pub_key) address, which contains actual data, an account alias is only an interface to all of that.
The text was updated successfully, but these errors were encountered: