Test against @smartledger/bsv 9.11.2 - #5
Merged
Merged
Conversation
9.11.2 writes an empty push in ASM as 0 instead of nothing, so OP_RETURN data
holding one (as buildDataOut('') makes) now reads back and exactAsm accepts it.
A unit test covers that case.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Change
@smartledger/bsv^9.11.1→^9.11.2. The peer range stays^9.10.1.516a00020aff→OP_1 OP_RETURN 0 0aff, which reads back byte for byte. That isOP_RETURNdata with an empty push, the shapebuildDataOut('')makes. With 9.11.1,toASMwrote nothing for the empty push, soexactAsmrefused it.npm test: 28/28 on 9.11.2.Review of bsv 9.11.2 (codenlighten/smartledger-bsv#177)
The change is writer-only and matches its description. Checked with a round-trip fuzz against the npm packages. The fuzz covers:
OP_1;4c00,4d0000,4e00000000,00,6a00and514c0051;ASM is expected to read back as the script with every push in its shortest encoding;
toStringexactly.toASM→fromASMmismatchestoString→fromStringmismatchesbuildDataOut(''),buildDataOut(Buffer.alloc(0)),add(Buffer.alloc(0)),buildDataOut(['', 'ab']), both formsIn 9.11.1, exactly the scripts with an empty push failed, and in both forms.