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

Fallback to default flags if rxcache initialization fails #3087

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jul 13, 2021

Description

Fallback to default flags if randomx cache allocation fails.
This should allow platforms with limited resources to validate blocks.
Similar to how xmrig falls back:
https://github.com/xmrig/xmrig/blob/02b2b87bb685ab83b132267aa3c2de0766f16b8b/src/crypto/rx/RxCache.cpp#L88
Adds some basic unit tests

Motivation and Context

A user reported "Unable to allocate randomx cache". Since this is used for block validation (not mining), falling
back to the slowest but lightest randomx profile is acceptable.

How Has This Been Tested?

Basic unit tests. Tested on weatherwax base node

Checklist:

  • I'm merging against the development branch.
  • I have squashed my commits into a single commit.

@sdbondi sdbondi force-pushed the core-jit-fallback branch 4 times, most recently from 4e5d1ad to 098d124 Compare July 13, 2021 10:59
- Fallback to default flags if randomx cache allocation fails.
  This should allow platforms with limited resources to validate blocks.
  Similar to how xmrig falls back:
  https://github.com/xmrig/xmrig/blob/02b2b87bb685ab83b132267aa3c2de0766f16b8b/src/crypto/rx/RxCache.cpp#L88
- Adds some basic unit tests
- Remove unused randomx config
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

LGTM

@stringhandler stringhandler merged commit eace2ff into tari-project:development Jul 14, 2021
@sdbondi sdbondi deleted the core-jit-fallback branch July 14, 2021 12:12
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.

5 participants