sbtc-developer-release icon indicating copy to clipboard operation
sbtc-developer-release copied to clipboard

miner: generate btc for stacks miner and deployer wallet

Open EmbeddedAndroid opened this issue 1 year ago • 1 comments

Description

We'd like to modify the miner service to do the following.

  • Mine N number of blocks to the stack miner wallet (N's default is 200 blocks)
  • Mine N number of blocks to the stacks deployer wallet (N's default is 200 blocks)
  • Generate one block every N seconds to the stacks deployer wallet (N's default is 2 seconds)

Context

This will allow users to not have to manually mine BTC to use the deposit comand.

Expected Approach

Update the entrypoint for the miner, and mine to both address.

Acceptance Criteria

  • [ ] PR adds the feature to mine to both addresses
  • [ ] Both the stacks miner and stacks deploy wallet should have btc when devenv first starts

EmbeddedAndroid avatar Oct 05 '23 18:10 EmbeddedAndroid

In this context there are 3 parties that need BTC:

  1. Stacks miner
  2. Peg wallet
  3. Depositor / withdrawer

In the current form utility scripts use the peg wallet address (2) to deposit and withdraw. It was made that way to reduce the amount of addresses that we need to track but in hindsight it might confuse people.

I'll make a PR where a third address is used for this purpose and will also make sure they all have some BTC premined as part of the devenv setup.

stjepangolemac avatar Oct 10 '23 09:10 stjepangolemac