These are chat archives for Nethereum/Nethereum

4th
Nov 2017
gaitchs gangmei
@gaitchs
Nov 04 2017 03:52
Need tutorial
Juan Blanco
@juanfranblanco
Nov 04 2017 06:33
@tatigo I missed that, no you don't if your clients are already "mining" or have started any other consenus process, so if you are using the Azure BaaS, the nodes will be already started
@FirefightGI yes you can create bindings for the c++ solidity
but i don't know how cross plaftorm that will be, ie.. could you export to webgl?
@gaitchs check the docs, workbooks, videos
Juan Blanco
@juanfranblanco
Nov 04 2017 06:41
let me know if you cannot find anything
abhishek
@triston_abhi_twitter
Nov 04 2017 08:13

Hello @juanfranblanco
I am trying to call my contract function from foreach loop which have minimum 50 records.
So ultimately I am trying to send 50 transaction from foreach loop.
But when I am doing this after 1 or 2 transaction send Geth is crashed with below error

"INFO [11-04|07:55:11] Submitted transaction fullhash=0xa9abae47d5425e909ae8413fec7d0a6fe6ac1cef40bf335c19871bdb12729d26 recipient=0x4BA9799Ab9EB780992095506AF17e2A7949f2639
INFO [11-04|07:55:12] Submitted transaction fullhash=0xdb1c889998956de2f9539d29be2415dc25905b76c5218f0cc5682620b3c9d229 recipient=0x4BA9799Ab9EB780992095506AF17e2A7949f2639
runtime: out of memory: cannot allocate 268435456-byte block (1414889472 in use)
fatal error: out of memory"

Juan Blanco
@juanfranblanco
Nov 04 2017 08:14
ah so you have ran out of memory
maybe geth has a memory leak
abhishek
@triston_abhi_twitter
Nov 04 2017 08:15
Code which is used to send transaction is
        var senderAddress = "sendaddress";
        string pass = "password";
        ManagedAccount account = new ManagedAccount(senderAddress, pass);
        string abi = System.IO.File.ReadAllText("Erc20StandaradcontractAbi.json");
        var contractAddress = "conAddress";
        var web3 = new Web3Geth(account);
        Contract con = web3.Eth.GetContract(abi, contractAddress);
        HexBigInteger estimategas = await con.GetFunction("addvalue").EstimateGasAsync("Value that needs to store");
        web3.TransactionManager.DefaultGas = estimategas;
        web3.TransactionManager.DefaultGasPrice = Nethereum.Signer.Transaction.DEFAULT_GAS_PRICE;
        string transactionId = await con.GetFunction("addvalue").SendTransactionAsync(senderAddress, "Value that needs to store");
        if (string.IsNullOrEmpty(transactionId))
            return ;
Juan Blanco
@juanfranblanco
Nov 04 2017 08:15
or you don't have enough memory?
what version of geth are you using?
are you mining or have you tried using PoA like clique
check this workbook on setup
abhishek
@triston_abhi_twitter
Nov 04 2017 08:17
I am running below command to start Geth testnet
geth --testnet --rpc --rpcaddr localhost --rpcport 8545 --rpcapi "eth,web3,personal,net,miner,admin,debug"
Juan Blanco
@juanfranblanco
Nov 04 2017 08:17
ok try using clique

"Download the test chain from https://github.com/Nethereum/Nethereum.Workbooks/tree/master/testchain/clique.

Start the chain using startgeth.bat (Windows) or startgeth.sh (Mac/Linux). The chain is setup with the Proof of Authority consensus and will start the mining process inmediatly."

are you in a vm?
abhishek
@triston_abhi_twitter
Nov 04 2017 08:18
yes
Juan Blanco
@juanfranblanco
Nov 04 2017 08:18
thought so
yes try clique and let me know how it goes
it is not "mining" so it will be less resource intensive
it uses Proof of Authority
abhishek
@triston_abhi_twitter
Nov 04 2017 08:19
ok let me try.
But let's say I am moving to live then also I will face same issue?
Juan Blanco
@juanfranblanco
Nov 04 2017 08:19
well if you are moving live
that is a different situation
what are you doing?
public chain ? consortium?
abhishek
@triston_abhi_twitter
Nov 04 2017 08:20
public chain of ethereum
Juan Blanco
@juanfranblanco
Nov 04 2017 08:21
then you are not mining
you will use something like infura
or your own client
if you are using your own client
still it will be a node so it wont be as resource intensive
i guess the vm is a cheap vm :)
abhishek
@triston_abhi_twitter
Nov 04 2017 08:22
you will use something like infura
Means https://infura.io/ ?
Juan Blanco
@juanfranblanco
Nov 04 2017 08:22
yes
anyway before you even go live you will need to test on a testnet
abhishek
@triston_abhi_twitter
Nov 04 2017 08:23
if you are using your own client
Means vm that I am using
Juan Blanco
@juanfranblanco
Nov 04 2017 08:23
well i dont think you should have
a vm
just a vm
you need to ensure your node is in sync
prevent forks
separate dependencies
failover
well i don't know what you are doing :)
in a very simplistic way yes you can do it on a simple vm
i guess you could even do it on a raspberry pi
abhishek
@triston_abhi_twitter
Nov 04 2017 08:26
Well I want to store a value in contract function and check that value if that exists or not from my website.
Juan Blanco
@juanfranblanco
Nov 04 2017 08:26
then just point to infura
much simpler
abhishek
@triston_abhi_twitter
Nov 04 2017 08:27
Ok I will check infura.
Thank you for your help.
try that
explanation
abhishek
@triston_abhi_twitter
Nov 04 2017 08:28
Ok I will go through it.
1 quick question is
Let's say I will use infura then my transaction detail will display in https://etherscan.io ?
Juan Blanco
@juanfranblanco
Nov 04 2017 08:32
yes
of course
abhishek
@triston_abhi_twitter
Nov 04 2017 08:33
Ok Got it.
Juan Blanco
@juanfranblanco
Nov 04 2017 08:33
ethereum, same network, decentralised
try a testnet
well you have to :)
abhishek
@triston_abhi_twitter
Nov 04 2017 08:36
yes First I will try testnet
RevVivek
@RevVivek
Nov 04 2017 08:54
Can we get some good tutorial to use Nethereum to develop to web application in .Net Core
Juan Blanco
@juanfranblanco
Nov 04 2017 08:54
check the faucte template
that is a good start
faucet*
RevVivek
@RevVivek
Nov 04 2017 08:56
Thanks Juan
And well How do I get the some ethere for the testnet
?
Juan Blanco
@juanfranblanco
Nov 04 2017 08:57
you mine it
or you ask for it
depending on the testnet
just google the chain
RevVivek
@RevVivek
Nov 04 2017 08:58
I am currently on ropsten
Sure
Once again thanks
Juan Blanco
@juanfranblanco
Nov 04 2017 08:59
try the metamask one
RevVivek
@RevVivek
Nov 04 2017 09:07
No user account found
Juan Blanco
@juanfranblanco
Nov 04 2017 09:25
you need to install metamask