Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented May 28, 2024

The suggested script now is based on git so we will always run the latest version. It also makes sure the Python dependencies are always up-to-date.

@firewave
Copy link
Collaborator Author

@feelamee as you currently contributed to the section please have a look

@firewave
Copy link
Collaborator Author

@firewave firewave force-pushed the daca-doc branch 5 times, most recently from 1d62649 to cddb43e Compare May 28, 2024 10:07
readme.md Outdated

# run the client for a limited amount of packages (adjust -j to the amount of cores to use)
.env/bin/python tools/donate-cpu.py --max-packages=1000 -j1

Copy link
Contributor

Choose a reason for hiding this comment

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

possibly we should check exit codes here?

I'm not sure, but donate-cpu.py have some handling of unstable network.
So, If it although exit with error, we need to handle this and maybe stop.

To be honest, I am a little afraid not only of the endless loop here, but especially auto updated script.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

possibly we should check exit codes here?

Good point. Will take a look.

I'm not sure, but donate-cpu.py have some handling of unstable network.

It does. Depending on the operation it might also exit if it was not able to perform it.

So, If it although exit with error, we need to handle this and maybe stop.

I do not think we need to handle this. If the network is not working the script will be restarted but won't do anything.

To be honest, I am a little afraid not only of the endless loop here, but especially auto updated script.

If it doesn't encounter any issues it will run infinitely. And if it does it just won't do much and still run infinitely.

The auto-update is actually important. The client always needs to run the latest version otherwise they might produce wrong or missing data which caused a range of problems so far. Outdated clients also make it harder to remove deprecated functionality - see #5907.

Copy link
Contributor

@feelamee feelamee May 29, 2024

Choose a reason for hiding this comment

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

it just won't do much

Why? It allow to execute arbitrary code for users, who has write access to this repo.
I understand that this is (endless loop) useful for running in isolated environment and check sometimes.
But I, as ordinary user, will prefer to know what I execute.

So, good that this part not in file and anyone can choose how to run it.

I do not think we need to handle this. If the network is not working the script will be restarted but won't do anything.

I meant all other errors except network, because network already handled by donate-cpu.py. Errors which we most likely can't fix by just restarting script. May be using counter of sequenced errors will a good compromise.

@firewave
Copy link
Collaborator Author

firewave commented Jan 4, 2025

I think I rather extract the script from the documentation and replace it with just add a wget and execution with a static link. We could also add an auto-update part to that script by limiting the amount of packages to analyze and then invoke the latest version again. That would greatly improve the user experience.

@firewave
Copy link
Collaborator Author

firewave commented Jan 4, 2025

Will require some more reworking to make it better for causal users.

@firewave firewave changed the title greatly improved Donate CPU section in documentation / cleaned up some donate-cpu scripts [skip ci] fixed #10540 - greatly improved Donate CPU section in documentation / cleaned up some donate-cpu scripts Jan 12, 2025
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

Successfully merging this pull request may close these issues.

2 participants