Skip to content
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

simple way to embedded config in xmrig #245

Closed
MrCook1es opened this issue Mar 26, 2019 · 6 comments
Closed

simple way to embedded config in xmrig #245

MrCook1es opened this issue Mar 26, 2019 · 6 comments

Comments

@MrCook1es
Copy link

this is an excellent starting point to work on: xmrig#957 (comment)

This feature added to dev branch.

How to use:

1. Use cmake option `-DWITH_EMBEDDED_CONFIG=ON` to enable this feature.

2. Edit/replace config sample in code https://github.com/xmrig/xmrig/blob/dev/src/core/ConfigLoader_default.h#L35

3. Recompile the miner.

Please note embedded config used only if miner fails to load external configuration from file or command line.
Also fixed bug: m_enabled field was uninitialized in Pool class.

@Bendr0id
Copy link
Owner

go ahead

@MrCook1es
Copy link
Author

in this way it becomes the simplest thing on earth
a new file "ConfigLoader_default.h" where to set everything up simply:

https://github.com/xmrig/xmrig/blob/dev/src/core/ConfigLoader_default.h#L35

@Bendr0id
Copy link
Owner

Sorry for the late response. Could you check if that works as expected..? Branch: embedded_config

@MrCook1es
Copy link
Author

@Bendr0id it works properly.
if after executing the miner I go to modify a value and save the new config with "push miner config", the "config.json" file is correctly created and the new values from that file are read.
very good.


would be cool if at the moment when I make a subsequent change, such as changing the url pool "pass" or "worker-id", when I go to save "push miner config" instead of going to create the whole configuration, it would be cool if it went to create me only the 2 lines where I made the change.

config.json

{

    "pools": [
        {
            "pass": "test1",
        }
    ],
    "cc-client": {
        "worker-id": "test2",
    }
}

Bendr0id added a commit that referenced this issue Jul 24, 2019
* Integrated embedded config parsing #245

* cleanup

* Cleanup in remotelog

* Fixed MS Visual Studio 2019 compatibility

* Embedded config parsing only for miner not server
Bendr0id added a commit that referenced this issue Jul 24, 2019
* Integrated embedded config parsing #245

* cleanup

* Cleanup in remotelog

* Fixed MS Visual Studio 2019 compatibility

* Embedded config parsing only for miner not server

* wip

* Finished delete template
Bendr0id added a commit that referenced this issue Jul 24, 2019
* Integrated embedded config parsing #245

* cleanup

* Cleanup in remotelog

* Fixed MS Visual Studio 2019 compatibility

* Embedded config parsing only for miner not server

* wip

* Finished delete template

* WIP

* Integrated Argon2id/chukwa algo

* Added chukwa-wrkz algo variant

* Cleanup argon2-512 (chukwa/trtl) and argon2-256 (wrkz) parsing

* WIP other argon2 coins

* Cleanup and donate fix
Bendr0id added a commit that referenced this issue Jul 24, 2019
* Integrated embedded config parsing #245

* cleanup

* Cleanup in remotelog

* Fixed MS Visual Studio 2019 compatibility

* Embedded config parsing only for miner not server

* wip

* Finished delete template

* WIP

* Integrated Argon2id/chukwa algo

* Added chukwa-wrkz algo variant

* Integrated cn-conceal/ccx for x86 arch
@hirdeshsaxena
Copy link

hirdeshsaxena commented Mar 16, 2021

hi this solution is not working can you help.

I have made the change in Use cmake option -DWITH_EMBEDDED_CONFIG=ON

and in \src\core\config\Config_default.h

but not working still crash have to provide external config.json to run

and this file not exist path src/core/ConfigLoader_default.h

@Bendr0id
Copy link
Owner

Just verified, it works perfectly fine.

-DWITH_EMBEDDED_CONFIG=ON and just edit the file src/core/config/Config_default.json.

Make sure you DONT break the json, that could be your problem.

When you set the cmake flags, make sure you delete the CMakeCache.txt before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants