-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add API functions to start and stop local Monero node [$300] #137
Comments
There is a bounty on this issue, the amount is in the title. The bounty will be awarded to the first person(s) who resolves this issue. Read the full conditions in the 'bounties.md' file. If you are starting to work on this issue, please write a comment here, so that we can assign the issue to you and avoid duplicated work. |
Hi guys, I would like to take on this bounty on my spare time, I have never programmed in Java but have some minor experience with other languages and am quite familiar with the Linux CLI. Could someone assign this bounty to me? Also, what is an acceptable delivery time-frame for a P2 issue of this sort? |
I should also mention that I'm having problems getting past the Deploy instructions on installing.md, specifically with make seednode. Is this the place I should go to in order to clear my doubts and request help - Development discussions: Haveno Development (#haveno-dev:haveno.network) relayed on Libera (IRC) (#haveno-dev) ? |
Excellent, I have assigned the issue to you. I can help implement (or at least review) the constructor of MoneroDaemonRpc.java in monero-java that launches the daemon process. It should be nearly identical to the constructor in MoneroWalletRpc.java, and will need a corresponding test. Would hope for a timeframe within the next month or two, as other API calls are being built. |
That timeframe sounds definitely reasonable! If I managed to finish this fast enough I'll jump onto other API bounties. As for my issue, something went wrong when I was following this step "Logs" for the errors found:
Same error happened when I ran make deploy, except it didn't recognize the 'screen' command. Then I tried this:
I also encountered a minor "error" during the first step when I ran make, should I paste that one as well? |
@erciccione Something you can help with? |
@HashedMantisShrimp what OS are you on? Looks like a local problem. Also from a quick check on that
Make sure you have
This is a script we inherit from Bisq, it's not really update to work with Haveno. |
Thank you, I will look into it! I was under the impression that this was a Haveno specific problem (because of the ./haveno-seednode command not found), since it's make related shouldnt be too hard to fix. |
The problem appears to be that the |
@woodser, that's the same conclusion I came to and was about to edit my other comment. Yes I saw an error when I initially ran make but disregarded it, now I can't find the terminal window with the history. I'll start over so I can investigate the first error (Just realized this is what you suggested, nvm lol). EDIT FINAL - make error log:
FAILURE: Build failed with an exception.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. BUILD FAILED in 33s |
Ah okay. I will wait for that to be resolved then. Or is it okay if I just run with the proposed change? I could edit the file locally and go with that. |
You can try manually reverting the checksum to |
That worked, thanks! |
The new hash should work and the old hash will stop working after clearing your gradle cache with |
Actually, my build seems to work without the new hash - prior to this I had deleted my ~/.gradle files and ran make clean && make, there was no error so I ran make a second time, just to be sure:
Futhermore, all other make commands seem to work. If it's not that big a deal I'll keep using the old hash but I'll be sure to merge from your master branch before I submit my code. |
@woodser, were you guys aware of these errors? I followed these instructions to run the existing tests and found an error when using the docker command:
As well as an error when running npm start:
I attempted to remove 'false' on line 130 (leaving only the semi colon) but then got this:
This is just an FYI, I'll get back at debugging this later today. EDIT: Am I wasting my time trying to get Haveno UI PoC to run w/o errors? I think not because at the end of the day I will be running tests to ensure my code hasn't broken anything, but I'd like a second opinion on this. EDIT 2: |
Regarding the jtorctl,
I'm not seeing this error when starting the envoy proxy. Is your local path correct when invoking this command:
Good catch, opened a PR to correctly set this parameter: https://github.com/haveno-dex/haveno-ui-poc/pull/26
Definitely not. It's most important that the end-to-end tests run, and the UI POC should run successfully if the tests run.
Please keep us posted. FYI: I have implemented changes in monero-java to support launching monerod as an internal process for this issue to use. It will be available in the next release of monero-java in the coming days. |
SOLVED: I narrowed down the issue to the protobuf-compiler version. I was on libprotoc 3.6.1 but woodser was on libprotoc 3.17.3. This was leading to the ts files not being generated correctly. I had to upgrade my OS version to upgrade my protobuf-compiler version, but it worked. Thanks to @woodser, couldn't have done it without your help. Now I'll get out of the way on this PR. |
This issue is currently unassigned with HashedMantisShrimp being pulled into other things. @randall-coding Please let me know if you'd like this issue assigned to you. |
Sure that sounds great, please do. I should be finishing up my other task very soon (working the bugs out of my tests right now). |
Hey @randall-coding, still working on this or better to re-assign? |
You can re-assign, I haven't gotten around to this yet. |
Ok. Thanks :) |
Hi, I would like to work on this next please! |
👍 It's all yours. Thanks. |
I think the issue description needs updated after reviewing starting/stopping a local node in more depth. The official Monero software recognizes when a local node is running at predefined ports (18081, 28081, 38081 for mainnet, testnet, stagenet respectively) and also allows a local node to be started with optional configuration (startup flags, blockchain path, and bootstrap url). I'm thinking we should do the same to accomodate various use cases. In that case, the API would be approximately:
For the test, if the local node is already started when the test is run, the test can do some basic checks and pass with a warning that the node was already started and so starting/stopping the node is not being tested. If the local node is not already started, the test can manually start and stop the local node and check the current connection accordingly ( We can update the issue description and make minor adjustments to the bounty amount if necessary. Thoughts? |
Sounds good I can begin looking into the changes soon. |
Can I get clarification on what the purpose of monero connection manager (added a3586fd) and how it should interact with a local monero node? To me it appears that it is used to fall back to other remote monero nodes, which should be disabled if a localhost monero node has been started. Does that mean the default connection detection (localhost stagenet) should not be part of the monero connection manager? |
I've updated it so that the new CoreMoneroNodeService will initialize by attempting to connect to a local node via RPC, or start a new local Monero node process from the last known MoneroNodeSettings. If successful, set that daemon connection in the Monero connection manager, otherwise use the same connection heuristics as before. As for encrypting the MoneroNodeSettings, I believe it would be better to implement encrypted persistence of all persistable objects at once, which I can work on as a separate pull request. I looked at the EncryptedConnectionsList as an alternative implementation strategy for encrypting specific properties with the user's password but I think it will be more maintenance to do that for every persisted setting. Let me know that's OK. |
Reward sent. Thanks @duriancrepe :) |
Received! Thanks :) |
This issue requests adding new API functions to start and stop a local Monero node.
The following functions are requested as additions to HavenoDaemon.ts. Feedback is welcome.
havenod.startMoneroNode(rpcUsername: string, rpcPassword: string)
void
havenod.stopMoneroNode()
void
How to implement
Start an internal monerod process using a constructor in MoneroDaemonRpc.java.
Refer to how monero-wallet-rpc instances are started and stopped in Haveno for reference as this pattern will be similar.
Follow these instructions to add and test new API functions end-to-end.
The text was updated successfully, but these errors were encountered: