...
Page properties | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
|
Background
What details are important in making this decision?
Problem
Define the problem we are going to discuss
Solution
Describe the way it should be solved in your opinion
Decisions
- There are 2 codec formats Iroha 2 peer support: SCALE and JSON
Problem
Iroha 2 has a lot of model-objects that peer can receive as input from blockchain clients and can respond with. Currently Iroha 2 in the active development process and set of this model-objects changes very often. These changes must be reflected in the Iroha 2 client's library and it requires a lot of affords to keep client's implementation up to date.
Solution
We can generate a scheme which would introspect details of object-models. These scheme allow to achieve benefits:
- Code generation of models and deser tests
- Type safe checks in clients code (if programming language support such checks)
Requirements for scheme
Basically we can consider three type of items
- Scalars (int, bool)
- Built-in containers (Option, Result, Vec, tuples)
- Custom containers (custom struct and enums)
...
Alternatives
Present at least two alternatives to the solution you suggested
Concerns
Write down all the things that worry you or other stakeholders
Assumptions
Document any assumption that you made
Risks
List all risks in form "description \[probability (from 0 to 9); impact (from 0 to 9)\]"
Additional Information
...
- Scale codec description in Substrate docs [https://substrate.dev/docs/en/knowledgebase/advanced/codec]
- Scale codec Github page [https://github.com/paritytech/parity-scale-codec]