fix: correct Palladium chain params and sanitize branding
- bitcoin/chainparams.c:
- Fix mainnet RPC port 2333 → 2332 (was the P2P port)
- Fix regtest RPC port 28444 → 12443 (verified against palladiumcore)
- Add missing testnet entry (tplm, RPC 12332, P2P 19735, P2PKH 127/P2SH 115)
- Reset when_lightning_became_cool to 1 (no Bitcoin-specific block reference)
- Add operational notes: Resilience Fork at block 340,000 (2 min blocks),
Taproot via BIP9 on mainnet / ALWAYS_ACTIVE on regtest
- common/configdir.c:
- Fix --network help text to list palladium/testnet/regtest
- Fix --mainnet alias description (bitcoin → palladium)
- configure: make lowdown optional (warning, not fatal); only needed for man pages
- lightningd/: replace all remaining "bitcoind/bitcoin network" log messages
with "palladiumd/palladium network" (dual_open_control.c, opening_control.c,
peer_htlcs.c)
- .gitignore: add ccan/config.h.* (PIDs left by build system)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,6 +34,7 @@ coverage
|
||||
# Generated Python API documentation
|
||||
docs/python
|
||||
ccan/config.h
|
||||
ccan/config.h.*
|
||||
__pycache__
|
||||
config.vars
|
||||
monkeytype.sqlite3
|
||||
|
||||
@@ -30,12 +30,22 @@ const struct chainparams networks[] = {
|
||||
.onchain_hrp = "plm",
|
||||
.lightning_hrp = "plm",
|
||||
.bip70_name = "main",
|
||||
/* genesis = 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
|
||||
* (same as Bitcoin mainnet - Palladium kept the original genesis block)
|
||||
*
|
||||
* OPERATIONAL NOTES FOR PALLADIUM MAINNET:
|
||||
* - Resilience Fork at block 340,000: block target changes from 10 min to 2 min.
|
||||
* Operators should tune --cltv-expiry-delta and --cltv-final accordingly.
|
||||
* Default cltv_expiry_delta=14 blocks ≈ 28 min (was 140 min on Bitcoin).
|
||||
* - Taproot (BIP341) activates via BIP9 (bit 2), window opens Feb 14 2026.
|
||||
* On regtest Taproot is ALWAYS_ACTIVE. Anchor/Taproot channels work
|
||||
* on regtest immediately; on mainnet only after BIP9 lock-in. */
|
||||
.genesis_blockhash = {{{.u.u8 = {0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3,
|
||||
0x72, 0xc1, 0xa6, 0xa2, 0x46, 0xae, 0x63,
|
||||
0xf7, 0x4f, 0x93, 0x1e, 0x83, 0x65, 0xe1,
|
||||
0x5a, 0x08, 0x9c, 0x68, 0xd6, 0x19, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00}}}},
|
||||
.rpc_port = 2333,
|
||||
.rpc_port = 2332,
|
||||
.ln_port = 9735,
|
||||
.cli = "palladium-cli",
|
||||
.cli_args = NULL,
|
||||
@@ -50,8 +60,7 @@ const struct chainparams networks[] = {
|
||||
.max_funding = AMOUNT_SAT_INIT((1 << 24) - 1),
|
||||
.max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL),
|
||||
.max_supply = AMOUNT_SAT_INIT(2100000000000000),
|
||||
/* "Lightning Charge Powers Developers & Blockstream Store" */
|
||||
.when_lightning_became_cool = 504500,
|
||||
.when_lightning_became_cool = 1,
|
||||
.p2pkh_version = 55,
|
||||
.p2sh_version = 5,
|
||||
.testnet = false,
|
||||
@@ -59,6 +68,34 @@ const struct chainparams networks[] = {
|
||||
.bip32_key_version = {.bip32_pubkey_version = BIP32_VER_MAIN_PUBLIC,
|
||||
.bip32_privkey_version = BIP32_VER_MAIN_PRIVATE},
|
||||
.is_elements = false},
|
||||
{.network_name = "testnet",
|
||||
.onchain_hrp = "tplm",
|
||||
.lightning_hrp = "tplm",
|
||||
.bip70_name = "test",
|
||||
/* genesis = 000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
|
||||
* (same as Bitcoin testnet - Palladium kept the original testnet genesis block) */
|
||||
.genesis_blockhash = {{{.u.u8 = {0x43, 0x49, 0x7f, 0xd7, 0xf8, 0x26, 0x95,
|
||||
0x71, 0x08, 0xf4, 0xa3, 0x0f, 0xd9, 0xce,
|
||||
0xc3, 0xae, 0xba, 0x79, 0x97, 0x20, 0x84,
|
||||
0xe9, 0x0e, 0xad, 0x01, 0xea, 0x33, 0x09,
|
||||
0x00, 0x00, 0x00, 0x00}}}},
|
||||
.rpc_port = 12332,
|
||||
.ln_port = 19735,
|
||||
.cli = "palladium-cli",
|
||||
.cli_args = "-testnet",
|
||||
.cli_min_supported_version = 150000,
|
||||
.dust_limit = { 546 },
|
||||
.max_funding = AMOUNT_SAT_INIT((1 << 24) - 1),
|
||||
.max_payment = AMOUNT_MSAT_INIT(0xFFFFFFFFULL),
|
||||
.max_supply = AMOUNT_SAT_INIT(2100000000000000),
|
||||
.when_lightning_became_cool = 1,
|
||||
.p2pkh_version = 127,
|
||||
.p2sh_version = 115,
|
||||
.testnet = true,
|
||||
.fee_asset_tag = NULL,
|
||||
.bip32_key_version = {.bip32_pubkey_version = BIP32_VER_TEST_PUBLIC,
|
||||
.bip32_privkey_version = BIP32_VER_TEST_PRIVATE},
|
||||
.is_elements = false},
|
||||
{.network_name = "regtest",
|
||||
.onchain_hrp = "rplm",
|
||||
.lightning_hrp = "rplm",
|
||||
@@ -68,7 +105,7 @@ const struct chainparams networks[] = {
|
||||
0x5b, 0xbf, 0x28, 0xc3, 0x4f, 0x3a, 0x5e,
|
||||
0x33, 0x2a, 0x1f, 0xc7, 0xb2, 0xb7, 0x3c,
|
||||
0xf1, 0x88, 0x91, 0x0f}}}},
|
||||
.rpc_port = 28444,
|
||||
.rpc_port = 12443,
|
||||
.ln_port = 19846,
|
||||
.cli = "palladium-cli",
|
||||
.cli_args = "-regtest",
|
||||
|
||||
@@ -340,8 +340,8 @@ struct configvar **initial_config_opts(const tal_t *ctx,
|
||||
"Set base directory: network-specific subdirectory is under here");
|
||||
opt_register_early_arg("--network", opt_set_network, opt_show_network,
|
||||
NULL,
|
||||
"Select the network parameters (bitcoin, testnet,"
|
||||
" signet, or regtest)");
|
||||
"Select the network parameters (palladium, testnet,"
|
||||
" or regtest)");
|
||||
opt_register_early_noarg("--testnet",
|
||||
opt_set_specific_network, "testnet",
|
||||
"Alias for --network=testnet");
|
||||
@@ -353,7 +353,7 @@ struct configvar **initial_config_opts(const tal_t *ctx,
|
||||
"Alias for --network=signet");
|
||||
opt_register_early_noarg("--mainnet",
|
||||
opt_set_specific_network, "palladium",
|
||||
"Alias for --network=bitcoin");
|
||||
"Alias for --network=palladium");
|
||||
opt_register_early_noarg("--regtest",
|
||||
opt_set_specific_network, "regtest",
|
||||
"Alias for --network=regtest");
|
||||
|
||||
3
configure
vendored
3
configure
vendored
@@ -538,8 +538,7 @@ else
|
||||
fi
|
||||
|
||||
if ! check_command 'lowdown' lowdown; then
|
||||
echo "*** We need lowdown!" >&2
|
||||
exit 1
|
||||
echo "WARNING: lowdown not found, man page generation will be skipped." >&2
|
||||
fi
|
||||
|
||||
if echo | check_command sha256sum sha256sum; then
|
||||
|
||||
@@ -2654,7 +2654,7 @@ json_openchannel_bump(struct command *cmd,
|
||||
/* Ok, we're kosher to start. Delay if not synced yet. */
|
||||
if (!topology_synced(cmd->ld->topology)) {
|
||||
json_notify_fmt(cmd, LOG_UNUSUAL,
|
||||
"Waiting to sync with bitcoind network (block %u of %u)",
|
||||
"Waiting to sync with palladiumd network (block %u of %u)",
|
||||
get_block_height(cmd->ld->topology),
|
||||
get_network_blockheight(cmd->ld->topology));
|
||||
|
||||
@@ -3287,7 +3287,7 @@ static struct command_result *json_openchannel_init(struct command *cmd,
|
||||
|
||||
if (!topology_synced(cmd->ld->topology)) {
|
||||
json_notify_fmt(cmd, LOG_UNUSUAL,
|
||||
"Waiting to sync with bitcoind network (block %u of %u)",
|
||||
"Waiting to sync with palladiumd network (block %u of %u)",
|
||||
get_block_height(cmd->ld->topology),
|
||||
get_network_blockheight(cmd->ld->topology));
|
||||
|
||||
|
||||
@@ -1456,7 +1456,7 @@ static struct command_result *json_fundchannel_start(struct command *cmd,
|
||||
= tal(cmd, struct fundchannel_start_info);
|
||||
|
||||
json_notify_fmt(cmd, LOG_UNUSUAL,
|
||||
"Waiting to sync with bitcoind network (block %u of %u)",
|
||||
"Waiting to sync with palladiumd network (block %u of %u)",
|
||||
get_block_height(cmd->ld->topology),
|
||||
get_network_blockheight(cmd->ld->topology));
|
||||
|
||||
|
||||
@@ -720,7 +720,7 @@ const u8 *send_htlc_out(const tal_t *ctx,
|
||||
/* Note: we allow outgoing HTLCs before sync, for fast startup. */
|
||||
if (!topology_synced(out->peer->ld->topology)) {
|
||||
log_debug(out->log, "Sending HTLC while still syncing"
|
||||
" with bitcoin network (%u vs %u)",
|
||||
" with palladium network (%u vs %u)",
|
||||
get_block_height(out->peer->ld->topology),
|
||||
get_network_blockheight(out->peer->ld->topology));
|
||||
}
|
||||
@@ -2409,7 +2409,7 @@ void peer_got_commitsig(struct channel *channel, const u8 *msg)
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we're not synced with bitcoin network, we can't accept
|
||||
/* If we're not synced with palladium network, we can't accept
|
||||
* any new HTLCs. We stall at this point, in the hope that it
|
||||
* won't take long! */
|
||||
if (added && !topology_synced(ld->topology)) {
|
||||
|
||||
Reference in New Issue
Block a user