News for hackers. Stuff that matters.
Re:New youtube-dl release: v2020.11.01.1 by dheera on Sunday November 01, 2020 @10:46AM (#24960207)
It would be interesting if we could make a youtube-dl that dynamically fetched the latest working version, cached it, and ran it, and the latest working version, or a link thereof, is stored on the blockchain so it can't be deleted.

That way the command would "just work", "always work", and it can be switched from one host to another anytime without breaking that.

Re:New youtube-dl release: v2020.11.01.1 by eMGm4D0zgUAVXc7 on Sunday November 01, 2020 @12:28PM (#24960975)
> or a link thereof, is stored on the blockchain so it can't be deleted.

A blockchain is overkill for this:

Its central goal of providing a clear ordering of events by the time at which they happened (t1 < t2 < t3) is not necessary to distribute software updates.

You merely want to be able to sort things by a number, the version of the software, which their author has provided on their own.

Remember, the blockchain was invented so Bitcoin could prevent double-spending of the same coins. I.e. if someone attempts to send the same money to multiple different addresses and thus fool multiple people into believing they were paid it can use the blockchain to determine which attempt was the first and ignore all others.

Such attacks would happen within milliseconds typically, hence the need for a strong mechanism against them.

This is not needed for merely distributing downloads:

You already trust the author enough that you would run their code, so you can as well trust them that the number which they say is the latest version in fact is the latest one. That's also because they have no incentive to fool you into using an older one, there's no money involved.

What you'd want instead is Freenet, the goal of which is preventing censorship and providing anonymity: https://en.wikipedia.org/wiki/Freenet

It's "updatable subspace key" (USK) address type is suitable here.

Re:New youtube-dl release: v2020.11.01.1 by sideshowb on Sunday November 01, 2020 @01:30PM (#24961404)
Erm, you seem to be saying something sensible about blockchain. Don't you know that's just not the done thing these days ?
Re:New youtube-dl release: v2020.11.01.1 by bitwize on Sunday November 01, 2020 @01:58PM (#24961596)
I thought blockchain mania had passed and it's all about AI these days?
Re:New youtube-dl release: v2020.11.01.1 by brianush1 on Monday November 02, 2020 @08:33AM (#24967935)
It's all about AI running on the blockchain
Re:New youtube-dl release: v2020.11.01.1 by dheera on Sunday November 01, 2020 @02:40PM (#24961909)
> Its central goal of providing a clear ordering of events by the time at which they happened (t1 < t2 < t3) is not necessary to distribute software updates.

I guess that's not strictly necessary just to provide a binary update, but this feature could also be used to make the blockchain itself host the repo and its commits. Branches, pull requests, reverts, and everything could be stored as events on the blockchain. Differential commits do need that clear ordering of time to work.

Basically, imagine a decentralized version of Github.

Re:New youtube-dl release: v2020.11.01.1 by eMGm4D0zgUAVXc7 on Sunday November 01, 2020 @04:49PM (#24962835)
No, they do not need ordering of time, they need the precise ordering their developers chose for them to make sense:

Code is a well-chosen piece of logic to make sense as a whole. You can't just arbitrarily take to pieces of code and mash them together just because two random developers on the planet happened to write them one after the other in a sequential fashion of time.

E.g if you ask a classroom "What's 1 + 1 ?" then someone might say "3" right after you asked but before someone else says "2", but that does not make "3" right.

Proper order of commits is established by a MUCH more simple mechanism in fact: A git commit includes the hash of the previous commit in the history.

So the plain aspect of "storing some bytes" is needed, not a blockchain :) As someone else said, Git provides just that.

FWIW, censorship-resistant networks such as the aforementioned Freenet can and are used to publish Git repositories in a robust fashion. But no blockchain magic is required here either :)

Re:New youtube-dl release: v2020.11.01.1 by dheera on Sunday November 01, 2020 @04:54PM (#24962860)
Okay, point taken. I guess with blockchain though it might "moon" and you might make a few bucks off the "whales" who "hodl" or whatever. LOL.
Re:New youtube-dl release: v2020.11.01.1 by gizmo686 on Sunday November 01, 2020 @02:50PM (#24961969)
I think you are describing git.
Re:New youtube-dl release: v2020.11.01.1 by dheera on Sunday November 01, 2020 @02:56PM (#24962011)
git itself doesn't support a decentralized push as far as I know, or rather that decentralized hosting infrastructure hasn't been built to seamlessly work with git.
Re:New youtube-dl release: v2020.11.01.1 by MetaDark on Sunday November 01, 2020 @03:45PM (#24962353)
Yes it does, you can either push to multiple remotes individually, or setup multiple pushurls for a single remote.
Re:New youtube-dl release: v2020.11.01.1 by anamexis on Sunday November 01, 2020 @04:17PM (#24962581)
I'm a blockchain skeptic with the best of them, but this does not solve the problem GP is describing. Yes, git supports multiple remotes, but there is no durable, decentralized hosting infrastructure for arbitrary repos that I am familiar with.
Re:New youtube-dl release: v2020.11.01.1 by sofetch on Monday November 02, 2020 @02:27PM (#24972009)
Unless I misunderstand git-ssb does this.
Re:New youtube-dl release: v2020.11.01.1 by rsync on Sunday November 01, 2020 @01:32PM (#24961408)
"It would be interesting if we could make a youtube-dl that dynamically fetched the latest working version ..."

I think a better strategy would be to separate the youtube-dl core "engine" from the set of rules/exceptions/offsets that it uses to iterate and download the media.

So the core youtube-dl could not download anything (or, perhaps, only a simple file at a static URL) and you would add a set of rules, or specs, that give it the ability to download from youtube or vimeo or whatever.

Then you would not worry about blocking youtube-dl or having it barred from github, etc. and all of the "rules" could be simply shared, or published, as simple text via pastebin or email or whatever.

Re:New youtube-dl release: v2020.11.01.1 by kaszanka on Sunday November 01, 2020 @11:06AM (#24960348)
The blockchain that is immutable and can't ever be retroactively changed (until a big fish loses money, see Ethereum DAO fork).

I think hosting the development repository in a country that doesn't respect the DMCA is a simpler solution. Git is a blockchain too, after all.

Re:New youtube-dl release: v2020.11.01.1 by chug on Sunday November 01, 2020 @02:26PM (#24961809)
The problem with this is that DMCA isn't the only option the RIAA has by a long shot. The DMCA is a tool to get a platform to stop hosting content the rights holder believes is infringing. There's nothing stopping the RIAA from sending a DMCA notice and suing all the contributors. In other words, the project doesn't just need to be hosted in a country that is outside the reach of the US legal system, but the maintainers and contributors as individuals need to also be outside the reach of the US legal system. In fact, I'd be shocked if RIAA doesn't go after the maintainers and major contributors individually if they haven't already (I haven't been following this very closely).

Interestingly, the DMCA notice RIAA sent GitHub isn't a typical DMCA notice either. It seems to be more of a cease and desist along the lines of "we noticed this repo is a tool used to infringe on our rights -- sure would be a shame if you were to get caught up in the legal shitstorm that's about to happen, thanks!"

Re:New youtube-dl release: v2020.11.01.1 by dheera on Sunday November 01, 2020 @11:54AM (#24960716)
Right, just keep shoving the latest version onto the end of the blockchain, and point some wallet at the latest revision. Point is nobody will be able to DMCA it.
Re:New youtube-dl release: v2020.11.01.1 by shuntress on Sunday November 01, 2020 @11:38AM (#24960586)
What do you mean by "the blockain"?
Re:New youtube-dl release: v2020.11.01.1 by jasode on Sunday November 01, 2020 @12:00PM (#24960777)
Unless I'm misunderstanding you, there seems to be a logic gap in your proposal.

Let's take this objective:

>it can be switched from one host to another anytime without breaking that.

... that flexibility of any unknown host in the future then breaks the following code:

>if we could make a youtube-dl that dynamically fetched the latest working version

... and youtube-dl would download the latest version from where? What kind of "intelligence" does one put in the code to download from a future unknown http source?

One could try to be clever and embed a "intelligent algorithm" inside youtube-dl to scan the Google SERs[0] for the latest host source but that's not foolproof. Google may also later block results with the all-too-common censorship message "In response to multiple complaints we received under the US Digital Millennium Copyright Act, we have removed 6 results from this page."

Would youtubel-dl scan a well-known Twitter account or SMTP mailing list server to find the latest version? (My previous comment exploring that[0])

Storing binary blobs in popular blockchains like Bitcoin or Ethereum would be near impossible because of technical and architectural limits. (E.g. youtube-dl binary is about 1.7MB and thus miners will reject your non-standard transaction.)

I'm unaware of a foolproof way to share future versions aka future sources that can be programmed into deterministic code. Discovery will have to involve humans coordinating in some way. E.g. PirateBay moves from host to host but humans (not code) spread the new location.

[0] https://www.google.com/search?q=youtube-dl+latest+download

[1] https://news.ycombinator.com/item?id=24930317

Re:New youtube-dl release: v2020.11.01.1 by eMGm4D0zgUAVXc7 on Sunday November 01, 2020 @12:30PM (#24960997)
> I'm unaware of a foolproof way to share future versions aka future sources that can be programmed into deterministic code.

This is entirely possible :)

You would use an "USK" ("updatable subspace key") address of Freenet to achieve that: https://en.wikipedia.org/wiki/Freenet

Also see my other comment to the parent for an explanation of why Freenet would be preferable to blockchains here.

Re:New youtube-dl release: v2020.11.01.1 by gizmo686 on Sunday November 01, 2020 @03:06PM (#24962073)
You do not need a resiliant method of distributing youtube-dl; just a resilient method of distributing the location where you are distributing youtube-dl, which is probably just a URL.

This is small enough that embedding it in a major blockchain is entirely feasible. There is also the much more boring option of hardcoding many different locations to find the URL.

Re:New youtube-dl release: v2020.11.01.1 by 0x0 on Sunday November 01, 2020 @12:10PM (#24960853)
You could probably post a gpg-signed url to the blockchain, and scan the blockchain for new urls signed by a known gpg key. Or something like that.
Re:New youtube-dl release: v2020.11.01.1 by jasode on Sunday November 01, 2020 @12:20PM (#24960916)
The gpg approach doesn't seem that reliable. Let's look at the paragraph about history of youtube-dl from wikipedia[1]:

>History youtube-dl was created in 2008 by Ricardo Garcia.[4] Initially, only YouTube was supported, but as the project grew, it began supporting other video sharing websites.[5] Ricardo Garcia stepped down as maintainer in 2011 and was replaced with phihag, who later stepped down and was replaced with dstftw.[6]

Would that be 3 different gpg signatures?

- gpg for Ricardo Garcia

- gpg for phihag

- gpg for dstftw

What would be the deterministic programming code algorithm to find the future unknown gpg signature for the latest non-malware version of youtube-dl on the blockchain?

Conceivably, one could create a project-specific gpg signature (private key shared with future authors) instead of human-author-specific gpg signer. Is that collaboration scenario common?

[1] https://en.wikipedia.org/wiki/Youtube-dl#History

Re:New youtube-dl release: v2020.11.01.1 by philsnow on Sunday November 01, 2020 @01:20PM (#24961341)
Have each outgoing maintainer sign a string "I approve <new maintainer> whose public gpg is <public gpg key>"?

Doesn't work if latest maintainer loses access to their private key or dies or anything like that though.

Re:New youtube-dl release: v2020.11.01.1 by 0x0 on Sunday November 01, 2020 @12:36PM (#24961046)
That's how android apks work. An app is signed with a public/private key combo, updates must match the same key. Surely something similar could be conceived. Keys could have an expiration date and someone would just need to post a signed update before it expires that implements an additional new key, then you could even upgrade extremely old versions through a couple of steps.
Re:New youtube-dl release: v2020.11.01.1 by josteink on Sunday November 01, 2020 @01:21PM (#24961343)
> That way the command would "just work", "always work", and it can be switched from one host to another anytime without breaking that.

Sounds like what you actually want is IPFS.

https://ipfs.io/

Re:New youtube-dl release: v2020.11.01.1 by aaron_m04 on Sunday November 01, 2020 @01:53PM (#24961546)
How about a command line tool for working with Merkle DAGs of changes to text files and that also supports "pushing" and "pulling" these changes in a decentralized fashion? I can think of a really popular one...