These are chat archives for Nethereum/Nethereum

28th
Mar 2017
Juan Blanco
@juanfranblanco
Mar 28 2017 04:04
yes use EthEstimateGas
or if you get the latest source code you can use something like this
Evobolics Digital, LLC
@evo01
Mar 28 2017 13:28
Thanks Juan. Really much appreciated.
Evobolics Digital, LLC
@evo01
Mar 28 2017 14:04
did web3.Miner move?
I am not seeing the property when I load the packages
Evobolics Digital, LLC
@evo01
Mar 28 2017 14:10
Ok, it looks like the Miner property was moved to a new class named Web3Geth
on Feb6; big changes. :) A coder after my own heart.
Evobolics Digital, LLC
@evo01
Mar 28 2017 14:47
Juan, I am running your example, and I am stuck on the following line of code:

var senderAddress = "0x12890d2cce102216644c59dae5baed380d84830c";
var password = "password";
var web3Geth = new Web3Geth();

var unlockAccountResult = await web3Geth.Personal.UnlockAccount.SendRequestAsync(senderAddress, password, new HexBigInteger(120));

I am getting the runtime error: Nethereum.JsonRpc.Client.RpcResponseException: 'invalid argument 2: json: cannot unmarshal string into Go value of type uint64'
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:26
Found the issue here: Nethereum/Nethereum#103
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:36

Ok, if I changed the code to:
var unlockAccountResult = await web3.Personal.UnlockAccount.SendRequestAsync(senderAddress, password, 120);

It works and returns true

Juan Blanco
@juanfranblanco
Mar 28 2017 15:36
yes Geth has changed from hex to integer
if you are using the new version of Nethereum
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:37
Yeah I am using the 2.0 rc
Juan Blanco
@juanfranblanco
Mar 28 2017 15:37
you can use new Web3(new ManagedAccount(addresss, password))
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:38
what code does that replace?
just the constructor?
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:38
I noticed I had to use Web3Geth
to have the Miner property
Juan Blanco
@juanfranblanco
Mar 28 2017 15:39
yes
that is because Parity behaves differently
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:39
I am making progress :)
Juan Blanco
@juanfranblanco
Mar 28 2017 15:39
so Miner is geth specific for management
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:39
So much learning to do: I am not even sure what parity is yet
Juan Blanco
@juanfranblanco
Mar 28 2017 15:39
ah that is another client
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:40
I told my wife I feel like I am back in graduate school again
Juan Blanco
@juanfranblanco
Mar 28 2017 15:40
yeah it is a steep learning curve.. but lots of fun
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:40
It feels like I have 10 videos / papers / blogs to read a night
well it is the most fun I have had in last 5 years
at least from a coding challange stand point
Juan Blanco
@juanfranblanco
Mar 28 2017 15:41
yes that is true
it is not just moving data around
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:42
it makes pretty much most other financial tech applications looks simple by comparision
Juan Blanco
@juanfranblanco
Mar 28 2017 15:42
well it is a different paradigm
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:42
ok, so I am running geth on a surface pro 4
and with visual studio
and it is totally pegging this machine
Juan Blanco
@juanfranblanco
Mar 28 2017 15:43
now you can put the complex rating calculations in solidity
ah stop mining
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:43
but don't I need that to run the sample?
Juan Blanco
@juanfranblanco
Mar 28 2017 15:44
well if you are just working on your own private net
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:44
been starting and stopping geth
Juan Blanco
@juanfranblanco
Mar 28 2017 15:44
you can start and stop mining
also you can use testrpc
which is a similator written in javascript
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:45
does this allow me to run the testnet on a different machine?
Juan Blanco
@juanfranblanco
Mar 28 2017 15:46
well you can run the testnet anywhere
the embedded in Nethereum is to run integration tests
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:47
ok, so I can just intialize the web3 with a different ip address and port
Juan Blanco
@juanfranblanco
Mar 28 2017 15:47
just run it with node
yeah
also it is a bit of a pain to install in windows
so if you have the ubuntu bash
run it there
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:48
sounds like anohter side project to knock out :)
Juan Blanco
@juanfranblanco
Mar 28 2017 15:48
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:49
where can i get information on account unlocking, does unlocking really just mean login to the account?
Juan Blanco
@juanfranblanco
Mar 28 2017 15:49
mainly the account is unlocked
using the password
so the private key is stored in memory for that duration
to sign the transactions
if you use the latest version
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:50
ok, so unlocked means private key is in memory for a bit to sign the transactions; make sense.
I am using geth 1.5.9
Juan Blanco
@juanfranblanco
Mar 28 2017 15:50
what happens underneath is that uses personal_sendTransaction
which is "better" as the private key is only used for that transaction
using the password provided
but you can always sign your transaction offline
and point to Infura
which is a public node
and work on the public testnet
finally if you are interested in Enterprise check Quorum
Evobolics Digital, LLC
@evo01
Mar 28 2017 15:59
ok, going to digest all of this :)
Juan Blanco
@juanfranblanco
Mar 28 2017 15:59
:)
Evobolics Digital, LLC
@evo01
Mar 28 2017 16:00
again thanks for the help
much appreciated
Evobolics Digital, LLC
@evo01
Mar 28 2017 16:07
Ok, I executed the first example all the way through
this afternoon I am going to see if I can get the local test net to work on a remote computer and figure out gas a bit more
be back later
some gas info
Evobolics Digital, LLC
@evo01
Mar 28 2017 21:39
Well putting geth on a machine with a intel extreme, made a huge difference in speed; takes about 24 secoonds on that machine to run the entire test example with mining versus 49s with surface pro