Skip to content

Conversation

@zeekay
Copy link
Member

@zeekay zeekay commented Oct 25, 2025

Summary

This PR updates the Lux CLI to support the regenesis migration process, primarily updating port configurations to align with the new infrastructure standards.

Changes

Port Configuration

  • pkg/constants/constants.go: Updated default port from 9650 to 9630
    • Aligns with the standardized port configuration across all services
    • Ensures CLI commands connect to the correct endpoints

Purpose

These changes ensure the Lux CLI tool works correctly with the migrated infrastructure and can properly interact with nodes running the regenesis migration.

Related PRs

Testing

✅ CLI commands tested with:

  • Node connectivity on port 9630
  • Network operations
  • Subnet management
  • Migration commands

Impact

Essential for CLI operations with the new regenesis infrastructure. All users will need to use the updated CLI version to interact with migrated networks.

This commit updates CLI constants to support the regenesis migration process.

Key changes:
- pkg/constants/constants.go: Updated ports to 9630 (from 9650)
- Configuration adjustments for migration support

These changes ensure the CLI tool works correctly with the migrated
infrastructure using the new standard port configuration.
- Update platformvm.Client, exchangevm.Client to use pointer types
- Use primary.NewKeychainAdapter() for wallet keychain compatibility
- Fix Addresses() return type (set.Set[T] requires .List() for slice)
- Rename SubnetAuth→NetAuth, TrackSubnetsKey→TrackNetsKey
- Update tmpnet API: ReadNetwork/Start signatures, StakingAddress→netip.AddrPort
- Fix L1ValidatorRegistrationJustification type names
- Update GetSubnet→GetNet, GetSubnetClientResponse→GetNetClientResponse
- Replace deprecated consensus-virtuous-commit-threshold and
  consensus-rogue-commit-threshold with consensus-commit-threshold
- Fixes luxd startup failures due to unknown flag errors
- Fix CreateEvmSidecar and CreateCustomSidecar to always set Name and Subnet fields
- Fix CreateEVMGenesisWithParams to properly generate genesis JSON with chain ID and allocations
- Add ChainID and Allocations fields to SubnetEVMGenesisParams
- Use placeholder values in warp deployer when warp-contracts repo is unavailable
- Update primary wallet imports from node/wallet/net/primary to sdk/wallet/primary
- Update chain/c imports from node/wallet/chain/c to sdk/wallet/chain/c
- Update chain/p/builder imports from node/wallet/chain/p/builder to sdk/wallet/chain/p/builder
- Remove redundant tools directory files
- Update SDK to v1.16.23 and ids to v1.1.3
- Replace deprecated consensus-sample-size, consensus-quorum-size,
  and consensus-commit-threshold flags
- Use sybil-protection-enabled=false for multi-node dev networks
- Update netrunner dependency to v1.14.6
- Replace EWOQKey references with GetLocalKey() from genesis package
- Keys now loaded at runtime from ~/.lux/keys or LUX_PRIVATE_KEY env
- Update tmpnet.go to match node v1.21.11 API:
  - GetStringVal() now returns string only, not (string, error)
  - InitiateStop() takes no args
  - node.Start() takes (ctx, log) parameters
- Create genesis config directly using genesis package types
- Add luxfi/ids import for NodeID handling
- Update to genesis v1.2.9 and node v1.21.11
SECURITY: The publicly-known EWOQ key was a security risk if accidentally
used on mainnet. This change introduces a new "local-key" system that:

- Generates a unique random key per machine on first use
- Stores keys in ~/.lux/keys/local-key.pk (0600 permissions)
- Updates the -e/--ewoq flag to use local-key instead
- Updates localnet wallet to use the secure local key

Added functions:
- key.GetLocalKeyPath() - returns expanded local key path
- key.GetOrCreateLocalKey() - loads or generates local key
- key.GetLocalPrivateKey() - convenience function for getting key

Breaking: The EWOQ key constant is deprecated but kept for backwards
compatibility. New code should use GetOrCreateLocalKey() instead.
- Merged upstream changes including --node-path flag and v1.9.1 version bump
- Resolved all merge conflicts preserving local-key security improvements
- Updated tablewriter API for v1.0.9 compatibility
- Updated lpm to v1.7.13 for node v1.21.11 compatibility
- Removed all local replace directives for production readiness
- Cleaned up deleted files (keycmd, nodecmd, blockchaincmd, messengercmd)
- Preserved configurable validator count in network start
@zeekay zeekay merged commit 8e7298a into main Dec 10, 2025
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