Skip to content

Instantly share code, notes, and snippets.

@gringineer
Last active March 10, 2021 01:45
Show Gist options
  • Save gringineer/e184155f251ba01ca3420d9f8f5575d0 to your computer and use it in GitHub Desktop.
Save gringineer/e184155f251ba01ca3420d9f8f5575d0 to your computer and use it in GitHub Desktop.

Start With Grin

The Four Agreements:

Be Impeccable With Your Word 
Don't Take Anything Personally
Don't Make Assumptions
Always Do Your Best

Walk Through: Create Local Grin Development Enviroment

This walkthough will create an enviroment for development with grin locally.

Note:

  • chain_type in your grin-wallet.toml and grin-node.toml are set to UserTesting which means that you will run a grin blockchain local to your computer.
  • run_test_miner is set to true to mine coins. If you're interested in mining on floonet or mainnet check out grin-miner.

Download grin binaries

  1. grin
  2. grin-wallet

Extract grin and grin-wallet

Run

./grin --usernet

  • ./chain_data is responsible for housing the blockchain
  • grin-server.log output of the grin process

Open /{{grin-dir}}/grin-server.toml

change run_test_miner from false to true

uncomment test_miner_wallet_url

edit test_miner_wallet_url port to {{grin-wallet.toml}}.owner_api_listen_port

e.g.
#test miner wallet URL (burns if this doesn't exist)
test_miner_wallet_url = "http://127.0.0.1:3420"

Run

./grin-wallet --usernet init

Follow the prompts

  • ./wallet_data wallet information
  • grin-wallet.log output of the grin wallet process
  • .api_secret secret for encrypting traffic between the grin and grin-wallet
  • .owner_api_secret secret for encrypting owner (and foreign) api traffic

Run

./grin-wallet --usernet owner_api --run_foreign

The grin-wallet --usernet --run_foreign owner_api command will start both the owner and foreign api listeners on the owner api port

You can find documentation about the grin-wallet cli and rpc below:

Work Together

Encourage An Ecosystem Of Creativity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment