list Kerrigan (KRGN)#1791
Conversation
|
thanks for the PR i activated KRGN on one of my makers and made a Desktop build, so it can be tested: https://github.com/cipig/komodo-wallet-desktop/actions/runs/24337624835 i found a problem related to the IPv6 address in DNS... if DEX uses that, it gets a connection failure btw, the Web version of the DEX can only handle WSS... TCP/SSL is for Mobile and Desktop |
|
Enabled the IPv6 Electrum interface and WSS as well, thanks for catching that. 🙏 |
|
I tried a swap, but it failed. Maker could send makerpayment, but taker couldn't spend it. Backend shows me this error then: |
[BOT] Update coins config json
Kerrigan (KRGN) is a Dash fork with PIVX-style Sapling that mines four PoW algorithms concurrently (X11, KawPoW, Equihash(200,9), Equihash(192,7)). The mined algorithm is encoded at `(version >> 9) & 0x7` and selects a different header tail per block, so header size varies within a single batch (80, 124, 543, or 1487 bytes on mainnet). On `ChainVariant::Standard` this produces a `blockchain.block.headers` parse failure as soon as the batch crosses a non-X11 block — see the listing PR at GLEECBTC/coins#1791, failing at height 22313: `failed to parse list of 11 headers ... MalformedData`. The fix dispatches the per-algo tail inside `BlockHeader::deserialize` when `ChainVariant::KRGN` is set: - algo 0 (X11) — plain 80-byte path (already the default behaviour) - algo 1 (KawPoW) — reuses the existing RVN ProgPow tail reader (n_height u32, n_nonce_64 u64, mix_hash H256); one detail to note is that Kerrigan keeps the 80-byte prefix u32 nonce on-wire (zeroed), unlike RVN which omits it, so the u32 read path stays active for KRGN - algo 2 or 3 (Equihash) — Zcash-style layout: hash_final_sapling_root before time, U32 bits, H256 nonce, then the variable-length solution list. No new struct fields needed; the existing zcash-style branch handles the whole tail once `is_zcash_style` is extended. All four algos share the canonical 80-byte Bitcoin-shaped prefix for identity hashing (X11 over those 80 bytes), so Serializable round-trips without changes. ### Tests Six new tests in `mm2src/mm2_bitcoin/chain/src/block_header.rs`, all using real mainnet block headers fetched from `electrum-kerrigan.jskitty.cat` around the original failure range: - `test_krgn_chain_variant_try_from` — "KRGN" string parses to `ChainVariant::KRGN` - `test_krgn_x11_header_round_trip` — algo 0, height 22312 (80 bytes) - `test_krgn_kawpow_header_round_trip` — algo 1, height 22316 (124 bytes); asserts n_height/n_nonce_64/mix_hash are populated with the right on-chain values - `test_krgn_equihash_200_header_round_trip` — algo 2, height 22314 (1487 bytes); asserts sapling root + 1344-byte solution + H256 nonce - `test_krgn_equihash_192_header_round_trip` — algo 3, height 22313 (543 bytes); asserts 400-byte solution - `test_krgn_mixed_algo_header_batch` — concatenates one header of each of the four algos and walks the buffer with a single Reader. This reproduces the exact on-wire shape of a `blockchain.block.headers` response and is the strongest regression guard for the swap failure reported on coins#1791. Every fixture is round-tripped byte-for-byte (parse → serialize == original), so the dispatch provably preserves all bytes of the header. All 32 tests pass in `chain::block_header::tests` (6 new, 26 existing); `cargo fmt` and `cargo clippy -- -D warnings` are clean for the two touched crates (`chain`, `serialization`).
Kerrigan Network (KRGN)
Privacy-first Layer 1 blockchain with optional Sapling shielded transactions.
Coin details
ElectrumX servers
Contact: notjskitty (Discord)
Explorers
Testing
Verified end-to-end with Komodo DeFi Framework v3.0.0-beta:
Files changed
coins— KRGN entryelectrums/KRGN— ElectrumX server config (SSL + TCP)explorers/KRGN— Block explorer URLicons_original/krgn.png— 128x128 RGBA coin icon