Code is compiled against Go 1.11.x.
In addition, we expect the following tools, which are present in the development docker environment:
- golangci-lint
- protoc
- protobuf Version 1.1.0
You can build everything by running:
make
If you want to run individual steps, the following steps are used for compilation:
make generate
make build
To lint run:
make lint
In addition to implementing the Ekiden node, the ekiden
command also
implements various sub-commands for the purpose of interacting with the
node, development, and debugging.
All sub-commands have online documentation that can be accessed via the
--help
parameter, for example:
ekiden debug dummy set-epoch --help
The debug dummy
sub-command provides faclities for controlling the centralized
node during tests.
The dummy set-epoch
sub-command allows the node's Oasis epoch to be
set to an arbitrary value, provided a compatible epochtime backend is
being used (mock
, tendermint_mock
).
ekiden debug dummy set-epoch -e 2600 # Set the epoch to 2600
The dummy wait-nodes
sub-command will block until the requested number
of compute worker nodes have registered.
ekiden debug dummy wait-nodes -n 5 # Wait until 5 compute nodes register
The registry
sub-command provides faclities for interacting with the
various registries.
The registry list-runtimes
sub-command will dump the runtime IDs of all
currently registered runtimes as newline deliniated hexadecimal strings.
ekiden registry list-runtimes
The debug roothash
sub-command provides facilities for interacting with the
root hash backend.
The roothash export
sub-command will fetch the current root hash block(s)
for the requested runtime IDs and write them in a binary serialized format,
suitable for use with the main ekiden
command's --roothash.geneisis-blocks
argument.
WARNING: The root hash block serialization format is deliberately opaque,
unstable, and unspecifed. Root hash blocks exported via this command are
NOT guaranteed to be compatible across different versions of the
ekiden
command.
RUNTIME_ID = 0000000000000000000000000000000000000000000000000000000000000000
ekiden debug roothash export $RUNTIME_ID # Export to stdout
ekiden debug roothash export $RUNTIME_ID -o roothash.bin # Export to roothash.bin
The storage
sub-command provides facilities for interacting with the
immutable content addressed blob store.
The storage export
sub-command will fetch the entire contents of storage
and write them in a binary serialized format, suitable for use with the
storage import
sub-command. No attempt is made to gracefully handle
the possibility of storage being altered while the export is in progress.
WARNING: The storage serialization format is deliberately opaque,
unstable, and unspecified. Storage contents exported via this command
are NOT guaranteed to be compatible across different versions of the
ekiden
command.
ekiden storage export -log.file=/tmp/export.log # Export to stdout (MUST log to file.)
ekiden storage export -o storage.bin # Export to storage.bin
The storage import
sub-command will insert the contents of a storage
dump generated by the storage export
sub-command into storage. Due to
the relative nature of the storage value expiry, the current epoch MUST
be specified via --current-epoch
for expiration times to be correct.
ekiden storage import --current_epoch 23 # Import from stdin
ekiden storage import -i storage.bin --current_epoch 190 # Import from storage.bin