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

[Question] How does the GPU know the reward function? #3

Open
fmhall opened this issue Oct 22, 2022 · 2 comments
Open

[Question] How does the GPU know the reward function? #3

fmhall opened this issue Oct 22, 2022 · 2 comments

Comments

@fmhall
Copy link

fmhall commented Oct 22, 2022

I've been playing around with the repo and I'm a bit confused with the GPU code.

Here's my confusion:

if you set const ZERO_BYTE: u8 = 0xff; for the sake of demonstration, the CPU code will now search for addresses that start with 0xff....

However, the GPU code continues to search for addresses with leading zeros. Why is this?

Thanks in advance. I'm a noob when it comes to working with the GPU.

@acegilz
Copy link

acegilz commented Oct 23, 2022

While brute-forcing, it automatically looks for both leading AND cumulative 0bytes on those billion generated address

From the example, when you run:
cargo run --release $FACTORY $CALLER $INIT_CODE_HASH 2 4 6

  • the 4 is the threshold to save on the file the leading bytes (4 bytes which means its 8 leading digits)
  • the 6 is the threshold to save on the file the total 0-bytes (pair of 0s on specific place)

It will output & save on the file any generated address that matches any of both conditions

Hope this helps you

@fmhall
Copy link
Author

fmhall commented Oct 24, 2022

For sure! But after replacing ZERO_BYTE with 0xff instead of 0x00, if you look at the gpu code, it should now do the same process but return addresses with f's instead of 0's, no?

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

2 participants