-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Doc on run Node without Docker
- Loading branch information
Showing
3 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Run Node Locally without Docker | ||
|
||
## Pre-requisites | ||
|
||
### Install | ||
|
||
[Docker](https://docs.docker.com/engine/install/) | ||
[Redis](https://redis.io/docs/install/install-redis/) | ||
[Cartesi Machine](https://github.com/cartesi/machine-emulator) | ||
[Server Manager](https://github.com/cartesi/server-manager) | ||
|
||
|
||
### Build Dependencies | ||
|
||
Some dependencies needs to be built. Open a shell and execute the command below: | ||
|
||
```shell | ||
make docker-build-deps | ||
``` | ||
|
||
|
||
### Save Machine Snapshot | ||
|
||
The Node needs an Application Cartesi Machine Snapshot to run. To save one locally, open a shell | ||
and excute the following command: | ||
|
||
```shell | ||
go run ./cmd/cartesi-rollups-cli/ save-snapshot | ||
``` | ||
|
||
This will save Snapshot for a default Echo Application. in order to save a Snapshot for a custom application | ||
please check cartesi-rollups-cli `save-snapshot` command docs | ||
|
||
|
||
## Run | ||
|
||
The Node confguration is done through Environment variables. To quick start with default values open a shell | ||
and execute the following command: | ||
|
||
```shell | ||
source ./setup_env.sh | ||
``` | ||
|
||
Once configured, start the dependencies, on a shell start the Server Manager with the following command: | ||
|
||
```shell | ||
server-manager --manager-address=0.0.0.0:5001 | ||
``` | ||
|
||
On other shell, start the other dependencies with the follwing command: | ||
|
||
```shell | ||
go run ./cmd/cartesi-rollups-cli/ run-deps | ||
``` | ||
|
||
Finally start the node by opening another shell and executing the node: | ||
|
||
```shell | ||
go run ./cmd/cartesi-rollups-node/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export CARTESI_POSTGRES_ENDPOINT=postgres://postgres:password@localhost:5432/postgres | ||
export CARTESI_BLOCKCHAIN_ID=31337 | ||
export CARTESI_BLOCKCHAIN_HTTP_ENDPOINT=http://localhost:8545 | ||
export CARTESI_BLOCKCHAIN_WS_ENDPOINT=ws://localhost:8545 | ||
export CARTESI_BLOCKCHAIN_IS_LEGACY=false | ||
export CARTESI_BLOCKCHAIN_FINALITY_OFFSET=1 | ||
export CARTESI_CONTRACTS_DAPP_ADDRESS=0x180763470853cAF642Df79a908F9282c61692A45 | ||
export CARTESI_CONTRACTS_DAPP_DEPLOYMENT_BLOCK_NUMBER=17 | ||
export CARTESI_CONTRACTS_HISTORY_ADDRESS=0xbCc4067dfdeE8274E531951f0968EC895f397A44 | ||
export CARTESI_CONTRACTS_AUTHORITY_ADDRESS=0xb090149a3cA43000681B74875500854B54355496 | ||
export CARTESI_CONTRACTS_INPUT_BOX_ADDRESS=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 | ||
export CARTESI_CONTRACTS_INPUT_BOX_DEPLOYMENT_BLOCK_NUMBER=17 | ||
export CARTESI_EPOCH_DURATION=120 | ||
export CARTESI_AUTH_MNEMONIC="test test test test test test test test test test test junk" | ||
export CARTESI_LOG_LEVEL=info | ||
export CARTESI_LOG_TIMESTAMP=false | ||
export CARTESI_FEATURE_HOST_MODE=false | ||
export CARTESI_FEATURE_READER_MODE=false | ||
export CARTESI_HTTP_ADDRESS=0.0.0.0 | ||
export CARTESI_HTTP_PORT=10000 | ||
export CARTESI_SNAPSHOT_DIR=$PWD/machine-snapshot | ||
|
||
rust_bin_path="$PWD/offchain/target/debug" | ||
# Check if the path is already in $PATH | ||
if [[ ":$PATH:" != *":$rust_bin_path:"* ]]; then | ||
export PATH=$PATH:$rust_bin_path | ||
fi |