Skip to content

feat(go): add testnet4 mapping and harden runtime integration behavior#4002

Open
lionakhnazarov wants to merge 2 commits into
stack/testnet4-03-deployment-artifactsfrom
stack/testnet4-04-go-testnet4-runtime
Open

feat(go): add testnet4 mapping and harden runtime integration behavior#4002
lionakhnazarov wants to merge 2 commits into
stack/testnet4-03-deployment-artifactsfrom
stack/testnet4-04-go-testnet4-runtime

Conversation

@lionakhnazarov
Copy link
Copy Markdown
Collaborator

@lionakhnazarov lionakhnazarov commented May 25, 2026

Stack Context

This is PR 4/4 in the reorganization stack.
Base: #4001 (stack/testnet4-03-deployment-artifacts)

What Changed

1) CLI/config wiring for Testnet4

  • CLI flags/start flow updates:
    • cmd/flags.go, cmd/flags_test.go, cmd/start.go
  • Added embedded Electrum URL set for testnet4:
    • config/_electrum_urls/testnet4
  • Config/network mapping updates and tests:
    • config/network/network.go
    • config/config_test.go
    • config/electrum_test.go
    • config/contracts.go

2) Bitcoin/Electrum behavior and tests

  • Network type/string handling and electrum client behavior updates:
    • pkg/bitcoin/bitcoin.go
    • pkg/bitcoin/electrum/electrum.go
  • Integration/unit test adjustments for reliability and expected behavior:
    • pkg/bitcoin/electrum/electrum_integration_test.go
    • pkg/bitcoin/electrum/electrum_test.go

3) Ethereum chain integration + TBTC wiring

  • Chain adapter updates including DKG validator support and integration behavior:
    • pkg/chain/ethereum/bitcoin_difficulty.go
    • pkg/chain/ethereum/ecdsa_dkg_validator_chain.go (new)
    • pkg/chain/ethereum/ethereum.go
    • pkg/chain/ethereum/ethereum_integration_test.go
    • pkg/chain/ethereum/tbtc.go

4) Runtime reliability and maintainer logic

  • Local block counter/watcher reliability update:
    • pkg/chain/local_v1/blockcounter.go
  • DKG test helper adjustment:
    • pkg/internal/dkgtest/dkgtest.go
  • Bitcoin difficulty maintainer behavior + tests/config/errors:
    • pkg/maintainer/btcdiff/bitcoin_difficulty.go
    • pkg/maintainer/btcdiff/bitcoin_difficulty_test.go
    • pkg/maintainer/btcdiff/config.go
    • pkg/maintainer/btcdiff/errors.go (new)

5) TBTC logic/tests and integration test config updates

  • TBTC behavior/tests:
    • pkg/tbtc/inactivity.go
    • pkg/tbtc/inactivity_test.go
    • pkg/tbtc/tbtc.go
    • pkg/tbtc/coordination_test.go
  • TBTC PG test marshaling helper:
    • pkg/tbtcpg/internal/test/marshaling.go
  • Updated test config fixtures:
    • test/config.json, test/config.toml, test/config.yaml

Test Plan

  • go test ./config/... ./pkg/bitcoin/...
  • go test ./pkg/maintainer/btcdiff/... ./pkg/tbtc/...
  • go test ./pkg/chain/ethereum/...

Moves generated deployment snapshots and ancillary artifact churn into a standalone layer so functional Solidity and Go changes can be reviewed independently.

Co-authored-by: Cursor <cursoragent@cursor.com>
…f runtime paths

Introduces testnet4 configuration and electrum URL wiring, updates chain integrations including DKG validator support, and improves btcdiff/TBTC runtime and reliability-oriented tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lionakhnazarov lionakhnazarov force-pushed the stack/testnet4-03-deployment-artifacts branch from 72b052e to 5b40e26 Compare May 25, 2026 10:43
@lionakhnazarov lionakhnazarov force-pushed the stack/testnet4-04-go-testnet4-runtime branch from 99015a1 to dc687c9 Compare May 25, 2026 10:43
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.

1 participant