216 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 26e21d0a8e chore: migrate luxd HTTP routes /ext -> /v1
Drop the Avalanche-heritage /ext prefix; /v1 is the single canonical route
surface (one way, no backward compat). The node's baseURL is the source of
truth; clients, SDKs, CLI, indexer, maker, genesis, netrunner, and the
k8s/compose/gateway/explorer configs are updated to match.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-07-01 11:40:27 -07:00
Hanzo AI 43ead226a9 scrub: subnet/l2 → chain (canonical vocabulary, forward-only)
Wire-format codec IDs unchanged. CLI aliases deleted; chain is the
command. No backwards-compat shims, no deprecation comments.
2026-05-31 15:09:15 -07:00
Hanzo AI 1888428bd4 drop hardcoded /Users/z paths — use $HOME-relative 2026-05-21 15:01:35 -07:00
Hanzo AI b673b28c31 rename: github.com/luxfi/protocol → github.com/luxfi/proto (imports + go.mod replace) 2026-05-18 21:19:09 -07:00
Hanzo DevandGitHub 811118da30 env: drop LUX_ prefix from env vars (noise) (#41)
Renames LUX_-prefixed env vars to canonical, non-noisy forms across
genesis_config, blockchain, network, examples, tests, genkeys, server:

- LUX_MNEMONIC      -> MNEMONIC
- LUX_PRIVATE_KEY   -> PRIVATE_KEY
- LUX_KEYS_DIR      -> KEYS_DIR
- LUX_BINARY_PATH   -> BINARY_PATH
- LUX_NETWORK_TYPE  -> NETWORK_TYPE  (doc only)
- LUX_GPU_EVM       -> GPU_EVM       (doc only)
- LUX_GPU_WORKER_PID-> GPU_WORKER_PID

Also fixes an obvious infinite-recursion bug in
local/genesis_config.go::getMnemonic() that the previous LUX_MNEMONIC
fallback line had become — the helper now reads MNEMONIC then
LIGHT_MNEMONIC and returns. Without this fix, callers reaching the
fallback would have hung the process.

BREAKING: external callers (CI, dev scripts, operators) must update
env var names. Per CLAUDE.md no-backwards-compatibility rule, the old
forms are removed.
2026-05-15 16:26:33 -07:00
Hanzo AI 69860c26e7 ci: migrate to shared docker-build workflow (native multi-arch, semver) 2026-04-09 21:58:21 -07:00
Hanzo AI af90017cd2 fix: chaos tests compile — resolve geth/crypto import + type mismatches
- Replace github.com/luxfi/geth/crypto (nonexistent) with
  github.com/luxfi/crypto for HexToECDSA, GenerateKey, S256, Sign, FromECDSA
- Use common.PubkeyToAddress and common.Keccak256 (geth/common wrappers)
  to avoid Address type mismatch between crypto/common and geth/common
- Fix log.NewWrappedCore (nonexistent) to log.New in consensus/dex tests
- Fix big.NewInt(1e19) overflow — 1e19 exceeds int64 max
- Fix toCallMsg returning interface{} instead of ethereum.CallMsg
- Add missing ethereum import in dex_chaos_test.go

Verified: go vet -tags chaos ./tests/ && go vet -tags gpu_chaos ./tests/
2026-04-07 09:03:09 -07:00
Hanzo AI af13dfac52 test: GPU EVM Block-STM chaos tests (8 parallel execution scenarios)
Fix compilation of gpu_evm_chaos_test.go by using proper ethereum.CallMsg
type from luxfi/geth root package for eth_call operations. All 8 tests
compile and list correctly with -tags gpu_chaos.

Tests: WriteConflict, ReadWriteSerializability, ECRecoverBatch,
Keccak256Batch, CrashMidBlock, MemoryPressure, StateRootConsistency,
PrecompileBatchVerify.
2026-04-07 01:26:03 -07:00
Hanzo AI a9aeb74c67 test: Jepsen-style chaos tests — bridge, DEX, Quasar consensus, GPU EVM
32 fault injection scenarios:

Bridge (8): nonce linearizability, MPC partition, batch atomicity,
  auto-pause under partition, clock skew rotation, double-spend nonce,
  exit guarantee during chaos, backing ratio hysteresis

DEX (8): swap atomicity, k=xy invariant under partition, TWAP resistance,
  concurrent swaps, StableSwap convergence, batch LP mint during reorg,
  fee split consistency, cross-pool arbitrage convergence

Quasar Consensus (8): partition recovery, byzantine fault detection,
  finality under load, validator rotation, clock skew, network jitter,
  double vote slashing, chain reorg recovery

GPU EVM Block-STM (8): write conflict resolution, read-write serializability,
  ecrecover batch correctness, keccak256 batch consistency, crash fallback
  to CPU, memory pressure degradation, state root determinism, precompile
  batch verify (FROST + CGGMP21 + BLS)
2026-04-07 01:24:52 -07:00
Hanzo AI 6cde3ea75c test: Jepsen-style chaos tests for Teleport bridge (8 fault injection scenarios)
Adds bridge_chaos_test.go with comprehensive fault injection tests for
the Teleporter bridge contract's safety invariants:

1. NonceLinearizability - concurrent nonce submission, exactly-once
2. PartitionedMPCSigner - oracle revocation/rejoin during partition
3. CrashDuringBatchMint - kill node mid-batch, verify no corruption
4. AutoPauseUnderPartition - insufficient backing triggers sticky pause
5. SignerRotationClockSkew - timestamp monotonicity enforcement
6. DoubleSpendNonce - concurrent same-nonce, exactly one succeeds
7. ExitGuaranteeDuringChaos - withdraw counter continuity across state
8. BackingRatioHysteresis - oscillating backing, sticky auto-pause

Tests deploy a TestTeleporter (mirrors production Teleporter.sol safety
invariants) to anvil and inject faults via process kill, concurrent
goroutines, and state manipulation. Gated behind -tags chaos.
2026-04-07 01:23:34 -07:00
Zach Kelling 0ea3b63752 fix: resolve all golangci-lint issues
- Fix gofmt formatting in 8 files
- Remove duplicate luxfi/config imports in local/ package
- Add error checking for os.Remove calls in local/snapshot.go
2026-01-28 10:30:11 -08:00
Zach Kelling 2157b410c6 Improve genesis loading and snapshot management
- Enhance genesis.go with LoadCanonicalGenesis for mainnet/testnet
- Add LoadGenesisForNetwork to load from external paths
- Improve snapshot.go with better incremental backup support
- Fix network ID handling in genesis_config.go (use constants.MainnetID not ChainID)
- Update API client interfaces for better type safety
- Fix server network handling for proper genesis selection
- Update dependencies to latest versions
2026-01-20 00:03:35 -08:00
Zach Kelling 160e25c144 fix build 2026-01-14 19:56:11 -08:00
Zach Kelling 1013ead275 Update constants package 2026-01-08 20:38:49 -08:00
Zach Kelling e53011719c fix: rename TLS key files to luxtls.key/crt
- Rename staking.key -> luxtls.key in embedded configs
- Rename staking.crt -> luxtls.crt in embedded configs
- Update imports to github.com/luxfi/constants
2026-01-08 19:35:37 -08:00
Zach Kelling 4e2a4e432e chore: remove local replace directives and update dependencies
- Update github.com/luxfi/keys v1.0.5 → v1.0.6
- Update github.com/luxfi/genesis v1.5.18 → v1.5.19
- Remove local replace directives for keys and genesis
- Use published package versions for reproducible builds
2026-01-03 07:05:17 -08:00
Zach Kelling 8252ac5a40 chore: migrate to stdlib maps, remove unused imports
- Replace golang.org/x/exp/maps with stdlib maps (Go 1.21+)
- Remove unused slices imports from network/config.go and local/genesis_config.go
2025-12-29 20:30:26 -08:00
Zach Kelling 94b4fccdfb fix: complete variable shadowing fix in e2e tests
Fix remaining instances where log package was passed instead of logger:
- client.New(..., log) -> client.New(..., logger)
- VerifySubnetHasCorrectParticipants(log, ...) at lines 267, 353, 906
2025-12-29 15:31:45 -08:00
Zach Kelling e74963cca4 refactor: clean up CLI and fix e2e tests
- Remove duplicate cmd files (start.go, multinet.go, engine.go)
  that bypassed server/control architecture and contained AI slop
- Fix e2e_test.go variable shadowing (log -> logger)
- Fix metric.NewRegistry() package reference
- Remove unused prometheus import
- CLI now cleanly provides: server, control, ping commands
- Update dependencies to github.com/luxfi/const v1.4.0
2025-12-29 15:10:32 -08:00
Zach Kelling ec09524375 refactor: migrate from zap to luxfi/log, remove local replace directives
- Replace all direct go.uber.org/zap imports with github.com/luxfi/log
- Rename log variables to logger throughout codebase to avoid shadowing
  the log package when using package-level functions like log.String, log.Err
- Remove local replace directives from go.mod (genesis, config)
- Bump version to 1.6.1
2025-12-22 12:39:05 -08:00
Zach Kelling 8d816a38ad refactor: remove all SubnetEVM references
- Rename --subnet-evm-path flag to --evm-path
- Rename subnetEvmPath variable to evmPath
- Rename subnet-evm-genesis.json to evm-genesis.json
- Change VmName from "subnetevm" to "evm"
- Update all test configurations
2025-12-21 11:12:41 -08:00
Zach Kelling 2f9accfb10 Refactor subnet→chain terminology and update genesis to v1.5.6
Major changes:
- Rename SubnetSpec → ChainSpec/ParticipantSpec throughout codebase
- Rename BlockchainSpec → ChainSpec for full chain definitions
- Update all protobuf definitions with new naming
- Fix duplicate variable declarations from sed replacements
- Update copyright headers to BSD-3-Clause with SPDX identifiers
- Update github.com/luxfi/genesis to v1.5.6 (BLS signer keys)

The genesis v1.5.6 update adds:
- Initial stakers with BLS publicKey and proofOfPossession
- Initial allocations for local network testing
- Fixes "failed to load database state: not found" error

Build fixes:
- Fix api/mocks/client.go CChainAPI return type
- Fix local/node_test.go with build tag for integration tests
- Fix parameter name collisions (chainConfigs → pChainConfigs)
2025-12-19 07:11:06 -08:00
Zach Kelling a3432cec0b Fix build, bump deps 2025-12-13 10:53:55 +00:00
Hanzo Dev 15b5c71d5c Fix imports to use separate packages instead of node monolith
- Use luxfi/consensus/validators instead of node/consensus/validators
- Use luxfi/ids instead of node/ids
- Use luxfi/log instead of node/utils/logging
- Use luxfi/utils/set instead of node/utils/set
- Use luxfi/genesis instead of node/genesis
- Use luxfi/evm/plugin/evm/client instead of geth/plugin/evm/client

Removes dependency on non-existent node packages in v1.21+
2025-12-04 16:20:15 -08:00
Hanzo Dev c50eca8711 feat: update consensus import paths for v1.21.1
- Fixed validators → validator import path
- Added local replace directives for development
2025-11-10 08:20:37 -08:00
Zach Kelling be85c151b0 fix: update imports and API calls for compatibility
- Migrated from Subnet to Net terminology
- Fixed logging imports to use luxfi/log
- Updated metric and set package imports
- Added replace directives for local packages
- All binaries building successfully
2025-09-19 05:37:42 +00:00
Zach Kelling a7fe664664 Update dependencies to use latest tagged versions 2025-08-16 07:43:26 +00:00
Zach Kelling 53f8af3521 Fix more tests 2025-08-11 06:14:05 +00:00
Zach Kelling 6a9125450a Update packages 2025-08-05 23:12:36 +00:00
Hanzo Dev 1dacb0d461 Updte for latest geth 2025-07-17 16:29:44 -05:00
Hanzo Dev 478d51ffee Update copyright headers to Lux Industries Inc 2025 2025-07-03 23:09:31 -04:00
Zach Kelling ef1adb0022 Rollback to 1.6.0 2024-01-02 20:55:14 +01:00
sukantoraymondandGitHub 83da8f512f Merge branch 'addPermissionlessValidators' into removeValidatorsNew
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-06-01 16:40:58 -04:00
sukantoraymond 38f2d97077 fix e2e 2023-06-01 15:48:56 -04:00
sukantoraymond c324b706bb fix e2e 2023-06-01 15:01:04 -04:00
sukantoraymond 0b7d3b8988 fix e2e 2023-06-01 12:32:55 -04:00
sukantoraymond f792526dbc fix merge 2023-06-01 12:13:24 -04:00
sukantoraymondandGitHub c4b89206fe Merge branch 'main' into addPermissionlessValidators
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-06-01 10:55:24 -04:00
fm 57d01f984c fix e2e 2023-05-31 19:17:51 -03:00
fm 8411afd3d1 add elastic info recovery from snapshot to e2e 2023-05-31 19:00:37 -03:00
sukantoraymond e603412a97 fix error 2023-05-30 18:09:31 -04:00
sukantoraymond 134da2baca fix e2e 2023-05-30 17:49:41 -04:00
sukantoraymond 87e987f158 address PR comments 2023-05-30 17:49:03 -04:00
sukantoraymondandGitHub d18fc0c992 Merge branch 'addPermissionlessValidators' into removeValidatorsNew
Signed-off-by: sukantoraymond <rsukanto@umich.edu>
2023-05-30 17:37:02 -04:00
sukantoraymond 779ddab542 resolve conflict 2023-05-30 17:28:32 -04:00
sukantoraymond 944ee337e9 update pr comments 2023-05-30 16:02:41 -04:00
sukantoraymond 6f8a10d582 update pr comments 2023-05-30 15:26:50 -04:00
sukantoraymond fd36b6d690 fix lint 2023-05-26 11:23:29 -04:00
sukantoraymond ddd10d757d fix lint 2023-05-25 18:44:58 -04:00
sukantoraymond eae7654b0c implement remove subnet validatorA 2023-05-25 18:15:35 -04:00