Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Markdown
highlightStylegithub
##RNode# RNode v0.2.1

This release of the RChain Node software includes the Rholang interpreter and message encryption.  This node has 3 modes in which it runs, P2P mode, where it participates in the RChain peer to peer network, and Interpreter mode with a REPL and Interpreter mode with support for running Rholang files.

# #QuickQuick Start


The REPL mode for the interpreter will accept Rholang code on the command line.  For example:

```
Medhas-MBP:~ medhaparlikar$$ docker run -ti rchain/rnode:dev --repl

> contract @"HelloWorld"(return) = {return!("Hello, World!")} |new myChannel in {@"HelloWorld"!(*myChannel)}

```

Pressing Enter will send the Rholang code for evaluation and print out the contents from storage:

```

Evaluating:
for( z0 <= @{ "HelloWorld" } ) { x0!("Hello, World!") } | new x0 in { @{ "HelloWorld" }!(*x0) }

Storage Contents:
@{ a865a21b-f3af-4c57-ad6f-fad61118ce0e }!("Hello, World!") | for( z0 <= @{ "HelloWorld" } ) { x0!("Hello, World!") }

```


If you want to run Rholang that is stored in a plain text file, use this command:

```

docker run -it --mount type=bind,source="$(pwd)"/file_directory,target=/tmp rchain/rnode --eval /tmp/filename.rho 

```

This command will run the node in interpreter mode and will make a directory on the local system available to the interpreter as a location where Rholang contracts can be executed.  When running your docker container, be aware of your current path - the "pwd" command sticks your current path in the bind command.



# #QuickQuick Start - P2P RNode

To run the node in P2P mode simply 
```
docker run -ti rchain/rchain-rnode
```

# #OptionsOptions