These are chat archives for Nethereum/Nethereum

13th
May 2018
Stef Heyenrath
@StefH
May 13 2018 14:51

I've a Ethereum Consortium Blockchain running on Azure (based on a older version from some months ago).
And it seems that when I use an invalid password, I'm still able to use

var managedAccount = new ManagedAccount(account.Address, account.Password);
var web3 = new Web3Geth(managedAccount, _settings.Endpoint);

And execute function calls on a smart contract ?

Juan Blanco
@juanfranblanco
May 13 2018 16:02
Interesting, I guess the main account is unlocked on start
Stef Heyenrath
@StefH
May 13 2018 17:50
@juanfranblanco Actually all accounts which I use besides the contract owner can just use that code without using the correct password. Could it be that geth (which is running on the TX node and Miner Nodes) does not validate the password?
Scot Wallace
@nestforce
May 13 2018 17:52
Hi, I keep getting an error saying that Invalid filter input for current event, use CreateFilterInput
The contract has been on Blockchain for months, I am not sure when it began experiencing this error.
seems that the error is out from CreateFilterInput(param1, param2 ...)
Juan Blanco
@juanfranblanco
May 13 2018 18:04
@StefH hmmm, but how are the getting signed?
The account should be unlocked
Mainly the keystone file decrypted
Keystone*
(damn autocorrect)
@nestforce there is a validation in place that checks the filter is for the contract / event
Scot Wallace
@nestforce
May 13 2018 18:09
but it worked
Juan Blanco
@juanfranblanco
May 13 2018 18:09
Mainly you need to use Eth.GetContract(address, abi) top of my head
And contract.getEvent("event name")
From there create the filter
Scot Wallace
@nestforce
May 13 2018 18:11
This is how I am doing
my situation is that my application has been running online for over 6 months, it always worked and it has never been changed during these 6 months
and not sure from when, it doesn't work
only upgraded to 2.4.0 I think
Stef Heyenrath
@StefH
May 13 2018 18:39
@juanfranblanco
Do I need to unlock accounts when I call a function, and lock account when done?
For example, is this code needed? web3.Personal.UnlockAccount.SendRequestAsync(account.Address, account.Password, 120).Result;
Scot Wallace
@nestforce
May 13 2018 18:48
Now Nethereum.JsonRpc.Client.RpcClient.SendAsync keeps throwing exception
error when sending JsonRpc requests
Stef Heyenrath
@StefH
May 13 2018 18:49
@nestforce Do you use a private or public blockchain?
Scot Wallace
@nestforce
May 13 2018 18:49
rinkeby
Juan Blanco
@juanfranblanco
May 13 2018 18:57
@nestforce the extra validation was put to avoid you getting events from other contracts
Scot Wallace
@nestforce
May 13 2018 18:58
now I replace CreateFilterInput with CreateFilterAsync, no that error anymore
but it keeps throwing JsonRpc error when
sending requests
Juan Blanco
@juanfranblanco
May 13 2018 18:59
Are you testing with Indira?
Infura
Scot Wallace
@nestforce
May 13 2018 18:59
rinkeby
yes
Juan Blanco
@juanfranblanco
May 13 2018 19:00
Infura does not allow filters
You can get logs
Scot Wallace
@nestforce
May 13 2018 19:01
when did they block filters ?
Juan Blanco
@juanfranblanco
May 13 2018 19:01
Forever as they cannot keep track
With all users and load balancing
Scot Wallace
@nestforce
May 13 2018 19:02
okay then, how can I get event logs with Nethereum ? any sample code ?
Stef Heyenrath
@StefH
May 13 2018 19:04
@juanfranblanco I observed something strange (at least strange for me...)
  • When just calling functions, the password is not used?
  • When executing transactions, the correct password is required?
@nestforce
@StefH yes that is correct
Calls don't need a password
The password is to decrypt the keystore file, retrieve the private key and sign transactions
Scot Wallace
@nestforce
May 13 2018 19:07
@juanfranblanco according to the book, it still demo how to use filter
Juan Blanco
@juanfranblanco
May 13 2018 19:08
Yes needs to be corrected, even if you create a filter
You do GetAllChanges from the logs
So there is no subscription
Scot Wallace
@nestforce
May 13 2018 19:09
so I need to get all logs and filter them by myself ?
Juan Blanco
@juanfranblanco
May 13 2018 19:11
Actually the workbook is fine, there was and old one that said something different
Scot Wallace
@nestforce
May 13 2018 19:12
now I notice that GetAllChanges takes at least 1 parameter, but if the filter is disallowed, how can I do with this method ?
EKostan
@EKostan
May 13 2018 20:36
hello how I can convert transaction parametr to string for using TransactionInput ?
I want send many transaction and change nonce custom
but I cant find how fill TransactionInput.Data
EKostan
@EKostan
May 13 2018 20:47
I find function.CreateTransactionInput function
thx all