Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Fixing endianness issues #202

Merged
merged 2 commits into from
Apr 16, 2018
Merged

Fixing endianness issues #202

merged 2 commits into from
Apr 16, 2018

Conversation

jwasinger
Copy link
Contributor

@jwasinger jwasinger commented Mar 22, 2018

Fixes #203.

WIP I think we need to remove a lot of these bswap* statements as they are needlessly changing the endianness of certain values (AFAIK at some point they were used and then we made some changes to hera that flipped endianness expectations).

@jwasinger jwasinger force-pushed the swap-endianness branch 3 times, most recently from 97deeb4 to b82b549 Compare March 26, 2018 20:42
@lrettig
Copy link
Member

lrettig commented Mar 27, 2018

Closes #203

@axic
Copy link
Member

axic commented Mar 28, 2018

Rebased.

@lrettig
Copy link
Member

lrettig commented Apr 1, 2018

I just tried rerunning the add11 test with this fix and I'm still getting the error. Here's what the filler file expects:

                "result" : {
                    "095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
                        "balance" : "1000000000000100000",
                        "code" : "0x6001600101600055",
                        "storage" : {
                            "0x" : "0x02"
                        }
                    },

And here's what the trace is showing me:

{"depth":0,"gas":378988,"gasCost":12,"op":85,"pc":7,"stack":["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000002"]}
storageStore 20 0

So maybe this didn't fix the issue? CC @hugo-dc

"0x02" != "0x0000000000000000000000000000000000000000000000000000000000000002"

@jwasinger
Copy link
Contributor Author

Double check you have everything set up properly. The test is passing for me.

@lrettig
Copy link
Member

lrettig commented Apr 2, 2018

My bad. I was running with an older version of the code. This test is passing for me now, with this change. Cool.

Copy link
Member

@lrettig lrettig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM

@jwasinger
Copy link
Contributor Author

Merging this as-is to get CI passing.

@jwasinger jwasinger merged commit e090897 into ewasm:master Apr 16, 2018
@jwasinger jwasinger deleted the swap-endianness branch April 16, 2018 17:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants