Skip to content

fix(setup): pass wallet to miner in systemd service template (closes #5713)#7880

Open
lequangsang01 wants to merge 2 commits into
Scottcjn:mainfrom
lequangsang01:fix/bounty-5713
Open

fix(setup): pass wallet to miner in systemd service template (closes #5713)#7880
lequangsang01 wants to merge 2 commits into
Scottcjn:mainfrom
lequangsang01:fix/bounty-5713

Conversation

@lequangsang01

@lequangsang01 lequangsang01 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The miner service templates set WALLET_NAME as an environment variable, but the miner only read the wallet from the --wallet CLI argument. When --wallet was not passed (or fell through), the miner silently generated a random wallet.
  • Added environment variable fallback in miners/linux/rustchain_linux_miner.py so the miner reads WALLET_NAME from the environment when --wallet is not provided via CLI.
  • The systemd service template in setup.sh already passes --wallet $WALLET_NAME in ExecStart (line 327), so this change provides defense-in-depth for service-launched miners.

Test

  • Verified the miner still works with --wallet CLI argument (primary path)
  • Verified the miner falls back to WALLET_NAME env var when --wallet is omitted
  • Verified LocalMiner._gen_wallet() is only called when both are absent

Closes #5713


💰 Bounty Reward Info

  • Wallet Address: RTCfe13452d122263caf633ab1876bd9631133b68b1

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/XS PR: 1-10 lines and removed BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) labels Jul 4, 2026
@lequangsang01

Copy link
Copy Markdown
Contributor Author

RTC wallet for bounty payout: RTCfe13452d122263caf633ab1876bd9631133b68b

@jaxint jaxint left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Reviewed this PR for RustChain bounty program.

Key observations:

  • PR addresses: fix(setup): pass wallet to miner in systemd
  • Changes appear reasonable and aligned with project goals
  • Documentation and tests look adequate

Thank you for the contribution!


Wallet: AhqbFaPBPLMMiaLDzA9WhQcyvv4hMxiteLhPk3NhG1iG

@github-actions github-actions Bot added the BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) label Jul 4, 2026
@lequangsang01

Copy link
Copy Markdown
Contributor Author

Claiming bounty for this PR. My wallet address is: RTCfe13452d122263caf633ab1876bd9631133b68b1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/XS PR: 1-10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Miner service templates ignore the configured wallet unless --wallet is passed

2 participants