alastria / alastriaID-truffle-contracts

Alastria ID truffle Smart Contracts
MIT License
2 stars 5 forks source link

Create a new smart contract called AlastriaObjectRegistry.sol #62

Closed rober12 closed 1 year ago

rober12 commented 1 year ago

This smart contract will unify the AlastriaCredentialRegistry.sol and AlastriaPresentationRegistry.sol smart contracts. It will store only the hash and the state of the objects without distinguishing which object is being talked about.

For this it is also necessary to unify the states of both smart contracts and change them from an enum to a numeric value. Later, in comments, we will mark the meaning of each state for credentials and presentations.

juftavira commented 1 year ago

The smartContract will hold the "object" hash and the status. The status will be a numeric value, not an enum, this way the numeric value will be understood by the caller (in this case the library) The numeric value will be re-used among credentials and presentation it would be nonsense to have values 0-9 for credentials and 10-19 for presentations as that would disclosure the kind of object. Example: Credentials have these possible statuses: {Valid, AskIssuer, Revoked, DeletedBySubject} Valid would become 0, AskIssuer would become 1, Revoked would become 2, DeletedBySubject would become 3

Presentations have these possible statuses: {Valid, Received, AskDeletion, DeletionConfirmation} Valid would become 0, Received would become 1, AskDeletion would become 2, DeletionConfirmation would become 3

Then the library will keep its functions for setting the status of Credentials and different functions for Presentations, then it will map those to the new function, sending the status as a numeric value.

rober12 commented 1 year ago

Different aspects to be studied in depth, such as, the possibility that the status associated with credentials and presentations be included in the hash and not separately as up to now, although this makes it more difficult to consult the status of credentials and presentations.

MisiakGeo commented 1 year ago

Moving away from enums, could be better, when Abigen is used to compile the Alastria Smart Contracts, due to the fact that Abigen does not accept the enum data type at all. This action could possibly make, the development of Alastria based solutions, using Golang easier.

rober12 commented 1 year ago

It is closed because a new task has been created with a more updated description according to eIDAS ARF.