-
Notifications
You must be signed in to change notification settings - Fork 137
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
WIP: 0.8.8 develop branch #351
Conversation
Using the bip32 interface allows clients to avoid deriving private keys outside of the library, and hides the implementation complexity of dealing with multiple public key types (compressed/xonly/uncompressed). Implement the existing private-key-only signing using the bip32 interface, and split the signing code into multiple sub-calls to be exposed in upcoming commits.
…tcode BIP174 uses scriptcode to refer to the script passed to generate the signature hash, so follow that convention, with signing_script being the source scriptPubKey or redeem script. Update the generated files also.
Co-authored-by: Nadav Ivgi <[email protected]>
ea538ef
to
a60c426
Compare
Updating emsdk to v3.1.27 was necessary for emscripten-core/emscripten#17915, which allows using the same WASM build for both browser and nodejs envs.
a60c426
to
5086e72
Compare
Users should move to the new JS wrappers which are significantly more functional.
len should be reserved for actual lengths, vs num for a count of (non-byte) elements.
7b195c6
to
c28fe90
Compare
With these removed from the SWIG generated file, the library builds without warnings.
c28fe90
to
dbcbb48
Compare
dbcbb48
to
2a6e00b
Compare
`test` is a user-land port of the built-in `node:test` test runner introduced in nodejs v18, currently marked as experimental. The port is used so that the tests can run with older versions (bullseye_deps uses nodejs v16) and can later be dropped-in replaced with `node:test`.
f067dfb
to
30d4fae
Compare
Not changed in this MR, but a quick fix (taking liberties, I know!) : |
Co-authored-by: Jon Griffiths <[email protected]>
Co-authored-by: Jon Griffiths <[email protected]>
30d4fae
to
5b851b6
Compare
@JamieDriver fixed, thanks for the report. |
src/anti_exfil.c is empty if BUILD_STANDARD_SECP, so src/test/test_anti_exfil.py fails with: ``` ERROR: test_anti_exfil (__main__.AntiExfilTests.test_anti_exfil) ---------------------------------------------------------------------- Traceback (most recent call last): File "src/test/test_anti_exfil.py", line 21, in test_anti_exfil ret = wally_ae_host_commit_from_bytes(entropy, 32, flags, host_commitment, 32) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not callable ``` Furthermore, src/sign.c omits wally_s2c_sig_from_bytes and wally_s2c_commitment_verify if BUILD_STANDARD_SECP, so src/test/test_sign.py fails with: ``` ERROR: test_s2c (__main__.SignTests.test_s2c) ---------------------------------------------------------------------- Traceback (most recent call last): File "src/test/test_sign.py", line 263, in test_s2c self.assertEqual(WALLY_OK, wally_s2c_sig_from_bytes(priv_key, 32, msg, 32, s2c_data, 32, flags, s2c_opening_out, 33, sig_out, 64)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not callable ```
I've been using this branch for the past few weeks in Jade development, keeping up to date with branch updates. |
thanks @JamieDriver I'm just waiting for some final JS updates from @shesek in this branch and will merge it after that, cheers. |
Mostly ported from the old wrap_js package, plus some from the python/java tests.
The typescript linter was complaining about the use of `bigint[]`, that syntax is only meant for use with primitives.
Scrypt with the BIP38 parameters can't work due to WASM's memory restrictions. Also, remove excluded functions from the .wasm build itself by excluding them from wasm_exports.sh (previously they were only excluded from the JavaScript code generation).
BIP 141 specifies that the maximum valid witness program size is 40 bytes. BIP 350 includes a test vector with the maximum size that's also included in test/bech32.js, which was failing prior to this commit. Make the old value available as SEGWIT_V0_ADDRESS_PUBKEY_MAX_LEN, and add a SEGWIT_V1_ADDRESS_PUBKEY_LEN constant for Taproot.
…ttings As documented in `man sort`: *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values. Before this change, my local dev env sorted the constants differently compared to the docker env.
148f88d
to
805e56c
Compare
805e56c
to
00e3df9
Compare
Tracking all post 0.8.7 changes here for a while in case 0.8.7 needs a patch release.