Conversation
- Reject hex string arguments with an odd number of digits or non-hex characters, which silently encoded to different bytes, and check that `pubkey` arguments are 33 or 65 bytes - Fix the ElectrumNetworkProvider no longer connecting for new requests after a failed request, when using automatic connection management - Compare the exact fee per byte against the minimum and maximum, instead of the fee per byte rounded to two decimals - Reject `setLocktime()` values that are not an unsigned 32-bit integer - Don't throw a FailedTransactionError from `send()` when the transaction was broadcast, but could not be retrieved afterwards - Report a failing final `require(variable)` at the require's own line, when its opcodes are optimised away - MockNetworkProvider: validate transactions when `updateUtxoSet` is false, reject block height locktimes above the mock block height, and compare hex strings case-insensitively - Split the test matcher types into cashscript/vitest (Vitest 5's `Matchers`) and cashscript/jest (`jest.Matchers`), since Vitest 5 no longer reads the jest namespace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
On behalf of Mathieu G. (mr-zwets), written by Claude Opus 5.5. Opened from the wrong branch by mistake (the name collided with the branch of #454), please ignore; replaced by a new PR. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened on behalf of Mathieu G. (mr-zwets), written by Claude Opus 5.5.
Fixes the remaining SDK findings from the 0.14 pre-release audit, apart from the timelock items in #455. Several of them made valid transactions fail in
debug()/send(), silently burned tokens, or silently produced a different bytecode.Changes
VaultandVaultSidecarin one transaction the sidecar input could use Vault's artifact: logs printed for code that didn't run, and a failing require crashed the debugger.require(f(x))with a non-inlinedfis now reported at its own line and message.console.logstatements after a failing instruction are no longer printed (twice), and a log after a division by zero no longer makesdebug()throw a plainError.require(b)forbool b) no longer crashesdebug(),send()andgetBitauthUri().send()(breaking): aNetworkProviderErroris thrown as it is instead of being wrapped in aFailedTransactionError, so the documented error classes can be caught. Unrecognised Electrum rejections are aNetworkProviderError, andMockNetworkProviderthrowsNetworkProviderMissingInputsErrorfor missing or spent UTXOs. Code that caughtFailedTransactionErrorfor network rejections needs to catchNetworkProviderErroras well; the release notes mark this as breaking and the migration notes show the change.addBchChangeOutputIfNeeded(): ECDSA signatures are sized at their maximum length, since re-signing after adding the change output could push the fee below 1 sat/byte (about 1 in 4 builds with one ECDSA input). The docs note that placeholder inputs assume Schnorr.addOpReturnOutput(): invalid hex ('0xabc','0xzz') now throws instead of being mis-encoded.addTokenChangeOutputIfNeeded()used to add no change output, so withallowImplicitFungibleTokenBurnthe tokens were burned.asmToBytecode: unknown opcode names (previously encoded asOP_0) and invalid data tokens now throw, so an artifact with an opcode the installed libauth doesn't know no longer silently gets a different address.Tests
require(f(x))withdisableInlining, logs after a failed require and after a division by zero, and a parameter-check-only function through the SDK.MockNetworkProviderand a fake Electrum client, both throughsend().asmToBytecode.Each of these tests fails on the current
next.Merges cleanly with #457 and #458; with #455 only
TransactionBuilder.test.tsneeds both sets of tests kept, and the release notes need their lines combined with the compiler findings PR.yarn build,yarn test,yarn lintandyarn spellcheckpass.🤖 Generated with Claude Code