{"id":20205892,"url":"https://github.com/kaplanmaxe/marinade-crank","last_synced_at":"2025-09-21T23:33:05.859Z","repository":{"id":239829039,"uuid":"800646917","full_name":"kaplanmaxe/marinade-crank","owner":"kaplanmaxe","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-22T17:22:33.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-14T05:20:50.007Z","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/kaplanmaxe.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,"publiccode":null,"codemeta":null}},"created_at":"2024-05-14T18:16:47.000Z","updated_at":"2024-10-22T17:22:37.000Z","dependencies_parsed_at":"2024-05-15T17:22:26.221Z","dependency_job_id":"4011108f-f8d8-4622-8536-d513c3f99fd2","html_url":"https://github.com/kaplanmaxe/marinade-crank","commit_stats":null,"previous_names":["kaplanmaxe/marinade-crank"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanmaxe%2Fmarinade-crank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanmaxe%2Fmarinade-crank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanmaxe%2Fmarinade-crank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaplanmaxe%2Fmarinade-crank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaplanmaxe","download_url":"https://codeload.github.com/kaplanmaxe/marinade-crank/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233808832,"owners_count":18733598,"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-14T05:19:55.979Z","updated_at":"2025-09-21T23:33:00.584Z","avatar_url":"https://github.com/kaplanmaxe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Marinade Crank\n\nStakes to a validator of your choosing. The validator needs to be eligible stake in order for this to run successfully.\n\n**This is an unofficial tool, not written or maintained by Marinade. It is provided as is as an open source tool.**\n\nThis was originally made as a script. It is being OSS'd to help other validators.\n\n### Building\n\n`cargo build`\n\n### Running\n\n**This tool can be run with any keypair so long as it is funded with a sufficient amount of SOL. There is no need to run this with your validator identity.**\n\nIt is recommended to simulate first. This is because `stakeReserve` can only be called at a specific slot. By simulating, the output will either show:\n\n1. Which slot you can run this program\n\n```\n./target/debug/marinade-crank --vote-account H4QVPxS7napq3NEYxqLhxbKi9nJ8s56dD2EQZGsyZ3sb --simulate --keypair \u003cPATH_TO_KEYPAIR_FILE\u003e --cluster https://api.mainnet-beta.solana.com\nAttempting to stake H4QVPxS7napq3NEYxqLhxbKi9nJ8s56dD2EQZGsyZ3sb with 2379 SOL\nSimulation result: Ok(Response { context: RpcResponseContext { slot: 265745295, api_version: Some(RpcApiVersion(Version { major: 1, minor: 17, patch: 28 })) }, value: RpcSimulateTransactionResult { err: Some(InstructionError(2, Custom(6042))), logs: Some([\"Program ComputeBudget111111111111111111111111111111 invoke [1]\", \"Program ComputeBudget111111111111111111111111111111 success\", \"Program ComputeBudget111111111111111111111111111111 invoke [1]\", \"Program ComputeBudget111111111111111111111111111111 success\", \"Program MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD invoke [1]\", \"Program log: Instruction: StakeReserve\", \"Program 11111111111111111111111111111111 invoke [2]\", \"Program 11111111111111111111111111111111 success\", \"Program consumption: 77570 units remaining\", \"Program log: AnchorError thrown in programs/marinade-finance/src/instructions/crank/stake_reserve.rs:171. Error Code: TooEarlyForStakeDelta. Error Number: 6042. Error Message: Too early for stake delta.\", \"Program log: Left: 265745298\", \"Program log: Right: 266093999\", \"Program MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD consumed 31901 of 99700 compute units\", \"Program MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD failed: custom program error: 0x179a\"]), accounts: None, units_consumed: Some(300), return_data: None } })\n```\n\n2. That the validator has already reached the stake target\n\n```\n./target/debug/marinade-crank --vote-account EdGevanAjM8a6Gg9KxBVrmVdZAUGAZ9xaVd7t9R4H2x --simulate --keypair \u003cPATH_TO_KEYPAIR_FILE\u003e --cluster https://api.mainnet-beta.solana.com\nValidator EdGevanAjM8a6Gg9KxBVrmVdZAUGAZ9xaVd7t9R4H2x already reached stake target. Active balance: 21482, stake_target: 20313\n```\n\nIf a validator is eligble for stake as shown in #1, read the output where it says `Too early for stake`. In that log, you will see a value for `Left` and `Right`. The value for `Left` is the current slot in the epoch. The value of `Right` is the slot when you can call the `stakeReserve` instruction. **If you try to call the instruction before the right slot, it will fail.**\n\nThen simply run the program but omit `--simulate`.\n\n### Priority fees\n\nTo run with a priority fee set, you can set `--with-compute-unit-price`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaplanmaxe%2Fmarinade-crank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaplanmaxe%2Fmarinade-crank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaplanmaxe%2Fmarinade-crank/lists"}