From f2c83e2a608f6a6e902bffe6c2202b3f99252ebb Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 19 Jun 2024 13:36:53 +0200 Subject: [PATCH] update --- scripts/linux/download.sh | 4 ---- scripts/linux/download_prover.sh | 5 +++++ scripts/linux/run_bootstrap.sh | 3 ++- scripts/linux/run_client.sh | 20 ++++++++++++++++++ scripts/linux/{run_storage.sh => run_host.sh} | 2 +- scripts/windows/download.bat | 3 --- scripts/windows/download_prover.bat | 2 ++ scripts/windows/run_client.bat | 21 +++++++++++++++++++ .../windows/{run_storage.bat => run_host.bat} | 0 9 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 scripts/linux/download_prover.sh create mode 100644 scripts/linux/run_client.sh rename scripts/linux/{run_storage.sh => run_host.sh} (76%) mode change 100755 => 100644 create mode 100644 scripts/windows/download_prover.bat create mode 100644 scripts/windows/run_client.bat rename scripts/windows/{run_storage.bat => run_host.bat} (100%) diff --git a/scripts/linux/download.sh b/scripts/linux/download.sh index d238b49..c2ba249 100755 --- a/scripts/linux/download.sh +++ b/scripts/linux/download.sh @@ -1,9 +1,5 @@ curl -o codex-v0.1.0-linux-amd64.tar.gz -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-v0.1.0-linux-amd64.tar.gz tar -xvzf codex-v0.1.0-linux-amd64.tar.gz -curl -o codex-prover-v0.1.0-linux-amd64.zip -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-prover-v0.1.0-linux-amd64.zip -unzip codex-prover-v0.1.0-linux-amd64.zip - chmod +x codex-v0.1.0-linux-amd64 -chmod +x codex-v0.1.0-prover-linux-amd64 diff --git a/scripts/linux/download_prover.sh b/scripts/linux/download_prover.sh new file mode 100644 index 0000000..f8657cc --- /dev/null +++ b/scripts/linux/download_prover.sh @@ -0,0 +1,5 @@ +curl -o codex-prover-v0.1.0-linux-amd64.zip -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-prover-v0.1.0-linux-amd64.zip +unzip codex-prover-v0.1.0-linux-amd64.zip + +chmod +x codex-v0.1.0-prover-linux-amd64 + diff --git a/scripts/linux/run_bootstrap.sh b/scripts/linux/run_bootstrap.sh index 492c1bc..c023226 100755 --- a/scripts/linux/run_bootstrap.sh +++ b/scripts/linux/run_bootstrap.sh @@ -10,4 +10,5 @@ LOCALIP="192.168.178.138" sleep 5 -curl http://localhost:8080/api/codex/v1/debug/info +curl http://localhost:8080/api/codex/v1/debug/info > bootstrap.info + diff --git a/scripts/linux/run_client.sh b/scripts/linux/run_client.sh new file mode 100644 index 0000000..064fd99 --- /dev/null +++ b/scripts/linux/run_client.sh @@ -0,0 +1,20 @@ +LOCALIP=192.168.178.138 +BOOTSPR=spr:CiUIAhIhAteA6IVIcN3egB_1rPz3HpFKVVO4emfRRcRzvyf0ES11EgIDARo8CicAJQgCEiEC14DohUhw3d6AH_Ws_PcekUpVU7h6Z9FFxHO_J_QRLXUQlcfKswYaCwoJBMCosquRAh-aKkcwRQIhAPzHOsoFmh96SeuFPzErNeck9C-vOkWp74HpddLmM4zLAiBwvbCZDaeMRkmVRVxh24J8OEGGuHFUTWPHAL8T7e8GyQ + +./codex-v0.1.0-prover-linux-amd64 \ + --data-dir=data_bootstrap \ + --storage-quota=11811160064 \ + --nat=${LOCALIP} \ + --api-port=8080 \ + --disc-port=8090 \ + --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ + --bootstrap-node=${BOOTSPR} \ + persistence \ + --eth-private-key=eth.key \ + --eth-provider=https://rpc.testnet.codex.storage \ + --marketplace-address=0x4cBDfab37baB0AA3AC69A7b12C4396907dfF5227 \ + & + +sleep 5 + +curl http://localhost:8180/api/codex/v1/debug/info diff --git a/scripts/linux/run_storage.sh b/scripts/linux/run_host.sh old mode 100755 new mode 100644 similarity index 76% rename from scripts/linux/run_storage.sh rename to scripts/linux/run_host.sh index 1926773..55cb1b8 --- a/scripts/linux/run_storage.sh +++ b/scripts/linux/run_host.sh @@ -1,5 +1,5 @@ LOCALIP=192.168.178.138 -BOOTSPR="spr:CiUIAhIhA7hDRTkU9Pb_Wt4qdoN_IsRGuDL6bucyvMqbE3F7UmFREgIDARo8CicAJQgCEiEDuENFORT09v9a3ip2g38ixEa4Mvpu5zK8ypsTcXtSYVEQ1uHFswYaCwoJBMCosoqRAh-aKkcwRQIhAKdz-V1ne8GB-QlUmXnA4_EO1WIisy6PPBJDzRRLn02UAiB4QmAVgBgJ94OxnrTo7c_zgsjDJXL_E0_KlBb2KaFzPw" +BOOTSPR=$(curl http://localhost:8080/api/codex/v1/spr | cut -d '"' -f4) # Quota = 11 GB # Availability = 10 GB diff --git a/scripts/windows/download.bat b/scripts/windows/download.bat index 24d348a..1475912 100644 --- a/scripts/windows/download.bat +++ b/scripts/windows/download.bat @@ -1,5 +1,2 @@ curl -O -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-v0.1.0-windows-amd64.zip unzip codex-v0.1.0-windows-amd64.zip - -curl -O -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-prover-v0.1.0-windows-amd64.exe.zip -unzip codex-prover-v0.1.0-windows-amd64.exe.zip diff --git a/scripts/windows/download_prover.bat b/scripts/windows/download_prover.bat new file mode 100644 index 0000000..7304d9c --- /dev/null +++ b/scripts/windows/download_prover.bat @@ -0,0 +1,2 @@ +curl -O -L https://github.com/codex-storage/nim-codex/releases/download/v0.1.0/codex-prover-v0.1.0-windows-amd64.exe.zip +unzip codex-prover-v0.1.0-windows-amd64.exe.zip diff --git a/scripts/windows/run_client.bat b/scripts/windows/run_client.bat new file mode 100644 index 0000000..61b0f23 --- /dev/null +++ b/scripts/windows/run_client.bat @@ -0,0 +1,21 @@ +set LOCALIP="192.168.178.138" +set BOOTSPR="spr:CiUIAhIhAteA6IVIcN3egB_1rPz3HpFKVVO4emfRRcRzvyf0ES11EgIDARo8CicAJQgCEiEC14DohUhw3d6AH_Ws_PcekUpVU7h6Z9FFxHO_J_QRLXUQlcfKswYaCwoJBMCosquRAh-aKkcwRQIhAPzHOsoFmh96SeuFPzErNeck9C-vOkWp74HpddLmM4zLAiBwvbCZDaeMRkmVRVxh24J8OEGGuHFUTWPHAL8T7e8GyQ" + +start /b codex-v0.1.0-windows-amd64.exe ^ + --data-dir=data_bootstrap ^ + --storage-quota=11811160064 ^ + --nat=%LOCALIP% ^ + --api-port=8080 ^ + --disc-port=8090 ^ + --listen-addrs=/ip4/0.0.0.0/tcp/8070 ^ + --bootstrap-node=%BOOTSPR% ^ + persistence ^ + --eth-private-key=eth.key ^ + --eth-provider=https://rpc.testnet.codex.storage ^ + --marketplace-address=0x4cBDfab37baB0AA3AC69A7b12C4396907dfF5227 + +timeout 5 + +cls + +curl http://localhost:8080/api/codex/v1/debug/info diff --git a/scripts/windows/run_storage.bat b/scripts/windows/run_host.bat similarity index 100% rename from scripts/windows/run_storage.bat rename to scripts/windows/run_host.bat