These are chat archives for Nethereum/Nethereum

Jan 2018
Jason Bert
Jan 22 2018 09:12
@juanfranblanco yeah had the private keys, it was more how to use them via Nethereum. Found out though, creating an Account object and passing it into the Web3 constructor.
Jan 22 2018 09:57
Kevin Small
Jan 22 2018 11:01
@CineTekDev_twitter very impressive, chain monsters looks great. I read the white paper and have a question. How often is the player asked to send Ether to pay for the transactions that interact with the smart contracts? Reading data from the contracts is free, right? But if I find a new monster or have a fight I guess a transaction has to happen and the player will pay some Ether.
Maximilian Weber MWC
Jan 22 2018 12:14
@KevinSmall Good question! We will limit the moveToArea transactions to a minimum which is only necessary when you travel to a far away area or walk/drive/move for like 10 minutes or so - we are actively working on integrating new technologies and hope that Plasma for example is going to be production ready (well at least for our use case) soon
our battle system did not work very well with Ethereum right now so we postponed it
I'll release a new blog post today tackling these and more questions
Juan Blanco
Jan 22 2018 12:37
@CineTekDev_twitter I forgot you want to submit many transactions the simplest way is to use a single instance of Web3 or use a single nonce provider / service. Everything else should be fine.
@jasonbert cool :)
Jan 22 2018 12:44
I am getting a Method not Allowed exception when creating a filter for an event:
var web3 = new Web3("");
web3.TransactionManager.DefaultGas = BigInteger.Parse("210000");
web3.TransactionManager.DefaultGasPrice = Transaction.DEFAULT_GAS_PRICE;
var contract = web3.Eth.GetContract(abi, contractAddress);
var gtEvent = contract.GetEvent("GetTransaction");
var filterAllGetEvent = await gtEvent.CreateFilterAsync();
The contract is deployed to ropsten testnet
Juan Blanco
Jan 22 2018 12:51
Yes infura does not support filters (as they are session specific)
You need to use GetAllChanges (which uses get logs) passing a block range
Jan 22 2018 12:52
@juanfranblanco Thank You:)
Is this the same scenario with infura main net?
Juan Blanco
Jan 22 2018 12:58
Yes it is
Michael Herman (Toronto)
Jan 22 2018 21:08
@juanfranblanco Is Nethereum (and the underlying infrastructure) thread-safe? I've written some multi-threaded block downloading code (using .NET Task's actually) and have run into some problems. For example, should each Task create its own Web3 object? ...or should they share the same one?
or this
only issue about multithreading is handling Nonces for signing
rest should be fine
Michael Herman (Toronto)
Jan 22 2018 21:18
I've completed some more testing and found that it was better to have a separate Web3 instance for each Task; else I was running into issues with the calls hanging. I'm running against the latest version of geth.exe runing against mainnet. It was OK on a slower laptop but now I'm testing on a faster CPU with an SSD drive. Everything runs many times faster but I was running into hanging issues until I started to use separate Web3 objects.
The main Task is mostly downloading BlocksWithTransactions while the second Task is mostly executing GetCode() calls to determine whether a particular address is an Account or Contract address. The latter calls were hanging.
Juan Blanco
Jan 22 2018 21:33
using ipc or http
Michael Herman (Toronto)
Jan 22 2018 23:29
@juanfranblanco HTTP ...which is reliable and more performant? that order :-)