-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Right now we show reputation as positive/negative numbers. In Unirep/Unirep#286 we'll make the data fields more generic allowing them to be used for things other than positive/negative reputation.
So for example, an application might use the first field to store a counter for user likes (64 bits), a counter for the number of post creations (64 bits), and a counter for the number of comments created (64 bits). In this example only the first data field is being used.
The empty user data field looks like this (in binary):
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
When a user likes something they receive the following attestation:
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
When a user creates a post they receive the following attestation:
00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000
When these are combined (using addition) the user has a data value of
00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001
We can interpret this as two values stored in the data field, but only if we know how the application interprets the data. If we look at the above as raw numbers we see the following (respectively):
0
1
36893488147419103232
36893488147419103233
So it's important to look at this as data instead of numbers (like positive/negative reputation). I think on the home screen we can show total number of bytes that have been given in attestations?