Access Levels

in Unimatrix 5253 years ago

There really aren't true access levels on most blockchain projects. The closest thing would be confidential (encrypted) transactions, which is not what I'm referring to.

I'm referring to levels of access that naturally emerge from a user's technical ability. Here's a quick primer of my terminology:

  • Level 0 - Does not know about Hive and does not have an account.
  • Level 1 - Has a Hive account and basic access to the blockchain from a web frontends that expose RPC methods.
  • Level 2 - Knows about multiple ways to get information from the blockchain beyond RPC methods.
  • Level 3 - Has direct access to the blockchain and/or access to some kind of index.
  • Level 4 - Can interpret the blockchain directly and can create an index.

Keep in mind, you may not know what an RPC is, but you can have tools that utilize an RPC that gives you access. It's the ability to access, not the technical understanding we're talking about here.

It has nothing to do with stake. It's also not strictly a skill level. People with the right tools can gain Level 4 access, even if they don't know how to program.

This scale also implies there's nothing beyond Level 4.

RPC (Remote Procedure Call)

An RPC is provided by an API (Application Program Interface). If you want a list of accounts, you can make a request to the API for that list by calling the associated RPC. A frontend that allows you to list accounts will often call the RPC for that task and relay that information to the user as a web page.

Often, an RPC is designed with a certain use-case in mind which means they are limited in what options and responses they provide.

"Follow" Example

When you follow someone on Hive, a record of "who/what/when" is added to the blockchain. But only "who/what" is easily accessible after that. Although the "when" is in the blockchain, it is not easily accessible.

What I mean is, "who" follows "who" and "what" as in "follow" or "mute." There are tools to find these facts fairly easily.

Because we have these tools, it fairly trivial to craft a web frontend to explore with. In a sense, the "who/what" is accessible by a Level 1 users. But the "when" is only accessible to Level 2 and up.

As an example, Alice follows Bob. Bob can easily discover that Alice follows him. But if Bob wanted to know when Alice followed him, he'll have to use heightened access.

Similarly, if Alice stopped following Bob for a month, then started following him again, Bob needs heightened accessed to determine the follow gap. This is not something exposed by a standard RPC method, and thus not available to Bob's "access level."

If Charlie, who has Level 4 access, creates a tool to index (determine) the full history of account follow activity, if Charlie makes his tools public, it would be possible for Bob to gain Level 2 access to that kind of data.

Later, let's say Charlie fails to maintain his tools and they break, Bob loses Level 2 access to that kind of data.

Frontends

Most frontends provide Level 1 access. This is because such frontends just represent the RPC responses on a 1-to-1 basis. E.g., if an RPC method does not allow sorting by a certain field, the frontend does not show any data sorted by that field.

Polling the API Over Time

One work-around for tools that lack direct access to the blockchain (or related index) is for those tools to poll the API. This means they watch for changes and keep track of them. This is extremely inefficient compared to just having direct access to the blockchain data, but you'll see this method used fairly often, even though it's not efficient.

If you can imagine the in the "follow" example, if Charlie didn't create a tool to index the blockchain directly, but instead wrote a tool that would poll all accounts and asked for their followers, a routine like that could get out of hand pretty quickly, especially if it's going to try to track the state of all accounts.

In fact, when it's done getting a list of all accounts and polling each one, by the time it finishes, the state has likely changed.






Wait, forgot to escape a space. Wheeeeee[taptaptap]eeeeee.