-
Notifications
You must be signed in to change notification settings - Fork 149
xmr: Download required monero client tools. #3441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry reviewing before you are ready.
So, what's the flow? I guess I would expect:
-
Try to get the hashes file at https://www.getmonero.org/downloads/hashes.txt and verify that with some public key somewhere. I guess we check every start up? Anyway when they first download for now is fine.
-
Parse the list and pick out the version and hash of the os and arch we should have.
-
Check if we have that version. If yes done. If no continue. Also continue if we have nothing downloaded yet.
-
Further check we can use the version in the list. We would accept any version v0.n.n.x. x, or patch can be higher than what we have hard coded. All other numbers must be the same. If we already have a valid version and the one in the list is not valid, stop and do not update.
-
If we have nothing and the version from the list is not valid, we must have a hard coded version and hash to download an earlier version and continue. We would also jump here if we had a problem getting or reading the list and have nothing.
-
Download the file and check hash.
-
Decompress to where we will keep it.
-
Use.
|
This seems like a bad idea to me. If people want a full node wallet, they can run a node and handle the rpc api configuration through the ui. I thought we were implementing a monero light wallet first. |
|
@buck54321 it's like running dcrwallet but dcrd is remote. One can set up a full node to connect to as you say. I think it is a light wallet. please see https://docs.getmonero.org/interacting/monero-wallet-rpc-reference/#json-rpc-interface We don't have any golang libraries to use this technology is why we are downloading the binaries for now. |
Just follow Since this all happens only in create and we always want the latest version from However there are exported functions to do those kind of checks .. mostly for later. |
No that's fine. It gives me the chance to explain where I am going. Run This is the relevant part of |
Can you humor me. Is it very different than what I would expect and why?
It would be done from different networks and different build dirs. It's one dir forbthe user currently. We also don't want latest of the Major version is higher. |
|
Itvlooks like the main difference is that you aren't checking if we already have it. If I made a simnet wallet then a mainnet wallet I would already have it. If we add a wallet delete like btc we would already have it. if restoring feom seed may already have it. |
|
I did not mean like that ... The |
|
Yeah, not quite right .. I really need --appdata but only DataDir available at Driver.Create time. Working .. |
|
Got a couple minor edge cases for architectures/OS's I want to look at but I think ready to review |
JoeGruffins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
|
The MAV stuff can be easily pulled out if it is not what you meant. Another way of hard coding an acceptable version would be to package one version of the monero zip set in dex. We need 7 os/arch files to cover the intersection of os/arch's we support in dex so 7x80MB for the full zipped set. But could also make a versioned dir of the extracted tools which would be 7x56MB which is actually quite large due to good compression I guess. |
JoeGruffins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very involved, looks like you thought of every angle here. Just a few more nits.
|
Then I tried adding a go.mod in xmr/cmd/mkJson: errorsSo that will not work. I guess because not merged yet? I will try to find another html->text tool .. Edit: Found |
JoeGruffins
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. A few more requests inline but after some testing I think good to go. Thanks for making the tool.
|
Locally I'm seeing a problem rebasing. Can you rebase and force push? You could flatten everything into one commit first which would make it easier. |
237f861 to
15d081d
Compare
* remove git rm`d binary: mkjson * update .gitignore for other incoming changes
15d081d to
ef52073
Compare
Completes #3383
Some more cleanup to do before review.