1> Must be on OSX or Linux
2> Contractor must be available for at least 4 hours of work a day
3> Wechat or Tox preferred communication
This is a library for serializing and deserializing structs. We need some additions to the library. https://github.com/skycoin/skycoin/tree/master/src/cipher/encoder
This project will be iterative. We will do one thing at a time.
Some of the Tasks:
1. Clone library into repo https://github.com/skycoin/skycoin/tree/master/src/cipher/encoder
2. See the unit tests for how this library works and how simple it is to use
We need several modifications and extensions to this library.
Some of the Tasks:
We will do one task at a time. We have issue tracking and ticket system setup.
We need to be able to dump the schema for a struct (its name, its fields and the type of the fields) as a struct. Then we can serialize the struct to byte.
We use golang reflect, but are only supporting basic types like uint32, uint64, byte. Strings will be treated as byte.
- support uint8, uint32, uint64 (call u8,u32,u64)
- support byte (strings are treated as byte)
- no pointers allowed in structs being serialized or deserialized
- allowed to use previously defined structs
- arrays of fixed size of atomic types
- variable sized arrays of atomic types
Need functions to list the fields of a struct given its schema
Need function to list type of fields, given its schema
Need function to get value of named field, given type and schema
Need function to verify that serialized (byte) struct matches schema
Need to implement special types, with special treatment in serialization
- Hid (hash ID, byte)
- HidRef (reference to hash ID)
Need a struct HidInc with an (Hid, Type, Value) value tuple.
- Hid is a byte, sha256 hash of the serialization of value
- Type is the Hid of the schema for the type serialized
- Value is the byte serialization of the struct
- This is for including one object in another object by Hid reference, with full embedded copy of object
To get the Hid of an object
- serialize the object to byte according to the schema
- SHA256 hash the byte serialization, using skycoin/src/cipher/
Need a struct HidRef with (Hid, Type)
- Hid is the byte, sha256 of the serialization of a struct stored else where (a reference)
- Type is the Hid of the schema of the type serialized (the schema Id)
- this is for embedding copy of object, by Hid without including copy of object
The struct schema will be defined and referenced by their Hid value
The first phase will be
- extending the library
- Implementing Hid functions and structs
- getting struct schema working (for uint32, uint64, byte, and simple structs)
The second phase will be
- store objects in key value store by Hid, to object
- for a given object with HidRef, give lists of Hid hashes referenced by HidRef fields in that object
- for a given object with HidRef, give list of HidRef hashes referenced by object instance recursively
The third phase will be
- a string /regulator expression language for querying the objects.
- if I have an object with Hid A, and it contains reference to object Hid B. I want to say var uint32 := Get_Uint32(ObjA, "Hid(A)/Hid(B).field1") or "Hid(A).Hid(B).field1" or some type notation for drilling down into the data structures and getting values by name.