quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Logs are not visible in the transactions and transactions dont fail if require conditions are not met

Open mohdrashid opened this issue 8 years ago • 5 comments

System information

Geth Version: 1.7.2-stable Git Commit: 0905eda48eb07a4ce0e7072c1a2ecbf690ddff77 Quorum Version: 2.0.0 Architecture: amd64 Network Id: 1 Go Version: go1.7.3 Operating System: linux GOPATH= GOROOT=/usr/local/go

Expected behaviour

The logs are generated when a function is called. Also if the caller is incorrect or require conditions are not met. The transaction should fail.

This not working in either public or private smart contracts.

Actual behaviour

The call succeeds even when the require conditions are wrong but does not change the state variables (which is good). However, the program works correctly in TestRPC. Moreover, Logs are generated for either private or public transactions.

Steps to reproduce the behaviour

Using require with any state variables. And output Logs at the end of the functions

mohdrashid avatar Feb 28 '18 15:02 mohdrashid

Please try again with Quorum 2.0.1. See https://github.com/jpmorganchase/quorum/pull/283

patrickmn avatar Feb 28 '18 17:02 patrickmn

And please let me know if you still experience the require bug on the latest version.

patrickmn avatar Feb 28 '18 17:02 patrickmn

The log issue is solved. Thanks. However, the require does not throw any error if false.

mohdrashid avatar Mar 01 '18 10:03 mohdrashid

Ok. Even though the state variables don't change, this is clearly not intended/good behavior.

patrickmn avatar Mar 01 '18 15:03 patrickmn

@mohdrashid I tested against master and looks like this is fixed, calls to web3.eth.getTransactionReceipt returns status 0x0 indicating transaction failure when required conditions are not met and returns a status 0x1 indicating success when required conditions are met.

I am closing this issue for now, please reopen if you are able to reproduce the issue and also provide the steps to reproduce.

jbhurat avatar Oct 10 '18 20:10 jbhurat