Sky Young
9184bf1cfa
Validate signatures from both 0.8.7 and 0.10.4 using OMIT_TX_COMMENT flag
2018-05-15 14:10:40 -07:00
Christopher Jeffrey
55f594d616
stack: remove useless checks.
2017-09-01 18:05:26 -07:00
Christopher Jeffrey
b87f557823
tx/script/chain: refactor locktime handling.
2017-08-27 19:07:57 -07:00
Christopher Jeffrey
140eece7dd
script: improve perf of getScripthash.
2017-08-25 20:54:56 -07:00
Christopher Jeffrey
49154be76d
script: refactor opcode and optimize.
2017-08-25 18:54:51 -07:00
Christopher Jeffrey
5fae0c50a1
script: enforce stack size on unexecuted branches.
...
This primarily only affects zero-length scripts. An input script which pushed
this many items onto the stack without failing _is not possible_, but with
segwit, it is possible. However, a witness program would fail due to cleanstack
before there would be any kind of consensus fault. In other words, without this
fix, we still remain in consensus with bitcoin core, but ideally we should want
to fail for the same reason.
2017-08-25 08:08:47 -07:00
Christopher Jeffrey
7145d21c9c
script: improve isCode.
2017-08-24 23:47:22 -07:00
Christopher Jeffrey
47eb484657
script: include opcode and instruction pointer in stack size errors.
2017-08-24 23:13:31 -07:00
Christopher Jeffrey
13892b3b38
encoding: rename written to offset.
2017-08-24 22:36:59 -07:00
Christopher Jeffrey
22a879f154
opcode: fix uncatchable error on .equals().
2017-08-24 22:24:39 -07:00
Christopher Jeffrey
af132c8818
opcode: handle OP_1NEGATE in opcode.toNum.
2017-08-24 18:22:45 -07:00
Christopher Jeffrey
d6ce66bce9
script: refactor script and stack mutation.
...
This allows more reasonable signing behavior and eliminates all polymorphism.
2017-08-24 17:34:20 -07:00
Christopher Jeffrey
a6b2c23a41
script: start using scriptnum implementation.
2017-08-20 15:13:17 -07:00
Christopher Jeffrey
1b0ae3ca79
refactor: use defineProperty instead of __define[GS]etter__.
2017-08-20 15:10:58 -07:00
Christopher Jeffrey
6c8c18f2a0
opcode: improve perf of opcode.from methods.
2017-08-20 12:52:35 -07:00
Christopher Jeffrey
2647d011dc
opcode: experiment with using cached opcodes.
2017-08-19 23:14:30 -07:00
Christopher Jeffrey
5047028511
script: stop using new Opcode.
2017-08-19 23:14:18 -07:00
Christopher Jeffrey
a47d68024a
scriptnum: improve encoding.
2017-08-17 09:59:17 -07:00
Christopher Jeffrey
a91bd5c958
script: improve new scriptnum.
2017-08-16 20:36:09 -07:00
Christopher Jeffrey
772025a4a1
script: a better scriptnum implementation.
2017-08-16 15:33:44 -07:00
Christopher Jeffrey
e7bc53c995
test: refactor script and tx test parsing.
2017-08-11 00:07:48 -07:00
Christopher Jeffrey
6c96a8e6ba
script: lint.
2017-08-10 23:37:42 -07:00
Christopher Jeffrey
87e3ee1971
script: do not use return values for script.execute and Script.verify.
2017-08-10 09:41:01 -07:00
Christopher Jeffrey
edebc51d18
primitives: use equals instead of equal for consistency.
2017-08-09 15:25:01 -07:00
Christopher Jeffrey
62152a1005
util: remove util.inherits. inline inheritance.
2017-08-06 19:45:10 -07:00
Christopher Jeffrey
4ce070fad4
validation: use stricter validation for ints.
2017-08-06 14:43:22 -07:00
Christopher Jeffrey
6ba8eb9951
eslint: more style rules.
2017-07-31 18:21:03 -07:00
Christopher Jeffrey
5eb6620431
lint: consistent return values.
2017-07-31 18:21:03 -07:00
Christopher Jeffrey
5e73e51177
lint: fix function names.
2017-07-31 18:21:03 -07:00
Christopher Jeffrey
55cf07a871
refactor: style for const/let and returns.
2017-07-31 18:21:02 -07:00
Christopher Jeffrey
6f3988e861
refactor: use const as much as possible.
2017-07-31 18:21:02 -07:00
Christopher Jeffrey
9cc5c393b4
eslint: use prefer-const.
2017-07-31 18:21:02 -07:00
Christopher Jeffrey
50c75aeea8
script: minor.
2017-07-31 18:20:48 -07:00
Christopher Jeffrey
02e4dda012
refactor: cleanup for..of loops.
2017-07-25 11:39:12 -07:00
Christopher Jeffrey
7eefb773be
refactor: use maps and sets wherever possible.
2017-07-25 05:15:47 -07:00
Christopher Jeffrey
053561f2ba
errors: fix stack traces.
2017-07-17 14:26:43 -07:00
Christopher Jeffrey
37da047a34
digest: avoid extra allocations.
2017-07-17 14:26:43 -07:00
Christopher Jeffrey
cf795e1cd3
script: minor.
2017-07-17 14:26:42 -07:00
Christopher Jeffrey
fdc9bca468
script: minor.
2017-07-17 14:26:39 -07:00
Christopher Jeffrey
296e65d0fd
refactor: use es6 template strings everywhere.
2017-07-17 14:26:39 -07:00
Christopher Jeffrey
3af014119a
refactor: switch to template strings for errors.
2017-07-17 14:26:38 -07:00
Christopher Jeffrey
e89f285e9a
script: refactor execution.
2017-07-17 14:26:38 -07:00
Christopher Jeffrey
8c7279518f
refactor: de-globalize workerpool.
2017-07-17 14:26:38 -07:00
Christopher Jeffrey
c53f4cf89e
refactor: switch to const/let.
2017-07-17 14:26:37 -07:00
Christopher Jeffrey
e00472891d
refactor: start using for...of.
2017-07-17 14:26:37 -07:00
Christopher Jeffrey
aa05bb5df7
refactor: use es6 maps for everything.
2017-07-17 14:26:37 -07:00
Christopher Jeffrey
62e7f97359
refactor: module index.
2017-06-27 09:28:18 -07:00
Christopher Jeffrey
d4cc22e1c5
refactor: crypto.
2017-06-27 07:27:53 -07:00
Christopher Jeffrey
fa3e98b274
crypto: rename ec to secp256k1.
2017-06-27 02:48:19 -07:00
Christopher Jeffrey
33ffb780b3
refactor: expose int64 and big numbers as modules.
2017-06-22 03:59:49 -07:00