Skip to content

Commit

Permalink
docs: Add README for sui-node deterministic builds (#18598)
Browse files Browse the repository at this point in the history
relates to: #13476

## Description 

Document process for building deterministic `sui-node` binaries on Mac +
Linux

## Test plan 

* Followed steps in newly created README.md
  • Loading branch information
jnaulty authored Jul 10, 2024
1 parent 9b8a5ae commit 4049268
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docker/sui-node-deterministic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Sui Node Deterministic Build

## General Requirements
* Requires Docker `>=v26.0.1`
* OCI-Compliant buildx `docker-container`:
* `docker buildx create --driver 'docker-container' --name stagex --use`
* `docker use --bootstrap stagex`

## MacOS Requirements
* ensure previous requirements, `Builders` should look like:
![alt text](./images/image-2.png)

* in `General`, Enable `containerd for pulling and storing images`
![Docker Engine General Settings](./images/image.png)

* disable Rosetta
![alt text](./images/image-1.png)

## Build Steps
In Root Directory, run: `./docker/sui-node-deterministic/build.sh`

Build artifact is output in: `build/oci/sui-node`

Load the image with the command: `(cd build/oci/sui-node && tar -c .) | docker load`

## Extract sui-node Binary

### Find sui-node binary

Find oci blob with sui-node binary (it is the largest blob in `build/oci/sui-node/blobs/sha256`)
`ls -lSh build/oci/sui-node/blobs/sha256`

### Extract sui-node Binary

Extract `sui-node` binary from blob:
`tar xf build/oci/sui-node/blobs/sha256/<blob-digest>`

### Get digest of sui-node.

On Linux run:
`sha256sum opt/sui/bin/sui-node`

On MacOS run:
`shasum -a 256 opt/sui/bin/sui-node`
Binary file added docker/sui-node-deterministic/images/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker/sui-node-deterministic/images/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker/sui-node-deterministic/images/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4049268

Please sign in to comment.