Decentralized censorship-resistant video will transform our society.

Written by itraynis | Published 2018/11/29
Tech Story Tags: blockchain | cryptocurrency | ethereum | government | politics

TLDRvia the TL;DR App

How a new blockchain project might free us from censorship

Imagine two very different technology futures. In one, we continue on the same path of centralized video delivery platforms — a world where video is stored, transcoded, and distributed from mammoth data centers owned by Facebook, Amazon, and Google. Or another, where video is distributed across a network of decentralized nodes — a world where video (information) is not under the mercy of some single authority.

The primary purpose behind this article — other than to present these two different futures — is to guide those readers unfamiliar with a new blockchain protocol, called Livepeer, on a technical journey from moment of video capture to final delivery on someone’s screen.

By the time you’re done reading, you will not only have better understanding of the societal implications of this technology but also gain a solid grasp of its deep technical processes.

Note: If you want to skip the drama and just need to understand the technical, scroll down to “The Livepeer Network” section 🤓

Path A: The Centralized Future

The year is 2022 and the progressive state of New York finally elects its very first female governor to office—almost an entire century after Nellie Ross’ swearing-in as Wyoming’s first female governor. Either way, almost everyone outside of Upstate New York is ecstatic. Celebrations are breaking out across Manhattan as various political organizations push their cadre out into the streets and in front of the cameras.

Time to celebrate!

Meanwhile, the newly elected governor paces restlessly outside the makeshift “war room” in her twenty-grand-a-night Tata Presidential Suite at the Pierre on the Upper East Side. The reason for her pensiveness is not due to some anxiety regarding a planned acceptance speech but rather the growing concern that she’s about to receive some very bad news.

The door swings open. A dapper man — her campaign manager — scrambles across the wooden floor with an uneasy look.

“We’re still working on the problem.”

On face value, the problem seems mundane. Apparently one of the staffers was involved in a heated exchange with the treasurer over compensation. However, rather than agree to some amenable resolution, this staffer has threatened to release an incriminating video of the governor.

“How in the hell did this staffer get a hold of this video?” she shouts at him.

The campaign manager looks even more agitated. He knows that if this video leaks out then this gubernatorial run is over. His career in politics is over.

He has good reason to foresee such a scenario. The video purportedly shows the governor agreeing to take $5 million in illegal campaign contributions from a man with ties to the Chinese government.

“We know the video was made with some new version of Instagram. This means it’s on one of facebook’s servers” he says almost with a sigh of relief.

Instagram. Your media belongs to Facebook.

Meanwhile, back in the war room, the team is in full damage-control mode. One staffer there just happens to be “connected.” His father-in-law is one of facebook’s board of directors.

After a few calls, the video is tracked-down and quietly removed from all servers.

For a while there’s uneasiness among the staff. What if the video resurfaces? What if witnesses come forward?

Some rumors do, in fact, circulate. A few tabloids run the rumor as a story but it soon dies out. Luckily, for the governor, most of the media is sympathetic to her cause and rather not rock the boat.

After a year, the incident is completely forgotten. The State of New York has made history again — the first to elect a governor beholden to Chinese interests.

“I ❤ centralization”

Path B: The Decentralized Future

Everything in this scenario plays out as in the first except for one exception. The video, captured by the staffer, is now routed though a completely different version of Instagram.

You see, in this alternate future many of the platforms with video provisioning services have incorporated several new decentralized protocols into their technology stack. Large companies, like Facebook, Amazon, and Google, have done this not out of newfound love for decentralization or because of some principled belief in freedom of information but out of practical business sense.

Sources of Revenue in 2017

These companies have done the math. Whereas centralized video solutions provide some advantages — vertical integration across the technology stack and strong barriers to entry for competitors—the decentralized version is a much more scalable, cheaper, alternative.

“So why not run a test of this decentralized protocol by integrating it into parts of our existing infrastructure?” some of the managers suggest. And this is, in fact, exactly what facebook does with its Instagram product.

As a result, the staffer’s incrementing video footage is routed through Livepeer’s network. Specifically, the video is chopped into single-second segments and then whisked through a series of nodes for fast transcoding, video authentication, and finally into peer-to-peer (P2P) storage.

Since many of these encoded videos are hosted by independent nodes that operate alongside P2P Content Delivery Networks (CDN), interference with delivery becomes much more complicated…

Basic illustration of how a decentralized live-streaming layer would work

Some of these nodes — that now store this video — are not only scattered across the planet but are beyond the reaches of facebook. There is a node in a Mumbai dorm room, owned by Aarav, who is studying engineering. And there’s another node that belongs to a mining pool run by a company out of Denver, Colorado. The list of owners is endless…

The “well-connected” staffer, whose father-in-law sits on facebook’s board, calls in for help. After an hour of waiting, a voice comes through on the other line with some bad news:

“The video went through some sort of decentralized network called Livepeer. There’s nothing we can do.”

“I am everywhere”

The Livepeer Network

Overview

Before we get into the nitty gritty of how this video is delivered across a seemingly complex network of nodes, let’s first understand some broader concepts that have to do with the Livepeer project.

The project is the brainchild of two technical founders: Doug Petkanics and Eric Tang. Their influence on its future will likely be relegated into obscurity by some governance structure. This structure is still being researched but it’s clear that those individuals that contribute toward the upkeep of the network (e.g. developers, transcoders, etc.) will have majority say in its future.

The beauty behind the protocol is that it’s a scalable, pay-as-you-go, network. In other words, network resources needed for the broadcasting of live-video expand and contract with demand. This is in stark contrast to centralized infrastructure managed either directly via some service provider (e.g. Google) or via third-party provider (i.e. Akamai, Lively, etc.). Companies such as these run data centers sometimes at full capacity and other times at 10% capacity.

There’s also a touch of genius, perhaps serendipity, regarding this technology. I say this because the transcoding of videos — from their original encoding into a range of accessible alternatives — is best handled by GPU’s that just so happen to litter the blockchain ecosystem in the form of idle ASIC chips. These chips can be repurposed in the service of this new decentralized video economy at considerable discount to the current alternative:

On average, centralized systems encode each video stream at roughly $3/hour. Repurposing idle ASIC’s might offer a cost reduction by as much as 1000X!

There is also evidence that decentralized P2P CDN’s (e.g. IPFS or Swarm) could result in significant cost reductions when compared to today’s many centralized HTTP CDN’s (e.g. Amazon S3, Cloudflare, etc.):

The use of a P2P CDN is estimated to be 80–98% cheaper than a HTTP CDN!

As of this writing, a working version of the protocol has been running on Ethereum’s Mainnet for just over 6 months (launched 05/1/2018). However, it will likely take a couple more years before many of the kinks are ironed out.

Let’s now explore how that video of our newly elected governor can move reliably — free of censorship or tampering — through a decentralized network and eventually find its way onto someone’s screen…

Glossary

  • A node is any computer connected to the network: broadcaster, transcoder, object store, etc. The phrase “transcoder node,” “transcoding node,” “transcoder,” “orchestrator” or even “node” could all mean the same thing.
  • A token holder is simply anyone who owns tokens, be they actual nodes or simply investors. Tokens may also refer to any number of cryptocurrencies: ETH, LPT, etc.
  • A bonded node is any node that has delegated (bonded) their tokens to another node (e.g. transcoder).

Final Note

The project is evolving at a rapid pace. Many components are still being researched, tested, implemented, reviewed, etc. This means that not every detail below will be the most accurate representation of the Livepeer project. However, on the whole, the process flow will likely remain unchanged.

Therefore, many of the details presented here are theoretical and not necessarily indicative of how the project might operate years from now…

The Video’s Streaming Journey

Broadcaster → Transcoder (“Orchestrator”)

In our decentralized future, a unique version of Instagram is used to capture the treasonous actions of our governor. Instead of delivering the entire video to facebook’s centralized data centers, Instagram divides the video into many segments and sends it into a network of nodes (running Livepeer Media Server) for transcoding**.** However, before video can be sent, payment must be received!

Normally facebook would subsidize costs internally but since this video is headed toward some external protocol, cost must be covered with either ETH or stablecoin (in the future). Luckily in this scenario facebook can make ETH payment using off-chain atomic swaps and then settle the tab on-chain through the Livepeer Smart Contract.

Payment (ETH): Broadcaster → Livepeer Smart Contract → Transcoder | Video: Broadcaster → Transcoder

So after facebook makes the required ETH deposit, the entire video is broken into single-second segments with various fields appended: segment source, segment position, payload hash, etc.

These video segments are then sent to a network of transcoder nodes that begin working (à la transcoding) with the expectation that they’ll receive a portion of that original ETH that’s now being held as escrow in the smart contract.

Since all of these nodes are competing to do transcoding work, there must be some way to qualify their work product. This is solved by ranking each node according to some specific criteria: amount staked, transcoder performance, broadcaster proximity, transcoder reliability, etc.

Obviously there are many variables that factor into selecting the best node for doing transcoding work. Perhaps one of the most important factors in this selection is the amount of Livepeer Token (LPT) staked…

The Livepeer Work Token (LPT)

Livepeer uses a consensus mechanism called delegated Proof-of-Stake (dPoS). As a result, the proportion of work allocated to each node is dependent on the amount of token staked. The token used for this staking is an ERC-20 token called Livepeer Token (LPT) and functions as a claim for the right to do work. Thus the more LPT that is staked, the more work there is allocated.

Those nodes that perform high-fidelity, honest transcoding are incentivized to stake as much LPT as possible in order to maximize profit. On the other hand, poorly performing, dishonest nodes are punitively punished by having their staked LPT slashed (taken away).

This is extremely useful because the LPT token becomes much more than a simple medium-of-exchange (i.e. payment) or a basic store-of-value (i.e. investment), it becomes a unit-of-account for network upkeep.This results in token value that is more reflective of overall network value.

The consensus mechanism also allows for delegation. This means that those transcoders, as well as speculators, that have LPT but are unwilling to do some of the work — referred to collectively as “token holders” — can delegate (or bond) their tokens to a transcoder node for some period of time.

There’s good reason for token holders to bond their LPT tokens with a node: Since honest transcoders are incentivized to stake as much LPT as possible, they compete for token holders by offering them a generous ETH-split.

Transcoder Node can stake their own LPT tokens or receive delegated LPT tokens from Token Holder

This delegation is important because it functions as a quality control mechanism for transcoders within the ecosystem. In fact, a curated list of active transcoders can be seen here: https://explorer.livepeer.org/transcoders

Inflationary Token Reward

In addition to the ETH sent from facebook to the Livepeer Smart Contract, which then finds its way to nodes who’ve done transcoding work, there’s also an additional form of compensation: LPT token reward. These particular tokens are issued by the protocol, programmatically, every block round.

We’ve already established that LPT tokens are wo_rk tokens_ used by Livepeer’s consensus mechanism. However, it’s important to understand that these LPT tokens — depending on the participant’s perspective in the ecosystem — fulfill slightly different purposes:

  1. For the node operator: LPT tokens are used to claim the right to do work in exchange for profit.
  2. For the token holder: LPT tokens are used as a form of passive income by bonding them to a node of their choosing.
  3. For the ecosystem itself: LPT tokens contribute toward **network quality (**and security) by attracting honest workers and deterring potential attack.

Interestingly, many blockchains are designed to have a fixed target for their token supply. Some gradually release their tokens as block rewards over many years (e.g. Bitcoin) and others release all of their tokens at once (e.g. Augur).

Livepeer is unusual because it does not have a fixed target for its token supply. Instead, an algorithmically adjusting issuance model is used to target a participation rate of 50% (at the moment).

What’s “participation rate?” For protocols that use Proof-of-Stake consensus, the number of active (staking) participants can correlate roughly with network security. This is simply for the reason that the more tokens there are staked in a network, the more expensive to mount an attack on the network.

Therefore participation rate can be defined as some proportion of staked tokens relative to overall token supply.

Block Reward is sent to Transcoder Node and Block Reward Cut is shared with Token Holder

The protocol’s self-adjusting token schedule functions like a counter-balance, pushing network participation towards a specific sweet spot. At the moment, the protocol’s parameter is set to 50%:

  • So when network staking is below 50%, the protocol issues a large LPT token reward. This dilutes everyone’s LPT value, pushing many to stake their LPT in order to stave off future inflation.
  • And when network staking is above 50%, the protocol issues a small LPT token reward. This has minor affect on LPT value, releasing any pressure there may have been to continue staking.

As of 11/30/2018, there are over 11 million LPT tokens. This number will increase for the foreseeable future.

Object Store (e.g. Swarm, IPFS, Amazon S3…)

Note: Swarm is still not in production; IPFS is being used as temp solution.

Once the video of our governor is transcoded, there must be some way to authenticate the output. After all, we wouldn’t want someone to find a clever way to tamper with final video output. Thus another specialized component is implemented for this purpose:

The Object Store is simply a server (or collection of nodes) that stores data using object-based storage architecture. Object Stores may or may not be capable of operating as content delivery systems. At this stage of the journey, however, Object Stores are just needed to host video segments for verification.

So after the transcoder node is finished doing work on all the video segments, authentication happens in a step-wise process:

  1. Transcoder node issues a receipt (filled with a variety of important fields) for the work done on the segment.
  2. This receipt is then sent to the Livepeer Smart Contract that then selects random video segments that should be challenged (verified).
  3. These segments are then sent by the Transcoder to an Object Store like Swarm or IPFS or even Amazon S3 for verification.

Transcoder Node writing random video segments to Object Store (e.g. Swarm, IPFS, etc.) for storage…

Swarm is a content addressed storage platform that is yet to reach production. However, due to its planned use of a special contract (called SWEAR) that can guarantee data availability with a high degree of probability, there is much anticipation for its release.

Guaranteeing data availability within some Object Store is very important because the video data will soon need to be accessed by another protocol, called Truebit, for verification…

Truebit Protocol

Alternatives: API Oracle, Oraclize Computation, Secure Hardware, etc.

The Truebit protocol is used to make sure that transcoder nodes are not creating compromised video segments. In a perfect world every segment would be checked but this would prove quite costly: 5X–50X original transcoding price.

Instead the Livepeer Smart Contract randomly assigns a limited number of segments to be checked (challenged). The burden now falls on the Transcoder to demonstrate their work is kosher:

  1. Transcoder sends original versions of the challenged segments to some Object Store like IPFS or Swarm (discussed in last section).
  2. Transcoder calls upon the Truebit Smart Contract to begin verification and provides address (hash or url) of segment in some Object Store_._
  3. Truebit verifiers engage in off-chain “verification game” by re-encoding (checking) segments and then sending results to Livepeer Smart Contract.
  4. Livepeer Smart Contract compares transcoder’s claim vs. truebit’s claim and then reports the final results for the segment.

Truebit must verify video integrity before Fee Share (ETH) + Block Rewards (LPT) can be released

Since there are so many moving parts to the process, a few details have been left out for sake of simplicity. The main takeaway, with respect to Truebit, should be that the protocol is capable of handling all the heavy computation off-chain before carrying the results on-chain.

Once all challenged segments pass verification, the Livepeer Smart Contract releases ETH from escrow and apportions the correct LPT block rewards to the transcoder. The newly encoded video (of the governor breaking the law) is now ready to be distributed…

Object Store (e.g. IPFS, Swarm, S3...) → Consumer

Note: Object Store could even be the original Broadcaster.

We’ve already established that Object Stores are simply nodes that store data using object-based storage architecture and that they may or may not be capable of operating as content delivery systems. Therefore in this scenario, once the encoded video has been verified by Truebit, the video must be distributed from the Object Store somehow.

Given the flexibility of the Livepeer protocol, delivering the finalized video can be accomplished any number of ways. Here are just a few examples:

Decentralized Delivery

  • Object store (IPFS or Swarm) → CDN (Peer5, Viblast, etc.) → Consumer
  • Broadcaster (Livepeer Media Server) → CDN (Peer5, etc.) → Consumer

Centralized Delivery

  • Object Store (S3, etc.) → CDN (Cloudfront, Limelight, etc.) → Consumer
  • Broadcaster (Instagram, etc.) → CDN (Akamai, Level 3, etc.) → Consumer

Although the above steps are illustrative, they do reveal an important point that many seem to gloss over: censorship-resistance depends on the developer. In other words, Livepeer provides the media layer for the decentralized stack that can be used to create censorship-resistant applications if the developer chooses to integrate other necessary components.

Thus it’s fair to say liability, with respect to ensuring censorship-resistance, lies squarely on the shoulder’s of the developer rather than Livepeer. And this developer responsibility falls across two specific design choices that are situated at the edges of the Livepeer protocol: (a) the application access point and (b) the content delivery solution.

A final point to emphasize is that the above steps can be mixed and matched a variety of different ways. For instance, the developer could choose to forego the CDN entirely and just serve newly encoded videos directly from some access point of their choosing.

Centralized HTTP CDN vs. Decentralized P2P CDN

Luckily in our scenario, Instagram routed the video of our corrupt governor from the transcoder node to many decentralized Swarm nodes, which then used a hybrid solution to deliver the video using HTTP CDN’s and P2P CDN’s. As in all prior cases, facebook made the decision to use this decentralized delivery solution because of costs savings.

In the end, the video became widely accessible not only from Instagram but also from a variety of different access points. There were web applications, along with other gateways, that streamed the video of our law-breaking governor to millions around the planet.

There was nothing anyone could do to stop the video’s dispersion…

Final Thoughts

We live in a world today no different than the world of yesterday. Technology may change, people might live longer, but human nature always stays the same…

“Mankind are so much the same, in all times and places, that history informs us of nothing new or strange.”

David Hume (1748)

This is a simple notion — still difficult for many to grasp. It has nothing to do with evolutionary biology or spiritual transcendence. Rather this critique is in reference to the most basic, underlying, forces that drive human beings.

In the same way that bacteria can adapt to a drug-resistant environment, humans can learn to exploit opportunities. This is human nature. Let’s spell it out using even more concrete language:

Fundamentally, human beings perpetrate wrongdoing (e.g. lie, steal, cheat, etc.) not out of simple circumstance (e.g. poor socialization, corrupted education, etc.) but because they can.

Historically, a coercive central power was employed to ensure that people cooperated with each other. This still remains the dominant mode today. Blockchain, however, has introduced a shift in the paradigm.

In the case of information, this might mean there’s no longer a need to route data through some single centralized authority (e.g. Google, Facebook, etc.). This is an important development, after all, because a growing number of people are getting their news delivered in some form of video. Case in point, demand for 4K video and cord-cutting continues to increase substantially.

Another important piece to the story is that for a long time we have relied on a variety of centralized services — monopolies in some cases — to moderate our information but some are beginning to ask: Who will watch the watchers?

“1984“ — George Orwell

After all, who decides what is “good speech?” Could it perhaps be that your sharp political speech today becomes the not-so-good speech of tomorrow? We need only turn our eyes to the past and see for ourselves that wherever there is opportunity to oppress, to deny, to censor — Man will do so.

Yet somehow it appears we’ve reached a crossroads. We now have a choice. On the one path there is decentralized blockchain technology and on the other advanced centralization (artificial intelligence). One system operates transparently and the other behind a curtain.

What will we choose?

  • If we continue on the path of centralization we will be protected. However, this protection will not be on our terms as free people but on someone or something else’s.
  • If we choose the path of decentralization no one will protect us. We will be free to express ourselves but — perhaps for some period — also be exposed to the offensive, the disgusting, and the indecent.

I firmly believe that as free individuals and heirs to the Enlightenment, we must choose the path of decentralization. Though I must note again that decentralization is not a panacea for mankind. Those projects that build upon actual blockchain technology do not offer the world a vision of utopia but simply a path to individual liberty.

This path can only be realized if the Livepeer protocol is integrated across the whole web3 infrastructure stack by future application developers. It would appear then that the fate of our censorship-resistant world rests squarely on your shoulders — developer. Make us proud.

Livepeer Project Resources


Published by HackerNoon on 2018/11/29