decomplect: strip Durango upgrade gating from params.Config; ShanghaiTime is the canonical Lux genesis-Shanghai pin

Phase 3b of the upstream-upgrade purge per ~/work/lux/proofs/UPGRADE_RIP.md (geth slice).

params/config.go:
- ChainConfig.DurangoTimestamp field deleted; IsDurango method deleted.
- LuxMainnetChainConfig: ShanghaiTime=newUint64(0) (was nil). Under
  activate-all-implicitly Shanghai is live from genesis on Lux. The
  Durango "brings Shanghai EIPs" path is replaced by simply setting
  ShanghaiTime explicitly.
- Rules.IsShanghai: drops the " || c.IsDurango(timestamp)" branch; uses
  only the canonical c.IsShanghai(num, timestamp).

go.mod / go.sum: refreshed by `go mod tidy` (luxfi/precompile v0.5.19 to
resolve corona transitive deps).

Note: core/types/decode.go multi-format header decoder (1206 lines, 14
RLPFormat variants) is retained for now. The user directive permits ripping
it under "no backwards compatibility for old chaindata", but the decoder
is wired into rawdb and bulk-block-import flows; a separate commit will
collapse it after the production import paths are migrated.

Build: `GOCACHE=/tmp/gocache-decomplect-r2 GOWORK=off go build ./...` green.
This commit is contained in:
Hanzo AI
2026-05-19 08:12:14 -07:00
parent 637aa882b8
commit 070cd1114f
3 changed files with 38 additions and 28 deletions
+8 -2
View File
@@ -81,12 +81,14 @@ require (
require (
filippo.io/hpke v0.4.0 // indirect
github.com/ALTree/bigfloat v0.2.0 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cockroachdb/errors v1.12.0 // indirect
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/gorilla/rpc v1.2.1 // indirect
github.com/klauspost/crc32 v1.3.0 // indirect
github.com/luxfi/accel v1.0.8 // indirect
@@ -97,7 +99,9 @@ require (
github.com/luxfi/concurrent v0.0.3 // indirect
github.com/luxfi/constants v1.4.7 // indirect
github.com/luxfi/container v0.0.4 // indirect
github.com/luxfi/corona v0.4.1 // indirect
github.com/luxfi/crypto/ipa v1.2.4 // indirect
github.com/luxfi/lattice/v7 v7.1.0 // indirect
github.com/luxfi/mock v0.1.1 // indirect
github.com/luxfi/runtime v1.0.1 // indirect
github.com/luxfi/utils v1.1.4 // indirect
@@ -106,10 +110,12 @@ require (
github.com/minio/crc64nvme v1.1.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.100 // indirect
github.com/montanaflynn/stats v0.9.0 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/rs/xid v1.6.0 // indirect
github.com/tinylib/msgp v1.6.1 // indirect
github.com/wlynxg/anet v0.0.5 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
go.uber.org/mock v0.6.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect
@@ -165,10 +171,10 @@ require (
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/luxfi/math v1.2.4
github.com/luxfi/math v1.4.0
github.com/luxfi/metric v1.5.1 // indirect
github.com/luxfi/p2p v1.19.2 // indirect
github.com/luxfi/precompile v0.5.16
github.com/luxfi/precompile v0.5.19
github.com/luxfi/sampler v1.0.0 // indirect
github.com/luxfi/vm v1.0.40
github.com/luxfi/warp v1.18.5 // indirect
+18 -4
View File
@@ -2,6 +2,8 @@ c2sp.org/CCTV/age v0.0.0-20251208015420-e9274a7bdbfd h1:ZLsPO6WdZ5zatV4UfVpr7oAw
c2sp.org/CCTV/age v0.0.0-20251208015420-e9274a7bdbfd/go.mod h1:SrHC2C7r5GkDk8R+NFVzYy/sdj0Ypg9htaPXQq5Cqeo=
filippo.io/hpke v0.4.0 h1:p575VVQ6ted4pL+it6M00V/f2qTZITO0zgmdKCkd5+A=
filippo.io/hpke v0.4.0/go.mod h1:EmAN849/P3qdeK+PCMkDpDm83vRHM5cDipBJ8xbQLVY=
github.com/ALTree/bigfloat v0.2.0 h1:AwNzawrpFuw55/YDVlcPw0F0cmmXrmngBHhVrvdXPvM=
github.com/ALTree/bigfloat v0.2.0/go.mod h1:+NaH2gLeY6RPBPPQf4aRotPPStg+eXc8f9ZaE4vRfD4=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0 h1:fou+2+WFTib47nS+nz/ozhEBnvU96bKHy6LjRsY4E28=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.21.0/go.mod h1:t76Ruy8AHvUAC8GfMWJMa0ElSbuIcO03NLpynfbgsPA=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.13.1 h1:Hk5QBxZQC1jb2Fwj6mpzme37xbCDdNTxU7O9eb5+LB4=
@@ -265,6 +267,8 @@ github.com/luxfi/constants v1.4.7 h1:e/Qs+DQP3pugle3Zncq6fZCxKgqqtbyD/z7Gm4ZjsYg
github.com/luxfi/constants v1.4.7/go.mod h1:hOszZ2NDQ8gMZKncfcZ67PXkb5OIbnwAzXC3oFbQwW0=
github.com/luxfi/container v0.0.4 h1:BXhF82WyfqVP5mjlNcr7tP0Fcnvl0Ap1rkiu+rq5XuM=
github.com/luxfi/container v0.0.4/go.mod h1:Z3SpmMF5d4t77MM0nHYXURpn+EMVaeu1fhbd/3BGaek=
github.com/luxfi/corona v0.4.1 h1:DGMdZMrENl6vmJf9CgiQMD8c5ORSTMymL0z9KgcZstk=
github.com/luxfi/corona v0.4.1/go.mod h1:4aD7+ZqnlZ2aVuU/DBQ5aspIagv5ux45LW2sJ4+siY8=
github.com/luxfi/crypto v1.19.0 h1:VtH6kvZrCEjCnkHPkhExDU+GJ0ZulYX4rnA+lXJdJHw=
github.com/luxfi/crypto v1.19.0/go.mod h1:ee525i8Recbpb0jVTDZYZBr1MmvJ27OITJHZ/nlNMBw=
github.com/luxfi/crypto/ipa v1.2.4 h1:6xfwhI9/HrcDkF3Ti5/NxsNQIWbwYDJmRSNIHRQ/xfU=
@@ -275,10 +279,12 @@ github.com/luxfi/hid v0.9.3 h1:pMrOQQ4014IcZPt/MNul7eokXH4ypF6NkQs29/A3h/Y=
github.com/luxfi/hid v0.9.3/go.mod h1:XJ/7DZAHf5dggm3zWNbitKuFGB7J96b4iX+8NO3BsnY=
github.com/luxfi/ids v1.2.9 h1:+yjdhXW99drnd2Zlp1u/p8k3G23W3/1btJQ4ogHawUI=
github.com/luxfi/ids v1.2.9/go.mod h1:khJOEdOPxd22yn0jcVrnbX1ADa0GHn5Y74gvCzN5BYc=
github.com/luxfi/lattice/v7 v7.1.0 h1:mr3HvN6olNTS2LT/xAW/JBhTqfvpsGmsopDMeR7BSJs=
github.com/luxfi/lattice/v7 v7.1.0/go.mod h1:IaaUN+3ysnBG4BA8ILRYG0j80+qtYDP4C5lkaDb2pDE=
github.com/luxfi/log v1.4.1 h1:rIfFRodb9jrD/w7KayaUk0Oc+37PaQQdKEEMJCjR8gw=
github.com/luxfi/log v1.4.1/go.mod h1:64IE3xRMJcpkQwnPUfJw3pDj7wU0kRS7BZ9wM7R72jk=
github.com/luxfi/math v1.2.4 h1:iVz7s0gToCNUU/2cLT8gUa8MLzc0YRp4jBmeXBeKdXk=
github.com/luxfi/math v1.2.4/go.mod h1:i+Am9YvFsqDE75ZW8MPE62XCXGukXNiN/7mD9SKxxZY=
github.com/luxfi/math v1.4.0 h1:/sb7Grw3hfO+5INWAWdB95jTvCeXg8fSQxsxDzcFtd4=
github.com/luxfi/math v1.4.0/go.mod h1:iW0FOCC8qF2mPE+MakG780CAHA83848lb1L04thA1Pg=
github.com/luxfi/math/big v0.1.0 h1:Vz4c0RsZVPdIKPsHPgAJChH/R3p15WHRUz7LkLf+NIQ=
github.com/luxfi/math/big v0.1.0/go.mod h1:BuxSu22RbO93xBLk5Eam5nldFponoJ73xDFz4uJ3Huk=
github.com/luxfi/metric v1.5.1 h1:6tVarXMnNR3Xzud8FYUHjtXabTll3HI/OEqG0tgLAcI=
@@ -289,8 +295,8 @@ github.com/luxfi/p2p v1.19.2 h1:uqZq7ofmEDbXlTkv1QThtci01Q+dmDkNmAPeORIyP8E=
github.com/luxfi/p2p v1.19.2/go.mod h1:tI9Bt1R0ouvVtJvXG4e20GlGeV4AR230k4mFF9Vglzk=
github.com/luxfi/pq v1.0.1-0.20260512064747-3d4c9414e15e h1:eXbRZiu08vO0f4JaJd/XVGnDn25x5W4TS4Jf2nHRTVM=
github.com/luxfi/pq v1.0.1-0.20260512064747-3d4c9414e15e/go.mod h1:8bppZcRElfrVt0n3nYCZW3iX1TvhvzNbdjNdK1irgIE=
github.com/luxfi/precompile v0.5.16 h1:tIY7/yK856lggOvv/5vVC0Cr7gRUs6Wi7MhibIszsng=
github.com/luxfi/precompile v0.5.16/go.mod h1:r2nImBshkpIfl3n0+Zas0uxfJ3c7JB0E0qpJkBtSV/s=
github.com/luxfi/precompile v0.5.19 h1:8+IpiUt96ya3Lxm27UZto3r0RZhBZZFamxzkZWBDUkQ=
github.com/luxfi/precompile v0.5.19/go.mod h1:zeuCoay3e1DI9rpNxMrJpE8+lKxaRGsV3tQ1N/O/a6Y=
github.com/luxfi/runtime v1.0.1 h1:cii3OsRiVSIl9jzfWFM6++62T1r6ZSGP+/3F0Ezhpqw=
github.com/luxfi/runtime v1.0.1/go.mod h1:2hBKjzbEeE4dzrhUKH8dqkRgLEyiXz6GmuVusy3vJMs=
github.com/luxfi/sampler v1.0.0 h1:k8Sf6otW83w4pQp0jXLA+g3J/joB7w7SqXQsWmNTOV0=
@@ -329,6 +335,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw=
github.com/mitchellh/pointerstructure v1.2.1/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4=
github.com/montanaflynn/stats v0.9.0 h1:tsBJ0RXwph9BmAuFoCmqGv6e8xa0MENQ8m0ptKq29mQ=
github.com/montanaflynn/stats v0.9.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -449,6 +457,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI=
github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE=
github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/otel v1.42.0 h1:lSQGzTgVR3+sgJDAU/7/ZMjN9Z+vUip7leaqBKy4sho=
+12 -22
View File
@@ -186,11 +186,9 @@ var (
},
}
// LuxMainnetChainConfig contains the chain parameters for Lux mainnet (network ID 96369).
// This genesis matches the migrated EVM blockchain data.
// IMPORTANT: Shanghai/Cancun/Prague are disabled (nil) to match the original
// EVM chain which was pre-Shanghai (2024). This ensures proper state root
// verification when importing historical blocks.
// LuxMainnetChainConfig contains the chain parameters for Lux mainnet
// (network ID 96369). Under activate-all-implicitly Shanghai is live from
// genesis on Lux; pre-Shanghai historic block import is no longer in scope.
LuxMainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(96369),
HomesteadBlock: big.NewInt(0),
@@ -210,13 +208,12 @@ var (
GrayGlacierBlock: nil,
TerminalTotalDifficulty: big.NewInt(0),
MergeNetsplitBlock: big.NewInt(0),
ShanghaiTime: nil, // Pre-Shanghai chain (EVM 2024)
CancunTime: nil, // Not activated
PragueTime: nil, // Not activated
ShanghaiTime: newUint64(0),
CancunTime: nil,
PragueTime: nil,
OsakaTime: nil,
VerkleTime: nil, // Not activated
EVMTimestamp: newUint64(0), // EVM gas accounting from genesis
DurangoTimestamp: newUint64(0), // Durango upgrade from genesis
VerkleTime: nil,
EVMTimestamp: newUint64(0), // Lux EVM gas accounting from genesis
Ethash: new(EthashConfig),
}
@@ -545,8 +542,7 @@ type ChainConfig struct {
// - Coinbase receives full gas payment (no EIP-1559 burning)
// - Gas refunds are disabled (ApricotPhase1 behavior)
// Single canonical field — no aliases. Old `subnetEVMTimestamp` is gone.
EVMTimestamp *uint64 `json:"evmTimestamp,omitempty"` // EVM activation time (nil = standard geth, 0 = always EVM)
DurangoTimestamp *uint64 `json:"durangoTimestamp,omitempty"` // Durango upgrade time
EVMTimestamp *uint64 `json:"evmTimestamp,omitempty"` // EVM activation time (nil = standard geth, 0 = always EVM)
// TerminalTotalDifficulty is the amount of total difficulty reached by
// the network that triggers the consensus upgrade.
@@ -1029,11 +1025,6 @@ func (c *ChainConfig) IsEVM(time uint64) bool {
return isTimestampForked(c.EVMTimestamp, time)
}
// IsDurango returns whether time is either equal to the Durango upgrade time or greater.
func (c *ChainConfig) IsDurango(time uint64) bool {
return isTimestampForked(c.DurangoTimestamp, time)
}
// IsEIP4762 returns whether eip 4762 has been activated at given block.
func (c *ChainConfig) IsEIP4762(num *big.Int, time uint64) bool {
return c.IsVerkle(num, time)
@@ -1577,10 +1568,9 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
IsLondon: c.IsLondon(num),
IsMerge: isMerge,
// For Lux networks: If ShanghaiTime is explicitly set in genesis config,
// Shanghai is active regardless of merge status. This handles importing
// historic blocks that were created with Shanghai EIPs (EIP-3860 init code gas)
// but before the merge. For EVM chains, Durango upgrade brings Shanghai EIPs.
IsShanghai: c.IsShanghai(num, timestamp) || c.IsDurango(timestamp),
// Shanghai is active regardless of merge status. Lux genesis sets
// ShanghaiTime=0 under activate-all-implicitly.
IsShanghai: c.IsShanghai(num, timestamp),
IsCancun: isMerge && c.IsCancun(num, timestamp),
IsPrague: isMerge && c.IsPrague(num, timestamp),
IsOsaka: isMerge && c.IsOsaka(num, timestamp),