These are chat archives for Nethereum/Nethereum

28th
Oct 2016
Juan Blanco
@juanfranblanco
Oct 28 2016 05:11
hi your gas issues might be associated with the new forks
what are your issues?
I personally had issues on Morden, but my contracts / transactions were using lots of gas
Conor Svensson
@conor10
Oct 28 2016 07:54
if it helps - for my integration tests in web3j I've been running transactions with the following gas parameters during the past few days without issue
static final BigInteger GAS_PRICE = BigInteger.valueOf(50_000_000_000L);
static final BigInteger GAS_LIMIT = BigInteger.valueOf(2_000_000);
also, solidity has a --gas parameter which can be useful for identifying how much gas a contract requires
Juan Blanco
@juanfranblanco
Oct 28 2016 08:03
thanks @conor10 also to add if you want to find out the current gas limit use Eth.GetBlock
Juan Blanco
@juanfranblanco
Oct 28 2016 08:09
what I have found is that in Morden, mining and deploying of contracts was very slow.. they were contracts that were in the pending state for a long time
Geasley
@Geasley
Oct 28 2016 08:13

Thanks for the responses - much appreciated. I'm actually currently using a private consortium blockchain and am basically finding that while I can deploy my contracts (and they function fine when transactions are invoked through truffle), whenever I attempt to kick of a transaction through nethereum while it returns that my transaction has been successfully mined (block number, hash etc) but there seem to have been no effect as a result (i.e. i can make a call to check updated state). At this point I'm presuming it's gas related (despite my provision of vast amounts of gas to the transaction) - though I'm struggling to get any kind diagnostic information back. What's the definitive way of identifying whether a transaction ran to completion or not?

I'll take a look at some of your suggestions regarding the gas limits and requirements and see if I can make any progress. I presume I'm just failing to understand something.

Juan Blanco
@juanfranblanco
Oct 28 2016 08:14
@Geasley check if your contract has been deployed by using
Eth.GetCode
if it returns "0x" it has not been deployed correctly
which it might have ran out of gas
Geasley
@Geasley
Oct 28 2016 08:23
That is indeed what I'm getting back - I'll investigate! Is there an equivalent check I can do for a transaction to identify whether it is likely to have not completed as desired?
Juan Blanco
@juanfranblanco
Oct 28 2016 08:24
well you can check if both the gas used + gas sent are the same in the receipt
this will normally indicate that there is an issue (as you have used all your gas)
then.. it gets a bit tricky as you need to use debug (in geth) to verify the stack trace
the last one is an example on how to call it
I would put extra state check when both gas quantities match
Geasley
@Geasley
Oct 28 2016 08:30
Great thanks - I'll check those out