1

While working on the ethereum , I come out with the issue of out of memory because of multiple transaction execution concurrently . The main reason was , i was unlocking account of that user every time which take too much of memory , if i do contract function execute (transaction) without unlocking the account in code and unlock account in geth by

personal.unlockAccount("address","password")

and then run transaction it execute smoothly over 500 transaction / sec . How can i unlock account everytime or give me better solution how to unlock account so that i can overcome with out off memory problem ?

Himanshu sharma
  • 782
  • 7
  • 19
  • Refer to the usage of the password file and --password in http://ethereum.stackexchange.com/questions/9178/how-to-call-library-function-from-a-contract-error-the-contract-code-could/9181#9181 – BokkyPooBah Jan 16 '17 at 05:50
  • @BokkyPooBah can it will we possible that geth is running and when a new account create , how it can be unlock automatically . So that i have to not unlock account everytime when i run code of contract. – Himanshu sharma Jan 16 '17 at 06:04
  • @BokkyPooBah geth --unlock firstaddress,secondaddress,.. --password <passwordFile> will unlock all address written here and If i want the newAddress also unlock what should i do so that it will we also get unlock . – Himanshu sharma Jan 16 '17 at 06:31
  • doing that is a potential risk, you will have to figure out a way if you actually want to use this in production right? – niksmac Jan 16 '17 at 08:41

1 Answers1

0

What about using signed transactions?

With ethereumjs-tx you can sign transaction using the public key generated by geth.

You will no longer need to either manually or programmatically unlock accounts.

You then use web3.eth.sendRawTransaction to submit transactions.

simonDos
  • 366
  • 1
  • 2
  • 9