Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce sorted collections to schemas #2114

Closed
mversic opened this issue Apr 17, 2022 · 0 comments
Closed

Introduce sorted collections to schemas #2114

mversic opened this issue Apr 17, 2022 · 0 comments
Assignees
Labels
api-changes Changes in the API for client libraries Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@mversic
Copy link
Contributor

mversic commented Apr 17, 2022

BTreeMap/BTreeSet when serialized must have a defined ordering. There was a bug recently because BTreeMap was represented as an unordered collection, i.e. HashMap because schemas file didn't carry information on the ordering of elements.

Vectors and arrays can also have a defined ordering. For sorted vectors this means that sdk developers can deserialize them into e.g. HashSet as long as this HashSets is serialized/deserialized into sorted vector. Arrays can therefore be serialized/deserialized into static HashSet

@mversic mversic added Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST api-changes Changes in the API for client libraries labels Apr 17, 2022
@mversic mversic self-assigned this Apr 17, 2022
@mversic mversic changed the title Introduce SortedVec to schemas Introduce sorted collections to schemas Apr 17, 2022
@mversic mversic closed this as completed Apr 20, 2022
mversic added a commit to mversic/iroha that referenced this issue May 2, 2022
…erledger#2115)

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…erledger#2115)

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
mversic added a commit to mversic/iroha that referenced this issue May 13, 2022
…erledger#2115)

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

No branches or pull requests

1 participant