dhiway / cord

CORD - Enterprise Blockchain Framework
https://cord.network
GNU General Public License v3.0
161 stars 112 forks source link

schema-accounts: Add pallet for accounts based schema management #514

Closed vatsa287 closed 1 month ago

vatsa287 commented 1 month ago

This PR,

vatsa287 commented 1 month ago

is 9400 better, or 9310 better as newer version?

I believe 9310 can be made, and next upcoming PR can have it updated to 9400 when it integrates account based schema with registries pallet. I am not sure if both 9300 and 9310 stands for 0.9.3 or it differs.

is 'schema-accounts' a good name? or something else?

I thought it tells what it is based on, I had something like schema-registries on mind as well since it created to work with it. If you find that good or you have something else in mind, please suggest.

should schema identifier be different for account based and did based? or should it be using same formula regardless of creator, in which case, we shouldn't use creator identity in schema identifier creation.

In schema pallet it was based on creator, space_id & schema input. Here it is just creator & schema input. Please tell me if you want to remove creator as part of identifier. I believe it is not required, as schema here can be public as well.

^ @amarts

amarts commented 1 month ago

is 9400 better, or 9310 better as newer version?

I believe 9310 can be made, and next upcoming PR can have it updated to 9400 when it integrates account based schema with registries pallet. I am not sure if both 9300 and 9310 stands for 0.9.3 or it differs.

9310 is better in that case.

is 'schema-accounts' a good name? or something else?

I thought it tells what it is based on, I had something like schema-registries on mind as well since it created to work with it. If you find that good or you have something else in mind, please suggest.

OK for now. Lets take this up again.

should schema identifier be different for account based and did based? or should it be using same formula regardless of creator, in which case, we shouldn't use creator identity in schema identifier creation.

In schema pallet it was based on creator, space_id & schema input. Here it is just creator & schema input. Please tell me if you want to remove creator as part of identifier. I believe it is not required, as schema here can be public as well.

The creator needs to be captured for the query, but need not be used for the schema identifier. That way, both pallets use the same logic for identifiers.

vatsa287 commented 1 month ago

@amarts Have updated the identifier logic by keeping only schema_input for identifier creation part.

commit for ref.