iskendria-pub / iskendria

Blockchain-based system for scientific publishing
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Design data model for Alexandria's smart contracts #5

Closed mhdirkse closed 5 years ago

mhdirkse commented 5 years ago

[AX-5] created by mdi

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

by dirkse

mhdirkse commented 5 years ago

I have finished the requirements document, AX-11, and the software design, AX-10. Now I think that the result of this user story should be a set of .proto files. There is no need for UML modeling in my opinion because .proto files are quite concise already.

mhdirkse commented 5 years ago

I thought of two things:

i) The Command .proto misses a field for the price.

ii) For repeated fields, naming can be improved. There should be a distinction between unordered and ordered repetitions.

mhdirkse commented 5 years ago

Tuesday April 16 I talked to Marcel. I have to change my data model.

mhdirkse commented 5 years ago

Four elements need to be described:

The data model within the Sawtooth state.
The format of the payload of transactions.
The client-side data model, used to search the data.
The format of events. These events come from the transaction processor and the client uses them to build the client-side data model.
mhdirkse commented 5 years ago

Today I got the idea that code repetition is useful for the data model. There is much repetitive code about preparing transaction payloads, verifying transaction payloads, applying transaction payloads to the blockchain state, generating events, updating an SQLite database from an incoming event and querying an SQLite database.

Therefore I do not want to write out the whole data model. Instead, I want to implement issue AX-14 first, which constitutes bootstrapping and persons. I can write that code by hand and then replace the repetitive code by generated code. Then I can build on that with the other issues.

mhdirkse commented 5 years ago

Marcel, I propose to have a discussion before I close this issue. This does not prevent me from moving on.