Commit Graph

115 Commits

Author SHA1 Message Date
Braydon Fuller
37fc9a78e4
script: update script tests and behavior
References:
- https://github.com/bitcoin/bitcoin/pull/12425
- https://github.com/bitcoin/bitcoin/pull/12167
- https://github.com/bitcoin/bitcoin/pull/10699
2019-02-01 16:32:39 -08:00
Braydon Fuller
efa78100e0
script: update tx standardness rules and more tx tests
References:
- https://github.com/bitcoin/bitcoin/pull/11423
- https://github.com/bitcoin/bitcoin/pull/12600
- https://github.com/bitcoin/bitcoin/pull/12082

Trivial References:
- https://github.com/bitcoin/bitcoin/pull/12393
- https://github.com/bitcoin/bitcoin/pull/6539
- https://github.com/bitcoin/bitcoin/pull/10742
- ecb11f561c
2019-02-01 16:32:31 -08:00
Christopher Jeffrey
a45e683eb2
bcoin: switch to bsert for everything. 2018-08-10 16:23:46 -07:00
Christopher Jeffrey
b92839c82a
bcoin: use buffer-map. see #533. 2018-08-10 16:23:46 -07:00
Christopher Jeffrey
bd76939f4c
pkg: update bcrypto. 2018-03-29 21:56:53 -07:00
Christopher Jeffrey
f1672a8b86
types: cleanup types. 2018-03-29 21:56:53 -07:00
Christopher Jeffrey
1474d49231
script: remove useless vars. 2018-03-29 21:56:52 -07:00
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
d0ed214067
bcoin: remove dependence on util.js. 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
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
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