diff --git a/README.md b/README.md index 96921b13..1f311840 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Polygon ZisK -You can find the documentation here: [docs](https://silver-guide-wgvmnpk.pages.github.io/) +You can find the documentation here: [docs](https://0xpolygonhermez.github.io/zisk/) # Licenses All crates of this monorepo are licensed under either of diff --git a/book/getting_started/install.md b/book/getting_started/install.md index 613b4975..c305b8ba 100644 --- a/book/getting_started/install.md +++ b/book/getting_started/install.md @@ -1,6 +1,10 @@ # Install + + ## Requirements +⚠️ Currently, macOS is not supported for proof generation. A Linux x86_64 machine is required at this time. ⚠️ + * [Rust (Nightly)](https://www.rust-lang.org/tools/install) * [xz]() * [jq]() @@ -32,18 +36,10 @@ nvm use 19 ## Option 1: Prebuilt Binaries (Recommended) -
-this is temporary until we make the repositories publics, if you need an installation token, write to the Zisk team ```bash -export ZISK_TOKEN=... +curl https://raw.githubusercontent.com/0xPolygonHermez/zisk/develop/ziskup/install.sh | bash ``` -```bash -curl -H "Authorization: token ${ZISK_TOKEN}" \ -https://raw.githubusercontent.com/0xPolygonHermez/zisk/develop/ziskup/install.sh | bash -``` -
- This will enable the ziskup command in your CLI. You need to restart your terminal to use it or run this command: diff --git a/book/getting_started/quickstart.md b/book/getting_started/quickstart.md index 09ec949e..c8bba9c4 100644 --- a/book/getting_started/quickstart.md +++ b/book/getting_started/quickstart.md @@ -4,20 +4,13 @@ In this section, we will show you how to create a simple program using ZisK. ## Create Project -
- -this is temporary until we make the repositories publics, if you need an installation token, write to the Zisk team -```bash -export ZISK_TOKEN=... -``` ```bash -git clone https://${ZISK_TOKEN}@github.com/0xPolygonHermez/zisk +git clone https://github.com/0xPolygonHermez/zisk git clone -b develop https://github.com/0xPolygonHermez/pil2-compiler.git git clone -b develop https://github.com/0xPolygonHermez/pil2-proofman.git git clone --recursive -b develop https://github.com/0xPolygonHermez/pil2-stark.git git clone -b feature/setup https://github.com/0xPolygonHermez/pil2-proofman-js ``` -
The first step is to create a new project using the `cargo-zisk sdk new ` command. This command will create a new folder in your current directory. diff --git a/book/getting_started/quickstart_dev.md b/book/getting_started/quickstart_dev.md index 63996212..bab10482 100644 --- a/book/getting_started/quickstart_dev.md +++ b/book/getting_started/quickstart_dev.md @@ -17,7 +17,7 @@ Run the following commands to clone the necessary repositories: ```bash git clone -b develop https://github.com/0xPolygonHermez/pil2-compiler.git -git clone -b develop https://${ZISK_TOKEN}@github.com/0xPolygonHermez/zisk.git +git clone -b develop https://github.com/0xPolygonHermez/zisk.git git clone -b develop https://github.com/0xPolygonHermez/pil2-proofman.git git clone --recursive -b develop https://github.com/0xPolygonHermez/pil2-stark.git git clone -b feature/setup https://github.com/0xPolygonHermez/pil2-proofman-js @@ -29,14 +29,6 @@ git clone -b feature/setup https://github.com/0xPolygonHermez/pil2-proofman-js Install qemu: `sudo apt-get install qemu-system` - -Set up tokens to access repositories: - -``` -export GITHUB_ACCESS_TOKEN=.... -export ZISK_TOKEN=.... -``` - ### Create New Hello World Project Create a new project using the Zisk toolchain: diff --git a/book/introduction.md b/book/introduction.md index e10b99d0..b66c3fa8 100644 --- a/book/introduction.md +++ b/book/introduction.md @@ -1 +1,3 @@ # Introduction + +WIP \ No newline at end of file diff --git a/cli/src/commands/build_toolchain.rs b/cli/src/commands/build_toolchain.rs index d341159c..5b36dbb1 100644 --- a/cli/src/commands/build_toolchain.rs +++ b/cli/src/commands/build_toolchain.rs @@ -11,7 +11,6 @@ impl BuildToolchainCmd { pub fn run(&self) -> Result<()> { println!("Building toolchain..."); // Get enviroment variables. - let zisk_token = std::env::var("ZISK_TOKEN"); let build_dir = std::env::var("ZISK_BUILD_DIR"); let rust_dir = match build_dir { Ok(build_dir) => { @@ -26,20 +25,12 @@ impl BuildToolchainCmd { } println!("No ZISK_BUILD_DIR detected, cloning rust."); - let repo_url = match zisk_token { - Ok(zisk_token) => { - println!("Detected ZISK_TOKEN, using it to clone rust."); - format!("https://{}@github.com/0xPolygonHermez/rust", zisk_token) - } - Err(_) => { - println!("No ZISK_TOKEN detected. If you get throttled by Github, set it to bypass the rate limit."); - "ssh://git@github.com/0xPolygonHermez/rust".to_string() - } - }; + let repo_url = "https://{}@github.com/0xPolygonHermez/rust"; + Command::new("git") .args([ "clone", - &repo_url, + repo_url, "--depth=1", "--single-branch", "--branch=zisk", diff --git a/cli/src/commands/new.rs b/cli/src/commands/new.rs index e48d82b9..e5df8b33 100644 --- a/cli/src/commands/new.rs +++ b/cli/src/commands/new.rs @@ -12,17 +12,7 @@ pub struct NewCmd { impl NewCmd { pub fn run(&self) -> Result<()> { let root = Path::new(&self.name); - let zisk_token = std::env::var("ZISK_TOKEN"); - let repo_url = match zisk_token { - Ok(zisk_token) => { - println!("Detected ZISK_TOKEN, using it to clone zisk_template"); - format!("https://{}@github.com/0xPolygonHermez/zisk_template", zisk_token) - } - Err(_) => { - println!("No ZISK_TOKEN detected. If you get throttled by Github, set it to bypass the rate limit."); - "ssh://git@github.com/0xPolygonHermez/zisk_template".to_string() - } - }; + let repo_url = "https://{}@github.com/0xPolygonHermez/zisk_template"; // Create the root directory if it doesn't exist. if !root.exists() { fs::create_dir(&self.name)?; diff --git a/cli/src/lib.rs b/cli/src/lib.rs index bf4ce3dd..3a4aa35b 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -68,10 +68,7 @@ pub fn is_supported_target() -> bool { pub async fn get_toolchain_download_url(client: &Client, target: String) -> String { // Get latest tag from https://api.github.com/repos/0xPolygonHermez/rust/releases/latest // and use it to construct the download URL. - let url = format!( - "https://{}@api.github.com/repos/0xPolygonHermez/rust/releases/latest", - std::env::var("ZISK_TOKEN").unwrap() - ); + let url = "https://api.github.com/repos/0xPolygonHermez/rust/releases/latest"; let json = client.get(url).send().await.unwrap().json::().await.unwrap(); let name: String = format!("rust-toolchain-{}.tar.gz", target); @@ -97,11 +94,6 @@ pub async fn download_file( ) -> std::result::Result<(), String> { let mut headers = HeaderMap::new(); - headers.insert( - "Authorization", - HeaderValue::from_str(format!("Bearer {}", std::env::var("ZISK_TOKEN").unwrap()).as_str()) - .unwrap(), - ); headers.insert("Accept", HeaderValue::from_static("application/octet-stream")); let res = client .get(url) diff --git a/ziskup/install.sh b/ziskup/install.sh index 6cc21137..d187c433 100755 --- a/ziskup/install.sh +++ b/ziskup/install.sh @@ -15,7 +15,7 @@ BIN_PATH="$ZISK_BIN_DIR/ziskup" # Create the .zisk bin directory and ziskup binary if it doesn't exist. mkdir -p $ZISK_BIN_DIR -curl -H "Authorization: token ${ZISK_TOKEN}" -# -L $BIN_URL -o $BIN_PATH +curl -# -L $BIN_URL -o $BIN_PATH chmod +x $BIN_PATH # Store the correct profile file (i.e. .profile for bash or .zshenv for ZSH). diff --git a/ziskup/ziskup b/ziskup/ziskup index 68637d25..005328f0 100755 --- a/ziskup/ziskup +++ b/ziskup/ziskup @@ -296,9 +296,9 @@ download() { # Fetch the URL from the GitHub API if check_cmd curl; then - API_RESPONSE=$(curl -H "Authorization: token ${ZISK_TOKEN}" https://api.github.com/repos/0xPolygonHermez/zisk/releases) + API_RESPONSE=$(curl https://api.github.com/repos/0xPolygonHermez/zisk/releases) else - API_RESPONSE=$(wget -qO- --header="Authorization: token ${ZISK_TOKEN}" https://api.github.com/repos/0xPolygonHermez/zisk/releases) + API_RESPONSE=$(wget -qO- https://api.github.com/repos/0xPolygonHermez/zisk/releases) fi # Extract the browser_download_url for the given file name ($1) @@ -311,16 +311,16 @@ download() { # output into $2 if check_cmd curl; then - curl -H "Accept: application/octet-stream" -H "Authorization: Bearer ${ZISK_TOKEN}" -#o "$2" -L "$URL" + curl -H "Accept: application/octet-stream" -#o "$2" -L "$URL" else - wget --header="Accept: application/octet-stream" --header="Authorization: Bearer ${ZISK_TOKEN}" --show-progress -qO "$2" "$URL" + wget --header="Accept: application/octet-stream" --show-progress -qO "$2" "$URL" fi else # Fetch the URL from the GitHub API if check_cmd curl; then - API_RESPONSE=$(curl -H "Authorization: token ${ZISK_TOKEN}" https://api.github.com/repos/0xPolygonHermez/zisk/releases) + API_RESPONSE=$(curl https://api.github.com/repos/0xPolygonHermez/zisk/releases) else - API_RESPONSE=$(wget -qO- --header="Authorization: token ${ZISK_TOKEN}" https://api.github.com/repos/0xPolygonHermez/zisk/releases) + API_RESPONSE=$(wget -qO- https://api.github.com/repos/0xPolygonHermez/zisk/releases) fi # Extract the browser_download_url for the given file name ($1) URL=$(echo "$API_RESPONSE" | jq -r --arg FILENAME "$1" '.[] | .assets[] | select(.browser_download_url == $FILENAME) | .url') @@ -332,9 +332,9 @@ download() { # output into $2 if check_cmd curl; then - curl -H "Accept: application/octet-stream" -H "Authorization: Bearer ${ZISK_TOKEN}" -L "$URL" + curl -H "Accept: application/octet-stream" -L "$URL" else - wget --header="Accept: application/octet-stream" --header="Authorization: Bearer ${ZISK_TOKEN}" --show-progress -qO- "$URL" + wget --header="Accept: application/octet-stream" --show-progress -qO- "$URL" fi fi }