These are chat archives for Nethereum/Nethereum

15th
Nov 2018
Astrovicis
@Astrovicis
Nov 15 2018 01:07
@juanfranblanco I'm getting "gas required exceeds allowance or always failing transaction" with all TransactionSignedUnityRequests I send for .NET 3.5. Is there a way around this?
Joshua Duxbury
@p0onage
Nov 15 2018 08:00
@Astrovicis have you got enough Ether in the account your are sending the transaction with?
keepbreath
@keepbreath
Nov 15 2018 09:46
Hello Juan@juanfranblanco
I think I have another problem and need your help,For the same code that was executed successfully in the winform program, I was told in the WebAPI that the RPC request had failed! I mentioned the specific code and screenshots on github,Thanks in advance.
Enigmatic
@EnigmaticUnreal_twitter
Nov 15 2018 10:10
Hmmm. Just wondering @keepbreath - Are you using .net451 for your web service?
keepbreath
@keepbreath
Nov 15 2018 10:12
Thank you,let me check
Juan Blanco
@juanfranblanco
Nov 15 2018 10:21
@spied001 are you using the same account to sing the transactions to different nodes
@Astrovicis normally this is an issue when estimating and reflects some problems with your solidity code
keepbreath
@keepbreath
Nov 15 2018 10:31
@EnigmaticUnreal_twitter .I checked, it's NET451, but there was an exception when I sent the RPC protocol, and the content was "Error occurred when trying to send RPC requests(s)"
Enigmatic
@EnigmaticUnreal_twitter
Nov 15 2018 10:35

Ah. Infura recently (a few months) upgraded to use TLS2, so if you're using .NET451 you'd want to specify the securityprotocoltype.

Something like ServicePointManager.SecurityProtocol = SecurityProtocolType.TLS12

See if it helps maybe?
keepbreath
@keepbreath
Nov 15 2018 10:51
Emmm...I used the Infura node to make data requests, and the same code ran successfully in the winform program, but an exception occurred in the web API, which is my problem on GitHub, and I invite you to come over and have a look:Nethereum/Nethereum#458 @EnigmaticUnreal_twitter
Enigmatic
@EnigmaticUnreal_twitter
Nov 15 2018 10:53

Ah I have looked at that already. Was wondering, as the winforms program could had been set to .NET46.

Was a known issue for a while: Nethereum/Nethereum#412

keepbreath
@keepbreath
Nov 15 2018 10:56
I will try to upgrade to NET4.6. I will try the method you mentioned. Thank you very much
Juan Blanco
@juanfranblanco
Nov 15 2018 11:34
yeah (I was answering in GitHub) try what Enigmatic said
Sergio Piedrahita
@spied001
Nov 15 2018 15:26

@juanfranblanco

@spied001 are you using the same account to sing the transactions to different nodes

@juanfranblanco yes I am using the same account to sing the transactions on each node
Juan Blanco
@juanfranblanco
Nov 15 2018 15:53
then that might be the issue, as your nonces are the same some of the transactions will be duplicated or rejected
Sergio Piedrahita
@spied001
Nov 15 2018 16:16
ok, thanks for the quick response. Is there a way to catch this type of issues. Now I now to not use the same account across multiple nodes, but I was wondering if there is way to prevent this type of situation through code ?
Dwagga
@Dwagga
Nov 15 2018 18:04
Hi! :D
Astrovicis
@Astrovicis
Nov 15 2018 18:06
@juanfranblanco No I don't think its our code. I notice in SignAndSendTransaction (with no type parameters), we can specify all Tx params, including gas and gasPrice but for the type-param version we can't. I've been able to get the non-type-param version to successfully send and execute transactions but the type-param requests won't go through. I really would love to be able to use the type-param version for methods that require struct input because that's a super super nice feature that will allow me to avoid having to manually encode these transactions (possibly, depending on the result of this discussion), which is something I would really really like to avoid for time's sake. Would it be possible to add support for Tx param editing (gas, gasPrice, value, etc) for the type-param version?
@juanfranblanco The reason I say its not our code: our code has been audited for correctness and metamask is able to make these transactions.
Juan Blanco
@juanfranblanco
Nov 15 2018 18:19
@Astrovicis ah that means the estimate is not working on the client
You can set the gas in the type object
Down the bottom it mentions it
It is part of the object
Juan Blanco
@juanfranblanco
Nov 15 2018 18:25
@spied001 not really (prevent) what has happened is that both transactions have been sent at the same time to two parts of the world. When syncing some will be rejected.
@Dwagga hi!!
Astrovicis
@Astrovicis
Nov 15 2018 22:05
@juanfranblanco This requires a web3 instance which the .NET 3.5 implementation doesn't/can't support, yea? I should opt for using the .NET461 implementation?
trying it...
Juan Blanco
@juanfranblanco
Nov 15 2018 22:14
Oh no
@Astrovicis
Mainly your function message has a Gas, Gas price and Value properties that can be set too.
That is the part I was referring.
Although you could use Nethereum vanilla in 4.61 if wanted
Astrovicis
@Astrovicis
Nov 15 2018 22:43
Oh no way. Okay! Thanks man!