Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Latest commit

 

History

History
76 lines (58 loc) · 2.55 KB

README.md

File metadata and controls

76 lines (58 loc) · 2.55 KB

Oasis Eth/WASI Runtime

Build status Coverage Status

Contributing

See the Oasis Core Contributing Guidelines.

Security

Read our Security document.

Setting up the development environment

First, make sure that you have everything required for Oasis Core installed by following the instructions.

For building and running the runtime, you need to have Oasis Core artifacts available. To do this, you can either:

  • Build Oasis Core locally by checking out the oasis-core repository (e.g., in /path/to/oasis-core) and then running make -C /path/to/oasis-core. After the process completes you can then run make symlink-artifacts OASIS_CORE_SRC_PATH=/path/to/oasis-core and all the required artifacts will be symlinked under .oasis-core and .runtime.

  • Download Oasis Core artifacts from a release (for currently supported release see OASIS_CORE_VERSION file), and then set OASIS_NODE=/path/to/oasis-node, OASIS_NET_RUNNER=/path/to/oasis-net-runner and OASIS_CORE_RUNTIME_LOADER=/path/to/oasis-core-runtime-loader environment variables.

In the following instructions, the top-level directory is the directory where the code has been checked out.

Building the runtime (unsafe non-SGX environment)

To build everything required for running the runtime, simply execute in the top-level directory:

$ export OASIS_UNSAFE_SKIP_AVR_VERIFY="1"
$ export OASIS_UNSAFE_SKIP_KM_POLICY="1"
$ make

Running the web3 gateway

To run a local Oasis network "cluster" and a development version of the web3 gateway, run:

$ make run-gateway

This command will launch a gateway with web3 RPC endpoints on ports 8545 (http) and 8555 (WebSocket). For example,

curl -s \
    -X POST \
    http://127.0.0.1:8545 \
    -d @- \
    --header "Content-Type: application/json" \
    <<EOF
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0x1cca28600d7491365520b31b466f88647b9839ec",
    "latest"
  ]
}
EOF

Should give a result like

{"jsonrpc":"2.0","result":"0x56bc75e2d63100000","id":1}