livepeer / research

Organization of the current open research tracks within the Livepeer Project
MIT License
7 stars 2 forks source link

Broadcaster transcoding verification challenge protocol #16

Open yondonfu opened 5 years ago

yondonfu commented 5 years ago
Title: Broadcaster transcoding verification challenge protocol
Author: @yondonfu 

Brief Description

Transcoding verification in the Livepeer network is a three part problem:

This problem statement will focus on part 3. In the V1 protocol, the verification task is executed when an orchestrator (using Streamflow terminology - they are referred to as transcoders in V1) submits a segment for verification which consists of the following steps:

For more details on the V1 challenge protocol, see the V1 spec.

A few of the downsides of the V1 challenge protocol include:

As a part of Streamflow, we are exploring a challenge protocol that is broadcaster driven as opposed to orchestrator driven. The broadcaster is responsible for running a verification task locally on a sample of transcoded results returned from an orchestrator and challenging segments for verification.

The problem we are interested in solving is how a broadcaster should detect segments to challenge and how it should invoke the challenge. We proceed to discuss the specific requirements for a broadcaster transcoding verification challenge protocol below.

Problem Statement

Use Cases

A broadcaster transcoding verification protocol must fulfill or preserve the following use cases:

Requirements

Reasonable Assumptions

Candidate Constructions

Local verification of random samples

For every input segment seg_data with a set of requested transcoding options t_opts that a broadcaster sends to an orchestrator, the broadcaster also sends the signature b_sig = sign(b_priv_key, H(seg_data) + H(t_opts)). b_sig cryptographically binds the input segment and the set of transcoding options pair to the broadcaster.

For every transcoded result t_res that for an input segment seg_data that an orchestrator sends to a broadcaster, the orchestrator also sends the signature o_sig = sign(o_priv_key, H(seg_data) + H(t_res)) to the broadcaster. o_sig cryptographically binds the input segment and transcoded result pair to the orchestrator.

The broadcaster defines a verification rate parameter v_rate - every v_rate segment that it sends, the broadcaster will randomly sample a transcoded result from the set of all transcoded results received for the last v_rate segments.

Let seg_data be the sampled input segment, t_opts be the set of transcoding options for the sampled input segment, t_res be the sampled transcoded result and t_res_opt be the specific transcoding option (i.e. rendition) corresponding to t_res. The broadcaster runs the verification task using seg_data, t_res and t_res_opt which results in a pass or fail. If the verification passes, the broadcaster does nothing. If the verification fails, the broadcaster initiates an on-chain challenge:

  1. The broadcaster uploads seg_data at seg_data_storage and t_res at t_res_storage at a storage provider i.e. IPFS
  2. The broadcaster submits H(seg_data), H(t_res), t_res_opt, t_opts, o_sig, b_sig, seg_data_storage and t_res_storage to the verification contract.
  3. The verification contract checks that o_sig is valid for H(seg_data) and H(t_res)
  4. The verification contract checks that b_sig is valid for H(seg_data) and H(t_opts)
  5. The verification contract checks that t_res_opt is in t_opts
  6. If the above checks pass, the off-chain verifier fetches seg_data from seg_data_storage and t_res from t_res_storage. The off-chain verifier checks that seg_data matches H(seg_data) provided on-chain and that t_res matches H(t_res) provided on-chain.
  7. The off-chain verifier runs the verification task using seg_data, t_res and t_res_opt. The result (pass or fail) is submitted back to the contract.
  8. If pass, nothing happens. If fail, the orchestrator (address recoverable from o_sig) is slashed.

Open Problems/Questions

Objectives & Key Results

Objective 1: Design a broadcaster transcoding verification challenge protocol that fulfills the above requirements.

If Objective 1 is believed to be impossible, then consider:

Objective 2: Prove that a broadcaster transcoding verification challenge protocol that fulfills the above requirements does not exist.

When a "written explanation" is mentioned, a logically constructed argument will usually suffice. Ideally, a rigorous proof (i.e. mathematical) would be provided. However, since not everyone is trained in writing those types of proofs and in the interest of promoting more open participation, the former should be adequate.

Suggested Reading

[1] V1 protocol challenge protocol (spec)

ericxtang commented 5 years ago

Another aspect of this research project is the verification algorithm itself. Currently, the proposed solution is a logistic regression based classifier trained with a dataset published by Livepeer. It's important to think about:

Another suggestion is to add the requirement of Parameterized transcoding, where the transcoding setting can be an input, and be captured in the verification workflow.

yondonfu commented 5 years ago

@ericxtang Yeah the verification task/algorithm is certainly a crucial component of the larger verification system - we are already capturing the details around the verification task/algorithm in the transcoding verification research project and this problem statement seeks to capture the details around when the verification task should be run (see the distinction outlined in the "Brief Description" section).

The two research projects will be closely related though and will likely benefit from consistent communication of results/insights!

Another suggestion is to add the requirement of Parameterized transcoding, where the transcoding setting can be an input, and be captured in the verification workflow.

👍 I've added this to the requirements section as Parameterized transcoding options.

yondonfu commented 5 years ago

Here is an updated version of the candidate construction that would support mutually agreed upon verification oracles (i.e. different verification tasks such as bitxeact or metrics based probabilistic verification)