{"id":38969103,"url":"https://github.com/eqlabs/starknet-validator-attestation","last_synced_at":"2026-01-17T16:35:55.290Z","repository":{"id":285392198,"uuid":"957979652","full_name":"eqlabs/starknet-validator-attestation","owner":"eqlabs","description":"Starknet Validator Attestation Tool","archived":false,"fork":false,"pushed_at":"2025-11-11T10:31:16.000Z","size":246,"stargazers_count":6,"open_issues_count":2,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-11-11T11:25:49.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eqlabs.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-31T12:55:47.000Z","updated_at":"2025-11-11T10:01:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcca96e7-85a9-4e28-8f43-11f0254f2c4f","html_url":"https://github.com/eqlabs/starknet-validator-attestation","commit_stats":null,"previous_names":["eqlabs/starknet-validator-attestation"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/eqlabs/starknet-validator-attestation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eqlabs%2Fstarknet-validator-attestation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eqlabs%2Fstarknet-validator-attestation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eqlabs%2Fstarknet-validator-attestation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eqlabs%2Fstarknet-validator-attestation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eqlabs","download_url":"https://codeload.github.com/eqlabs/starknet-validator-attestation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eqlabs%2Fstarknet-validator-attestation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-17T16:35:54.738Z","updated_at":"2026-01-17T16:35:55.282Z","avatar_url":"https://github.com/eqlabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starknet Validator Attestation\n\nThis is a tool for attesting validators on Starknet. Implements the attestation specification in [SNIP 28](https://community.starknet.io/t/snip-28-staking-v2-proposal/115250).\n\n\n## Requirements\n\n- A Starknet node with support for the JSON-RPC 0.9.0 API specification. This tool has been tested with [Pathfinder](https://github.com/eqlabs/pathfinder) v0.20.0.\n- Staking contracts set up and registered with Staking v2.\n- Sufficient funds in the operational account to pay for attestation transactions.\n\n\n## Installation\n\nYou can either use the Docker image we publish on [GitHub](https://github.com/eqlabs/starknet-validator-attestation/pkgs/container/starknet-validator-attestation), the binaries on our [release page](https://github.com/eqlabs/starknet-validator-attestation/releases/latest) or compile the source code from this repository. Compilation requires Rust 1.91+.\n\n\n## Running\n\n```shell\ndocker run -it --rm --network host \\\n  -e VALIDATOR_ATTESTATION_OPERATIONAL_PRIVATE_KEY=\"0xdeadbeef\" \\\n  ghcr.io/eqlabs/starknet-validator-attestation \\\n  --staker-operational-address 0x02e216b191ac966ba1d35cb6cfddfaf9c12aec4dfe869d9fa6233611bb334ee9 \\\n  --node-url http://localhost:9545/rpc/v0_9 \\\n  --local-signer\n```\n\nEach CLI option can also be set via environment variables. Please check the output of `starknet-validator-attestation --help` for more information.\n\nLog level defaults to `info`. Verbose logging can be enabled by setting the `RUST_LOG` environment variable to `debug`.\n\n\n### Signatures\n\nThere are two options for signing attestation transactions sent by the tool.\n\n- You can use `--local-signer`. In this case you _must_ set the private key of the operational account in the `VALIDATOR_ATTESTATION_OPERATIONAL_PRIVATE_KEY` environment variable.\n- You can use an external signer implementing a simple HTTP API. Use `--remote-signer-url URL` or set the `VALIDATOR_ATTESTATION_REMOTE_SIGNER_URL` to the URL of the external signer API.\n\n#### External signer API\n\nThe API should expose a single `/sign` endpoint:\n\n- POST `/sign`: should return the signature for the chain id and transaction values received as its input. The `transaction` object should follow the [INVOKE_TXN_V3](https://github.com/starkware-libs/starknet-specs/blob/a2d10fc6cbaddbe2d3cf6ace5174dd0a306f4885/api/starknet_api_openrpc.json#L2621) schema from the JSON-RPC specification (the signature field is ignored). Example request body:\n  ```json\n  {\n      \"transaction\": {\n          \"type\": \"INVOKE\",\n          \"sender_address\": \"0x2e216b191ac966ba1d35cb6cfddfaf9c12aec4dfe869d9fa6233611bb334ee9\",\n          \"calldata\": [\n              \"0x1\",\n              \"0x4862e05d00f2d0981c4a912269c21ad99438598ab86b6e70d1cee267caaa78d\",\n              \"0x37446750a403c1b4014436073cf8d08ceadc5b156ac1c8b7b0ca41a0c9c1c54\",\n              \"0x1\",\n              \"0x614f596b9d8eafbc87a48ff3a2a4bd503762d3f4be7c91cdeb766cf869c2233\"\n          ],\n          \"version\": \"0x3\",\n          \"signature\": [],\n          \"nonce\": \"0xbf\",\n          \"resource_bounds\": {\n              \"l1_gas\": {\n                  \"max_amount\": \"0x0\",\n                  \"max_price_per_unit\": \"0x49f83fa3027b\"\n              },\n              \"l1_data_gas\": {\n                  \"max_amount\": \"0x600\",\n                  \"max_price_per_unit\": \"0x3948c\"\n              },\n              \"l2_gas\": {\n                  \"max_amount\": \"0x1142700\",\n                  \"max_price_per_unit\": \"0x33a8f57f9\"\n              }\n          },\n          \"tip\": \"0x0\",\n          \"paymaster_data\": [],\n          \"account_deployment_data\": [],\n          \"nonce_data_availability_mode\": \"L1\",\n          \"fee_data_availability_mode\": \"L1\"\n      },\n      \"chain_id\": \"0x534e5f5345504f4c4941\"\n  }\n  ```\n  Response should contain the signature as an array:\n  ```json\n  {\n      \"signature\": [\n          \"0x6a775c4dcc7d1a1b8f23a1ab18d9e080ccb8271a7706296dfbadb3563daedfb\",\n          \"0x43fc38b8fd6b204ee52c3843ce060e94f8ed96355bc479dcb2db1292668ccef\"\n      ]\n  }\n  ```\n\nAn example implementation of the API is available [here](./examples/signer.rs).\n\n\n### Tip\n\nThe transaction tip value used during submission is calculated based on the median tip value in the `latest` block. The exact value used during submission is `MAX(latest_median_tip * ${tip_boost}, ${minimum_tip})`, where `tip_boost` and `minimum_tip` can be configured using the `--tip-boost` and `--minimum-tip` CLI arguments.\n\n## Monitoring\n\nA metrics endpoint is provided for scraping with Prometheus. By default the endpoint is available at `http://127.0.0.1:9090/metrics`. You can use the `--metrics-address` CLI option to change this address.\n\nAvailable metrics are:\n\n- `validator_attestation_starknet_latest_block_number`: Latest block number seen by the validator.\n- `validator_attestation_current_epoch_id`: ID of the current epoch.\n- `validator_attestation_current_epoch_length`: Length of the current epoch.\n- `validator_attestation_current_epoch_starting_block_number`: First block number of the current epoch.\n- `validator_attestation_current_epoch_assigned_block_number`: Block number to attest in current epoch.\n- `validator_attestation_last_attestation_timestamp_seconds`: Timestamp of the last attestation.\n- `validator_attestation_attestation_submitted_count`: Number of attestations submitted by the validator.\n- `validator_attestation_attestation_failure_count`: Number of attestation transaction submission failures.\n- `validator_attestation_attestation_confirmed_count`: Number of attestations submitted that have been confirmed by the network.\n- `validator_attestation_attestation_confirmations_observed_count`: Number of total attestation confirmations (includes attestation _not_ submitted by this tool).\n- `validator_attestation_missed_epochs_count`: Number of epochs with no successful attestation.\n- `validator_attestation_operational_account_balance_strk`: Current STRK token balance of the operational account.\n\nThe chain ID of the network is exposed as the `network` label on all metrics.\n\n\n## License\n\nLicensed under the Apache License, Version 2.0 ([LICENSE](LICENSE) or http://www.apache.org/licenses/LICENSE-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feqlabs%2Fstarknet-validator-attestation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feqlabs%2Fstarknet-validator-attestation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feqlabs%2Fstarknet-validator-attestation/lists"}