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

Rust Miner Arch Improvements #32

Merged
merged 8 commits into from
Sep 11, 2023
Merged

Rust Miner Arch Improvements #32

merged 8 commits into from
Sep 11, 2023

Conversation

MitchTurner
Copy link
Collaborator

I kept thinking about this so I figured I'd write it up and put it out there.

I kept the worker manager as a trait as well because I keep hearing about doing GPU hashing. We could develop a CPU manager for now and then someone could upgrade it to GPU once we figure it out. The abstraction makes that easier.

@MitchTurner MitchTurner marked this pull request as draft September 5, 2023 20:24
@MitchTurner MitchTurner changed the title Rust Miner Arch Suggestion DRAFT: Rust Miner Arch Suggestion Sep 5, 2023
@MitchTurner
Copy link
Collaborator Author

It's possible that more logic could be pushed into the Miner::run() function, maybe by letting the manager tell you how many threads to create or something, but this is the general idea.

}
}

pub async fn run(&self, mut shutdown: oneshot::Receiver<()>) -> Result<()> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could also have this spawn a task for the loop and return the sender.

@rvcas
Copy link
Member

rvcas commented Sep 6, 2023

yea this is great, I'm down to move these changes into src

@MitchTurner MitchTurner changed the title DRAFT: Rust Miner Arch Suggestion Rust Miner Arch Improvements Sep 8, 2023
@MitchTurner MitchTurner marked this pull request as ready for review September 10, 2023 22:30
@rvcas rvcas merged commit 7cf2bb4 into main Sep 11, 2023
1 check passed
@rvcas rvcas deleted the rust-miner-arch branch September 11, 2023 00:10
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