diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..500bcd4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +# Set default behavior to automatically normalize line endings. +* text=auto + +# Force bash scripts to always use lf line endings so that if a repo is accessed +# in Unix via a file share from Windows, the scripts will work. +*.sh text eol=lf + +# Likewise, force cmd and batch scripts to always use crlf +*.cmd text eol=crlf +*.bat text eol=crlf + diff --git a/SETUP_HOME.md b/SETUP_HOME.md index f17b396..807644f 100644 --- a/SETUP_HOME.md +++ b/SETUP_HOME.md @@ -94,7 +94,7 @@ These options are required to join the testnet: - `--eth-private-key=FILE` - Set FILE to your private key file. - `--eth-provider=URL` - Set URL to the "Geth Public RPC" found [here](https://docs.codex.storage/networks/testnet) The marketplace address should default to the correct testnet deployment. You can override it with: - - `--marketplace-address=ADDR` - Set ADDR to `0xCDef8d6884557be4F68dC265b6bB2E3e52a6C9d6` + - `--marketplace-address=ADDR` - Set ADDR to `0xfE822Df439d987849a90B64a4C0e26a297DBD47F` The above options allow you to join the testnet, exchange data, and purchase storage in the network. If you wish to *sell storage space* to the network, you must include one additional argument: - `prover` - Tells the node we want to enable storage space selling diff --git a/docker-compose.yaml b/docker-compose.yaml index fed88c6..48a86fd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: # Codex Node codex: - image: codexstorage/nim-codex:0.1.4 + image: codexstorage/nim-codex:0.1.5 container_name: codex command: - codex diff --git a/forcodexers/run_host.sh b/forcodexers/run_host.sh index f23f605..154609d 100755 --- a/forcodexers/run_host.sh +++ b/forcodexers/run_host.sh @@ -17,7 +17,7 @@ BOOTSPR=$(curl http://localhost:8078/api/codex/v1/spr | cut -d '"' -f4) persistence \ --eth-private-key=eth.key \ --eth-provider=https://rpc.testnet.codex.storage \ - --marketplace-address=0x9C88D67c7C745D2F0A4E411c18A6a22c15b37EaA \ + --marketplace-address=0xfE822Df439d987849a90B64a4C0e26a297DBD47F \ prover \ & diff --git a/scripts/download.sh b/scripts/download.sh index 87ab3de..dd24f6a 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -48,7 +48,7 @@ else ARCHIVE_EXT=".tar.gz" EXE_EXT="" fi -VERSION="v0.1.4" +VERSION="v0.1.6" BASE_URL="http://192.168.88.253:8080" EXTRACT_DIR="./" # Use BINARY_NAMES=("codex" "codex-prover") to also download/verify/extract prover binary diff --git a/scripts/download_online.sh b/scripts/download_online.sh index 5181d93..25792f8 100755 --- a/scripts/download_online.sh +++ b/scripts/download_online.sh @@ -48,7 +48,7 @@ else ARCHIVE_EXT=".tar.gz" EXE_EXT="" fi -VERSION="v0.1.4" +VERSION="v0.1.6" BASE_URL="https://github.com/codex-storage/nim-codex/releases/download/${VERSION}" EXTRACT_DIR="./" # Use BINARY_NAMES=("codex" "codex-prover") to also download/verify/extract prover binary diff --git a/scripts/run_client.sh b/scripts/run_client.sh index ac38279..4c4c756 100755 --- a/scripts/run_client.sh +++ b/scripts/run_client.sh @@ -36,7 +36,7 @@ if [ ! -f eth.key ]; then fi # Set variables -VERSION="v0.1.4" +VERSION="v0.1.6" OS=$(get_os) ARCH=$(get_arch) DATA_DIR="data_client" @@ -52,6 +52,8 @@ chmod 0700 ${DATA_DIR} --disc-port=8090 \ --listen-addrs=/ip4/0.0.0.0/tcp/8070 \ --bootstrap-node=${BOOTSPR} \ + --api-cors-origin="*" \ + --block-ttl=30d \ persistence \ --eth-private-key=eth.key \ --eth-provider=https://rpc.testnet.codex.storage diff --git a/scripts/windows/download-online.bat b/scripts/windows/download-online.bat index 4c70e14..9c86890 100644 --- a/scripts/windows/download-online.bat +++ b/scripts/windows/download-online.bat @@ -1,14 +1,15 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Set variables set "OS=windows" call :get_arch ARCH set "ARCHIVE_EXT=.zip" set "EXE_EXT=.exe" -set "VERSION=v0.1.4" +set "VERSION=v0.1.6" set "BASE_URL=https://github.com/codex-storage/nim-codex/releases/download/%VERSION%" set "EXTRACT_DIR=.\" set "BINARY_NAMES=codex" diff --git a/scripts/windows/download.bat b/scripts/windows/download.bat index 2f3a07d..2afa543 100644 --- a/scripts/windows/download.bat +++ b/scripts/windows/download.bat @@ -1,14 +1,15 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Set variables set "OS=windows" call :get_arch ARCH set "ARCHIVE_EXT=.zip" set "EXE_EXT=.exe" -set "VERSION=v0.1.4" +set "VERSION=v0.1.6" set "BASE_URL=http://192.168.88.253:8080" set "EXTRACT_DIR=.\" set "BINARY_NAMES=codex" diff --git a/scripts/windows/run-client.bat b/scripts/windows/run-client.bat index 9751ba2..2d99a1e 100644 --- a/scripts/windows/run-client.bat +++ b/scripts/windows/run-client.bat @@ -1,7 +1,8 @@ @echo off setlocal enabledelayedexpansion -call utils.bat +:: Variables +if not defined NETWORK set NETWORK=testnet :: Check if LOCALIP is provided as an argument if "%1" neq "" ( @@ -43,7 +44,7 @@ if errorlevel 1 ( ) :: Set variables -set "VERSION=v0.1.4" +set "VERSION=v0.1.6" set "OS=windows" call :get_arch ARCH set "DATA_DIR=data_client" @@ -59,6 +60,8 @@ codex-%VERSION%-%OS%-%ARCH%.exe ^ --api-port=8080 ^ --disc-port=8090 ^ --listen-addrs=/ip4/0.0.0.0/tcp/8070 ^ + --api-cors-origin="*" ^ + --block-ttl=30d ^ --bootstrap-node=%BOOTSPR% ^ persistence ^ --eth-private-key=eth.key ^ @@ -89,5 +92,5 @@ exit /b :: Function to get Public IP using ip lookup service :get_ip_public - for /f "tokens=1" %%a in ('curl -m 5 -s https://ip.codex.storage') do set "%1=%%a" + for /f "tokens=1" %%a in ('curl -m 5 -s --ssl-reqd ip.codex.storage') do set "%1=%%a" exit /b diff --git a/scripts/windows/utils.bat b/scripts/windows/utils.bat deleted file mode 100644 index db53e6e..0000000 --- a/scripts/windows/utils.bat +++ /dev/null @@ -1,35 +0,0 @@ -@echo off - -:: Variables -if not defined NETWORK set NETWORK=testnet - -:: Function to detect OS -:get_os - echo windows -exit /b - -:: Function to detect CPU architecture -:get_arch - set "arch_result=unknown" - for /f "tokens=2 delims=:" %%a in ('systeminfo ^| find "System Type"') do ( - echo %%a | find "x64" > nul - if not errorlevel 1 set "arch_result=amd64" - echo %%a | find "ARM" > nul - if not errorlevel 1 set "arch_result=arm64" - ) - if "%arch_result%"=="unknown" ( - echo Unsupported architecture: %PROCESSOR_ARCHITECTURE% - exit /b 1 - ) - set "%1=%arch_result%" -exit /b - -:: Function to get IP -:get_ip - for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /c:"IPv4 Address"') do ( - set "%1=%%a" - set "%1=!%1: =!" - goto :break - ) - :break -exit /b