bitauth / libauth

An ultra-lightweight, zero-dependency TypeScript library for Bitcoin Cash, Bitcoin, and Bitauth applications.
https://libauth.org
MIT License
271 stars 50 forks source link

BCH_2019_11 & BCH_2020_05 support #53

Open rkalis opened 4 years ago

rkalis commented 4 years ago

Currently the most recent implemented instruction set is BCH_2019_05, while there is also a BCH_2019_11_SPEC option. To use modern functions such as OP_REVERSEBYTES we need to implement support for the newer hardforks.

According to the specs on GitHub (https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/), these are the features that were introduced by these hardforks. These should be added to libauth to support these newer instruction sets.

BCH_2019_11

BCH_2020_05

bitjson commented 3 years ago

Just an update on this: my overall goal is to implement the latest instruction sets at the same time as developing a set of flag-less VM bytecode test vectors: https://github.com/bitauth/libauth/issues/31. I’m also planning to refactor the source for each instruction set to be more verbose, where every instruction and associated method is clearly listed in a single place (to be easier to review vs. the large amount of indirection currently used).

Right now I'm focused on the transaction signing API in Libauth, so this may be a few months. However, if anyone would like to take a shot at implementing just the minimum necessary changes (no need to worry about the above), I'd love to take a PR!

bitjson commented 3 years ago

Update: @rkalis knocked out a large part of this with PR https://github.com/bitauth/libauth/pull/56, but I'll leave this open until we have full support for the latest VM version. (Likely will happen at the same time as #31.)