Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
running evm with ganache-cli in travis ci jobs (#301)
* adding the whole idea directory to gitignore * roughing in some testing scripts that run yul code through truffle and ganache. these almost certainly do not work. * tweaking permissions, per https://stackoverflow.com/questions/42154912/permission-denied-for-build-sh-file * updating npm so that it's modern enough to work for ganache * commenting out fabric tests * double quotes for safety against splitting * debugging travis build * debugging travis build * debugging travis build * travis_specific/install_ganache.sh * updating to a more modern ubuntu to maybe solve some node problems * debugging travis build * debugging travis build * going big with version increments * debugging travis build * debugging travis build * debugging travis build xx * breadcrumbs for myself for tomorrow * java version * java11 worked, trying 12. also actually running ganache tests * moving comments around, removing some directory manipulation commands * updating sbt version to remove error about log4j * fixing some Auto-application to () is deprecated errors in the scala * fixing a scala warning, bumping java version too * adding a catch all case to the parser to squelch a warning * 14 seems to be too much, lets try 13 * down to 12 * changes * some trivial changes to trigger a fresh travis job * Check to make sure ganache-cli and truffle are installed. Put the output of solc in EmptyContract.evm. * Use $TRAVIS_BUILD_DIR to find the repository directory. * stubs * Capture return status from individual tests and fail on any failures. * config file to cause truffle to run evm, possibly * stepping through emptycontract.sh locally; next thing is to figure out the docker invocation with volumes and maybe a local permission problem for me * truffle init with fewer Ns * removing some unused imports as an excuse to kick off a new travis job that might be less cached * adding cached output of truffle init instead of trying to run it in the script because it is not well-behaved * small change, new output that i want to run on travis * scraps * removing truffle * progress towards running the evm bytecode directly through curl and ganache-cli * sudo * snap * more changes * ganache cli returns an error! this is wonderful! * pulling an account off of the ganache-cli instance works * adding more gas, bigger default balance * localhost may not exist by default on travis ci instances * tidying up output from emptycontract.sh a little bit, making it return an error code so that the travis build fails even if kill succeeds * add response output * replicated bad response locally, clearing up some possible causes, pushing to see how it runs on travis. #304 * got past the 400 locally, back to opcodes. pushing to travis to see it there. #304 * this should now (correctly) fail on travis * pretty printing ganache response, too #304 * #304 * #304 * cleaning up comments and adding references to the tech debt issue * cleaning up some high churn IDE files that i don't think need to be shared * tidying up for a PR * tidying up for a PR * tidying up for a PR * tidying up for a PR * ganache test now correctly fails if one of the tests it runs fails. #302 * reverting install-protobuf * travis build problems * i have no idea if this will work or what changed that makes this needed * progress on #309. there's something happening here i don't understand. specifically when translateContract exits, if I print the return value i get ``` YulObject(EmptyContract,Code(Block(List(ExpressionStatement(FunctionCall(Identifier(mstore),List(Literal(number,64,int), Literal(number,128,int)))), ExpressionStatement(FunctionCall(Identifier(return),List(Literal(number,0,int), Literal(number,0,int))))))),List(YulObject(EmptyContract_deployed,Code(Block(List(ExpressionStatement(FunctionCall(Identifier(mstore),List(Literal(number,64,int), Literal(number,128,int)))), ExpressionStatement(FunctionCall(Identifier(return),List(Literal(number,0,int), Literal(number,0,int))))))),List(),List())),List()) ``` which has the `mstore` and `return` command in both blocks, but when i look at the yul file written to disk it's missing the `mstore` command in the `_deployed` block: ``` object "EmptyContract" { code { mstore(64,128) return(0,0) } object "EmptyContract_deployed" { code { return(0,0) } } } ``` solc is happy to take this as valid Yul and produces EVM that ganache accepts. but i don't know if this is right. i certainly intended both commands to be in both places, but i don't really know if they should be. i looked at the call sites for `translateContract` in `translateProgram` and they don't seem to do anything that would change what's in `_deployed`. There's only one call to `translateProgram` and it's right before the file gets written to disk via `yulString` in `YulAST.scala:83`. That leads me to `object.mustache`, but I'm not sure that something there would be causing this error (if it is indeed an error). * removing print statement * debugging path manipulations in testing script * more descriptive comment text for polling ganache * swapping todo and error text in parser Co-authored-by: Michael Coblenz <mcoblenz@cs.cmu.edu> Co-authored-by: Michael Coblenz <mcoblenz@umd.edu>
- Loading branch information