Pt 166636909 avoid calldata collision #578
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "PT-166636909-avoid-calldata-collision"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: ThomasArts
Created by: hanssv
This will only work for nulllary functions (since the added function will always have 0 arguments...) This is a problem in the original PR not introduced here.
Created by: hanssv
We should have a test that actually creates calldata for something with arguments :-)
Created by: ThomasArts
Yes, done that now
Created by: UlfNorell
con
is not list cons, but variant type construction (Ar
is the list of arities of the constructors,I
is the tag index, andAs
is the constructor arguments). Cons is{op, '::', [Hd, Tl]}
.Created by: UlfNorell
TODO:
{op, '-', [{lit, {int, N}}]}
)Created by: UlfNorell
Or better: break out
lit_to_fate
fromterm_to_fate
and use that.Created by: hanssv
Where?
Created by: UlfNorell
I don't see the tests. You mean done, but not pushed?
Created by: ThomasArts
Thanks. Will check with @hanssv. Pushed the test for dutch_auction, counter and bitcoin_auth that take different arguments. Bitcoin_auth is not compilable yet, but when it is, test is ready.
Created by: UlfNorell
The test would look nicer if you defined a single contract with functions whose arguments cover all the cases in
term_to_fate
. Choosing a different existing test contract and defining a new unit test for each case is a bit clumsy, and it's hard to get an overview of the test coverage.Created by: UlfNorell
Created by: UlfNorell
Created by: UlfNorell
Works, since
make_list
is identity. Should really do?FATE_LIST_VALUE
on the tail.Created by: UlfNorell
The second
make_list
makes no sense.term_to_fate
already adds amake_list
so if anything thatmake_list
should be stripped off (butmake_list
is currently a no-op, so...). I guess the most correct thing to do without messing with aebytecode (and addingaeb_fate_data:X_value
functions) is to includeaeb_fate_data.hrl
and use?FATE_LIST_VALUE
.Created by: ThomasArts
In that case I probably would just only use
term_to_fate(Tl)
because including that abstraction breaker in this code seems weird.Created by: ThomasArts
I can do a comment on why it works :-).
Created by: hanssv
Signatures and hash are missing, but it is probably easier if I take care of them in a follow up PR.
Created by: UlfNorell
Remove the outer
make_list
as well then.Created by: UlfNorell
also missing: maps
Created by: UlfNorell
Review: Approved
Created by: hanssv
Review: Approved
Merged by: ThomasArts at 2019-06-14 11:09:25 UTC