Christopher Jeffrey
03ddc79dfc
script/address: fix addr checking for nested p2sh inputs.
2018-03-29 21:56:52 -07:00
Christopher Jeffrey
3c82ac0486
bcoin: use util.revHex again.
2018-03-29 21:56:49 -07:00
Christopher Jeffrey
9b269dd1f0
script: remove mast.
2018-03-29 21:56:49 -07:00
Christopher Jeffrey
163e89fc29
bcoin: lint.
2018-03-29 21:56:49 -07:00
Christopher Jeffrey
51e3341252
script: classify.
2018-03-29 21:56:48 -07:00
Christopher Jeffrey
21ab415769
refactor: switch to bio module.
2018-03-29 21:56:48 -07:00
Christopher Jeffrey
ca08d6d97e
bcoin: rename bufio and bstring.
2018-03-29 21:56:48 -07:00
Christopher Jeffrey
f9eba3f5a6
crypto: start using hash.digest().
2018-03-29 21:56:47 -07:00
Christopher Jeffrey
41925d495c
utils: start using bbuf.
2018-03-29 21:56:46 -07:00
Christopher Jeffrey
e92b1f4cec
utils: start using bfilter.
2018-03-29 21:56:46 -07:00
Christopher Jeffrey
d0ed214067
bcoin: remove dependence on util.js.
2018-03-29 21:56:45 -07:00
Christopher Jeffrey
1a5782fa06
script: do not use util.reverse.
2018-03-29 21:56:45 -07:00
Christopher Jeffrey
636d66a5c7
bcoin: use bcrypto. remove crypto module.
2018-03-29 21:56:45 -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