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
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
5047028511
script: stop using new Opcode.
2017-08-19 23:14:18 -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
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
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
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
e89f285e9a
script: refactor execution.
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
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
Christopher Jeffrey
8593bd9410
script: less static methods.
2017-06-13 18:45:42 -07:00
Christopher Jeffrey
b722e5f6e9
ec: remove historical and high params.
2017-06-13 18:31:04 -07:00
Christopher Jeffrey
eba457ae11
script: minor.
2017-06-13 11:49:35 -07:00
Christopher Jeffrey
a3c7a49c80
refactor: replace util.equal with Buffer#equals.
2017-06-12 03:00:08 -07:00
Christopher Jeffrey
be457ee581
script: refactor branch/disabled opcodes.
2017-06-12 00:34:56 -07:00
Christopher Jeffrey
85ec9ae2c3
script: remove disabled ops permanently.
2017-06-11 23:40:35 -07:00
Christopher Jeffrey
a1e9999f29
script: refactor execution.
2017-06-11 23:37:55 -07:00
Christopher Jeffrey
3fd229d9ee
script: remove disabled opcode code.
2017-06-10 01:27:19 -07:00
Christopher Jeffrey
30b8a458ed
script: do not pass flags to Script.num.
2017-06-10 01:22:01 -07:00
Christopher Jeffrey
8893131e08
script: move static methods off of script constructor.
2017-06-10 01:20:05 -07:00
Christopher Jeffrey
28cd43045d
refactor: avoid using new Buffer() due to its new perf implications.
2017-05-30 21:11:10 -07:00
Christopher Jeffrey
ed4400acb9
address: start using from/toString.
2017-04-30 07:13:36 -07:00
Christopher Jeffrey
d56e50e166
script: docs for getters.
2017-02-05 18:17:49 -08:00
Christopher Jeffrey
23f7d3a782
script: minor.
2017-02-04 15:09:06 -08:00
Christopher Jeffrey
ef95b69e5e
minor: refactor. move asyncobject.
2017-02-04 14:52:13 -08:00
Christopher Jeffrey
4e7df6ef87
docs: get jsdoc compiling again.
2017-02-03 22:47:26 -08:00
Christopher Jeffrey
bbbe537574
script: minor.
2017-01-18 17:06:05 -08:00
Christopher Jeffrey
a1dcb8c381
script: do not clone for removeSeparators.
2017-01-16 13:57:14 -08:00
Christopher Jeffrey
a53b2c0eef
primitives: cloning and assertions.
2017-01-15 15:17:33 -08:00
Christopher Jeffrey
c3c3e41e68
script: typo.
2017-01-14 06:42:48 -08:00
Christopher Jeffrey
4c557744a2
refactor: address, amount, uri, errors.
2017-01-09 23:07:02 -08:00