|
|
@@ -65,6 +65,54 @@ Tear down cluster:
|
|
|
|
|
|
Once you're done, press Ctrl-C. Run `tilt down` to tear down the devnet.
|
|
|
|
|
|
+## Getting started on a development VM
|
|
|
+
|
|
|
+This tutorial assumes a clean Debian >=10 VM. We recommend at least **16 vCPU, 64G of RAM and 500G of disk**.
|
|
|
+Rust eats CPU for breakfast, so the more CPUs, the nicer your Solana compilation experience will be.
|
|
|
+
|
|
|
+Install Git first:
|
|
|
+
|
|
|
+ sudo apt-get install -y git
|
|
|
+
|
|
|
+First, create an SSH key in your shell:
|
|
|
+
|
|
|
+ ssh-keygen -t ed25519
|
|
|
+ cat .ssh/id_ed25519.pub
|
|
|
+
|
|
|
+You can then [add your public key on Gerrit](https://forge.certus.one/settings/#SSHKeys) and [clone the repository](https://forge.certus.one/admin/repos/wormhole) in your shell. The clone command should look like this:
|
|
|
+
|
|
|
+```shell
|
|
|
+# don't copy this - copy it from Gerrit instead
|
|
|
+git clone "ssh://yourusername@forge.certus.one:30322/wormhole" && scp -p -P 30322 yourusername@forge.certus.one:hooks/commit-msg "wormhole/.git/hooks/"
|
|
|
+```
|
|
|
+
|
|
|
+Configure your Git identity to match your Gerrit name and email:
|
|
|
+
|
|
|
+ git config --global user.name "Your Name"
|
|
|
+ git config --global user.email "yourname@company.com"
|
|
|
+
|
|
|
+*If you are a Jump Crypto employee, make sure to log into Gerrit using Azure SSO using your
|
|
|
+jumptrading.com email address and request Gerrit review permissions in #wormhole-dev on Slack.*
|
|
|
+
|
|
|
+You can then use our regular Git and Gerrit workflow as detailed in [Submit change for review](./CONTRIBUTING.md#Submit change for review).
|
|
|
+
|
|
|
+### Set up devnet on the VM
|
|
|
+
|
|
|
+After cloning the repo, run the setup script:
|
|
|
+
|
|
|
+ scripts/devnet-setup.sh
|
|
|
+
|
|
|
+You then need to close and re-open your session to apply the new environment.
|
|
|
+If you use persistent SSH sessions, make sure to kill the session before reconnecting.
|
|
|
+
|
|
|
+You can then run tilt normally (see above).
|
|
|
+
|
|
|
+The easiest way to get access to the Tilt UI is to simply run Tilt on a public port, and use a firewall
|
|
|
+of your choice to control access:
|
|
|
+
|
|
|
+ tilt up --host=0.0.0.0 --port=8080
|
|
|
+
|
|
|
+## Tips and tricks
|
|
|
|
|
|
### Post messages
|
|
|
|
|
|
@@ -77,21 +125,25 @@ To Solana as CPI instruction:
|
|
|
kubectl exec solana-devnet-0 -c setup -- client post-message --proxy CP1co2QMMoDPbsmV7PGcUTLFwyhgCgTXt25gLQ5LewE1 Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o 1 confirmed ffff
|
|
|
|
|
|
|
|
|
-## IntelliJ Protobuf Autocompletion
|
|
|
+### IntelliJ Protobuf Autocompletion
|
|
|
+
|
|
|
+Locally compile protos to populate the buf cache:
|
|
|
+
|
|
|
+ make generate
|
|
|
|
|
|
Set the include path:
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
-## BigTable event persistence
|
|
|
+### BigTable event persistence
|
|
|
|
|
|
Guardian events can be persisted to a cloud BigTable instance by passing a GCP project and service account key to Tilt.
|
|
|
Launch the devnet with flags supplying your database info to forward events to your cloud BigTable, rather than the local devnet BigTable emulator:
|
|
|
|
|
|
tilt up -- --num=1 --gcpProject=your-project-id --bigTableKeyPath=./your-service-account-key.json
|
|
|
|
|
|
-## bridge UI
|
|
|
+### bridge UI
|
|
|
|
|
|
Run the bridge UI in devnet by supplying the `--bridge_ui` flag:
|
|
|
|