These are chat archives for Nethereum/Nethereum

3rd
Nov 2017
Tatigo
@tatigo
Nov 03 2017 03:54
Getting error: Nethereum.JsonRpc.Client.RpcResponseException: The method personal_unlockAccount does not exist/is not available
Any ideas why?
trying to unlock account of a private network
Tatigo
@tatigo
Nov 03 2017 04:56
@ChinhPLQ thanks a million for your unswer on stackoverflow!! I would be getting nowhere without it !!
RobinsonKurian
@Robinson031790_twitter
Nov 03 2017 07:25
halo, Nethereum account creation code in uwp..
Pls suggest any links for Nethereum account creation/transactions in uwp Projects...
Juan Blanco
@juanfranblanco
Nov 03 2017 09:30
@ilyadruzhinin you won't overpay, any amount provided over the limit it will refunded
@tatigo you need to setup geth with personal permissions
l-vitall
@l-vitall
Nov 03 2017 09:32
@juanfranblanco , it must be answer for my question about overpay. But I do not want refund, I need to transfer the balance and not to use the address anymore
Juan Blanco
@juanfranblanco
Nov 03 2017 09:32
@tajzeeshan_twitter if you use the same web3 / with the same transaction manager it will manage internally the count of of your nonces
ah you want to do a full transfer of all funds
@l-vitall
check the Nethereum.Console as it does that functionality
l-vitall
@l-vitall
Nov 03 2017 09:34
@juanfranblanco ok, thanks
Juan Blanco
@juanfranblanco
Nov 03 2017 09:34
all that will be moving to a generic "Wallet" management library
currentAmount - (web3.TransactionManager.DefaultGas * web3.TransactionManager.DefaultGasPrice);
i thought I should find it for you
l-vitall
@l-vitall
Nov 03 2017 09:37
I'm using it already, but I'm not sure these values are always the best ones
Juan Blanco
@juanfranblanco
Nov 03 2017 09:38
well you can get the overall gas price
from the previous blocks
l-vitall
@l-vitall
Nov 03 2017 09:41
I worked with bitcoin before and there is some fee per transaction byte is used. Depending on that I can control the expected confirmation time. But here I do not see any similar logic.. it looks like I should use some universal gas price, correct?
Juan Blanco
@juanfranblanco
Nov 03 2017 09:41
ah ok
if you want to speed up your transactions etc
(confirmation time, mining etc)
that will help you
so like i said you can adjust the price based on the previous blocks
l-vitall
@l-vitall
Nov 03 2017 09:45
Ok, now I see, thank you. I do not need to estimate transaction size, just to change the gas price
Juan Blanco
@juanfranblanco
Nov 03 2017 09:45
well if you are just transfering amounts (wei / ether) yes
but if you calling a contract then you need to know the gas usage
l-vitall
@l-vitall
Nov 03 2017 09:47
yes, I had an error when tried to do so. For test I just used a big fee value, so is there a better way to estimate it?
Juan Blanco
@juanfranblanco
Nov 03 2017 09:47
the average of previous blocks
l-vitall
@l-vitall
Nov 03 2017 09:48
same for DeployContract?
Juan Blanco
@juanfranblanco
Nov 03 2017 09:48
the price is not related to the gas usage
so in simple terms (i hope)
l-vitall
@l-vitall
Nov 03 2017 09:51
web3.Eth.DeployContract.SendRequestAsync() receives the gas and balance. Should I use the same average gas here? It is failing if gas value is not sufficient
And what is the balance here, is it the default balance of contract?
Juan Blanco
@juanfranblanco
Nov 03 2017 09:51
when you transfer an amount, the gas usage will be always the same
but you can adjust the gas price to be mined faster
when you deploy a contract, the gas usage will depend based on the size of the contract (storage), and calculations / and other storage carried out in the constructor
you can use EstimateGas for this, but the truth is that Geth does not always get it right
in a similar way you can adjust the gas price to be mined faster
normally the default gas price will be used
and valid if there is not a major event happening in the network
like an ICO
launch etc
in any testnet you will get an understanding of how much gas you used to deploy a contract, if using the same constructor parameters
hopefully that helps :D
l-vitall
@l-vitall
Nov 03 2017 09:57
It greatly helps, thank you ) I will keep my tests.
Juan Blanco
@juanfranblanco
Nov 03 2017 09:58
great :)
Tatigo
@tatigo
Nov 03 2017 12:45
@juanfranblanco thanks I figured that , thanks to ChinhPLQ. what are the alternatives for using RPC ? I'm on azure network.
Juan Blanco
@juanfranblanco
Nov 03 2017 12:46
ipc
in azure you will mainly setup your own blockchain consortium and will interact with one of the clients using rpc
http
Tatigo
@tatigo
Nov 03 2017 12:48
need to do some home work on what is ipc. for now rpc worked, but was reading there are security issues etc
Juan Blanco
@juanfranblanco
Nov 03 2017 12:48
ipc will not be the usual way, but you could ssh or map the file
ah
Tatigo
@tatigo
Nov 03 2017 12:49
like having a script to ssh?
Juan Blanco
@juanfranblanco
Nov 03 2017 12:49
mainly you shouldn't open
unlock your accounts in a live environment
what you would do is sing the transactions before hand and send them to one of the clients to be processed / include in one of the blocks / etc
what you read is the scenario that you are mining
and also open your clients for rpc
and you unlock your account
which will mean that anyone can use the simple sendTransaction and you as a client signit
now how you manage your private key is another story :)
as and end user or as a system
Tatigo
@tatigo
Nov 03 2017 12:53
i'm on a private network and the webapi i'm doing it from is secured.. i guess it's still not enough for huckers to crack it open.. but ssh from script to unlock account sounds the same to me.
Juan Blanco
@juanfranblanco
Nov 03 2017 12:54
yes exactly
so where do you put your private keys?
:)
Tatigo
@tatigo
Nov 03 2017 12:54
don't decided yet :)
Juan Blanco
@juanfranblanco
Nov 03 2017 12:55
well don't tell me
:)
Tatigo
@tatigo
Nov 03 2017 12:55
I can tell you, this is a POC network ;)
Juan Blanco
@juanfranblanco
Nov 03 2017 12:55
ok, you can leverage AD
security to isolate services
you can store them in Key Vault
Tatigo
@tatigo
Nov 03 2017 13:26
do I need to call MinerStart to deploy contract on private network?
FirefightGI
@FirefightGI
Nov 03 2017 19:58
So it turns out Unity can interface with native and managed (.NET) C++ DLLs so all I need to do is package Solidity into DLLs for import into Unity, I hope fingers crossed otherwise I'll figure out a way to convert to C# or write a C# wrapper for Solidity cpp.
If it works I'll provide the Unity DLLs for Solidity for anyone else who needs to use the compiler.