After a long debugging I found that I had two following problems in a private ethereum network using geth:
- If I have a require statement then the code is not executed on the EVM. The solution I found was to use a boolean and a if (test) { ...} statement
- Some code did not work to the end (that is emission of emit Statement(...) in my case). The problem appeared to be insufficient gas. The raw solution to that was to double the gas as given by eth_estimate_gas.
What would be the real solution to those problems? What documentation exist about this kind of problems?