Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Use upstream Unicorn #55

Closed
norswap opened this issue Mar 2, 2022 · 3 comments
Closed

Use upstream Unicorn #55

norswap opened this issue Mar 2, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@norswap
Copy link
Contributor

norswap commented Mar 2, 2022

Currently, this repo uses a fork of Unicorn made by @geohot https://github.com/geohot/unicorn.git

George said he made a few fixes to it, which do have to upstream and/or merged upstream before we can switch over, so we should track, push for the fixes to be merged and switch when we can.

Quick search releaved the following issue: unicorn-engine/unicorn#1470 but that seem to be fixed, but there seems to be more than that here: https://github.com/geohot/unicorn/commits/master

@geohot Could you comment as to what we need?

@norswap norswap added the enhancement New feature or request label Mar 2, 2022
@geohot
Copy link
Collaborator

geohot commented Mar 8, 2022

It might just be good now, try it and make sure the extended tests pass running a block in lockstep with the chain version.

@norswap
Copy link
Contributor Author

norswap commented May 5, 2022

I'm trying again but things are proving difficult.

I tried with release 2.0.0-rc7, which includes these commits from George.

This does not cover all the commits in George's branch, which also include three more commits related to a read hook, write hook, and step callback.

The issue manifests in the mipsevm tests:

=== RUN   TestCompareUnicornEvm
         0 pc: 0 steps per s 0.000000 ram entries 269281
0 [0 269281 0 0 0 0 0 0 0] [0 269281 0 0 0 0 0 0 0]
9 mismatch at 0 cevm [547364 269283 0 0 0 0 0 0 0 0 4096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2147471360 0 547364 547364 0 0 0] cuni [36 269283 0 0 0 0 0 0 0 0 4096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2147471360 0 547364 36 0 0 0]
9 mismatch at 34 cevm [547364 269283 0 0 0 0 0 0 0 0 4096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2147471360 0 547364 547364 0 0 0] cuni [36 269283 0 0 0 0 0 0 0 0 4096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2147471360 0 547364 36 0 0 0]
ram mismatch at c0000080, evm 85a18 != uni 85a28
2022/05/05 02:49:15 RAM mismatch
exit status 1
FAIL    mipsevm 23.710s

@norswap norswap added the help wanted Extra attention is needed label May 5, 2022
@norswap norswap self-assigned this May 5, 2022
@protolambda
Copy link
Contributor

Cannon uses upstream unicorn now without issues, running Go programs with all the functionality we are concerned about. Will re-open a new issue if we find any Unicorn issues with more fault-proof program testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants