aragon / aragonOS

(Aragon 1) Reference implementation for aragonOS: a Solidity framework for building complex dApps and protocols
https://hack.aragon.org/docs/aragonos-intro.html
GNU General Public License v3.0
686 stars 245 forks source link

Run tests in geth and parity #171

Closed izqui closed 4 years ago

izqui commented 6 years ago

Right now the test suite only runs on ganache-cli (former testrpc). Gearing up to mainnet deployment, we need to be running our tests in real nodes where code will eventually be deployed.

Great inspiration for how to do this right can be taken from the https://github.com/JoinColony/colonySale repo

status-open-bounty commented 6 years ago

Current balance: 0.0 ETH Tokens: ANT: 20.00 Contract address: 0x5bddf0e51e487af3ccea6cb7070348424349008f QR Code Network: Mainnet To claim this bounty sign up at https://openbounty.status.im and make sure to update your Ethereum address in My Payment Details so that the bounty is correctly allocated. To fund it, send ETH or ERC20/ERC223 tokens to the contract address.

fgimenez commented 6 years ago

hi @izqui! I'd like to give it a try. This is my very first issue, already set up on status.im, anything else needed to get started?

izqui commented 6 years ago

Sweet! Nothing needed to get started!

fgimenez commented 6 years ago

@cpurta you are doing a wonderful job on https://github.com/aragon/aragon-apps/pull/66! I'm starting with this issue today but every question that has arisen for me so far is solved in your PR :) So please feel free to take this one too once you are done, I think that your current work could be adapted to this issue very nicely.

trislit commented 6 years ago

Are you still looking at testing this? Are you attempting to test with payments through the front end api or just straight sendtocontract calls?

nadavhollander commented 6 years ago

@izqui Came across this across the interwebz because we're looking do the exact same thing at Dharma. Have you found any good leads on how to do this? I'm not sure how to recreate TestRPC functionality like evm_increaseTime in Geth / Parity

sohkai commented 6 years ago

@nadavhollander That's a good question, I'm not sure if @cpurta has run into that issue with https://github.com/aragon/aragon-apps/pull/66 yet...

There's an open spec that's under some discussion: https://github.com/ethereum/interfaces/issues/4.

cpurta commented 6 years ago

@nadavhollander I have ran into the same issue with Geth and Parity. They do not support that method in the RPC for good reason. Currently for testing you could not run any tests that make those calls when using those clients. I know that is a pretty bad solution to the problem but it may be better than the alternative.

The alternative would be making changes to one/both clients to support the method and maintaining a up to date branch with the master (or releases).

sohkai commented 6 years ago

@nadavhollander Something to try (we kind of use this strategy) is avoiding use of any of the time utilities in ganache and using a mocked contract to set the time instead.

aj07 commented 6 years ago

@izqui is this bounty still open for new contributors ? If yes, I would like to work on this

sohkai commented 6 years ago

He @aj07; this has been put on standby for a while and @cpurta's done a really good job with #186 already.

sohkai commented 4 years ago

Closing; as mentioned in #186, this is not a short term priority at the moment.