-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Labels
CodecEncode & Decode for the ObjectEncode & Decode for the ObjectObjectObject design, codec and usageObject design, codec and usagebugSomething isn't workingSomething isn't workingcyfs-baseFunctions and components in cyfs-base projectFunctions and components in cyfs-base project
Milestone
Description
Discussed in #253
Originally posted by streetycat May 6, 2023
I am reviewing the encoding format for types. But I find that our encoding process only explicitly sorts the HashMap. Other types(as HashSet/BTreeMap/BTreeSet) depends on the iter in Rust. I have read the documents for those types, The iters for BTreeMap and BTreeSet return elements in ascending order. but I have not found how it is sorted in HashSet.
I am reading the code in raw_types.rs.
I think we have to explicitly define the encoding order of the fields/elements of the composite type, otherwise different results may be encoded.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CodecEncode & Decode for the ObjectEncode & Decode for the ObjectObjectObject design, codec and usageObject design, codec and usagebugSomething isn't workingSomething isn't workingcyfs-baseFunctions and components in cyfs-base projectFunctions and components in cyfs-base project
Type
Projects
Status
🧪To Test