-
- Your average Hashrate: {{ number_formatter.format(hashrate) }} H/s
- You have solved {{ total_solved }} {{ pluralize(total_solved, "challenge") }} in
- {{ number_formatter.format(total_solving_for / 1000) }}s
- Your Hashrate on the last challenge: {{ number_formatter.format(hashrate_array.at(-1)!) }} H/s
-
- You have not solved any challenges yet
- Challenge: {{ challenge_loading_indicator }}
- {{ challenge }}
-
- Nonce: {{ nonce }}
-
- Get Challenge
-
-
- Solve Challenge
- Solving challenge for {{ solving_for }}s...
-
-
-
- Challenge solved in {{ solveTime }}ms!
- Validating solution...
-
-
{{ challenge_error }}
-
-
-
-
- Auto solve
-
-
-
-
- Difficulty
-
-
-
-
-
\ No newline at end of file
diff --git a/example-app/app/utils/worker-name.ts b/example-app/app/utils/worker-name.ts
deleted file mode 100644
index 7d7e09f..0000000
--- a/example-app/app/utils/worker-name.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-const adjectives = ['swift', 'silent', 'hidden', 'clever', 'brave', 'sharp', 'shadow', 'crimson', 'bright', 'quiet', 'loud', 'happy', 'dark', 'evil', 'good', 'intelligent', 'lovely', 'mysterious', 'peaceful', 'powerful', 'pure', 'quiet', 'shiny', 'sleepy', 'strong', 'sweet', 'tall', 'warm', 'gentle', 'kind', 'nice', 'polite', 'rough', 'rude', 'scary', 'shy', 'silly', 'smart', 'strange', 'tough', 'ugly', 'vivid', 'wicked', 'wise', 'young', 'sleepy'];
-const nouns = ['fox', 'river', 'stone', 'cipher', 'link', 'comet', 'falcon', 'signal', 'anchor', 'spark', 'stone', 'comet', 'rocket', 'snake', 'snail', 'shark', 'elephant', 'cat', 'dog', 'whale', 'orca', 'cactus', 'flower', 'frog', 'toad', 'apple', 'strawberry', 'raspberry', 'lemon', 'bot', 'gopher', 'dinosaur', 'racoon', 'penguin', 'chameleon', 'atom', 'particle', 'witch', 'wizard', 'warlock', 'deer']
-
-export function getWorkerName() {
- return `${adjectives[Math.floor(Math.random() * adjectives.length)]}-${nouns[Math.floor(Math.random() * nouns.length)]}`;
-}
\ No newline at end of file
diff --git a/example-app/app/utils/worker.ts b/example-app/app/utils/worker.ts
deleted file mode 100644
index b5d05db..0000000
--- a/example-app/app/utils/worker.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-// This worker just sits on another thread and waits for message to solve
-// challenges so that we dont block the render thread
-
-import {
- type WorkerRequest,
- type SolutionMessage,
- WorkerMessageType,
- WorkerResponseType,
- ChallengeStrategy,
-} from "~/types/pow";
-
-const worker_name = getWorkerName();
-let solver: SolverModule | null = null;
-
-let atomic_nonce: Int32Array | null = null;
-let atomic_solution: Int32Array | null = null;
-
-async function loadWasmSolver(module: WebAssembly.Module) {
- if (atomic_nonce === null || atomic_solution === null) {
- throw createError("Atomics not initialized");
- }
-
- console.debug(`[${worker_name}]: Loading WASM solver`);
-
- solver = await WebAssembly.instantiate(module, {
- env: {
- __get_solution: () => Atomics.load(atomic_solution!, 0),
- __set_solution: (value: number) => Atomics.store(atomic_solution!, 0, value),
- __cmpxchg_solution: (expected: number, replacement: number) => Atomics.compareExchange(atomic_solution!, 0, expected, replacement),
- __fetch_add_nonce: (value: number) => Atomics.add(atomic_nonce!, 0, value),
- __log: (ptr: number, len: number) => {
- const string_data = new Uint8Array(solver!.exports.memory.buffer, ptr, len);
- console.log(`[${worker_name}]: ${new TextDecoder().decode(string_data)}`);
- },
- }
- }) as unknown as SolverModule;
- console.debug(`[${worker_name}]: WASM solver loaded`);
-}
-
-onmessage = async (event: MessageEvent