crytic / medusa

Parallelized, coverage-guided, mutational Solidity smart contract fuzzing, powered by go-ethereum
https://www.trailofbits.com/
GNU Affero General Public License v3.0
292 stars 37 forks source link

medusaup #352

Closed aviggiano closed 5 months ago

aviggiano commented 5 months ago

As a beta tester, I would like to always use the latest version of medusa.

It would be nice to have a medusaup command similar to foundryup so that it can compile from the master branch

0xalpharush commented 5 months ago

This is a duplicate of https://github.com/crytic/medusa/issues/205

What is the blocker on https://github.com/crytic/medusa/pull/224 @anishnaik ?

aviggiano commented 5 months ago

I'll close this one

If anyone wants a quick fix, here's what I'm doing:

function medusaup()
{
        pushd . &>>/dev/null
        cd <YOUR_MEDUSA_GIT_REPOSITORY_PATH>
        git pull
        echo "Building medusa $(git rev-parse --short HEAD)"
        go build
        mv medusa /usr/local/bin
        popd &>>/dev/null
}
Xenomega commented 5 months ago

@0xalpharush As a side note, we'll also be fixing go get (so you can use the normal Go flow to pull the tool).

We can't use go get now because we use a replaces directive in medusa-geth, and go get does not respect replaces directives unless it's at the top level (e.g. medusa, if that's what you're 'getting', rather than medusa-geth, a dependency).

This is only a problem because we tried to maintain the original github.com/ethereum/go-ethereum module path in medusa-geth, and use a replaces directive to redirect it. We thought this would be nice, but caught on to the replaces directive caveat later and never revisited it.

The fix will look like this:

That will let us use go get and will be required for some other planned features.