Does appendable-data maintain an ordering?

Based on the RFC for AppendableData here it looks like PubAppendableData (and PrivAppendableData) keep their data in Rust’s BTreeSet, i.e. pub data : BTreeSet<AppendedData>. It looks like BTreeSet<T> expects T to implement Ord. Is Ord implemented for AppendedData anywhere? I haven’t been able to find it in the safe_core repo anywhere.

My ultimate reason for asking this is that I was wondering if Appended Data keeps a chronological ordering of the data that has been appended to it. My impression is that it does, based on the presence of functions like this Is my understanding of that correct, and does it have something to do with the Ord implementation?

1 Like

Check the Data implementation in the Routing Repo

Ord is derived for AppendedData and it’s not chronological:
The idea is that it should be possible for the network to handle more append requests in parallel if the nodes don’t have to agree on an order for them.
That data type might change again in the future, however.

1 Like