Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Downloading node client binaries at runtime #1228

Merged
merged 18 commits into from Oct 15, 2016
Merged

Conversation

hiddentao
Copy link
Contributor

@hiddentao hiddentao commented Sep 29, 2016

Instead of bundling client binaries at build time we will download then on startup at runtime. This will allow us to update client binaries for all Mist users without having to publish a new Mist release, and it will also reduce the size of Mist/wallet releases. And we will no longer track binaries in the repo (which we should never have done in the first place!). This makes use of ethereum-client-binaries to facilitate this.

  1. It first checks for ethereumBinaries.json online in the master repo of Mist project
  2. If not found or invalid it will load the one bundled with Mist
  3. It will then call into ethereum-client-binaries lib with the JSON config and scan for binaries (only Geth supported at the mo)
  4. If not matching version of a binary found it will download one and verify again
  5. It will then start the app as normal

@hiddentao hiddentao changed the title Downloading geth/eth client binaries at runtime Downloading node client binaries at runtime Sep 29, 2016
@hiddentao
Copy link
Contributor Author

Ready for review. Eth is still bundled as normal whilst I work out how best to fetch it on the fly. Gulp script simplified.

@luclu
Copy link
Contributor

luclu commented Sep 30, 2016

Works flawlessly (tested on mac and linux) :)

Could you also cleanup your shrinkwrap by running npm install; npm prune; npm shrinkwrap?
Without the prune there will be dev-deps included that won't be available under linux (#1208).
This will also fix the travis build.

@hiddentao
Copy link
Contributor Author

Thanks @luclu , shrinkwrap updated. Also removed some redundant deps.

@luclu
Copy link
Contributor

luclu commented Sep 30, 2016

hmm, seems it didn't work as expected, could you repeat npm install; npm prune; npm shrinkwrap while doing rm -r node_modules before?

@hiddentao
Copy link
Contributor Author

Tried again, after removing node_modules

@luclu
Copy link
Contributor

luclu commented Sep 30, 2016

Weird, I pushed my npm install; npm prune; npm shrinkwrap's result.

@luclu
Copy link
Contributor

luclu commented Sep 30, 2016

Ok, made travis happy again while on it.

@hiddentao
Copy link
Contributor Author

Thanks @luclu

With the frequent new releases of Geth that have been happening recently, this PR would really help in rolling out Geth updates for Mist users.

@hiddentao hiddentao mentioned this pull request Oct 4, 2016
@hiddentao
Copy link
Contributor Author

Annoyingly am getting build errors again. I've done a fresh npm shrinkwrap but to no avail. @luclu I think I need your help again.

@frozeman
Copy link
Contributor

frozeman commented Oct 6, 2016

One problem with your config is that it downloads all files from peters cross builds. We should download the ones on the github release page from there and only take from peter what we don't get there.

@hiddentao if the config file contains the links to the versions to download, how does the client updates the geth nodes automatically, or checks for new versions? Also how do we restrict updates to only patch versions, as minor amen major versions could contain backwards incompatible changes.

EDIT i see we download the config from github master. Can we also include the links from the github release page and can you sth-client package download and unzip them as well?

@hiddentao
Copy link
Contributor Author

hiddentao commented Oct 6, 2016

@frozeman The download links are arbitrary and can be set to whatever. As long as they link to Zips and Tarballs (i.e. no installers) it's fine.

As you saw, it first checks for a config on the master branch. Thus, to update Geth we have to update the master branch config and then tell users to restart their Mist client. Nothing is automatic.

@hiddentao
Copy link
Contributor Author

Parity binaries available here: https://vanity-service.ethcore.io/parity-binaries

@luclu
Copy link
Contributor

luclu commented Oct 6, 2016

@hiddentao no problem, I'm at your disposal ;)

Annoyingly am getting build errors again. I've done a fresh npm shrinkwrap but to no avail. @luclu I think I need your help again.

@hiddentao
Copy link
Contributor Author

Thanks @luclu !

@evertonfraga
Copy link
Member

evertonfraga commented Oct 13, 2016

Testing checklist

  • Start mist without geth nodes on folder
  • Empty nodes with newer geth on remote json
  • Start mist with geth nodes on folder
  • Start mist with JSON failing to load
  • Old node; Newer geth on remote json
    • failed to link to newer geth binary

Silly tests

  • Test with version check (sanity) failing on purpose
    • it does fails to install/update the node.

@evertonfraga
Copy link
Member

@hiddentao I've raised https://github.com/hiddentao/ethereum-client-binaries/pull/2 in order to make node updates more reliable.

I'll keep testing.

@hiddentao
Copy link
Contributor Author

@evertonfraga Nice one. Only a minor change needed to that PR and it can be merged.

@evertonfraga
Copy link
Member

Looks really good to me :)
@hiddentao after integrating that PR, we're good to go

@evertonfraga evertonfraga added this to the 0.8.6 milestone Oct 14, 2016
Copy link
Contributor Author

@hiddentao hiddentao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we fetch binaries from the Github servers? e.g. links on https://github.com/ethereum/go-ethereum/releases/tag/v1.4.17

@hiddentao
Copy link
Contributor Author

Fixed CI, ready to merge.

@hiddentao hiddentao merged commit 36b9eb2 into develop Oct 15, 2016
@hiddentao hiddentao deleted the runtime_binaries branch October 15, 2016 00:37
@lock
Copy link

lock bot commented Mar 31, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants