{"id":27968619,"url":"https://github.com/nethermindeth/starknet-staking-v2","last_synced_at":"2025-07-31T17:34:40.712Z","repository":{"id":286971857,"uuid":"947534161","full_name":"NethermindEth/starknet-staking-v2","owner":"NethermindEth","description":"Validator software for Starknet stakers written in Go","archived":false,"fork":false,"pushed_at":"2025-05-07T15:16:11.000Z","size":383,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-07T21:05:28.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NethermindEth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-12T20:57:16.000Z","updated_at":"2025-05-06T16:20:01.000Z","dependencies_parsed_at":"2025-04-09T09:34:00.878Z","dependency_job_id":"8ed1651a-c859-45eb-8313-e159d982b2c6","html_url":"https://github.com/NethermindEth/starknet-staking-v2","commit_stats":null,"previous_names":["nethermindeth/starknet-staking-v2"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-staking-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-staking-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-staking-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-staking-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NethermindEth","download_url":"https://codeload.github.com/NethermindEth/starknet-staking-v2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954427,"owners_count":21830903,"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":"2025-05-07T21:05:32.672Z","updated_at":"2025-07-31T17:34:40.706Z","avatar_url":"https://github.com/NethermindEth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starknet Staking v2\nValidator software written in Go for Starknet staking v2 as specified in [SNIP 28](https://community.starknet.io/t/snip-28-staking-v2-proposal/115250)\n\n\u003e ℹ️ This README offers a basic overview of the Validator tool. For detailed instructions—such as running with Docker, configuring external signing, or setting up a metrics server—please refer to the [official documentation](https://nethermindeth.github.io/starknet-staking-v2/).\n\n## Requirements\n\n- A connection to a [Starknet node or RPC endpoint](https://www.starknet.io/fullnodes-rpc-services/) with support for the JSON-RPC 0.8.0 API specification. For reliability reasons we recommend stakers to host their own nodes. See [Juno](https://github.com/NethermindEth/juno) and [Pathfinder](https://github.com/eqlabs/pathfinder).\n- An account with enough funds to pay for the attestation transactions.\n\n## Installation\n\nThe tool can be either built from source or pulled from docker. Aditionally we offer pre-compiles, check our [release page](https://github.com/NethermindEth/starknet-staking-v2/releases).\n\n### Building from source\n\nRequires having the latest [GO compiler](https://go.dev/doc/install) version. Once installed run:\n\n```bash\nmake validator\n```\n\nThis will compile the project and place the binary in *./build/validator*.\n\n## Validator configuration and execution\n\nTo run the validator it needs certain data specified such as the Starknet node to connect to and the operational address of the staker.\nThis data can be provided through several ways, in order of (decreasing) priority:\n1. Command line flags,\n2. Environment vars and\n3. Configuration file.\n\n### With a configuration file\n\nThe validator can be run with:\n```bash\n./build/validator --config \u003cpath_to_config_file\u003e\n```\n\nThe config file is `.json` which specifies two main fields `provider` and `signer`. For the `provider`, it requires an *http* and *websocket* endpoints to a starknet node that supports rpc version `0.8.1` or higher. Those endpoints are used to listen information from the network.\n\nFor the `signer`, you need to specify the *operational address* and a signing method. \nThe signing method can be either internal to the tool or asked externally, based on if you provide a *private key* or an external *url*:\n1. By provding a *private key* the program will sign the transactions internally.\n2. By providing an external *url* to program from which the validator will ask for signatures, see exactly how [here](#external-signer).\n3. If both are provided, the validator will use the remote signer over the internal one.\n\n\nA full configuration file looks like this:\n\n```json\n{\n  \"provider\": {\n      \"http\": \"http://localhost:6060/v0_8\",\n      \"ws\": \"ws://localhost:6061/v0_8\"\n  },\n  \"signer\": {\n      \"url\": \"http://localhost:8080\",\n      \"operationalAddress\": \"0x123\",\n      \"privateKey\": \"0x456\"\n  }\n}\n```\n\nNote that because both `url` and `privateKey` fields are set in the previous example the tool will prioritize remote signing through the `url` than internally signing with the `privateKey`. Be sure to  be explicit on your configuration file and leave just one of them.\n\n\n### With Environment Variables\nAlternatively, similarly as described as the previous section, the validator can be configured using environment vars. The following example using a `.env` file with the following content:\n\n```bash\nexport PROVIDER_HTTP_URL=\"http://localhost:6060/v0_8\"\nexport PROVIDER_WS_URL=\"ws://localhost:6061/v0_8\"\n\nexport SIGNER_EXTERNAL_URL=\"http://localhost:8080\"\nexport SIGNER_OPERATIONAL_ADDRESS=\"0x123\"\nexport SIGNER_PRIVATE_KEY=\"0x456\"\n```\n\nSource the enviroment vars and run the validator:\n\n```bash\nsource path/to/env\n\n./build/validator\n```\n\n\n### With flags\nFinally, as a third alternative, you can specify the necessary validation configuration through flags as well:\n\n```bash\n./build/validator \\\n    --provider-http \"http://localhost:6060/v0_8\" \\\n    --provider-ws \"ws://localhost:6061/v0_8\" \\\n    --signer-url \"http://localhost:8080\" \\\n    --signer-op-address \"0x123\" \\\n    --signer-priv-key \"0x456\"\n```\n\n\n### Mixed configuration approach\n\nUsing a combination of both approaches is also valid. Values set by flags will override values set by enviroment flags and values set by enviroment flags will override values set in a configuration file.\n\n```bash\nPROVIDER_HTTP_URL=\"http://localhost:6060/v0_8\" ./build/validator \\\n    --config \u003cpath_to_config_file\u003e \\\n    --provider-ws \"ws://localhost:6061/v0_8\" \\\n    --signer-url \"http//localhost:8080\" \\\n    --signer-op-address \"0x123\" \\\n    --private-key \"0x456\"\n```\n\n## Additional configurations\n\nIn addition to the configuration described above, the tool allows for other non-essential customization. You can see all available options by using the `--help` flag:\n\n1. Using specific staking and attestation contract addresses through the `--staking-contract-address` and `--attest-contract-address` flags respectively. If no values are provided, sensible defaults are provided based on the network id (only Mainnet and Sepolia).\n\n2. `--max-tries` allows you to set how many attempts the tool does to get attestation information. It can be set to any positive number or to *infinite* if you want the tool to never stop execution. It's set to *infinite* by default.\n\n3. `--balance-threshold` represents the balance amount you want your signer account to be above of. Checks are performed after every attestation window ends and if the balance is below the specified amount a warning is emitted. Defaults to 100 STRK.\n\n4. `--log-level` set's the tool logging level. Defaults to `info`.\n\n5. `--braavos-account` changes the transaction version format from `0x3` to `1\u003c\u003c128 + 0x3` required by Braavos accounts. \n\n## Other features\n\nWe offer advance features such as **[external signing](https://nethermindeth.github.io/starknet-staking-v2/external-signer)** and **[monitoring via prometheus](https://nethermindeth.github.io/starknet-staking-v2/metrics)**. \n\n\nFor further general details of the tool you can reference the [official documentation](https://nethermindeth.github.io/starknet-staking-v2/).\n\n\n\n## Contact us\n\nWe are the team behind the Juno client. Please don't hesitate to contact us if you have questions or feedback:\n\n- [Telegram](https://t.me/StarknetJuno)\n- [Discord](https://discord.com/invite/TcHbSZ9ATd)\n- [X(Formerly Twitter)](https://x.com/NethermindStark)\n\n##  License\n\nStarknet Staking v2 is open-source software licensed under the [Apache-2.0 License](https://github.com/NethermindEth/starknet-staking-v2/blob/main/LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fstarknet-staking-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnethermindeth%2Fstarknet-staking-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fstarknet-staking-v2/lists"}