-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
txscript: backport tokenizer from dcrd #1769
Merged
Roasbeef
merged 108 commits into
btcsuite:master
from
Roasbeef:txscript_zero_alloc_optimization_refactor
Nov 17, 2021
Merged
Changes from all commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
843d760
txscript: Add benchmark for CalcSignatureHash
davecgh 47806df
txscript: Add benchmark for CalcWitnessSigHash
cfromknecht bcb9643
txscript: Add benchmark for script parsing.
davecgh c997417
txscript: Introduce zero-alloc script tokenizer.
davecgh 0997842
txscript: Add benchmark for DisasmString.
davecgh f980c9a
txscript: Optimize script disasm.
davecgh af757d3
txscript: Introduce raw script sighash calc func.
cfromknecht c19535b
txscript: Optimize CalcSignatureHash.
davecgh c6f4caf
txscript/reference_test: Convert sighash calc test
cfromknecht 583b740
txscript: Make isSmallInt accept raw opcode.
davecgh dfb1a67
txscript: Make asSmallInt accept raw opcode.
davecgh 05aa488
txscript: Add benchmark for IsPayToPubKey
davecgh 99cb679
txscript: Optimize IsPayToPubKey
cfromknecht 2d2608c
txscript: Add benchmark for IsPayToPubKeyHash
cfromknecht c771f4f
txscript: Optimize IsPayToPubKeyHash
cfromknecht 665c298
txscript: Add benchmark for IsPayToScriptHash.
davecgh 215af7f
txscript: Optimize IsPayToScriptHash.
davecgh 4d31d15
txscript: Add benchmarks for IsMutlsigScript.
davecgh 0eaae26
txscript: Optimize IsMultisigScript.
davecgh 02dab16
txscript: Add benchmarks for IsMutlsigSigScript.
davecgh 34ebf0f
txscript: Optimize IsMultisigSigScript.
davecgh ce1513d
txscript: Add benchmark for IsPushOnlyScript.
davecgh 2d5f7cf
txscript: Optimize IsPushOnlyScript.
davecgh e422d42
txscript: Add benchmark IsPayToWitnessPubkeyHash
cfromknecht 54d08eb
txscript: Optimize IsPayToWitnessPubKeyHash
cfromknecht 728ce10
txscript: Add benchmark for IsPayToWitnessScriptHash
cfromknecht 55a6bb5
txscript: Optimize IsPayToWitnessScriptHash
cfromknecht e4118c9
txscript: Add benchmark for IsNullData
davecgh 5f771c1
txscript: Optimize IsNullData
cfromknecht 77660b7
txscript: Add benchmark for IsUnspendable.
davecgh e98b7c1
txscript: Optimize IsUnspendable.
davecgh 549a1f2
txscript/engine: Optimize new engine push only script
cfromknecht a59e01c
txscript/engine: Use optimized IsPushOnlyScript
cfromknecht 1be3450
txscript/engine: Use optimized isScriptHashScript
cfromknecht 98dd6a9
txscript/engine: Check ps2h push before parsing script
cfromknecht 8316a06
txscript: Add benchmark for GetSigOpCount.
davecgh 4d5c0b2
txscript: Optimize GetSigOpCount.
davecgh cc802d1
txscript: Add benchmark for GetPreciseSigOpCount.
davecgh a4a21c0
txscript: Optimize GetPreciseSigOpCount.
davecgh 26d63c6
txscript: add GetWitnessSigOpCountBenchmarks
cfromknecht 77863f5
txscript: Optimize GetWitnessSigOpCount
cfromknecht 69d560c
txscript: Add benchmark for GetScriptClass.
davecgh 9b06388
txscript: Make typeOfScript accept raw script.
davecgh 3b86e0a
txscript: Optimize typeOfScript pay-to-script-hash.
davecgh 671b5fe
txscript: Remove unused isScriptHash function.
davecgh 71bf51e
txscript: Optimize typeOfScript multisig.
davecgh 6e86f0d
txscript: Remove unused isMultiSig function.
davecgh 8b64adc
txscript: Optimze typeOfScript pay-to-pubkey
cfromknecht 1133ea0
txscript: Remove unused isPubkey function.
davecgh 13f6462
txscript: Optimize typeOfScript pay-to-pubkey-hash.
davecgh d02f97e
txscript: Remove unused isPubkeyHash function.
davecgh d80863d
txscript: Optimize typeOfScript for null data scripts
cfromknecht 78046b3
txscript: Remove unused isNullData function.
davecgh 847a262
txscript: Optimize typeOfScript witness-pubkey-hash
cfromknecht 1a60e11
txscript: Optimize typeOfScript for witness-script-hash
cfromknecht 43846b1
txscript: Remove unused isWitnessScriptHash
cfromknecht 705d24c
txscript: Convert CalcScriptInfo.
davecgh 6c212fd
txscript: Remove unused isPushOnly function.
davecgh 8c54905
txscript: Remove unused getSigOpCount function.
davecgh 7791f92
txscript: Optimize CalcMultiSigStats.
davecgh c4f6302
txscript: Add benchmark for PushedData.
davecgh 0a4f228
txscript: Optimize PushedData.
davecgh da9fdab
txscript: Make canonicalPush accept raw opcode.
davecgh 81b8032
txscript: Add ExtractAtomicSwapDataPushes benches.
davecgh 6ec9b73
txscript/scriptnum: add maxscriptnum and maxcltvlength
cfromknecht 367a75a
txscript: Optimize ExtractAtomicSwapDataPushes.
davecgh 33ee3e2
txscript: Add ExtractPkScriptAddrs benchmarks.
davecgh 055be98
txscript: Optimize ExtractPkScriptAddrs scripthash.
davecgh 16bd663
txscript: Optimize ExtractPkScriptAddrs pubkeyhash.
davecgh 0e810b4
txscript: Optimize ExtractPkScriptAddrs pubkey.
davecgh 0bc1825
txscript: Optimize ExtractPkScriptAddrs multisig.
davecgh 507a4dc
txscript: Optimize ExtractPkScriptAddrs nulldata.
davecgh ae7fffb
txscript: Optimize ExtractPkScriptAddrs witness pubkey hash
cfromknecht a831522
txscript: Optimize ExtractPkScriptAddrs witness script hash
cfromknecht 1034a66
txscript: Optimize ExtractPkScriptAddr assume non-standard if no success
cfromknecht 6fb1c82
txscript: Optimize IsWitnessProgram
cfromknecht 8b70634
txscript: Return witness version and program in one pass
cfromknecht 4b03b59
txscript: Use internal analysis methods for GetWitnessSigOpCount
cfromknecht d410d7d
txscript: Optimize ExtractWitnessProgramInfo
cfromknecht 7ad3a10
txscript: mergeMultiSig function def order cleanup.
davecgh dd609d6
txscript: Introduce calcWitnessSignatureHashRaw
cfromknecht ed9e17a
txscript: Remove unused isWitnessPubKeyHash
cfromknecht e00fec1
txscript: Use optimized calcWitnessSignatureHashRaw w/o parsing
cfromknecht f3354be
txscript: Use raw scripts in SignTxOutput.
davecgh 30874ff
txscript: Implement efficient opcode data removal.
davecgh a4720f3
txscript: Optimize removeOpcodeRaw
cfromknecht 2ddcdb9
txscript: Remove unused removeOpcode
cfromknecht a2ab5b6
txscript: Use removeOpcodeRaw for CODESEP in calcSigHash
cfromknecht 484f7b1
txscript: Make isDisabled accept raw opcode.
davecgh c641025
txscript: Make alwaysIllegal accept raw opcode.
davecgh 62c608f
txscript: Make isConditional accept raw opcode.
davecgh 710bd56
txscript: Make min push accept raw opcode and data.
davecgh 54036e8
txscript: Convert to use non-parsed opcode disasm.
davecgh d6b968c
txscript: Refactor engine to use raw scripts.
davecgh 06c8bea
txscript: Remove unused calcSignatureHash
cfromknecht 03d1fb0
txscript: Remove unused isWitnessProgram
cfromknecht 07ab66b
txscript: Remove unused removeOpcodeByData func.
davecgh 911db90
txscript: Rename removeOpcodeByDataRaw func.
davecgh 94e99cf
txscript: Rename calcSignatureHashRaw
cfromknecht 69f3a39
txscript/sign: Use calcWitnessSigHashRaw for witness sigs
cfromknecht 7533672
txscript/pkscript: Use finalOpcodeData to extract redeem script
cfromknecht 6e5fbf8
txscript: Remove unused parseScript func.
davecgh e06b11a
txscript: Remove unused calcWitnessSignatureHash
cfromknecht 491b7b5
txscript: Remove unused unparseScript func.
davecgh ca044fe
txscript: Remove unused parsedOpcode.bytes func.
davecgh 595d379
txscript: Remove unused parseScriptTemplate func.
davecgh ef3d06e
txscript: Make executeOpcode take opcode and data.
davecgh b95ba0a
txscript: Make op callbacks take opcode and data.
davecgh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is trivial to add to the PR right? Might be better to just include the code snippet here and link it.
Or maybe just link to
ExampleScriptTokenizer()
intxscript/example_test.go
since that looks like the exact same thingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm lean towards adding link to the example code here. @kcalvinalvin maybe we can do that as a sep. PR.