Skip to content
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 #1684

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
c5a193f
txscript: Add benchmark for CalcSignatureHash
davecgh Mar 13, 2019
d683492
txscript: Add benchmark for CalcWitnessSigHash
cfromknecht Feb 5, 2021
a93ee39
txscript: Add benchmark for script parsing.
davecgh Mar 13, 2019
fff82cf
txscript: Introduce zero-alloc script tokenizer.
davecgh Mar 13, 2019
cce880c
txscript: Add benchmark for DisasmString.
davecgh Mar 13, 2019
1762107
txscript: Optimize script disasm.
davecgh Mar 13, 2019
04ed404
txscript: Introduce raw script sighash calc func.
cfromknecht Apr 19, 2019
bcbf950
txscript: Optimize CalcSignatureHash.
davecgh Mar 13, 2019
54fda7d
txscript/reference_test: Convert sighash calc test
cfromknecht Apr 19, 2019
b4abc15
txscript: Make isSmallInt accept raw opcode.
davecgh Mar 13, 2019
cd6f1f9
txscript: Make asSmallInt accept raw opcode.
davecgh Mar 13, 2019
9846914
txscript: Add benchmark for IsPayToPubKey
davecgh Mar 13, 2019
8ceea24
txscript: Optimize IsPayToPubKey
cfromknecht Feb 4, 2021
dff834b
txscript: Add benchmark for IsPayToPubKeyHash
cfromknecht Feb 4, 2021
e51d50a
txscript: Optimize IsPayToPubKeyHash
cfromknecht Feb 4, 2021
f75b1e2
txscript: Add benchmark for IsPayToScriptHash.
davecgh Mar 13, 2019
ff0fc4c
txscript: Optimize IsPayToScriptHash.
davecgh Mar 13, 2019
086b4f1
txscript: Add benchmarks for IsMutlsigScript.
davecgh Mar 13, 2019
e0b8ade
txscript: Optimize IsMultisigScript.
davecgh Mar 13, 2019
d64dbbb
txscript: Add benchmarks for IsMutlsigSigScript.
davecgh Mar 13, 2019
3cfdeca
txscript: Optimize IsMultisigSigScript.
davecgh Mar 13, 2019
1f2afc1
txscript: Add benchmark for IsPushOnlyScript.
davecgh Mar 13, 2019
29dcb83
txscript: Optimize IsPushOnlyScript.
davecgh Mar 13, 2019
c1d1b0e
txscript: Add benchmark IsPayToWitnessPubkeyHash
cfromknecht Apr 19, 2019
344636f
txscript: Optimize IsPayToWitnessPubKeyHash
cfromknecht Feb 4, 2021
58a2fa9
txscript: Add benchmark for IsPayToWitnessScriptHash
cfromknecht Apr 19, 2019
5b69223
txscript: Optimize IsPayToWitnessScriptHash
cfromknecht Feb 4, 2021
0ccd702
txscript: Add benchmark for IsNullData
davecgh Mar 13, 2019
eda642a
txscript: Optimize IsNullData
cfromknecht Feb 4, 2021
75b614c
txscript: Add benchmark for IsUnspendable.
davecgh Mar 13, 2019
6635382
txscript: Optimize IsUnspendable.
davecgh Mar 13, 2019
e726274
txscript/engine: Optimize new engine push only script
cfromknecht Apr 19, 2019
2f4de13
txscript/engine: Use optimized IsPushOnlyScript
cfromknecht Apr 19, 2019
f676d32
txscript/engine: Use optimized isScriptHashScript
cfromknecht Apr 19, 2019
3d352cd
txscript/engine: Check ps2h push before parsing script
cfromknecht Apr 19, 2019
564681c
txscript: Add benchmark for GetSigOpCount.
davecgh Mar 13, 2019
43624d9
txscript: Optimize GetSigOpCount.
davecgh Mar 13, 2019
86f5907
txscript: Add benchmark for GetPreciseSigOpCount.
davecgh Mar 13, 2019
c747cc5
txscript: Optimize GetPreciseSigOpCount.
davecgh Mar 13, 2019
931aab2
txscript: add GetWitnessSigOpCountBenchmarks
cfromknecht Feb 4, 2021
f3185ee
txscript: Optimize GetWitnessSigOpCount
cfromknecht Feb 4, 2021
ca395fe
txscript: Add benchmark for GetScriptClass.
davecgh Mar 13, 2019
e9d7686
txscript: Make typeOfScript accept raw script.
davecgh Mar 13, 2019
5161238
txscript: Optimize typeOfScript pay-to-script-hash.
davecgh Mar 13, 2019
f4b4bfa
txscript: Remove unused isScriptHash function.
davecgh Mar 13, 2019
b1a191a
txscript: Optimize typeOfScript multisig.
davecgh Mar 13, 2019
b76572d
txscript: Remove unused isMultiSig function.
davecgh Mar 13, 2019
d8e3a4a
txscript: Optimze typeOfScript pay-to-pubkey
cfromknecht Feb 4, 2021
d165f48
txscript: Remove unused isPubkey function.
davecgh Mar 13, 2019
fe80899
txscript: Optimize typeOfScript pay-to-pubkey-hash.
davecgh Mar 13, 2019
bf287f5
txscript: Remove unused isPubkeyHash function.
davecgh Mar 13, 2019
612f05c
txscript: Optimize typeOfScript for null data scripts
cfromknecht Feb 4, 2021
ddffa50
txscript: Remove unused isNullData function.
davecgh Mar 13, 2019
7a471e0
txscript: Optimize typeOfScript witness-pubkey-hash
cfromknecht Apr 19, 2019
7f10c29
txscript: Optimize typeOfScript for witness-script-hash
cfromknecht Apr 19, 2019
7032bd5
txscript: Remove unused isWitnessScriptHash
cfromknecht Apr 19, 2019
5c97e22
txscript: Convert CalcScriptInfo.
davecgh Mar 13, 2019
b933306
txscript: Remove unused isPushOnly function.
davecgh Mar 13, 2019
fae615d
txscript: Remove unused getSigOpCount function.
davecgh Mar 13, 2019
1df85f4
txscript: Optimize CalcMultiSigStats.
davecgh Mar 13, 2019
5079460
txscript: Add benchmark for PushedData.
davecgh Mar 13, 2019
d88103e
txscript: Optimize PushedData.
davecgh Mar 13, 2019
be38621
txscript: Make canonicalPush accept raw opcode.
davecgh Mar 13, 2019
7e6b84c
txscript: Add ExtractAtomicSwapDataPushes benches.
davecgh Mar 13, 2019
ba0c48b
txscript/scriptnum: add maxscriptnum and maxcltvlength
cfromknecht Apr 19, 2019
bf39ad7
txscript: Optimize ExtractAtomicSwapDataPushes.
davecgh Mar 13, 2019
3b8712d
txscript: Add ExtractPkScriptAddrs benchmarks.
davecgh Mar 13, 2019
1adafa3
txscript: Optimize ExtractPkScriptAddrs scripthash.
davecgh Mar 13, 2019
7aaa28a
txscript: Optimize ExtractPkScriptAddrs pubkeyhash.
davecgh Mar 13, 2019
76a2d2b
txscript: Optimize ExtractPkScriptAddrs pubkey.
davecgh Mar 13, 2019
05388db
txscript: Optimize ExtractPkScriptAddrs multisig.
davecgh Mar 13, 2019
5f9581d
txscript: Optimize ExtractPkScriptAddrs nulldata.
davecgh Mar 13, 2019
57bef04
txscript: Optimize ExtractPkScriptAddrs witness pubkey hash
cfromknecht Apr 20, 2019
d17add5
txscript: Optimize ExtractPkScriptAddrs witness script hash
cfromknecht Apr 20, 2019
c1f8d30
txscript: Optimize ExtractPkScriptAddr assume non-standard if no success
cfromknecht Apr 20, 2019
cbc3a2e
txscript: Optimize IsWitnessProgram
cfromknecht Apr 20, 2019
6702a2b
txscript: Return witness version and program in one pass
cfromknecht Apr 20, 2019
f0b3095
txscript: Use internal analysis methods for GetWitnessSigOpCount
cfromknecht Feb 5, 2021
5c56138
txscript: Optimize ExtractWitnessProgramInfo
cfromknecht Apr 20, 2019
8170896
txscript: mergeMultiSig function def order cleanup.
davecgh Mar 13, 2019
b280be1
txscript: Introduce calcWitnessSignatureHashRaw
cfromknecht Apr 19, 2019
bfc2a3e
txscript: Remove unused isWitnessPubKeyHash
cfromknecht Apr 20, 2019
5aa00f7
txscript: Use optimized calcWitnessSignatureHashRaw w/o parsing
cfromknecht Apr 19, 2019
01f8aec
txscript: Use raw scripts in SignTxOutput.
davecgh Mar 13, 2019
1200b05
txscript: Implement efficient opcode data removal.
davecgh Mar 13, 2019
897c0ec
txscript: Optimize removeOpcodeRaw
cfromknecht Apr 19, 2019
3337741
txscript: Remove unused removeOpcode
cfromknecht Apr 20, 2019
9351643
txscript: Use removeOpcodeRaw for CODESEP in calcSigHash
cfromknecht Apr 19, 2019
a3d3df3
txscript: Make isDisabled accept raw opcode.
davecgh Mar 13, 2019
6bdd5c0
txscript: Make alwaysIllegal accept raw opcode.
davecgh Mar 13, 2019
84bf89a
txscript: Make isConditional accept raw opcode.
davecgh Mar 13, 2019
f2ab844
txscript: Make min push accept raw opcode and data.
davecgh Mar 13, 2019
2258e94
txscript: Convert to use non-parsed opcode disasm.
davecgh Mar 13, 2019
3f1788f
txscript: Refactor engine to use raw scripts.
davecgh Mar 13, 2019
215269d
txscript: Remove unused calcSignatureHash
cfromknecht Apr 20, 2019
4091cd0
txscript: Remove unused isWitnessProgram
cfromknecht Apr 20, 2019
79d106e
txscript: Remove unused removeOpcodeByData func.
davecgh Mar 13, 2019
afa1d5a
txscript: Rename removeOpcodeByDataRaw func.
davecgh Mar 13, 2019
97a1f61
txscript: Rename calcSignatureHashRaw
cfromknecht Apr 20, 2019
1442714
txscript/sign: Use calcWitnessSigHashRaw for witness sigs
cfromknecht Apr 20, 2019
83375f1
txscript/pkscript: Use finalOpcodeData to extract redeem script
cfromknecht Apr 20, 2019
1b571f6
txscript: Remove unused parseScript func.
davecgh Mar 13, 2019
11f1857
txscript: Remove unused calcWitnessSignatureHash
cfromknecht Apr 20, 2019
d16fd9f
txscript: Remove unused unparseScript func.
davecgh Mar 13, 2019
f535e04
txscript: Remove unused parsedOpcode.bytes func.
davecgh Mar 13, 2019
56c26d1
txscript: Remove unused parseScriptTemplate func.
davecgh Mar 13, 2019
1cdaaf3
txscript: Make executeOpcode take opcode and data.
davecgh Mar 13, 2019
398da74
txscript: Make op callbacks take opcode and data.
davecgh Mar 13, 2019
a7e0771
fixup! txscript: Optimize GetSigOpCount.
cfromknecht Feb 10, 2021
7b69471
fixup! txscript/reference_test: Convert sighash calc test
cfromknecht Feb 10, 2021
ef59254
fixup! txscript: Optimize IsPayToWitnessPubKeyHash
cfromknecht Feb 10, 2021
60ab922
fixup! txscript: Optimize IsPayToWitnessScriptHash
cfromknecht Feb 10, 2021
563521d
fixup! txscript: Optimize IsPayToPubKey
cfromknecht Feb 10, 2021
e095ea8
fixup! txscript: Optimize IsPayToWitnessPubKeyHash
cfromknecht Feb 10, 2021
81013ff
fixup! txscript: Optimize IsPayToWitnessScriptHash
cfromknecht Feb 10, 2021
a6ce226
fixup! txscript: Optimize IsPayToPubKey
cfromknecht Feb 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions txscript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ $ go get -u github.com/btcsuite/btcd/txscript
* [Manually Signing a Transaction Output](http://godoc.org/github.com/btcsuite/btcd/txscript#example-SignTxOutput)
Demonstrates manually creating and signing a redeem transaction.

* [Counting Opcodes in Scripts](http://godoc.org/github.com/decred/dcrd/txscript#example-ScriptTokenizer)
Roasbeef marked this conversation as resolved.
Show resolved Hide resolved
Demonstrates creating a script tokenizer instance and using it to count the
number of opcodes a script contains.

## GPG Verification Key

All official release tags are signed by Conformal so users can ensure the code
Expand Down
Loading