Commit Graph

220 Commits

Author SHA1 Message Date
drbeefsupreme
f4a84caf30 hoon, dprint: remove |% and |@ core names
partial revert of 3d3ea61d53, which introduced core names by completing
an unimplemented feature that was already present in hoon.hoon. we've
decided to remove this for the initial launch since it violates the
principle of least surprise for the name of a core to end up in its
$garb and yet only be used for doccords, as opposed to something like a
wing resolution. it was also confusing that this only worked for |% and
|@.

this breaks two of the tests for the dprint library, which have been
commented out. these tests ought to be restored once dprint is rewritten
in order to implement a different way to refer to cores not built by arms
2022-11-15 18:25:57 -05:00
drbeefsupreme
5fc3b3fd0f hoon, dprint: change doccords syntax to ::
this constitutes a pretty major rework of how whitespace is handled in
hoon in order to change the doccords syntax from :> and :< to ::.

in summary: throughout the hoon parser (+vast) many instances of +gap
have been replaced by +jump, which first tries to remove whitespace (+leap)
until it arrives at something that can be parsed as a prefix
doccord (+apex:docs:vast). if it does not encounter a doccord, it
instead uses +gap as normal.

if you follow along with the parser, you will notice that every time
jump is called, it then tries to call +apex:docs via +scye or +seam. if
apex:docs succeeds, it will end up consuming a newline at the end,
hiding the fact that there was valid whitespace from the parser. thus
+apex:docs then inserts a newline after successfully parsing a prefix
doccord, which will then be consumed by a subsequent invocation of +gap,
ensuring that there was proper whitespace if the doccord would have been
consumed by +gap instead of +leap.

there are a few other changes:

+hint in the compiler throws out doccords attached to %noun types. this
was already the behavior before doccords, and the change was made before
i understood what i was doing.

similarly for commenting out the %note case in +open:ap - this was an
earlier mistake

postfix comments for chapters are now enabled.

+expx was unused and removed in order to be rid of the
convention-defying +exp1. other unused +ex(p/q)* were commented out.

arms that handle batch comments (+glow and +whap) were refactored

+toad, which was used to change between tall and wide form, tries to
+jump before +gap. since +jump is ;~(pose leap:docs gap), i would have
thought that just using +jump there would be fine, but it fails for some
reason.

some parsers built with |@ were rewritten to use |*

|$ was made so that any doccords put on the spec are converted into hoon
doccords on the $ arm. it wouldn't compile otherwise. there's probably a
more principled way to do this but it works fine for now.
2022-11-15 18:25:29 -05:00
drbeefsupreme
a4ca51009a dprint: fix syntax and test suite for new parser 2022-07-06 16:21:13 -04:00
drbeefsupreme
2028ae9397 dprint: batch comment tests, more refactoring 2022-07-01 13:48:48 -04:00
drbeefsupreme
37ce546dd4 dprint: simplify arm doc testing 2022-07-01 10:39:01 -04:00
drbeefsupreme
5710826cd4 dprint: fix test library argument 2022-06-30 17:18:09 -04:00
drbeefsupreme
72dec146b4 dprint: update default core arm comment syntax 2022-06-28 13:30:40 -04:00
drbeefsupreme
f31a9edd79 dprint: swap expected<->actual order in unit tests 2022-06-09 11:52:38 -04:00
drbeefsupreme
7e0d16d817 dprint: new core naming syntax
changes the syntax for cores named with :>  #  %corename to
|%  %core-name for the dprint and dprint testing library
2022-06-07 12:37:32 -04:00
drbeefsupreme
959906e69c
doccords: unit test for chapter dox 2022-05-09 16:45:16 -04:00
drbeefsupreme
715d0f3793
doccords: unit test for core dox 2022-05-09 16:01:32 -04:00
drbeefsupreme
3d701f79c4
doccords: unit tests for arm dox 2022-05-09 14:57:43 -04:00
Philip Monk
d9d7f69f26
test: make lib/vere/dawn not crash 2021-11-10 01:25:08 -08:00
yosoyubik
27576e272b Merge remote-tracking branch 'origin/philip/naive' into naive/roller 2021-10-31 15:14:15 +01:00
fang
0ec3d5111d
Merge branch 'master' into naive/roller 2021-10-26 20:46:32 +02:00
fang
36cd69b6d0
Merge tag 'urbit-os-v2.100' into naive/roller 2021-10-26 17:08:03 +02:00
fang
5131d3165d
Merge branch 'release/next-userspace' into m/eip-1559-plus 2021-10-08 20:42:37 +04:00
Philip Monk
7b528e823f
naive: final touch-up 2021-10-05 22:20:35 -05:00
yosoyubik
f243500068 Merge remote-tracking branch 'origin/philip/naive' into naive/roller 2021-09-27 16:29:12 +02:00
Philip Monk
32f07f4c3e
naive: add block-number to input
Unused, but will be used to trigger all upgrades
2021-09-23 12:24:20 -05:00
Fang
4692c10fe2
ethereum: add support for eip-1559 transactions
Adds a new transaction type and signing method for eip-1559-style
transactions.

Includes a $typed-transactions type which can support any number of
eip-2718-style typed transactions.
2021-09-18 20:41:33 +02:00
Fang
3c5fd9fda6
ethereum: ensure "to" value is 20 bytes wide
Previously, this would measure as <20 bytes for addresses with leading
zeroes. This resulted in transactions with unexpected behavior.
For example, sending ETH to the zero address would create a contract
instead.

Here we switch to using +encode:rlp directly and indicate a width of
20 bytes for the "to" field.
2021-09-18 20:41:26 +02:00
Fang
0c1e999cdb
ethereum: fix bug with rlp encoding of zero bytes
Null bytes in lists were getting eaten during concatenation. To avoid
this, we track encoded item widths (which are always 1 or higher) and
+can them all together.

This likely did not affect any of the other Ethereum code, considering
it nearly always measures atoms, and the null byte would be seen as
no bytes in that case.
2021-09-18 20:41:14 +02:00
Joe Bryan
bb53d5a8ba naive: splits large batch test into parsing and full tx handling 2021-09-15 10:36:56 -04:00
Philip Monk
312d27169b
naive: specific large batch test 2021-09-13 14:24:00 -05:00
Philip Monk
94c2223bf8
naive: style 2021-09-13 14:23:21 -05:00
drbeefsupreme
22d19f29cc
naive: remove unnecessary variable from test 2021-09-13 14:42:59 -04:00
drbeefsupreme
08e4a5afce
naive: large batch test is an actual batch 2021-09-13 14:40:26 -04:00
drbeefsupreme
b808f927d2
naive: large batch test 2021-09-13 12:56:53 -04:00
drbeefsupreme
f9f82eedfd
naive: ledger signature tests 2021-09-08 14:52:24 -04:00
drbeefsupreme
ee260694fa
naive: test trezor signature 2021-09-01 16:54:52 -04:00
drbeefsupreme
e1bbcd01e3
naive: fix metamask signature test 2021-09-01 16:38:01 -04:00
drbeefsupreme
419400fd9c
naive: 80 char width trimming 2021-08-24 18:18:48 -04:00
drbeefsupreme
996743b830
naive: cleanup +test-rut 2021-08-24 17:01:09 -04:00
drbeefsupreme
44e0d65740
naive: add %spawn dominion galaxy tests 2021-08-24 15:28:40 -04:00
drbeefsupreme
e03a6d7055
naive: fix rank-filter 2021-08-24 15:06:08 -04:00
yosoyubik
3774abba73 Merge remote-tracking branch 'origin/philip/naive' into naive/roller 2021-08-22 18:27:33 +02:00
Philip Monk
38c0452203
naive: fixup test nonces 2021-08-20 10:36:04 -07:00
drbeefsupreme
45daca57ad
Merge branch 'philip/naive' into poprox/naive-tests 2021-08-19 20:56:23 -04:00
Philip Monk
16306dc48c
naive: speed up tests by pinning initial state 2021-08-19 17:33:28 -07:00
drbeefsupreme
ee71d19000
naive: fix broken test nonces 2021-08-19 20:32:19 -04:00
Philip Monk
bfd7550c98
naive: migrate tests to ordered map 2021-08-19 16:47:28 -07:00
Philip Monk
7f7e033004
Revert "Revert "Merge naive/aggregator into poprox/naive-tests""
This reverts commit 2f49dab586.
2021-08-19 16:09:28 -07:00
drbeefsupreme
c1106bf3f0
naive: cleanup test prep area 2021-08-19 18:11:14 -04:00
drbeefsupreme
175b363412
naive: add transfer proxy tests to +test-rut 2021-08-19 14:07:04 -04:00
drbeefsupreme
37ca59e96d
naive: add another case to spawn proxy test 2021-08-17 15:58:28 -04:00
drbeefsupreme
e834033daa
naive: comment out unneeded test 2021-08-17 15:41:54 -04:00
drbeefsupreme
febe814cce
naive: fully functional test-rut complete 2021-08-17 15:08:33 -04:00
drbeefsupreme
c11cd709d0
naive: fix test-rut nonce calculation 2021-08-17 13:37:43 -04:00
drbeefsupreme
c8b62d8d2c
naive: expand approval-for-all test 2021-08-17 13:30:04 -04:00