-
Notifications
You must be signed in to change notification settings - Fork 12
docs: testnet with tee support guide #1604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+561
−1
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d520399
WIP before rebase
barakeinav1 79ca9a9
ip fix
barakeinav1 19d1271
hash update
barakeinav1 36083e0
some updates
barakeinav1 73b3d87
dashboard
barakeinav1 e6aaa5b
adding scripts
barakeinav1 9aee5b9
update vote commands
barakeinav1 4e92669
update get allow hashes command
barakeinav1 3cf8003
use latest image tag
DSharifi a9ca58f
comment out EXTERNAL_MPC_DECENTRALIZED_STATE_SYNC port
DSharifi 6c32390
typo in `frodo`
DSharifi 8c2229b
Update docs/localnet/TEE_localnet.md
barakeinav1 a41c6bc
Update docs/localnet/TEE_localnet.md
barakeinav1 1ad01aa
review fixes
barakeinav1 02db180
review fixes
barakeinav1 3684872
tag fix
barakeinav1 55681c7
mroe fixes
barakeinav1 0273e03
update after reproducation of the setup
barakeinav1 e928aab
doc updates
barakeinav1 ed04b86
small fixes
barakeinav1 86327e3
fix IP
barakeinav1 449ec37
adjust ports and paths
barakeinav1 7b36b23
doc update
barakeinav1 99da713
testnet with tee testing
barakeinav1 067ac8f
add files
barakeinav1 253bb36
Reset frodo.env and sam.env to main version
barakeinav1 89ea59a
small udpates
barakeinav1 c56bad7
Proofreading fixes
barakeinav1 77693ad
launcher_docker_compose.yaml
barakeinav1 8afce16
Sync localnet docs and env files from main
barakeinav1 f718117
Remove one-server testnet files (moved to separate branch)
barakeinav1 a14821f
cleaup temp files
barakeinav1 245a4c6
make account names generic
barakeinav1 a5e52c5
make account names configurable
barakeinav1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # MPC Docker image override | ||
| MPC_IMAGE_NAME=nearone/mpc-node | ||
| MPC_IMAGE_TAGS=barak-doc-update_localnet_guide-b12bc7d | ||
| MPC_REGISTRY=registry.hub.docker.com | ||
|
|
||
| # MPC node settings | ||
| MPC_ACCOUNT_ID=$FRODO_ACCOUNT | ||
| MPC_LOCAL_ADDRESS=127.0.0.1 | ||
| MPC_SECRET_STORE_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| MPC_CONTRACT_ID=$MPC_CONTRACT_ACCOUNT | ||
| MPC_ENV=testnet | ||
| MPC_HOME_DIR=/data | ||
| RUST_BACKTRACE=full | ||
| RUST_LOG=info | ||
|
|
||
| NEAR_BOOT_NODES=$BOOTNODES | ||
| # Port forwarding | ||
| PORTS=8080:8080,24567:24567,13001:13001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Required environment variables for Launcher / MPC app deployment. | ||
| # Please uncomment and set values for the following variables: | ||
|
|
||
| APP_NAME="frodo_testnet_tee" | ||
|
|
||
| # VMM_RPC -The RPC of the dstack-vmm RPC service used to deploy CVMs | ||
| # Can either be a unix socket or an http address. (make sure this is the same configuration as in the dstack-vmm service.toml) | ||
|
|
||
| #VMM_RPC=unix:../../../build/vmm.sock | ||
|
|
||
| VMM_RPC=http://127.0.0.1:10000 | ||
|
|
||
| # The type of sealing key to used by the VM (SGX,KMS) | ||
| # KMS should only be used for deployment and SGX for production. | ||
| SEALING_KEY_TYPE=SGX | ||
|
|
||
| # Port on the host machine to connect to the dstack guest agent | ||
| EXTERNAL_DSTACK_AGENT_PORT=127.0.0.1:18091 | ||
|
|
||
| EXTERNAL_SSH_PORT=127.0.0.1:1220 | ||
|
|
||
| # External MPC ports (host machine) | ||
| EXTERNAL_MPC_PUBLIC_DEBUG_PORT=0.0.0.0:18081 | ||
| EXTERNAL_MPC_LOCAL_DEBUG_PORT=127.0.0.1:3031 | ||
| EXTERNAL_MPC_DECENTRALIZED_STATE_SYNC=0.0.0.0:24567 | ||
| EXTERNAL_MPC_MAIN_PORT=0.0.0.0:13001 | ||
|
|
||
| # Internal MPC ports (inside CVM) | ||
| INTERNAL_MPC_PUBLIC_DEBUG_PORT=8080 | ||
| INTERNAL_MPC_LOCAL_DEBUG_PORT=3030 # ✅ Matches container listener | ||
| INTERNAL_MPC_DECENTRALIZED_STATE_SYNC=24567 | ||
| INTERNAL_MPC_MAIN_PORT=13001 | ||
|
|
||
| # The dstack OS image name use for the CVM | ||
|
|
||
| # production OS image | ||
| #OS_IMAGE=dstack-0.5.4 | ||
|
|
||
| # development OS image | ||
| OS_IMAGE=dstack-dev-0.5.4 | ||
|
|
||
| # Path of the launcher docker_compose_file | ||
| DOCKER_COMPOSE_FILE_PATH=launcher_docker_compose.yaml | ||
| # Path of the user_config file | ||
| USER_CONFIG_FILE_PATH=/tmp/$USER/frodo.conf | ||
|
|
||
| # for testing use a smaller disk size 128G | ||
| DISK=500G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # MPC Docker image override | ||
| MPC_IMAGE_NAME=nearone/mpc-node | ||
| MPC_IMAGE_TAGS=barak-doc-update_localnet_guide-b12bc7d | ||
| MPC_REGISTRY=registry.hub.docker.com | ||
|
|
||
| # MPC node settings | ||
| MPC_ACCOUNT_ID=$SAM_ACCOUNT | ||
| MPC_LOCAL_ADDRESS=127.0.0.1 | ||
| MPC_SECRET_STORE_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| MPC_CONTRACT_ID=$MPC_CONTRACT_ACCOUNT | ||
| MPC_ENV=testnet | ||
| MPC_HOME_DIR=/data | ||
| RUST_BACKTRACE=full | ||
| RUST_LOG=info | ||
|
|
||
| NEAR_BOOT_NODES=$BOOTNODES | ||
|
|
||
| # Port forwarding | ||
| PORTS=8080:8080,24567:24567,13002:13002 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Required environment variables for Launcher / MPC app deployment. | ||
| # Please uncomment and set values for the following variables: | ||
|
|
||
| APP_NAME="sam_testnet_tee" | ||
|
|
||
| # VMM_RPC -The RPC of the dstack-vmm RPC service used to deploy CVMs | ||
| # Can either be a unix socket or an http address. (make sure this is the same configuration as in the dstack-vmm service.toml) | ||
|
|
||
| #VMM_RPC=unix:../../../build/vmm.sock | ||
|
|
||
| VMM_RPC=http://127.0.0.1:10000 | ||
|
|
||
| # The type of sealing key to used by the VM (SGX,KMS) | ||
| # KMS should only be used for deployment and SGX for production. | ||
| SEALING_KEY_TYPE=SGX | ||
|
|
||
| # Port on the host machine to connect to the dstack guest agent | ||
| EXTERNAL_DSTACK_AGENT_PORT=127.0.0.1:18092 | ||
|
|
||
|
|
||
| EXTERNAL_SSH_PORT=127.0.0.1:1221 | ||
|
|
||
| # External ports (host machine / outside CVM) | ||
| EXTERNAL_MPC_PUBLIC_DEBUG_PORT=0.0.0.0:18082 | ||
| EXTERNAL_MPC_LOCAL_DEBUG_PORT=127.0.0.1:3032 | ||
| EXTERNAL_MPC_DECENTRALIZED_STATE_SYNC=0.0.0.0:24567 | ||
| EXTERNAL_MPC_MAIN_PORT=0.0.0.0:13002 | ||
|
|
||
| # Internal ports (inside CVM) | ||
| INTERNAL_MPC_PUBLIC_DEBUG_PORT=8080 | ||
| INTERNAL_MPC_LOCAL_DEBUG_PORT=3030 | ||
| INTERNAL_MPC_DECENTRALIZED_STATE_SYNC=24567 | ||
| INTERNAL_MPC_MAIN_PORT=13002 | ||
|
|
||
| # The dstack OS image name use for the CVM | ||
|
|
||
| # production OS image | ||
| #OS_IMAGE=dstack-0.5.4 | ||
|
|
||
| # development OS image | ||
| OS_IMAGE=dstack-dev-0.5.4 | ||
|
|
||
| # Path of the launcher docker_compose_file | ||
| DOCKER_COMPOSE_FILE_PATH=launcher_docker_compose.yaml | ||
| # Path of the user_config file | ||
| USER_CONFIG_FILE_PATH=/tmp/$USER/sam.conf | ||
|
|
||
| # for testing use a smaller disk size 128G | ||
| DISK=500G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "parameters": { | ||
| "threshold": 2, | ||
| "participants": { | ||
| "next_id": 2, | ||
| "participants": [ | ||
| [ | ||
| "$FRODO_ACCOUNT", | ||
| 0, | ||
| { | ||
| "sign_pk": "$FRODO_P2P_KEY", | ||
| "url": "https://$SERVER_IP_1:13001" | ||
| } | ||
| ], | ||
| [ | ||
| "$SAM_ACCOUNT", | ||
| 1, | ||
| { | ||
| "sign_pk": "$SAM_P2P_KEY", | ||
| "url": "https://$SERVER_IP_2:13002" | ||
| } | ||
| ] | ||
| ] | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of creating a new file, we could reuse the existing
docs/localnet/args/init.jsontemplate and just add an env var for the port.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several differences between init.json and the nit_testnet_tee.json (different port ranges, IPs, and configurable account names).
I'm not saying it doesn't make sense to merge them together, but the overhead now (updating all localnet+localnet_TEE docs), is a but too much.
We can do this in a follow-up PR if really needed.