Introducing Glofile

Posted September 18, 2015 by Jonathan Brown ‐ 5 min read

Originally published on Retrieved from the Wayback Machine.

Glofile (Global profile) is essentially a clone of Gravatar for Ethereum.

Users of Ethereum will be accessing many different dapps with the same account. It makes sense that they should be able to associate some basic public information with their account that can then be utilized by any dapp.

The following information can be stored in a Glofile:

  • dontIndex - can be set as a flag that this Glofile should not be discoverable, except by direct link
  • glofileType - one of Anon, Person, Project, Organization, Proxy, Parody, Bot
  • safetyLevel - safe, NSFW or NSFL; the account may publish content that is less safe than this, so long as it is flagged as such
  • fullName - the full name of the account; max 128 chars. This is different from the username, which will be handled by a dedicated registry contract.
  • location - simple string; max 128 chars.
  • topics - space separated string of topics that this account may be publishing under on other contracts
  • uris - space separated string of URIs. They can be anything whatsoever relating to the account, e.g. email address, website, Facebook account, Bitcoin address.
  • parents - space separated string of usernames of accounts that this Glofile claims to be a child of, e.g. company working for or account that is being parodied
  • children - space separated string of usernames of accounts that this Glofile claims to be a parent of, e.g. employees
  • foregroundColors - array of RGB triplets
  • backgroundColors - array of RGB triplets
  • avatars - IPFS hashes of avatar images
  • coverImages - IPFS hashes of cover images
  • backgroundImages - IPFS hashes of background images
  • bio - Markdown string; max 256 chars. Any ISO 639-3 language code can have its own translation.
  • publicKeys - public key certificates for the account owner's identity

There are many other things that could potentially be stored in a Glofile such as personal information e.g. gender, DOB, nationality, sexuality, etc; and professional information like what would be on a resume. However, these are things that people might want to be able to have access control for. This is not the purpose of Glofile. Also, Glofiles can be for different kinds of accounts, e.g. projects and organizations. These fields would not make sense in this context. Other contracts can be utilized to store more domain-specific account data.

I have created a prototype contract, although I will move the public keys to log storage so it is more economical. Please feel free to critique it!

The next step is to create a JavaScript API.

I intend to create a dapp using GSS. I really despise CSS and GSS is a much more modern layout language based on the concept of constraints that can generate CSS dynamically. Here is an example of what a profile can look like with GSS.

Once Swarm is live, I will release an updated version of Glofile that uses that for image storage instead of IPFS.

Some of the larger string fields are compressed with DEFLATE before being added to contract storage. The deflateRaw and inflateRaw methods of pako can be used for this. It tends to be beneficial for human-language strings longer than about 36 characters.

I hope that every dapp will be pulling in basic user info from Glofile! Anyone want to make a logo?