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

Low Memory Profile (LMP) Hash #60

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WhoSoup
Copy link
Contributor

@WhoSoup WhoSoup commented Nov 3, 2019

Hey, wanted to get your take on this idea:

It is possible to have an lxr hash that does not load the bytemap into memory, at the cost of sacrificing almost all performance. The idea is to just have a file pointer open to the bytemap file and use Seek to jump to the appropriate offset, then read a single byte.

This is very inefficient compared to keeping it in RAM so this would only be useful in situations where a low RAM usage is critical. Not suitable for mining.

Regular LXR was ~151ms for 1000 hashes
With an older SATA ssd, LMP was ~7400ms for 1000 hashes
With a newer M.2 ssd, LMP was ~3400ms for 1000 hashes

Anyway, this is probably an unreasonably poor utilization of file i/o that it's not a viable option, just wanted to put it out there.

@WhoSoup WhoSoup requested a review from PaulSnow November 3, 2019 13:37
@Emyrk
Copy link
Member

Emyrk commented Nov 5, 2019

I think it's a valid option to offer.

@PaulSnow
Copy link
Collaborator

I'd note that if you really only want to validate a few blocks of hashes, then this is a viable option, and then trusting the history going backwards (avoiding the hashes) would work just fine for some wallets and infrastructure.

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.

3 participants