Skip to content

update config generator for translator proxy and jdc#175

Merged
GitGab19 merged 1 commit into
stratum-mining:mainfrom
lucasbalieiro:fix-config-generator
Jun 4, 2026
Merged

update config generator for translator proxy and jdc#175
GitGab19 merged 1 commit into
stratum-mining:mainfrom
lucasbalieiro:fix-config-generator

Conversation

@lucasbalieiro

Copy link
Copy Markdown
Collaborator

closes #174.

this patch ended up being slightly more complex than initially expected because we need to support multiple versions of sv2-apps. Until this point, we had not encountered any breaking changes in the configuration file format.

the approach taken in this PR is intentionally minimal: introduce version-aware branching logic in the configuration generator and place the user_identity field in the location expected by each supported version.

specifically:

  • For sv2-apps v0.3.5, user_identity is written at the top level of the configuration.
  • For the current main branch, user_identity is written under the upstream section.

This ensures compatibility with both versions while keeping the change set small and focused on resolving the immediate issue.

ps: I would recommend revisiting this implementation in the future. As we begin supporting additional versions of sv2-apps, the current branching approach may become increasingly difficult to maintain. A more structured versioning strategy for configuration generation would likely be beneficial in the long term. For now, however, this solution provides a practical fix for the main branch and unblocks affected users.

@lucasbalieiro lucasbalieiro marked this pull request as ready for review June 3, 2026 18:35
@GitGab19

GitGab19 commented Jun 4, 2026

Copy link
Copy Markdown
Member

ps: I would recommend revisiting this implementation in the future. As we begin supporting additional versions of sv2-apps, the current branching approach may become increasingly difficult to maintain. A more structured versioning strategy for configuration generation would likely be beneficial in the long term. For now, however, this solution provides a practical fix for the main branch and unblocks affected users.

The good thing is that after the work on bitcoin_core_sv2 defined here, we won't need to handle different apps' versions anymore.

So when those changes land on sv2-apps, we can finally remove all this branching logic which we introduced up to now.

@Shourya742 Shourya742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tested it locally seems to work fine.

tACK

@GitGab19

GitGab19 commented Jun 4, 2026

Copy link
Copy Markdown
Member

The good thing is that after the work on bitcoin_core_sv2 defined stratum-mining/sv2-apps#516, we won't need to handle different apps' versions anymore.

So when those changes land on sv2-apps, we can finally remove all this branching logic which we introduced up to now.

Opened this issue to better track it: #176

@GitGab19 GitGab19 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tACK (both v30.2 and v31)

@GitGab19 GitGab19 merged commit 0665ca6 into stratum-mining:main Jun 4, 2026
5 checks passed
@lucasbalieiro lucasbalieiro deleted the fix-config-generator branch June 4, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

broken config TOML creation

3 participants