Commit Graph
21 Commits
Author SHA1 Message Date
pharpend 127be10d03 [wip] code cleanups, making style uniform in vanillae ts 2022-11-06 12:20:45 -07:00
pharpend c21a4c42fe [wip] start work on api deconstructor 2022-10-26 08:52:11 -06:00
pharpend 64f9752ee5 wrote an encoder and it worked on the first try. wtf 2022-10-23 20:19:21 -06:00
pharpend 7751e71982 my ts rlp decoder seems to work
i feel like i would have more confidence in my code if i didn't test it
2022-10-23 06:41:19 -06:00
pharpend 2254c82f77 my erl rlp implementation agrees with ethereum python implementation for 59,638 random cases 2022-10-23 04:55:59 -06:00
pharpend 9701993e8b more python cases 2022-10-23 04:49:03 -06:00
pharpend 27eac056eb Generating tests for RLP Erlang (appears to work!)
Methodology:

- in Erlang, generate random DecodeData that are decentish (hard to generate
  because of arbitrary depth recursive nature)
- in Erlang, check that DecodeData->rlp:encode->rlp:decode is an identity (it
  is!)
- generate tons of encode/decode pairs for Python, make sure they all work
  (they do!)
2022-10-23 04:44:07 -06:00
pharpend ebf82a091c fix comment in b58.py 2022-10-23 04:43:56 -06:00
pharpend 3e86f27063 minor cleanups in rlp.erl 2022-10-23 04:43:35 -06:00
pharpend 427583e530 update notes 2022-10-21 20:37:13 -06:00
pharpend b826080c1b wrote an rlp implementation in erlang that seems to work
my current methodology for doing X

- find library that does X in Python with lots of stars on GitHub
- autogenerate test cases against Python library
- do X in Erlang to work out logic in easier setting
- make sure Erlang implementation works
- do X in TypeScript
- make sure TypeScript implementation works
2022-10-21 20:35:01 -06:00
pharpend c5afe1dd20 forgot to add the actual code 2022-10-21 05:57:09 -06:00
pharpend 3a9cd39046 my base58 encoder/decoder worked the first time and I'm scared 2022-10-21 05:54:08 -06:00
pharpend 9f65987ca2 base58 test generation in python 2022-10-21 05:17:04 -06:00
pharpend aa9b8b7339 [wip] add untested base58 encode in ts 2022-10-21 04:47:55 -06:00
pharpend 0e600f0f05 thinking about base58, fix some comments 2022-10-21 03:14:34 -06:00
pharpend 039d246d84 base64 encode/decode done and tested 2022-10-20 02:00:27 -06:00
pharpend 90d464040d add more cases 2022-10-19 22:01:29 -06:00
pharpend 584ffff507 it turns out that testing your code is a good idea
I found a bug in my base64 implementation

have started implementing a "test system"
2022-10-19 21:47:46 -06:00
pharpend 0f1a181c08 write out the rest of the encode cases 2022-10-19 03:17:49 -06:00
pharpend 0e95fef840 [wip] start making vanillae js library
It compiles but there's some NYI functions

This is going to have all the common functions that we need all over the place

- base64 encode/decode
- base58 encode/decode
- rlp encode/decode
- transaction types
- transaction formation
- reading stuff from the transaction
- safe type
- (maybe) AWCP

This commit contains a refactored version of my prior base64 implementation,
which is more imperativey and less "trying to fit Erlang into TS".
2022-10-19 01:21:41 -06:00