Commit Graph
1726 Commits
Author SHA1 Message Date
zeekay 86bb1fd604 deps: bump p2p v1.21.1, vm v1.1.11, geth v1.16.99 (Wave 2G-Cascade) v0.19.4 2026-06-06 06:27:18 -07:00
zeekay bb8ab8e681 codec rip: switch sync/statesync to luxfi/utils/wrappers
Drop codec/wrappers import in trie_segments + statesynctest helpers.
luxfi/utils/wrappers has identical API (Packer, ByteLen/ShortLen/
LongLen, Errs) — it has been the canonical home since utils v1.1.x.

Bumps utils to v1.1.5 for the new json subpackage now used elsewhere
in the codec rip; statesync only uses /wrappers.
2026-06-06 02:56:37 -07:00
zeekay a37e2ddecc evm: codec rip — message.Manager + validators state hand-rolled binary
Salvages an in-flight Wave 1C cascade on evm/ (the EVM fork separate
from coreth and evmgpu). 17 files touched. Mirrors the coreth
migration patterns:

- plugin/evm/message/codec.go: defines local Manager interface with
  hand-rolled wrappers.Packer; drops codec.Manager polymorphic registry.
- plugin/evm/message/request.go: typed Marshaler boundary.
- sync/{client,handlers}/*.go: codec.Manager → message.Manager swap.
- plugin/evm/customrawdb/*: explicit big-endian for state sync schema.
- plugin/evm/validators/state/{codec,state,state_test}.go: hand-rolled.
- plugin/evm/upgrade/feewindow/window.go + plugin/evm/vm.go +
  network/network.go + plugin/evm/network_handler.go: call-site fixups.
- precompile/registry/registry.go: codec-free registration path.

Builds clean: go build ./...
2026-06-05 15:31:59 -07:00
zeekay edb432f1dc predicate, warp/messages: hand-rolled binary, drop github.com/luxfi/codec
predicate/predicate_results.go:
  Hand-rolled big-endian wire for map[Hash]map[Address][]byte:
    u16 version | u32 outer | (32B hash, u32 inner, (20B addr, u32 len, bytes)*)*
  Sorted by hash then address for deterministic output — block-hash
  load-bearing across validators. Test suite (golden-byte multi-tx
  cases) passes.

warp/messages/{codec,payload}.go:
  Drops codec.Manager polymorphic registry — single payload family
  (ValidatorUptime) doesn't need reflection. Fixed 44-byte layout:
    u16 version | u16 type | 32B validation_id | u64 total_uptime
  Parse() dispatches on type discriminator (u16) — extensible without
  the codec dependency. initialize() / Bytes() / Parse() API unchanged.

Both Bytes()/Parse() public APIs preserved — consumers don't change.
2026-06-05 15:30:41 -07:00
zeekay 894a836bec plugin/evm: harden admin_exportChain with idempotency + sentinel (Task #118)
Previous ExportChain returned (bool, error) and would re-export from
scratch every call, leaving partial files with no marker on Ctrl-C.

Now returns *ExportChainResult with first/last block hashes and a Status
field ("ok" | "noop" | "interrupted"). Behavior:

  * Atomic JSON sentinel at <file>.sentinel (tmp+rename) updated every
    1024 blocks and on terminal states.
  * Idempotency: if file exists with a "done" sentinel matching
    {first, last, firstHash, lastHash}, returns Status=noop without
    re-exporting. Safe to call from a cron CronJob.
  * Interrupt: ctx.Done() at every block boundary writes a sentinel
    with Status=interrupted + HighestExported so the caller can resume.
  * Block iterator still streams (no whole-chain buffering); gzip path
    unchanged.

Symmetric with admin_importChain which returns *ImportChainResult, and
with the cmd/rlp-export CLI shipping alongside.

Server-side test coverage: writeSentinel atomicity, readSentinel
absent + corrupt fall-through, JSON shape pinning for both the
sentinel and ExportChainResult, exportProgressInterval stability.
2026-06-05 15:30:41 -07:00
zeekay 89f58534df docs: gRPC -> ZAP native sweep per LP-200 / LP-186 2026-06-05 15:30:41 -07:00
zeekayandGitHub ba89c6c620 Merge pull request #117 from luxfi/dependabot/go_modules/github.com/luxfi/sys-0.1.0
build(deps): bump github.com/luxfi/sys from 0.0.0-20260110090042-50187ec5ffd8 to 0.1.0
2026-06-04 14:02:33 -07:00
zeekayandGitHub 18ec81e703 Merge pull request #118 from luxfi/dependabot/go_modules/github.com/luxfi/metric-1.5.8
build(deps): bump github.com/luxfi/metric from 1.5.7 to 1.5.8
2026-06-04 14:02:30 -07:00
dependabot[bot]andGitHub ad7b377e84 build(deps): bump github.com/luxfi/metric from 1.5.7 to 1.5.8
Bumps [github.com/luxfi/metric](https://github.com/luxfi/metric) from 1.5.7 to 1.5.8.
- [Release notes](https://github.com/luxfi/metric/releases)
- [Commits](https://github.com/luxfi/metric/compare/v1.5.7...v1.5.8)

---
updated-dependencies:
- dependency-name: github.com/luxfi/metric
  dependency-version: 1.5.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 21:00:14 +00:00
dependabot[bot]andGitHub 4989aca17d build(deps): bump github.com/luxfi/sys
Bumps [github.com/luxfi/sys](https://github.com/luxfi/sys) from 0.0.0-20260110090042-50187ec5ffd8 to 0.1.0.
- [Release notes](https://github.com/luxfi/sys/releases)
- [Commits](https://github.com/luxfi/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: github.com/luxfi/sys
  dependency-version: 0.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 20:59:56 +00:00
zeekayandGitHub 5f88b10e4b Merge pull request #116 from luxfi/dependabot/go_modules/golang.org/x/tools-0.45.0
build(deps): bump golang.org/x/tools from 0.43.0 to 0.45.0
2026-06-04 13:57:25 -07:00
zeekayandGitHub 829b56eeb7 Merge pull request #119 from luxfi/dependabot/go_modules/github.com/luxfi/consensus-1.25.14
build(deps): bump github.com/luxfi/consensus from 1.25.0 to 1.25.14
2026-06-04 13:57:19 -07:00
zeekayandGitHub f36d9d7b67 Merge pull request #120 from luxfi/dependabot/go_modules/github.com/deckarep/golang-set/v2-2.9.0
build(deps): bump github.com/deckarep/golang-set/v2 from 2.8.0 to 2.9.0
2026-06-04 13:57:16 -07:00
dependabot[bot]andGitHub 34e453e0da build(deps): bump github.com/deckarep/golang-set/v2 from 2.8.0 to 2.9.0
Bumps [github.com/deckarep/golang-set/v2](https://github.com/deckarep/golang-set) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/deckarep/golang-set/releases)
- [Commits](https://github.com/deckarep/golang-set/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: github.com/deckarep/golang-set/v2
  dependency-version: 2.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 13:04:33 +00:00
dependabot[bot]andGitHub 87b68f6432 build(deps): bump github.com/luxfi/consensus from 1.25.0 to 1.25.14
Bumps [github.com/luxfi/consensus](https://github.com/luxfi/consensus) from 1.25.0 to 1.25.14.
- [Release notes](https://github.com/luxfi/consensus/releases)
- [Changelog](https://github.com/luxfi/consensus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luxfi/consensus/compare/v1.25.0...v1.25.14)

---
updated-dependencies:
- dependency-name: github.com/luxfi/consensus
  dependency-version: 1.25.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 13:04:26 +00:00
dependabot[bot]andGitHub c1ad253908 build(deps): bump golang.org/x/tools from 0.43.0 to 0.45.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.43.0 to 0.45.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.43.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 13:04:06 +00:00
zeekayandGitHub 31e914fc7f Merge pull request #97 from luxfi/dependabot/github_actions/actions/cache-5
build(deps): bump actions/cache from 4 to 5
2026-06-04 01:36:54 -07:00
zeekayandGitHub ca564801fa Merge pull request #103 from luxfi/dependabot/go_modules/github.com/luxfi/crypto-1.17.42
build(deps): bump github.com/luxfi/crypto from 1.19.15 to 1.19.17
2026-06-04 01:36:44 -07:00
zeekayandGitHub 46bbd08560 Merge pull request #104 from luxfi/dependabot/go_modules/go.opentelemetry.io/otel/trace-1.40.0
build(deps): bump go.opentelemetry.io/otel/trace from 1.43.0 to 1.44.0
2026-06-04 01:36:41 -07:00
zeekayandGitHub 82d3219889 Merge pull request #105 from luxfi/dependabot/go_modules/go.opentelemetry.io/otel-1.40.0
build(deps): bump go.opentelemetry.io/otel from 1.43.0 to 1.44.0
2026-06-04 01:36:37 -07:00
zeekayandGitHub 073a51a41c Merge pull request #108 from luxfi/dependabot/github_actions/luxfi/node-1.23.21
build(deps): bump luxfi/node from 1.13.2 to 1.28.27
2026-06-04 01:36:19 -07:00
zeekayandGitHub 8692769a87 Merge pull request #110 from luxfi/dependabot/github_actions/docker/login-action-4.0.0
build(deps): bump docker/login-action from 3 to 4
2026-06-04 01:36:15 -07:00
dependabot[bot]andGitHub 3a92b16a7e build(deps): bump go.opentelemetry.io/otel from 1.43.0 to 1.44.0
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel
  dependency-version: 1.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:10:41 +00:00
dependabot[bot]andGitHub 39c05ee548 build(deps): bump go.opentelemetry.io/otel/trace from 1.43.0 to 1.44.0
Bumps [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/trace
  dependency-version: 1.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:10:16 +00:00
dependabot[bot]andGitHub 4a8670d6e1 build(deps): bump github.com/luxfi/crypto from 1.19.15 to 1.19.17
Bumps [github.com/luxfi/crypto](https://github.com/luxfi/crypto) from 1.19.15 to 1.19.17.
- [Release notes](https://github.com/luxfi/crypto/releases)
- [Changelog](https://github.com/luxfi/crypto/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luxfi/crypto/compare/v1.19.15...v1.19.17)

---
updated-dependencies:
- dependency-name: github.com/luxfi/crypto
  dependency-version: 1.17.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:04:01 +00:00
dependabot[bot]andGitHub e06bcbee74 build(deps): bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:03:48 +00:00
dependabot[bot]andGitHub 07fcf84a7c build(deps): bump luxfi/node from 1.13.2 to 1.28.27
Bumps [luxfi/node](https://github.com/luxfi/node) from 1.13.2 to 1.28.27.
- [Release notes](https://github.com/luxfi/node/releases)
- [Changelog](https://github.com/luxfi/node/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luxfi/node/compare/092cf182dd92b66a8ab882b657d3ae52b174c913...f6f46d61062da261206232742ee4fe19a0cd8026)

---
updated-dependencies:
- dependency-name: luxfi/node
  dependency-version: 1.23.21
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:03:45 +00:00
dependabot[bot]andGitHub fdbf01941f build(deps): bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-04 08:03:25 +00:00
zeekayandGitHub c052e1f595 Merge pull request #98 from luxfi/dependabot/github_actions/actions/setup-node-6
build(deps): bump actions/setup-node from 4 to 6
2026-06-03 13:25:44 -07:00
zeekayandGitHub ca786d8d64 Merge pull request #109 from luxfi/dependabot/github_actions/github/codeql-action-4.32.6
build(deps): bump github/codeql-action from 4.31.0 to 4.32.6
2026-06-03 13:25:04 -07:00
zeekayandGitHub affb592c3a Merge pull request #115 from luxfi/fix/genesis-cancun-withdrawalshash
fix(core/genesis): set WithdrawalsHash on Cancun-active genesis headers (fresh L1 produces no blocks)
2026-06-03 13:22:08 -07:00
zeekay a5d572f608 go.mod: bump vm v1.1.6 -> v1.1.7, runtime v1.0.1 -> v1.1.0
vm v1.1.7 pins runtime v1.1.0 (NetworkUpgrades interface ripped +
XAssetID -> UTXOAssetID rename). Closes the IsEtnaActivated /
GetNetworkUpgrades cascade started by the v0.19.0 Quasar rename.

Transitive (// indirect): consensus v1.24.0 -> v1.25.0, corona
v0.4.1 -> v0.7.5, metric v1.5.5 -> v1.5.7.
v0.19.3
2026-06-03 12:49:10 -07:00
zeekay 539890f87e go.mod: bump luxfi/vm v1.1.5 -> v1.1.6
vm v1.1.6 drops GetNetworkUpgrades() (removed in runtime decomplect
3eea32ad). Required for v0.19.0's Etna -> Quasar rename: vm v1.1.5
still expected upgrade.Config to implement runtime.NetworkUpgrades
with the old IsEtnaActivated method, which no longer exists post-rename.

Transitive: luxfi/protocol v0.0.5 -> luxfi/proto v1.0.0 (vm v1.1.6
dep tree).
v0.19.2
2026-06-03 12:39:51 -07:00
zeekay 0b8e4cccf3 evm: bump luxfi/precompile v0.5.27 → v0.5.35 (bls12381 7-sub-config Key() fix)
precompile v0.5.35 (commit 794912f) fixes a Key() collision in the 7
EIP-2537 bls12381 sub-configs: G1Add, G1Mul, G1MSM, G2Add, G2Mul,
G2MSM, Pairing each now return their own ConfigKey rather than all
returning G1AddConfigKey. Without this, only one of the 7 entries
could land in the registry's ordered upgrade map — DisallowUnknownFields
parse would reject any upgrade.json with the other six.

Lux Neo had to drop the 7 bls12381 entries from mainnet upgrade.json
(78f2ecb) to ship #114 because of this bug. With v0.5.35 they can be
re-added forward-dated to Quasar (Unix 1766708400).

Bundles into the next evm release tag (v0.19.1).
v0.19.1
2026-06-03 12:32:36 -07:00
zeekay 4106c7e2b9 plugin/evm: enforce DisallowUnknownFields on upgradeBytes parse
Quasar Edition rip: there is one and only one upgrade-key namespace.
The strict decoder forces parse-time failure on any unknown field —
which catches typos and stale aliases (e.g. etnaTimestamp) at config
roll instead of silently muting forks at activation.

Why this matters: encoding/json by default ignores unknown JSON keys
and zero-initializes the corresponding struct fields. After the
EtnaTimestamp → QuasarTimestamp rename, any deployed upgrade.json
still carrying etnaTimestamp would parse cleanly with the new field
left nil, and the fork would never activate. The strict decoder
turns that silent-disable failure mode into a loud boot-time error.

Pairs with: luxfi/genesis kill-etna sweep + node v1.28.22 plugin bump.
v0.19.0
2026-06-03 11:51:13 -07:00
Darkhorse7stars e6180611b6 fix(core/genesis): set WithdrawalsHash on Cancun-active genesis headers
A genesis header with Cancun active (CancunTime=0) populated the Cancun fields
(ParentBeaconRoot/ExcessBlobGas/BlobGasUsed) but left WithdrawalsHash nil,
because the assignment was guarded by num.Sign()!=0 (skipped at block 0). RLP
encodes post-merge fields positionally, so a nil WithdrawalsHash followed by
present Cancun fields yields a header ReadHeader cannot decode:
  rlp: input string too short for common.Hash, decoding into ...WithdrawalsHash
NewHeaderChain then fabricates a fake genesis header, which has the wrong state
root, so block-building on a fresh L1 fails and the chain produces zero blocks.

Cancun implies Shanghai, so a Cancun header MUST carry WithdrawalsHash. Set it
(EmptyWithdrawalsHash) whenever Cancun is active and it's nil. Chains preserving
a pre-withdrawals genesis hash opt out via SkipPostMergeFields (short-circuits
the whole post-merge block), so they're unaffected.

Verified on lqd devnet (chainId 8675312): genesis header round-trips, balance
readable at 0x0, self-transfer mines block 1.
2026-06-03 09:23:29 -07:00
zeekay 3e2bdb3387 rename: Etna → Quasar Edition
Wire-level renames in EVM:
  - extras.NetworkUpgrades.EtnaTimestamp → QuasarTimestamp
    json tag etnaTimestamp → quasarTimestamp
  - extras.NetworkUpgrades.IsEtna()      → IsQuasar()
  - extras.LuxRules.IsEtna               → IsQuasar
  - params.RulesExtra.IsEtna             → IsQuasar
  - extras.TestEtnaChainConfig           → TestQuasarChainConfig
  - params.TestEtnaChainConfig           → TestQuasarChainConfig
  - upgradetest.Etna fork enum           → Quasar (luxfi/upgrade dep)

Test JSON fixtures (mainnet_upgrade_v46, testnet_upgrade_v47, embedded
genesis_skippostmerge_test, precompile_upgrade_rollout_test) flipped from
"etnaTimestamp" → "quasarTimestamp".

Also patched .disabled test files for grep cleanliness so future grep -rn
'Etna' returns 0 outside historical RELEASES.md.

Bumps luxfi/upgrade@main + luxfi/constants@main with their renamed symbols.
No backcompat aliases — forwards-only.
2026-06-02 23:01:55 -07:00
zeekay e42bfbeef6 brand-scrub: drop ava-labs antithesis workflow + Avalanche comment
publish_antithesis_images.yml pushed to molten-verve-216720/avalanche-repository
(ava-labs GAR). Per workspace policy, lux containers go to GHCR not GAR; the
trigger-antithesis.yml that remains is already rebranded to tenant=lux. Also
fix stale 'Avalanche linters' comment in .golangci.yml.
2026-06-02 23:01:32 -07:00
zeekay cd9d789287 params/extras_e2e_test: testnet upgrade.json regression gate (task #99)
Mirrors the mainnet UnmarshalJSON regression test for the lux-testnet
primary C-Chain. Embeds testnet_upgrade_v47.json (47 entries) and
asserts every key round-trips through extras.UpgradeConfig.UnmarshalJSON
against the live precompile registry.

If a future luxfi/precompile bump adds a new ConfigKey without the
corresponding RegisterModule(), or if the canonical
~/work/lux/genesis/configs/testnet/upgrade.json re-introduces an
unregistered EIP key (kzg4844Config / secp256r1Config / ed25519Config),
this test trips before the JSON ships to the cluster — closing the same
brick-on-boot footgun Red flagged on mainnet (vector 8 CRITICAL).

Sync rule: re-vendor testnet_upgrade_v47.json whenever the genesis
canonical changes — same pattern as mainnet_upgrade_v46.json.
2026-06-02 18:37:48 -07:00
zeekay a527029da6 #114: hermetic e2e test for upgrade.json registry resolution + drop continue-on-error on CI test step
params/extras_e2e_test/: new hermetic e2e regression-proof test that
unmarshals the canonical luxfi/genesis configs/mainnet/upgrade.json
(embedded via //go:embed) through extras.UpgradeConfig and asserts:
  - precompileUpgrades count = 46
  - all known config types resolve via the registry
  - no unregistered EIP entries leak through
  - networkUpgradeOverrides round-trip stable
Closes Red round-2 vector V12.

.github/workflows/ci.yml: drop `continue-on-error: true` from the
"Run short tests" step (kept on dependency-install and ci_setup
steps that legitimately have flaky external network deps).
CGO_ENABLED=0 still dodges the duplicate _randombytes symbol
collision from luxfi/accel cgo deps, but TEST FAILURES in that mode
must now gate CI per Red round-2 vector V19. Without this gate the
new e2e test could silently regress.
2026-06-02 18:37:18 -07:00
zeekay a1a78a9985 fix(plugin/evm): force HashScheme default to stop fresh L2s wedging on pathdb
On lux-mainnet 2026-06-02 every newly-created L2 EVM chain (hanzo, zoo,
spc, pars) panicked at chain create with:

  panic in eth.New: unable to commit genesis block to statedb:
    triedb parent [0x56e81f17171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421] layer missing

Root cause: the operator does not specify state-scheme in chain config, so
vm.ethConfig.StateScheme = "" enters eth.New. backend.go then calls
customrawdb.ParseStateSchemeExt("", chainDb) which delegates to
geth/rawdb.ParseStateScheme — upstream returns PathScheme as the implicit
default for any database with no stored scheme (every fresh L2). That
silently re-enables path mode even though vm.go's preflight at the top
of Initialize hard-refuses it. Genesis commit then runs through pathdb's
Update with parentRoot=EmptyRootHash and dies the moment the layer tree
is consulted.

Fix: extract the scheme normalisation into resolveStateScheme() and lock
the empty-string default to HashScheme here, before backend.go can inherit
geth's path-by-default. Path explicit is still refused as before, so this
is purely an operator-default fix.

Adds:
- plugin/evm/vm_statescheme_test.go: TestResolveStateScheme covering all
  four input cases (empty→hash, hash passthrough, path refused, custom
  passthrough).
- core/genesis_pathdb_test.go: TestGenesisCommit_PathDB_{FreshDB,
  SetupGenesisBlock_FreshDB} document the upstream pathdb genesis-commit
  invariant on a fresh in-memory DB so future drift here is caught
  immediately.

Also bumps compatibility.json to register v0.18.4-v0.18.18 with the
existing RPC chain VM protocol (42); restores TestCompatibility (which
was failing on main since v0.18.4 because the table was never updated).

Version: v0.18.17 -> v0.18.18.
v0.18.18
2026-06-02 11:53:21 -07:00
zeekay a742159226 evm v0.18.17: go mod tidy after genesis v1.13.8 cascade
luxfi/genesis is now indirect (no direct EVM imports), but tidy pulled in
fresher minimum versions of its transitive deps:

- constants v1.5.2 -> v1.5.7
- crypto v1.19.6 -> v1.19.15
- metric v1.5.1 -> v1.5.5
- precompile v0.5.23 -> v0.5.27
- otel v1.42.0 -> v1.43.0

Plus drops StephenButtolph/canoto, fatih/structtag, grpc-prometheus from
indirect block (no longer transitively required).

No functional changes; this is purely the dependency cleanup that follows
the luxfi/genesis v1.13.8 bump.
v0.18.17
2026-06-02 04:25:49 -07:00
zeekay 1c2e0f5640 release: bump Version to v0.18.16 (matches semver tag) v0.18.16 2026-06-02 01:04:55 -07:00
zeekay 844cacb4fb evm v0.18.16: fix nil-chainConfig panic at PQ gate + RLP verifier tool
Bug fix (closure-swarm v1.28.15 boot blocker):
PQ gate at plugin/evm/vm.go was setting vm.chainConfig.PQ BEFORE
vm.chainConfig was assigned from g.Config — chainConfig was nil at
that point, panic on dereference. Moved the gate AFTER assignment.

Repro: fresh-PVC bootstrap with chain-config.json pq:true caused
"runtime error: invalid memory address or nil pointer dereference"
in the EVM ZAP plugin → C-Chain never bootstraps. Discovered during
localnet 1337 bring-up against v1.28.15.

Fix: move the gate to AFTER `vm.chainConfig = g.Config`. PQ profile
is now correctly installed on a non-nil chainConfig.

Added:
- cmd/rlp-verify/main.go — decodes C-Chain RLP export, verifies
  genesis hash matches genesis JSON, each block's ParentHash chains
  cleanly. What admin.importChain does sans state execution; sufficient
  proof that an RLP+genesis pair is wireable to a luxd boot.

Indirect dep bumps:
- github.com/ChainSafe/go-schnorrkel v1.1.0 (sr25519Verify precompile)
- github.com/cosmos/go-bip39 v1.0.0 (bridgeRegistrarConfig precompile)
- github.com/luxfi/ai v0.1.0 (aiMiningConfig precompile)

Build tag: drop `gpu` tag on darwin gpu_bridge.go (parallel/gpu is one
concept; the darwin gpu bridge always compiles when cgo+darwin).
2026-06-02 01:04:45 -07:00
zeekay 6c246f9abf params/extras: rollout regression tests + register 16 missing precompiles
Two changes for the Quasar Edition rollout:

1. precompile/registry/registry.go side-effect imports the 16 modules
   that ship in the canonical upgrade.json but were not yet wired into
   the registry: attestation, babyjubjub, bls12381, bridge, compute,
   curve25519, ed25519, math, pasta, pedersen, poseidon, sr25519,
   stableswap, vrf, x25519, xwing. Without these imports each module's
   init() never runs, so modules.RegisteredModules omits them and
   UpgradeConfig.UnmarshalJSON rejects the activation with
   "unknown precompile config: <key>", bricking luxd boot.

2. params/extras/precompile_upgrade_rollout_test.go (NEW) is the
   forward-compat regression gate against the live lux-mainnet config.
   Five subtests:
   - IsForwardCompatibleWithLiveActivations: every precompile
     activation currently in the lux-mainnet StatefulSet inline
     upgrade.json (18 entries at blockTimestamp:0 including the
     dead* family) MUST be preserved at the same blockTimestamp in
     the canonical upgrade.json, else checkPrecompileCompatible
     refuses boot.
   - PrecompileTimestampsAreMonotonic: verifyPrecompileUpgrades
     rejects non-monotonic timestamps; we verify the canonical
     config respects this.
   - WarpRequiresPrimaryNetworkSigners: warpConfig MUST pin
     requirePrimaryNetworkSigners=true (red-review finding #8).
   - HasStrictPQActivation: networkUpgradeOverrides MUST set
     strictPQTimestamp=1766708400 (Quasar timestamp) so
     contract.RefuseUnderStrictPQ fires.
   - HasStrictPQTrue: ~/work/lux/state/chain-configs/lux-mainnet/
     config.json MUST set "pq": true so the EVM plugin boots into
     strict-PQ posture.

The test uses raw JSON parsing (not typed UpgradeConfig.Unmarshal) so
it does not depend on the registry side-effect imports being loaded
in the test binary — avoiding cgo linker conflicts between sr25519's
NaCl-compat randombytes and the HQC PQClean randombytes shim.

Red review findings #2, #7, #8.
2026-06-01 21:12:21 -07:00
zeekay ba3a0108bd release: bump Version to v0.18.15 (matches semver tag) v0.18.15 2026-06-01 19:25:41 -07:00
zeekay ee78eef322 core/genesis: honor SkipPostMergeFields flag from JSON
Lux mainnet C-Chain canonical genesis hash is
0x3f4fa2a0b0ce089f52bf0ae9199c75ffdd76ecafc987794050cb0d286f1ec61e,
matching the 1,082,781-block historic RLP export at
lux-mainnet-96369.rlp. The genesis JSON activates Cancun at
genesis time (cancunTime=0) for MCOPY etc., but the genesis BLOCK
itself predates Cancun and must use the 16-field pre-Shanghai
header format to preserve hash continuity with the historic chain.

luxfi/geth's core.Genesis exposes SkipPostMergeFields for exactly
this case. luxfi/evm shipped the JSON unmarshaling but ignored the
flag in toBlock(), so any post-merge field that fork-activates at
genesis time (ParentBeaconRoot, ExcessBlobGas, BlobGasUsed,
WithdrawalsHash) gets baked into the header and shifts the
computed genesis hash, e.g. to 0x1ade42ec…. luxd then panics
during EnsureGenesisState because the resulting state root has no
parent in pathdb's layertree ("triedb parent
[0x56e81f17…] layer missing"), which blocks mainnet C-Chain
bootstrap and admin_importChain.

Mirror the upstream geth pattern: gate the entire Shanghai+
post-merge field assignment block with `if !g.SkipPostMergeFields`,
and round-trip the flag through MarshalJSON/UnmarshalJSON in
gen_genesis.go.

Verification (TestSkipPostMergeFieldsGenesisHash pins both):
- `skipPostMergeFields: true` → 0x3f4fa2a0… (canonical, RLP block 0)
- flag absent / false                → different hash (gate is active)
2026-06-01 19:25:03 -07:00
zeekay b2eb72e963 merge: env/drop-lux-prefix 2026-06-01 16:33:58 -07:00
zeekay 67cd062fca drop hardcoded /Users/z paths — use $HOME-relative 2026-05-21 15:01:37 -07:00
zeekay 644d94afcd plugin: refresh vm + main + runner 2026-05-20 16:24:51 -07:00