Skip to content

refactor(utxo): remove hardcoded CoinVariant in favor of ChainVariant config#2692

Merged
shamardy merged 4 commits intodevfrom
feat-config-utxo-forks
Nov 25, 2025
Merged

refactor(utxo): remove hardcoded CoinVariant in favor of ChainVariant config#2692
shamardy merged 4 commits intodevfrom
feat-config-utxo-forks

Conversation

@shamardy
Copy link
Copy Markdown
Collaborator

@shamardy shamardy commented Nov 23, 2025

Summary

Refactors CoinVariant to ChainVariant, removing hardcoded ticker-based logic for block header deserialization. This logic is now explicitly defined in the coin configuration.

Configuration Changes

The coins config file must be updated. Add "chain_variant": "<VARIANT>" inside the "protocol" object for the coins listed below.

Default Behavior: If omitted, it defaults to Standard (used by KMD, LTC, DOGE, DASH, ZEC, etc.), so those coins do not require changes.

Required Updates:

Affected Coins Chain Variant Value
BTC, BCH, NAV, RIC "BTC"
QTUM, RUNES "QTUM"
LBC "LBC"
PPC "PPC"
RICK, DOC "RICK"
MORTY, MARTY "MORTY"
RVN, AIPG, XNA, EVR, MEWC, AVN "RVN"
PIVX, DOGEC "PIVX"

Example Config:

"protocol": {
  "type": "UTXO",
  "chain_variant": "BTC" 
}

@shamardy shamardy marked this pull request as ready for review November 24, 2025 11:27
Copy link
Copy Markdown

@cipig cipig left a comment

Choose a reason for hiding this comment

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

thanks a lot, works fine
fixes #2620

@shamardy shamardy merged commit 82bcc7a into dev Nov 25, 2025
20 of 27 checks passed
@shamardy shamardy deleted the feat-config-utxo-forks branch November 25, 2025 09:48
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.

2 participants