Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/mock mining hot swap #4743

Merged
merged 2 commits into from
May 3, 2024

Conversation

ASuciuX
Copy link
Contributor

@ASuciuX ASuciuX commented May 2, 2024

Fixes #4705

I went through all the hot-swappable fields and wrote this to follow the architecture implemented for burnchain hot-swappable fields from the config.

How I tested this using clarinet for devnet and regtest nodes:

Moved my testing commits to this external branch .

  1. Have my updated code + the 2 commits from Hugo.
  2. Build a custom docker image using the last commit from this source branch using this commit 214ae48c0a2c2bac6cd593039210cc21ac3e5e0b.
  3. Custom clarinet devnet start:
    a. Use the built docker image for stacks_node_image_url = "localhost:5001/stacks-node:mock-miner"
    b. Disable automatically bitcoin mining to check balances bitcoin_controller_automining_disabled = true. This is performed as we expect the stacks-mock-miner not to spend bitcoin, while the stacks-miner spends for mining.
  4. Get into stacks-node docker container > files > src>stacks-node>Stacks.toml and add mock_mining=true.
  5. Results on the image below - when the mock-miner was true, there were no stacks-blocks created, in that frame 4 bitcoin blocks were mined and 0 stacks blocks. After switching back the config to not have mock-miner, it mined stacks blocks again.

image

 redid it on top of develop
@ASuciuX
Copy link
Contributor Author

ASuciuX commented May 2, 2024

I'm removing the extra code about clarinet, but want to keep the commit history for this to still be checked/tested. The only commit for the mock-mining hot-swappable is 4245554ae0863f0e5afa802266bca1b697b29bd8.

@stacks-network stacks-network deleted a comment May 2, 2024
@stacks-network stacks-network deleted a comment May 2, 2024
@ASuciuX ASuciuX force-pushed the feat/mock-mining-hot-swap branch from 58b2331 to 4245554 Compare May 2, 2024 16:41
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@obycode obycode added this pull request to the merge queue May 3, 2024
Merged via the queue into stacks-network:develop with commit 1886013 May 3, 2024
1 check passed
@ASuciuX ASuciuX linked an issue May 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nakamoto Miner[3.0] - Make mock-mining config parameter hot-swappable
3 participants