roles
feature flag in data_model
causes serialization disparity
#2111
Labels
Bug
Something isn't working
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
question
Further information is requested
roles
feature flag affects the layout of enums/structures indata_model
because it conditionally includes/excludes variants/fields. Due to this, a difference can arise in serialized format on client as compared to the server which basically makes them unable to exchange some messages. Example:This can be fixed in following ways:
roles
feature flag from all cratesalways include roles
roles
feature flag fromdata_model
crate onlydon't include roles in your data structures but always include them in the serialized form. Queries can work without problems with server just empty lists objects for roles. Instructions on roles must fail with an error. I'm not sure this is possible without implying the 1st point to always include roles. This possibility requires more consideration
Client will ask for the data layout information in the first message and adapt it's subsequent messages according to it. This effectively makes
roles
a compile flag on the server(as is currently) but a runtime flag on the client which adds strain on the sdk developmentroles
support in the schemaI mention this possibility just out of completeness. I maintain that the 3rd point should take precedence compared to this one.
Relates to #1969
Could relate to #2112
The text was updated successfully, but these errors were encountered: