Welcome Zstake Service
GenLayer
GenLayer Simulator
Copy
GenLayer Simulator Install Guide
Installation of GenLayer Simulator is still possible only in a GUI environment where a display is installed.
스크린샷 2024-09-30 오후 4.37.09.png
- Install docker, npm, nvm
1sudo apt update && sudo apt-get install openssl
1curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
1sudo usermod -aG docker $USER && newgrp docker
1sudo systemctl enable docker.service && sudo systemctl enable containerd.service
1curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
1echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bash_profile
2echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> $HOME/.bash_profile
3echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> $HOME/.bash_profile
4
5source $HOME/.bash_profile
1nvm install --lts
- Node,NPM version Check
1node -v
2npm -v
- Install GenLayer CLI
1npm install -g genlayer
- Execute the genlayer init Command
1genlayer init
스크린샷 2024-09-30 오후 4.33.31.png
When you run the genlayer init command, you'll receive a prompt to select which LLM providers you want to use. These LLM providers are used by validators to process and validate Intelligent Contracts. You can select one or multiple providers based on your needs and the API keys available to you. Here are the options available:
- OpenAI: Fastest and most reliable option for running validators. However, it requires an OpenAI API key(opens in a new tab) as it is a paid service.
- Ollama: Free and open-source option that runs locally but may perform slower than the others.
- Heurist: A decentralized inference provider for open-source AI models. It requires an API key, get free API credits at dev-api-form.heurist.ai(opens in a new tab) with referral code: "genlayer".
Check Simulator
스크린샷 2024-09-30 오후 4.35.36.png
1genlayer up
This command allows you to launch the simulator with a previously initialized environment and configuration. You can use the following options to customize the simulator launch:
- -reset-validators: This option removes all current validators and creates new random ones, useful for testing different validator scenarios in development.
- -numValidators <number>: Specify the number of validators to start, defaulting to 5.
- -branch <branch>: Specify the branch from which to start the GenLayer Simulator, defaulting to "main".