-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ethSendTransaction doesn't wait for the transaction to be mined #1312
Comments
Hi @tinchou! We only run our tests agaisnt |
No, there are multiple issues but this is the first one I could isolate. Is running your tests on full nodes something you want to do? Your test suite is very valuable for us, but we could just fork if this isn't something you're interested in. |
We've actually discussed that same thing very recently, since there are some minor differences between I'd hate however to have the test suite littered with |
It's hard for me to say. As a node developer, I would argue that the behavior of the I'll let you know if I can work a little more on this to get a sense of the amount of code needed to make it compatible. |
@tinchou We are definitely interested in running the test suite against actual nodes. The main obstacle is probably our use of ganache's I agree with @nventuro that it would be very bad to have the test suite littered with these function calls. We should be able to solve it at a lower level. |
We started working on it, hopefully we can collaborate! Here's a preview: https://github.com/rsksmart/openzeppelin-solidity I saw just a minor issue with our The main issue is that Circle CI aborts the test run after 5 hours. I plan to investigate and come up with alternatives on Monday. One idea I had was to reduce the time between blocks in the node configuration for these tests. |
Good news! We just had a successful test run on the public Circle CI server: https://circleci.com/gh/rsksmart/openzeppelin-solidity/23 Current status:
This was the main goal of this sprint's task, and I will move on to another task for now. These are some things we've identified that could allow us to have 100% compatibility, and hopefully we could tackle them soon:
|
That's great news @tinchou! Are those blockers specific to RSKj, or will they affect all other nodes? Also, how did you get the promises to resolve only once the transaction was mined? |
It seems that some Ethereum implementations would not have them. EthereumJ probably would. For transferring value I added an |
Awesome! This will be of help once we set up our tests against a real node, thanks :) For reference, this is the bit that we'd need to port over to OZ to fix this issue. |
@ignaciopulicedonatto started working on insta-mining. We've seen test times go down to the sub-10 minute mark :). It would seem that Truffle has code in place specially for Geth which makes things easier for them (and we're stuck with the workarounds). We'll look into it next week. Happy long weekend! |
🎉 Description
I'm running your test suite against the RSKj 0.5.0 node and found an issue with some tests.
💻 Environment
master
branch (commit 6c4c898)npx truffle test --network rsk
with my node listening atlocalhost:4444
📝 Details
Let's take for example the
BreakInvariantBounty
tests. Theit can set reward
test fails becausesendReward
returns immediately, before the block including the transaction is mined. The balance ofthis.bounty.address
hasn't been updated yet and the check fails.🔢 Code To Reproduce Issue
I ran the test code against the RSK node and it failed consistently.
I also verified that both of these changes make the test pass:
I could send a PR if you want, let me know.
Thanks!
The text was updated successfully, but these errors were encountered: