This may be outside the scope of this forum, but I thought I’d give this a shot.
I’m setting up a private network using Geth. The consensus algorithm is Proof of Authority, and Geth docs indicate that an “unlocked” account is required for sealing blocks.
I also want to communicate with the node via http, and so I get a fatal error that I cannot unlock an account when using HTTP.
I would like some help understanding if there is another way my DApp (front end) can communicate with the private network so I can unlock this sealer account successfully.
I have mostly only spun up Proof of Authority networks hosted on Microsoft Azure, so this isn't something I am that familiar with. (which when I last used Azure about two years ago was pretty straight forward).
I assume that the sealer account is unlocked via the command line for each Geth node whilst your dapp interacts with the node just like interacting with a public node, though you would need to fund any accounts used by your dapp (assuming that gas has a non-zero fee), such as funding an account in the genesis block.
To set up Geth for signing blocks in proof-of-authority mode, a signer account must be available. The account must be unlocked to mine blocks. The following command will prompt for the account password, then start signing blocks:
Thanks for the quick reply. I am on that discord, but unfortunately it isn’t very active, so I am not hopeful for a reply =\
I have read through those docs several times. I also tried using CLEF to sign the blocks, though they neglect to say that the account password is requested each time it has to sign I will be playing around with CLEF more, as I understand geth prefers clef for user management and signing.
Now yesterday I learned that using http defaults to only allowing requests from localhost, so I was able to get things working with the following flags:
I didn’t use these flags:
–http --http.corsdomain “*”
So it was important to not start the http server (–http) and certainly not allow requests from any domain. Just stating the port I wanted (–http.port 123) ensured geth was only reachable on my local machine, and thus didn’t pose a security risk.