Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Add documentation/example with deployment on private geth chain #2795

Open
wbt opened this issue Jan 27, 2020 · 5 comments
Open

Add documentation/example with deployment on private geth chain #2795

wbt opened this issue Jan 27, 2020 · 5 comments

Comments

@wbt
Copy link
Contributor

wbt commented Jan 27, 2020

Issue

Available examples for truffle migrate focus on using a development blockchain like ganache or testrpc. An example should be given of deployment to a private geth node.

Specifically, this documentation addition should demonstrate how to connect to geth (examples show use of the HTTP RPC endpoint Geth can provide) while allowing an account to be unlocked sufficiently for truffle to do migrations. This should be with Geth >1.9.0, following Geth PR 17037 which prevents unlocking accounts when RPC/HTTP access to the node is enabled. The example should show instructions demonstrating a truffle migrate without the error authentication needed: password or unlock using Geth >1.9.0 as the blockchain node.

@wbt
Copy link
Contributor Author

wbt commented Jan 29, 2020

For anyone hoping to do a PR or find a solution on this, the instructions are roughly:

  • Use a Hierarchical Deterministic (HD) wallet provider such as MyEtherWallet to generate an HD wallet mnemonic. It may not be best for security to use one's primary MetaMask wallet mnemonic here.
  • Get the address of at least one account from that wallet, e.g. the first one.
  • Run geth with RPC enabled and without unlocking any accounts; make sure the RPC address is reflected in truffle-config.js
  • Make sure that address is funded (and sufficiently privileged to run any transaction in the migration, if applicable) before attempting to run a migration, whether from the genesis block or from subsequent transactions, on the chain you intend to deploy on.
  • Install HDWalletProvider and specify its use in truffle-config.js per documentation in that repo, with access to the same mnemonic and account index.

@gnidan
Copy link
Contributor

gnidan commented Jan 29, 2020

Thanks for submitting this, @wbt! Good to see you again 😄

@miguelmtzinf
Copy link

Hey, working on this for EthDenver, any insight about how the docs should be formatted? using markdown?

@wbt
Copy link
Contributor Author

wbt commented Feb 8, 2021

@miguelmartinezinf Thanks! Probably a format and location similar to the source of https://www.trufflesuite.com/docs/truffle/getting-started/running-migrations would be easiest to find.

@miguelmtzinf
Copy link

Work submitted for EthDenver! https://devfolio.co/submissions/custom-contract-deployment-with-truffle-docs-b738

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants