[WIP] proto3 proposal #17

Closed
lyoshenka wants to merge 3 commits from proto3 into master
lyoshenka commented 2019-01-25 17:20:30 +01:00 (Migrated from github.com)

My proposed schema changes. this is very much WIP. I just wanted to see what it might look like and get your opinions on it.

Goals:

  • upgrade to proto3
  • drop Version from all protobuf definitions. One of the core ideas of protobufs is that versioning is not necessary
  • rename and rearrange some of the data to better match our current terminology and understanding of the protocol
  • add new fields that we know we need (releaseTime, file fields, tags, etc)

Keep in mind that in proto3, every field is optional. Also keep in mind that I'm trying to match this stuff to https://spec.lbry.io/#specification (e.g. Stream.hash vs Stream.sd_hash)

When you look at the field numbers, anything numbered 1-15 means we think that field will be set in most claims. Numbers 16+ means we think that field will not be set in most claims. There's no functional difference other than a small space savings if we predict it correctly.

I think the biggest questions are about the structure of the stream.proto file.

Closes #3, closes #16, closes #8, closes #13, closes #6, closes lbryio/internal-issues#205.

My proposed schema changes. this is very much WIP. I just wanted to see what it might look like and get your opinions on it. Goals: - upgrade to proto3 - drop Version from all protobuf definitions. One of the core ideas of protobufs is that versioning is not necessary - rename and rearrange some of the data to better match our current terminology and understanding of the protocol - add new fields that we know we need (releaseTime, file fields, tags, etc) Keep in mind that in proto3, every field is optional. Also keep in mind that I'm trying to match this stuff to https://spec.lbry.io/#specification (e.g. Stream.hash vs Stream.sd_hash) When you look at the field numbers, anything numbered 1-15 means we think that field will be set in most claims. Numbers 16+ means we think that field will not be set in most claims. There's no functional difference other than a small space savings if we predict it correctly. I think the biggest questions are about the structure of the `stream.proto` file. Closes #3, closes #16, closes #8, closes #13, closes #6, closes lbryio/internal-issues#205.
eukreign (Migrated from github.com) reviewed 2019-01-25 17:20:30 +01:00
shyba (Migrated from github.com) reviewed 2019-01-25 17:20:30 +01:00
kauffj (Migrated from github.com) reviewed 2019-01-25 17:20:30 +01:00
kauffj (Migrated from github.com) reviewed 2019-01-25 22:37:59 +01:00
kauffj (Migrated from github.com) left a comment

Some comments, but I'm pretty much a protobuf idiot.

Some comments, but I'm pretty much a protobuf idiot.
kauffj (Migrated from github.com) commented 2019-01-25 22:37:14 +01:00

Do we need this?

Do we need this?
kauffj (Migrated from github.com) commented 2019-01-25 22:37:34 +01:00

It does seem like this could be inferred, though I could also see the metadata switching on type, which might be a reason to keep it?

It does seem like this could be inferred, though I could also see the metadata switching on type, which might be a reason to keep it?
kauffj (Migrated from github.com) commented 2019-01-25 22:35:11 +01:00

This seems very safe to include in the top 15, I think.

This seems very safe to include in the top 15, I think.
kauffj (Migrated from github.com) commented 2019-01-25 22:35:28 +01:00

If this is metadata 2.0 this should be fixed/expanded, or simply moved into a tag.

If this is metadata 2.0 this should be fixed/expanded, or simply moved into a tag.
kauffj (Migrated from github.com) commented 2019-01-25 22:35:36 +01:00

What is this?

What is this?
@ -17,0 +20,4 @@
string thumbnail_url = 18;
uint32 duration = 19;
repeated string tags = 20;
int64 release_time = 21; // seconds since UNIX epoch
kauffj (Migrated from github.com) commented 2019-01-25 22:34:45 +01:00

this field should die entirely

this field should die entirely
kauffj commented 2019-01-25 22:38:46 +01:00 (Migrated from github.com)

Is there anything else I should do to test or run this? We also have a semi-long list of fields to add. Would it make sense to add those before merging in case some should go in the top 15?

Is there anything else I should do to test or run this? We also have a semi-long list of fields to add. Would it make sense to add those before merging in case some should go in the top 15?
lyoshenka commented 2019-01-28 19:02:06 +01:00 (Migrated from github.com)

putting this here so i don't forget: https://github.com/lbryio/types/issues/8

putting this here so i don't forget: https://github.com/lbryio/types/issues/8
lyoshenka commented 2019-01-28 19:29:00 +01:00 (Migrated from github.com)
related: https://github.com/lbryio/types/issues/15
lyoshenka commented 2019-01-28 22:36:39 +01:00 (Migrated from github.com)

@kauffj yes, link any fields that need to be added here. i found a few PRs but not sure i got em all

@kauffj yes, link any fields that need to be added here. i found a few PRs but not sure i got em all
lyoshenka (Migrated from github.com) reviewed 2019-01-28 22:38:05 +01:00
@ -17,0 +20,4 @@
string thumbnail_url = 18;
uint32 duration = 19;
repeated string tags = 20;
int64 release_time = 21; // seconds since UNIX epoch
lyoshenka (Migrated from github.com) commented 2019-01-28 22:38:05 +01:00

should it be changed to creator? if im publishing public-domain work that i did not create, how do i note that?

should it be changed to creator? if im publishing public-domain work that i did not create, how do i note that?
kauffj (Migrated from github.com) reviewed 2019-01-29 00:33:03 +01:00
@ -17,0 +20,4 @@
string thumbnail_url = 18;
uint32 duration = 19;
repeated string tags = 20;
int64 release_time = 21; // seconds since UNIX epoch
kauffj (Migrated from github.com) commented 2019-01-29 00:33:03 +01:00

Fair, something like this probably needs to exist. But if we're supporting that kind of thing we'd still want that to be a first-class entity (at some point, we're obviously not too close to that).

I'd recommend keeping this out of the 15 because I do not think a single plain text field will be the ultimate solution for how distinguishing authorship.

Fair, something like this probably needs to exist. But if we're supporting that kind of thing we'd still want that to be a first-class entity (at some point, we're obviously not too close to that). I'd recommend keeping this out of the 15 because I do not think a single plain text field will be the ultimate solution for how distinguishing authorship.
shyba commented 2019-01-29 15:13:27 +01:00 (Migrated from github.com)

great, maybe make a backup of the current one like /proto_legacy/? The current proto2 one is still needed for decoding claims.

great, maybe make a backup of the current one like `/proto_legacy/`? The current proto2 one is still needed for decoding claims.
lyoshenka (Migrated from github.com) reviewed 2019-02-13 23:48:34 +01:00
lyoshenka (Migrated from github.com) commented 2019-02-13 23:48:34 +01:00

i actually don't know. we have it today

i actually don't know. we have it today
lyoshenka commented 2019-02-14 00:28:20 +01:00 (Migrated from github.com)

Questions re: channel metadata

  • what does Name mean? don't channels already have a name? is this like the difference between username and display name?
  • should cover and thumbnail be web URLs or LBRY URLs or claim IDs?
Questions re: [channel metadata](https://github.com/lbryio/types/issues/8) - what does Name mean? don't channels already have a name? is this like the difference between `username` and `display name`? - should `cover` and `thumbnail` be web URLs or LBRY URLs or claim IDs?
kauffj (Migrated from github.com) reviewed 2019-02-14 16:53:54 +01:00
@ -0,0 +8,4 @@
string description = 3;
string thumbnail_url = 4; // url or claim ID?
string cover_url = 5; // url or claim ID?
}
kauffj (Migrated from github.com) commented 2019-02-14 16:46:05 +01:00

we may want a short description, limited to a reasonable number of characters and no markup, as well as an unbounded (well, bounded by claim size) field that would be shown on the full profile view

we may want a short description, limited to a reasonable number of characters and no markup, as well as an unbounded (well, bounded by claim size) field that would be shown on the full profile view
kauffj (Migrated from github.com) commented 2019-02-14 16:53:49 +01:00

whatever is determined by https://github.com/lbryio/lbry/issues/1842

it may be better to have them directly as blob or stream hashes?

whatever is determined by https://github.com/lbryio/lbry/issues/1842 it may be better to have them directly as blob or stream hashes?
lyoshenka commented 2019-02-15 16:08:57 +01:00 (Migrated from github.com)

Question for reviewers:

  • are any fields still missing?
  • are any fields unnecessary?
  • should the fields be structured differently?
Question for reviewers: - are any fields still missing? - are any fields unnecessary? - should the fields be structured differently?
tzarebczan (Migrated from github.com) reviewed 2019-02-15 17:50:00 +01:00
tzarebczan (Migrated from github.com) commented 2019-02-15 17:49:59 +01:00

content height/length and orientation would be helpful for spee.ch and other apps too - see https://github.com/lbryio/spee.ch/issues/435 / https://github.com/lbryio/spee.ch/issues/527. We wouldn't have to run ffmpeg on new files anymore...

content height/length and orientation would be helpful for spee.ch and other apps too - see https://github.com/lbryio/spee.ch/issues/435 / https://github.com/lbryio/spee.ch/issues/527. We wouldn't have to run ffmpeg on new files anymore...
tzarebczan (Migrated from github.com) reviewed 2019-02-15 17:57:34 +01:00
@ -0,0 +8,4 @@
string description = 3;
string thumbnail_url = 4; // url or claim ID?
string cover_url = 5; // url or claim ID?
}
tzarebczan (Migrated from github.com) commented 2019-02-15 17:57:34 +01:00

regarding: https://github.com/lbryio/types/pull/17#issuecomment-463418314 - I think Name could be the channels real name, or whatever they want to nickname their channel...i.e. my channel is @iloveLBRY, but the name would be "I Love LBRY!"

How does everyone feel about adding some of my other suggestions from https://github.com/lbryio/types/issues/8 -at least Language (and/or Location? - that's what YT has) and Featured Video (lbry URL/claimid).

regarding: https://github.com/lbryio/types/pull/17#issuecomment-463418314 - I think Name could be the channels real name, or whatever they want to nickname their channel...i.e. my channel is @iloveLBRY, but the name would be "I Love LBRY!" How does everyone feel about adding some of my other suggestions from https://github.com/lbryio/types/issues/8 -at least Language (and/or Location? - that's what YT has) and Featured Video (lbry URL/claimid).
tzarebczan (Migrated from github.com) reviewed 2019-02-15 18:06:58 +01:00
tzarebczan (Migrated from github.com) commented 2019-02-15 18:06:58 +01:00

Can tags have a "type" property the way it's defined currently? i.e. Category/topic/genre/other/etc.

Can tags have a "type" property the way it's defined currently? i.e. Category/topic/genre/other/etc.
tzarebczan (Migrated from github.com) reviewed 2019-02-16 15:48:32 +01:00
@ -0,0 +8,4 @@
string description = 3;
string thumbnail_url = 4; // url or claim ID?
string cover_url = 5; // url or claim ID?
}
tzarebczan (Migrated from github.com) commented 2019-02-16 15:48:32 +01:00
  • should cover and thumbnail be web URLs or LBRY URLs or claim IDs? - I think this should be similar to our current thumbnail system, and if we decide to support LBRY urls/hashes there, then we should here too. For now, http urls / spee.ch links should work fine.
* should `cover` and `thumbnail` be web URLs or LBRY URLs or claim IDs? - I think this should be similar to our current thumbnail system, and if we decide to support LBRY urls/hashes there, then we should here too. For now, http urls / spee.ch links should work fine.
lyoshenka (Migrated from github.com) reviewed 2019-02-18 15:04:36 +01:00
lyoshenka (Migrated from github.com) commented 2019-02-18 15:04:36 +01:00

i'm not sure what you mean. can you give me some examples?

i'm not sure what you mean. can you give me some examples?
neb-b commented 2019-02-18 23:04:39 +01:00 (Migrated from github.com)

What about a website/contact field? Most sites have something for you to add your email address or link to a website. I'm not sure if both would be valuable, or if you could just merge it into one field.

What about a `website/contact` field? Most sites have something for you to add your email address or link to a website. I'm not sure if both would be valuable, or if you could just merge it into one field.
tzarebczan (Migrated from github.com) reviewed 2019-02-18 23:42:31 +01:00
tzarebczan (Migrated from github.com) commented 2019-02-18 23:42:31 +01:00

Per the discussion this afternoon, this would pose UX challenges when users tagged content.

The idea was that a top level tag might be bound to some type, i.e. category, with predefined values. Then users could easily reference the category tag when searching/selecting based on tags, as opposed to more generic tags.

Per the discussion this afternoon, this would pose UX challenges when users tagged content. The idea was that a top level tag might be bound to some type, i.e. category, with predefined values. Then users could easily reference the category tag when searching/selecting based on tags, as opposed to more generic tags.
kauffj commented 2019-02-18 23:43:26 +01:00 (Migrated from github.com)

👍 on adding both a website and an email field to channels @lyoshenka

:+1: on adding both a website and an email field to channels @lyoshenka
eukreign commented 2019-02-19 03:38:26 +01:00 (Migrated from github.com)

Question Responses:

  1. I think name is the display name. Slightly less ambigious (not sure by how much) might be to use title insead of name, but I think name is fine too.
  2. cover and thumbnail should be claim IDs

Feedback:

  • thumbnail_url -> thumbnail
  • cover_url -> cover
  • using float for the Fee is a bad idea. It should be an integer and then the precision is 2 decimals for fiat currencies (USD) and 8 decimals for crypto currencies (LBC/BTC). ($1USD would be 100 and 1LBC would be 100000000).

New Questions:

  • Does Channel make sense for certificates if we're planning to also use them for a users identity? I think the old Certificate is more generic when applying to both channels and identities.
  • Can they all go in one file? They are pretty short and it's easier to get the full picture with just one file open.
  • Stream vs. File is confusing. Are there Streams which aren't Files?
  • Insead of having Claim container type with Channel and Stream inside of it, can we just have Channel and Stream as root containers (and get rid of Claim)? (And perhaps add other root objects like Comment in the future?)
Question Responses: 1. I think `name` is the display name. Slightly less ambigious (not sure by how much) might be to use `title` insead of `name`, but I think `name` is fine too. 2. `cover` and `thumbnail` should be claim IDs Feedback: - thumbnail_url -> thumbnail - cover_url -> cover - using `float` for the Fee is a bad idea. It should be an integer and then the precision is 2 decimals for fiat currencies (USD) and 8 decimals for crypto currencies (LBC/BTC). ($1USD would be 100 and 1LBC would be 100000000). New Questions: - Does `Channel` make sense for certificates if we're planning to also use them for a users identity? I think the old `Certificate` is more generic when applying to both channels and identities. - Can they all go in one file? They are pretty short and it's easier to get the full picture with just one file open. - Stream vs. File is confusing. Are there Streams which aren't Files? - Insead of having `Claim` container type with `Channel` and `Stream` inside of it, can we just have `Channel` and `Stream` as root containers (and get rid of `Claim`)? (And perhaps add other root objects like `Comment` in the future?)
tzarebczan commented 2019-02-19 05:39:27 +01:00 (Migrated from github.com)

I don't think I should have to download thumbnails/covers over DHT, unless the long term plan is to allow that for claim thumnails as well (https://github.com/lbryio/lbry/issues/1842)

I don't think I should have to download thumbnails/covers over DHT, unless the long term plan is to allow that for claim thumnails as well (https://github.com/lbryio/lbry/issues/1842)
neb-b commented 2019-02-19 07:33:49 +01:00 (Migrated from github.com)

I agree. I do not think thumbnail/cover should be a claim id.

I can see a case where it is a url or a claim id (or something else), but since thumbnail is already a url for a claim, this should follow the same behavior.

I agree. I do not think thumbnail/cover should be a claim id. I can see a case where it is a url _or_ a claim id (or something else), but since thumbnail is already a url for a claim, this should follow the same behavior.
tzarebczan (Migrated from github.com) reviewed 2019-02-19 21:32:04 +01:00
tzarebczan (Migrated from github.com) commented 2019-02-19 21:32:03 +01:00

per @lyoshenka, we should add these under a dimensions subfield

per @lyoshenka, we should add these under a dimensions subfield
kauffj commented 2019-02-20 19:12:14 +01:00 (Migrated from github.com)

@seanyesmunt note that as long as we encourage usage of spee.ch for images, we are encouraging thumbnail/cover to be a claim id just with extra steps ;)

@seanyesmunt note that as long as we encourage usage of spee.ch for images, we are encouraging thumbnail/cover to be a claim id just with extra steps ;)
kauffj commented 2019-02-22 18:31:40 +01:00 (Migrated from github.com)

Another feature that just struck me as missing is creator identity verification (where verification equals proving I own a certain Twitter account, YouTube account, domain name, or ??). You would prove you own relevant property by issuing a tweet, publishing a video, adding a DNS entry / uploading a file, etc.

This is more complicated than basically everything else we're proposing to add, so I don't want to block on this, but if we can come up with a generic format or nail down a few of them specifically, it'd be good to include.

Another feature that just struck me as missing is creator identity verification (where verification equals proving I own a certain Twitter account, YouTube account, domain name, or ??). You would prove you own relevant property by issuing a tweet, publishing a video, adding a DNS entry / uploading a file, etc. This is more complicated than basically everything else we're proposing to add, so I don't want to block on this, but if we can come up with a generic format or nail down a few of them specifically, it'd be good to include.
jackrobison (Migrated from github.com) reviewed 2019-02-26 22:45:11 +01:00
@ -0,0 +4,4 @@
message Channel {
bytes public_key = 1;
string name = 2;
jackrobison (Migrated from github.com) commented 2019-02-26 22:45:11 +01:00

this is different from the name used to make the claim? is this like a title?

this is different from the name used to make the claim? is this like a title?
kauffj (Migrated from github.com) reviewed 2019-02-27 16:00:33 +01:00
@ -0,0 +4,4 @@
message Channel {
bytes public_key = 1;
string name = 2;
kauffj (Migrated from github.com) commented 2019-02-27 16:00:33 +01:00

yes

yes
kauffj commented 2019-02-27 16:00:47 +01:00 (Migrated from github.com)

@lyoshenka is anything blocking this?

@lyoshenka is anything blocking this?
lyoshenka (Migrated from github.com) reviewed 2019-02-27 17:43:17 +01:00
lyoshenka (Migrated from github.com) commented 2019-02-27 17:43:17 +01:00

what are the possible values for orientation?

what are the possible values for `orientation`?
lyoshenka commented 2019-02-27 17:54:38 +01:00 (Migrated from github.com)

i'm dropping the ability to list payments in BTC. we're just keeping usd and lbc.

i'm dropping the ability to list payments in BTC. we're just keeping usd and lbc.
tzarebczan (Migrated from github.com) reviewed 2019-02-28 02:51:08 +01:00
tzarebczan (Migrated from github.com) commented 2019-02-28 02:51:07 +01:00

@lyoshenka I would say horizontal/vertical, but we can expand that to 0/90/180/270 (https://stackoverflow.com/a/47676129/8308000). I asked Sean and he suggested a boolean for a Portrait setting.

@lyoshenka I would say horizontal/vertical, but we can expand that to 0/90/180/270 (https://stackoverflow.com/a/47676129/8308000). I asked Sean and he suggested a boolean for a Portrait setting.

Pull request closed

Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/types#17
No description provided.