BlockchainCommons / GordianServer-macOS

Tor-protected full-node GordianServer for macOS
Other
63 stars 8 forks source link

Gordian Server breaks with Bitcoin 23.0 #171

Open shannona opened 2 years ago

shannona commented 2 years ago

It looks like the main problem is that MacOS binary URL changed from the expected:

https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-osx64.tar.gz

To one of:

https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-arm64-apple-darwin.tar.gz
https://bitcoincore.org/bin/bitcoin-core-23.0/bitcoin-23.0-x86_64-apple-darwin.tar.gz

(There are also DMGs, but I presume the tar.gz is still preferred.)

Download now needs to occur from:

bitcoin-${processedVersion}-`uname -m`-apple.darwin.tar.gz

The uname -m command from the command line can provide the architecture. The uname() command in Swift can do the same, per this [see the currently 4th answer], but it'll tell you arm64 if it's running in Rosetta, which Gordian Server will be, so we presumably want to get the command-line answer to get them Bitcoin proper running efficiently on the appropriate architecture. (Hopefully that won't also be running in Rosetta since it's a script, but we won't know until we test.)

So, my suggestion is:

  1. Move the final composition of the download URL from GordianServer-macOS/Helpers/UrlRequest.swift to GordianServer-MacOS/Scripts/Standup.command to take advantage of the uname -m command line option.
  2. Adjust the URL for apple-darwin instead of osx.
ChristopherA commented 2 years ago

/cc @Fonta1n3 : is something you can take care of? After all, Gordian Server is largely used with your Fully Noded customers.

Fonta1n3 commented 2 years ago

/cc @Fonta1n3 : is something you can take care of? After all, Gordian Server is largely used with your Fully Noded customers.

It's an easy fix, but will break again if they change the url. Happy to do it.

ChristopherA commented 2 years ago

That would be great. Thanks!