]>
zoso.dev Git - libnemo.git/log
Chris Duncan [Tue, 3 Dec 2024 23:23:36 +0000 (15:23 -0800)]
Per typescript, navigator.hardwareConcurrency is never null, so lose the fallback to 1. Also limit to 80% cpu instead of almost maxing out.
Chris Duncan [Tue, 3 Dec 2024 23:00:30 +0000 (15:00 -0800)]
Remove unused blake2b import. Remove typescript no-check flags and start adding typings.
Chris Duncan [Tue, 3 Dec 2024 22:55:09 +0000 (14:55 -0800)]
Fix hexification.
Chris Duncan [Tue, 3 Dec 2024 22:51:07 +0000 (14:51 -0800)]
More typings.
Chris Duncan [Tue, 3 Dec 2024 22:47:46 +0000 (14:47 -0800)]
Use faster for loop instead of reduce function. Add typings to NanoNaCl.
Chris Duncan [Tue, 3 Dec 2024 22:38:23 +0000 (14:38 -0800)]
Return public key as hex string from NanoNaCl.
Chris Duncan [Tue, 3 Dec 2024 22:36:53 +0000 (14:36 -0800)]
Rename function since we are no longer returning a pair of keys.
Chris Duncan [Tue, 3 Dec 2024 22:34:26 +0000 (14:34 -0800)]
Remove secret key derivation from NanoNaCl since it's not applicable to Nano.
Chris Duncan [Tue, 3 Dec 2024 22:33:11 +0000 (14:33 -0800)]
Fix public key derivation.
Chris Duncan [Tue, 3 Dec 2024 21:21:59 +0000 (13:21 -0800)]
Move threshold constants into CONSTANTS and use them in block pow.
Chris Duncan [Tue, 3 Dec 2024 21:01:59 +0000 (13:01 -0800)]
Since pow is already so expensive, the overhead of creating workers is negligible, so spin up a new pool when calculating and dismiss it when finished.
Chris Duncan [Tue, 3 Dec 2024 21:01:04 +0000 (13:01 -0800)]
Create pool method to clear workers from memory.
Chris Duncan [Tue, 3 Dec 2024 20:57:40 +0000 (12:57 -0800)]
Save pool object URL so it can be revoked later.
Chris Duncan [Tue, 3 Dec 2024 20:51:24 +0000 (12:51 -0800)]
Explicitly define pool cores.
Chris Duncan [Tue, 3 Dec 2024 20:48:28 +0000 (12:48 -0800)]
Remove RPC references from pow now that it's done locally.
Chris Duncan [Tue, 3 Dec 2024 20:47:58 +0000 (12:47 -0800)]
Remove console logging. Remove deprecated CPU-based pow code.
Chris Duncan [Tue, 3 Dec 2024 20:25:23 +0000 (12:25 -0800)]
Convert IIFE to regular set of functions called from worker implementation. Use worker-usable OffscreenCanvas for WebGL. Reorganize order of functions. Add typings and tabs.
Chris Duncan [Tue, 3 Dec 2024 20:20:01 +0000 (12:20 -0800)]
Ensure worker results are stored only if they exist.
Chris Duncan [Tue, 3 Dec 2024 20:18:32 +0000 (12:18 -0800)]
Do not mark worker as available until it has reported from a stop command.
Chris Duncan [Tue, 3 Dec 2024 20:17:49 +0000 (12:17 -0800)]
Fix pool parsing of worker response to account for no data.
Chris Duncan [Tue, 3 Dec 2024 20:17:05 +0000 (12:17 -0800)]
Add function return typings and variable typings.
Chris Duncan [Tue, 3 Dec 2024 20:16:14 +0000 (12:16 -0800)]
Fix pow response destructuring assignment.
Chris Duncan [Tue, 3 Dec 2024 13:10:43 +0000 (05:10 -0800)]
Add function to convert base32 to hex.
Chris Duncan [Tue, 3 Dec 2024 13:09:47 +0000 (05:09 -0800)]
Tweak var names for clarity of intent.
Chris Duncan [Tue, 3 Dec 2024 13:02:54 +0000 (05:02 -0800)]
Fix address to public key extraction.
Chris Duncan [Tue, 3 Dec 2024 12:55:24 +0000 (04:55 -0800)]
Tweak some var names for clarity of intent.
Chris Duncan [Tue, 3 Dec 2024 05:31:55 +0000 (21:31 -0800)]
Fix public key and checksum extraction from address.
Chris Duncan [Tue, 3 Dec 2024 05:18:03 +0000 (21:18 -0800)]
Fix promise thenable handling in pow.
Chris Duncan [Tue, 3 Dec 2024 01:09:17 +0000 (17:09 -0800)]
Add nano-webgl-pow. Add testing logging.
Chris Duncan [Tue, 3 Dec 2024 01:08:57 +0000 (17:08 -0800)]
Implement divide option on pool work.
Chris Duncan [Tue, 3 Dec 2024 01:08:40 +0000 (17:08 -0800)]
Add converge functionality to Pool so that work can be divided or collaborated.
Chris Duncan [Tue, 3 Dec 2024 01:08:02 +0000 (17:08 -0800)]
Implement nano-webgl-pow on block.
Chris Duncan [Tue, 3 Dec 2024 01:07:42 +0000 (17:07 -0800)]
Export Blake2b directly for testing purposes.
Chris Duncan [Tue, 3 Dec 2024 01:07:31 +0000 (17:07 -0800)]
Add block pow to test webpage.
Chris Duncan [Mon, 2 Dec 2024 22:25:31 +0000 (14:25 -0800)]
Ensure a minimum of one Pool core, even if nav.hwConc doesn't play nice.
Chris Duncan [Mon, 2 Dec 2024 19:59:01 +0000 (11:59 -0800)]
Tools hash function is only used within Tools itself, so don't bother exporting it. Arbitrary hashing falls outside our scope as a nano project.
Chris Duncan [Mon, 2 Dec 2024 19:51:00 +0000 (11:51 -0800)]
Directly calculate blake2b hash as part of block verification so that Tools import can be eliminated.
Chris Duncan [Mon, 2 Dec 2024 19:48:10 +0000 (11:48 -0800)]
Calculate block hash directly instead of calling Tools.
Chris Duncan [Mon, 2 Dec 2024 19:47:36 +0000 (11:47 -0800)]
Remove type assertions rendered unnecessary by improvements to blake2b typings.
Chris Duncan [Mon, 2 Dec 2024 19:46:52 +0000 (11:46 -0800)]
Add return typings to blake2b functions.
Chris Duncan [Mon, 2 Dec 2024 19:31:15 +0000 (11:31 -0800)]
Target esnext which is esbuild default.
Chris Duncan [Mon, 2 Dec 2024 19:30:24 +0000 (11:30 -0800)]
Fix JSDoc.
Chris Duncan [Mon, 2 Dec 2024 18:46:57 +0000 (10:46 -0800)]
Revert typescript update due to issue with SharedArrayBuffer not existing on ArrayBufferLike.
Chris Duncan [Mon, 2 Dec 2024 18:46:26 +0000 (10:46 -0800)]
Explicitly specify return typings from entropy getters.
Chris Duncan [Mon, 2 Dec 2024 16:43:15 +0000 (08:43 -0800)]
Tabs.
Chris Duncan [Mon, 2 Dec 2024 16:26:26 +0000 (08:26 -0800)]
Remove blake2b typings. Update node typings and typescript package.
Chris Duncan [Mon, 2 Dec 2024 16:03:47 +0000 (08:03 -0800)]
Remove blake2b package.
Chris Duncan [Mon, 2 Dec 2024 16:02:56 +0000 (08:02 -0800)]
Instantiate Pool as part of block for calculating pow.
Chris Duncan [Mon, 2 Dec 2024 16:00:17 +0000 (08:00 -0800)]
Remove replaced X25519 files.
Chris Duncan [Mon, 2 Dec 2024 06:34:08 +0000 (22:34 -0800)]
RNG directly instead of from Entropy. Tweak blake hashing call. Clarify some var names. Set known Nano constants. Import to main.js for testing.
Chris Duncan [Mon, 2 Dec 2024 04:49:45 +0000 (20:49 -0800)]
Implement initial PoW worker.
Chris Duncan [Mon, 2 Dec 2024 03:01:05 +0000 (19:01 -0800)]
Add perf logging to test webpage.
Chris Duncan [Sun, 1 Dec 2024 21:43:06 +0000 (13:43 -0800)]
Remove testing log statements.
Chris Duncan [Sun, 1 Dec 2024 21:42:12 +0000 (13:42 -0800)]
Rename BIP-44 ckd file.
Chris Duncan [Sun, 1 Dec 2024 21:41:11 +0000 (13:41 -0800)]
Update Bip44Ckd exports and imports.
Chris Duncan [Sun, 1 Dec 2024 20:46:23 +0000 (12:46 -0800)]
Move nano-nacl type definitions, which will eventually just be implemented in the file itself.
Chris Duncan [Sun, 1 Dec 2024 20:45:39 +0000 (12:45 -0800)]
Reorganize NanoNaCl exports and imports. Remove some logging from test attempts and start converting vars to lets and consts as appropriate.
Chris Duncan [Sun, 1 Dec 2024 18:40:04 +0000 (10:40 -0800)]
The issue was Chrome all along. Firefox uses workers just fine. Remove unused imports.
Chris Duncan [Sun, 1 Dec 2024 07:17:29 +0000 (23:17 -0800)]
Remove more extraneous logging.
Chris Duncan [Sun, 1 Dec 2024 07:17:14 +0000 (23:17 -0800)]
Remove some extraneous logging.
Chris Duncan [Sun, 1 Dec 2024 06:06:29 +0000 (22:06 -0800)]
Add a few logs for perf testing.
Chris Duncan [Sun, 1 Dec 2024 05:57:49 +0000 (21:57 -0800)]
Add bytes-to-hex function in nanonacl and return keys as strings instead of bytes.
Chris Duncan [Sun, 1 Dec 2024 05:30:45 +0000 (21:30 -0800)]
Fix wrong variable being returned from worker.
Chris Duncan [Sun, 1 Dec 2024 05:30:07 +0000 (21:30 -0800)]
Fix keypair object being assigned to public key variable.
Chris Duncan [Sat, 30 Nov 2024 22:58:51 +0000 (14:58 -0800)]
Fix chunking assignment in Pool. Get keys as hex string instead of Uint8Array in nacl worker since the stringifier mucks up the array.
Chris Duncan [Sat, 30 Nov 2024 20:49:12 +0000 (12:49 -0800)]
Use ArrayBuffer to transfer data to and from worker.
Chris Duncan [Sat, 30 Nov 2024 20:48:12 +0000 (12:48 -0800)]
Start prepping pow worker.
Chris Duncan [Sat, 30 Nov 2024 20:47:32 +0000 (12:47 -0800)]
Add cores count to pool for job splitting.
Chris Duncan [Sat, 30 Nov 2024 08:15:27 +0000 (00:15 -0800)]
Delete unneeded backup file.
Chris Duncan [Sat, 30 Nov 2024 08:15:17 +0000 (00:15 -0800)]
We are only ever using this to get public keys if interacting with keys are all, so remove unrelated functionality and update references.
Chris Duncan [Sat, 30 Nov 2024 08:13:55 +0000 (00:13 -0800)]
Public key is validated as part of fromPublicKey call, so remove it from fromKeypair.
Chris Duncan [Sat, 30 Nov 2024 07:00:42 +0000 (23:00 -0800)]
Change some names and fix NanoNaCl worker with a forced name for the Blake2b class that was getting changed by esbuild.
Chris Duncan [Sat, 30 Nov 2024 06:59:26 +0000 (22:59 -0800)]
Logging for perf tests
Chris Duncan [Sat, 30 Nov 2024 06:59:12 +0000 (22:59 -0800)]
Class reference to static member within static initializer should use 'this'.
Chris Duncan [Sat, 30 Nov 2024 05:38:10 +0000 (21:38 -0800)]
Backup working copy of nano-nacl prior to optimization efforts.
Chris Duncan [Fri, 29 Nov 2024 10:45:27 +0000 (02:45 -0800)]
Add typings. Remove unnecessary allocation when hashing.
Chris Duncan [Fri, 29 Nov 2024 10:35:49 +0000 (02:35 -0800)]
We're only going to work in browser environments from here on out, so lose the node crypto implementation. We're also not opening the module up to plugin RNG, so place the relevant code directly in the one place it is used.
Chris Duncan [Fri, 29 Nov 2024 10:26:53 +0000 (02:26 -0800)]
Bite the bullet on formatting.
Chris Duncan [Fri, 29 Nov 2024 10:25:05 +0000 (02:25 -0800)]
Import typing for blake.
Chris Duncan [Fri, 29 Nov 2024 10:20:00 +0000 (02:20 -0800)]
Start adding typings to nano-nacl.
Chris Duncan [Fri, 29 Nov 2024 10:07:25 +0000 (02:07 -0800)]
Simplify ckd implementation with fewer allowed typings.
Chris Duncan [Fri, 29 Nov 2024 09:45:49 +0000 (01:45 -0800)]
Use more concise typing.
Chris Duncan [Fri, 29 Nov 2024 09:39:10 +0000 (01:39 -0800)]
Aha moment: the entire Blake2b class can be passed as an argument into the stringified NanoNaCl worker using an IIFE construct. Brilliant, it works now! Also fix object property name being passed from blake ckd, and update references to renamed account keypair factory method.
Chris Duncan [Fri, 29 Nov 2024 09:32:03 +0000 (01:32 -0800)]
Normalize address prefix in constructor to fix duplicate prefix bug.
Chris Duncan [Fri, 29 Nov 2024 09:24:46 +0000 (01:24 -0800)]
Pass index when creating account from known keypair.
Chris Duncan [Thu, 28 Nov 2024 11:15:19 +0000 (03:15 -0800)]
Pass blake2b through nacl functions. Need to do something about bytes vs hex in blake vs bip wallets.
Chris Duncan [Thu, 28 Nov 2024 10:52:27 +0000 (02:52 -0800)]
Fix nano-nacl exports. Fix bip44 ckd return value. Pass account private key to worker as bytes.
Chris Duncan [Thu, 28 Nov 2024 10:51:09 +0000 (02:51 -0800)]
Fix account factory usage.
Chris Duncan [Thu, 28 Nov 2024 10:40:52 +0000 (02:40 -0800)]
Refactor wallet account methods to start building out for NaCl worker implementation.
Chris Duncan [Thu, 28 Nov 2024 10:21:21 +0000 (02:21 -0800)]
Begin refactoring NaCl implementation to a web worker format.
Chris Duncan [Thu, 28 Nov 2024 10:20:02 +0000 (02:20 -0800)]
Rename for clarity.
Chris Duncan [Thu, 28 Nov 2024 10:19:38 +0000 (02:19 -0800)]
Account class is pretty simple overall, so having async factory methods is not very useful. Refactor them to be synchronous.
Chris Duncan [Thu, 28 Nov 2024 09:14:38 +0000 (01:14 -0800)]
Rename NaCl implementation.
Chris Duncan [Thu, 28 Nov 2024 09:06:03 +0000 (01:06 -0800)]
Rewrite blake2b as class and update references. Add typings and assertions to satisfy TypeScript compiler.
Chris Duncan [Wed, 27 Nov 2024 22:04:04 +0000 (14:04 -0800)]
Condense assertions.
Chris Duncan [Wed, 27 Nov 2024 21:58:09 +0000 (13:58 -0800)]
Add quick performance checks to test page.
Chris Duncan [Wed, 27 Nov 2024 21:53:04 +0000 (13:53 -0800)]
Spaces.
Chris Duncan [Wed, 27 Nov 2024 21:38:13 +0000 (13:38 -0800)]
Delete deprecated worker.
Chris Duncan [Wed, 27 Nov 2024 21:35:10 +0000 (13:35 -0800)]
Update comment header to reflect current purpose.
Chris Duncan [Wed, 27 Nov 2024 21:33:11 +0000 (13:33 -0800)]
Use customized blake implementation and start trying to reoptimize it since it's about 20% slower (but still really fast).