{"id":18623176,"url":"https://github.com/glottologist/simple-handshake","last_synced_at":"2025-10-16T00:02:25.523Z","repository":{"id":228432193,"uuid":"769816461","full_name":"glottologist/simple-handshake","owner":"glottologist","description":"Simple node handshake code","archived":false,"fork":false,"pushed_at":"2024-03-16T10:03:54.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T05:23:03.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glottologist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-10T06:15:15.000Z","updated_at":"2024-03-18T17:36:07.000Z","dependencies_parsed_at":"2024-03-18T20:21:17.242Z","dependency_job_id":"60f4eef5-c048-42e5-96bf-d129318a6aad","html_url":"https://github.com/glottologist/simple-handshake","commit_stats":null,"previous_names":["glottologist/simple-handshake"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fsimple-handshake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fsimple-handshake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fsimple-handshake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glottologist%2Fsimple-handshake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glottologist","download_url":"https://codeload.github.com/glottologist/simple-handshake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239418544,"owners_count":19635203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T04:21:49.326Z","updated_at":"2025-10-16T00:02:25.504Z","avatar_url":"https://github.com/glottologist.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Solana Node Handshake\n\n## Limitations and Caveats\n\nAs this is a simple handshake project, there are some limitations on its functionality.\n\n- It doesn't support the usage of proxies.\n- It only supports Ip4 addresses.\n- It is a simple connect and handshake - not robust enough for more complex ops\n- It assumes that you are specifying the address correctly, no probing is done prior to the handshake attempt.\n- It assumes that you pass the scheme (http or https) in the host argument.\n- The gossip node uses the Solana sdk for key generation - handrolling this would have taken too long.\n\n## Path to usage\n\n### Installation/Build\n\n#### Take the high road\n\nThe easiest way to build and test is to use Nix. This not only gives the support for running the project (should you not have Rust installed) but also supplies the Solana toolchain so that a test validator (rpc node) can be spun up locally.\n\n##### Install Nix\n\nRun the following in a terminal:\n\n```bash\nsh \u003c(curl -L https://nixos.org/nix/install) --daemon\n```\n\n##### Enable flake support\n\nAdd the following to `~/.config/nix/nix.conf` or `/etc/nix/nix.conf`:\n\n```\nexperimental-features = nix-command flakes\n```\n\n##### Usage\n\nIn order to use the handshake you will need Rust support and a running Solana RPC node. To enable usage of the tool you will need two terminals, one to run the solana-test-validator and another to run the handshake. In both terminals, you will need to run a nix development shell by running the following:\n\n```bash\nnix develop --impure\n```\n\nIn the one of the terminals the Solana test validator needs to be run:\n\n```bash\nsolana-test-validator\n```\n\n#### Take the low road\n\nIf you are not using, or don't want to use, Nix; then you will need to install Rust and the Solana toolchain.\n\n##### Installing Rust\n\n###### Download the Rust Installer\n\n- **Windows**: Download the Rust installer from the official Rust website (https://www.rust-lang.org/tools/install). Look for the \"rustup-init.exe\" file and download it.\n- **macOS and Linux**: Open a terminal and run the following command:\n\n  ```bash\n  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n  ```\n\n  This command downloads a script and starts the installation of the rustup tool, which installs Rust.\n\n###### Run the Installer\n\n- **Windows**: Run the \"rustup-init.exe\" file and follow the on-screen instructions.\n- **macOS and Linux**: After running the curl command in the terminal, the rustup script will start automatically. Follow the instructions provided in the terminal.\n\n###### Configure Your Path\n\nRust installation is almost complete. Now, you need to ensure that your system's PATH environment variable includes Rust.\n\n- **Windows**: The installer should automatically add Rust to your system PATH. Restart your terminal or computer to ensure the changes take effect.\n- **macOS and Linux**: If you're using a Unix-like OS, the rustup script suggests running a command to add Rust to your PATH. Typically, it involves modifying your shell profile file (like `.bash_profile`, `.zshrc`, etc.). If rustup does not do this automatically, you can add the following line to your profile:\n\n  ```bash\n  export PATH=\"$HOME/.cargo/bin:$PATH\"\n  ```\n\n  After adding the line, reload your profile (e.g., `source ~/.bash_profile`) or restart your terminal.\n\n###### Verify Installation\n\nTo confirm that Rust is installed correctly, open a new terminal and run:\n\n```bash\nrustc --version\n```\n\nIf the installation was successful, you should see the version of Rust printed to the console.\n\n##### Install the Solana toolchain\n\n###### Run the install script\n\n```bash\nsh -c \"$(curl -sSfL https://release.solana.com/v1.10.32/install)\"\n```\n\n###### Configure your Path\n\n```bash\nexport PATH=\"$HOME/.local/share/solana/install/active_release/bin:$PATH\"\n```\n\n###### Verfiy the installation\n\n```bash\nsolana --version\n```\n\n###### Run the Solana test validator\n\n```bash\nsolana-test-validator\n```\n\nYou should see a terminal output like the following:\n\n```bash\nVersion: 1.16.26\nShred Version: 43529\nGossip Address: 127.0.0.1:1024\nTPU Address: 27.0.0.1:1027\nJSON RPC URL: http://127.0.0.1:8899\nWebSocket PubSub URL: ws://127.0.0.1:8900\n```\n\nThis output will show the connection urls and you can move on to running the tool.\n\n### Building the tool\n\nBuild the tool using cargo:\n\n```bash\ncargo build --release\n```\n\nThe handshake binary will then be located at `/target/release/handshake`.\n\n### Running the tool\n\n#### Handshake with the JSON RPC endpoint\n\nYou can run the handshake with the Solana test validator with the following command in a terminal:\n\n```bash\n./target/release/handshake connect-rpc --address \"127.0.0.1:8899\"\n```\n\n##### Connecting to a HTTPS endpoint\n\nIf you are connecting to a non-local node that is HTTPS you can use the secure flag to connect:\n\n```bash\n./target/release/handshake connect-rpc --address \"127.0.0.1:8899\" --secure\n```\n\n#### Handshake with the Websocket PubSub endpoint\n\nYou can run the handshake with the Solana test validator with the following command in a terminal:\n\n```bash\n./target/release/handshake connect-rpc-with-websocket --address \"127.0.0.1:8900\"\n```\n\n##### Connecting to a WSS endpoint\n\nIf you are connecting to a non-local node that is WSS you can use the secure flag to connect:\n\n```bash\n./target/release/handshake connect-rpc-with-websocket --address \"127.0.0.1:8900\" --secure\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglottologist%2Fsimple-handshake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglottologist%2Fsimple-handshake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglottologist%2Fsimple-handshake/lists"}