Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Allow up to N nonces for contract creation #43

Open
arian487 opened this issue Mar 18, 2021 · 2 comments
Open

Allow up to N nonces for contract creation #43

arian487 opened this issue Mar 18, 2021 · 2 comments

Comments

@arian487
Copy link

The current contract flag only uses the 0th nonce to check if a match is found but it would speed up a lot if you were to allow up to N nonces to be generated before generating a new wallet address to check.

@NgVQuang
Copy link

NgVQuang commented Apr 4, 2021

0xFfAE7915C888DE11f5A76FB4dcCF9d065734C7d8

@SmartLayer
Copy link

The following patch allows you to get contract addresses with nonce=1 instead of 0:

diff --git a/profanity.cl b/profanity.cl
index 41a3fcf..41c8c67 100644
--- a/profanity.cl
+++ b/profanity.cl
@@ -690,7 +690,7 @@ __kernel void profanity_transform_contract(__global mp_number * const pInverse)
        for (int i = 0; i < 20; i++) {
                h.b[i + 2] = hash[i];
        }
-       h.b[22] = 128;
+       h.b[22] = 1;
 
        h.b[23] ^= 0x01; // length 23
        sha3_keccakf(&h);

You need to delete the cache-.* file after applying the patch for it to be regenerated with the patched code. You can start from the binaries in release section. If you need nonce=𝑛, replace 1 with 𝑛.

To make it a parameter, such as

./profanity.x64 --contract-nonce 1

You will need to work quite a bit in the source code since you will need to pass more data to the kernel. A patch is welcome (at least by me, not sure if author will accept).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants