fix(devnet): canonical EVM chainID 96370 -> 96367

This commit is contained in:
zeekay
2026-06-23 14:00:16 -07:00
parent 8fef3692f6
commit 71d5afb016
10 changed files with 23 additions and 18 deletions
+3 -3
View File
@@ -113,7 +113,7 @@ If genesis hash drifts → check `cChainGenesis` in `genesis.json` is the litera
|---------|------------|----------|--------------|----------|
| Mainnet | 1 | 96369 | `0x3f4fa2a0b0ce089f52bf0ae9199c75ffdd76ecafc987794050cb0d286f1ec61e` | 2T LUX |
| Testnet | 2 | 96368 | `0xfc909f7e992d9cb91485f114f6d333f3823a12f2c72bbf51ed2c8eea749b2d2e` | 2T LUX |
| Devnet | 3 | 96370 | `0x836f6053473e4331bb347afc45b641f12075c63a302f4e56e64239a3ba4acd4b` | 2T LUX |
| Devnet | 3 | 96367 | `0x836f6053473e4331bb347afc45b641f12075c63a302f4e56e64239a3ba4acd4b` | 2T LUX |
| Local | 1337 | 1337 | - | 2T LUX |
> **Historical note**: testnet was `0x1c5fe37764b8bc146dc88bc1c2e0259cd8369b07a06439bcfa1782b5d4fb0995`
@@ -139,7 +139,7 @@ on the same VM IDs (`builder.TChainAliases`, `builder.KChainAliases`).
| Letter | VM | Mainnet | Testnet | Devnet | Localnet |
|--------|--------------|---------|---------|--------|----------|
| X | XVM (UTXO) | — | — | — | — |
| C | EVM | 96369 | 96368 | 96370 | 31337 |
| C | EVM | 96369 | 96368 | 96367 | 31337 |
| D | DexVM | 96469 | 96468 | 96470 | 31447 |
| Q | QuantumVM | 96569 | 96568 | 96570 | 31557 |
| A | AIVM | 96669 | 96668 | 96670 | 31667 |
@@ -239,7 +239,7 @@ configs/
| Block Rate | 2s | 2s | 1s | 1s |
| Gas Limit | 12M | 12M | 20M | 15M |
| Min Base Fee | 25 gwei | 25 gwei | 1 gwei | 1 gwei |
| Chain ID | 96369 | 96368 | 96370 | 1337 |
| Chain ID | 96369 | 96368 | 96367 | 1337 |
### Warp Precompile (Required for Genesis Hash)
+3 -3
View File
@@ -15,7 +15,7 @@ genesis/
├── testnet/ # LUX Testnet (Chain ID: 96368)
│ ├── cchain.json # C-Chain genesis (EVM compatible)
│ └── genesis.json # Full testnet genesis
├── devnet/ # LUX Devnet (Chain ID: 96370) - Fast iteration network
├── devnet/ # LUX Devnet (Chain ID: 96367) - Fast iteration network
│ └── cchain.json # C-Chain genesis (EVM compatible)
├── local/ # Local development network (Chain ID: 1337)
│ ├── cchain.json # C-Chain genesis (EVM compatible)
@@ -45,7 +45,7 @@ The mainnet C-Chain was initialized with a single genesis allocation:
|---------|----------|------------|---------|
| LUX Mainnet | 96369 | 96369 | Production network |
| LUX Testnet | 96368 | 96368 | Public test network |
| LUX Devnet | 96370 | 96370 | Fast iteration dev network |
| LUX Devnet | 96367 | 3 | Fast iteration dev network |
| Local | 1337 | 1337 | Local development |
## Network Configurations
@@ -62,7 +62,7 @@ The mainnet C-Chain was initialized with a single genesis allocation:
- **Min Base Fee**: 25 gwei
- **Genesis Account**: `0x9011...` with 2T LUX (same as mainnet)
### Devnet (96370)
### Devnet (96367)
- **Block Rate**: 1 second (faster)
- **Gas Limit**: 20M
- **Min Base Fee**: 1 gwei (cheaper)
+6 -1
View File
@@ -209,9 +209,14 @@ func TestGetGenesis_AllPrimaryChainsBakedIn(t *testing.T) {
// letter base = 96369 + 100*(idx_in_alphabet_relative_to_C)
// per-network offset: testnet = base-1, devnet = base+1 (mirrors C-Chain)
//
// Exception: the C-Chain devnet EVM chainID is the owner-locked canonical
// value 96367 (see DevnetChainID), NOT base+1 (96370). The +1 rule holds
// for the D/Q/A/... shards below; C is the one cell pinned by the
// canonical map rather than derived from the arithmetic.
//
// This produces:
//
// C(96369/96368/96370), D(96469/96468/96470), Q(96569/96568/96570),
// C(96369/96368/96367), D(96469/96468/96470), Q(96569/96568/96570),
// A(96669/96668/96670), B(96769/96768/96770), T(96869/96868/96870),
// Z(96969/96968/96970), G(97069/97068/97070), K(97169/97168/97170)
//
+3 -3
View File
@@ -54,11 +54,11 @@ const (
// Chain ID constants (C-Chain EVM).
MainnetChainID = 96369
TestnetChainID = 96368
DevnetChainID = 96370
DevnetChainID = 96367
// LocalChainID is the canonical local C-Chain EVM ID (Anvil convention).
LocalChainID = 31337
// CustomChainID is the sentinel C-Chain EVM ID for any chain outside
// the well-known {96369, 96368, 96370, 31337} set. Mirrors CustomID
// the well-known {96369, 96368, 96367, 31337} set. Mirrors CustomID
// at the network-ID layer; the two should always be paired (a peer
// presenting CustomID at the network layer also presents
// CustomChainID at the EVM layer unless overridden via genesis-file).
@@ -435,7 +435,7 @@ func IsCustom(networkID uint32) bool {
}
// networkNameFromID returns the network directory name for a network ID.
// Accepts both network IDs (1, 2, 3, 1337) and chain IDs (96369, 96368, 96370, 31337)
// Accepts both network IDs (1, 2, 3, 1337) and chain IDs (96369, 96368, 96367, 31337)
// as aliases. User-defined custom networks return "" — callers must
// supply a genesis file (`--genesis-file`) for them since there are no
// embedded canonical configs to load from disk.
+1 -1
View File
@@ -38,7 +38,7 @@
"berlinBlock": 0,
"byzantiumBlock": 0,
"cancunTime": 0,
"chainId": 96370,
"chainId": 96367,
"constantinopleBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
+1 -1
View File
@@ -320,7 +320,7 @@
},
"byzantiumBlock": 0,
"cancunTime": 0,
"chainId": 96370,
"chainId": 96367,
"constantinopleBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -17,7 +17,7 @@ func TestEVMChainID_KnownCells(t *testing.T) {
}{
{FamilyLux, MainnetID, 96369},
{FamilyLux, TestnetID, 96368},
{FamilyLux, DevnetID, 96370},
{FamilyLux, DevnetID, 96367},
{FamilyLux, LocalID, 31337},
{FamilyHanzo, MainnetID, 36963},
{FamilyHanzo, TestnetID, 36962},
@@ -72,7 +72,7 @@ func TestNetworkFamilyOf_RoundTrip(t *testing.T) {
}{
{96369, FamilyLux},
{96368, FamilyLux},
{96370, FamilyLux},
{96367, FamilyLux},
{31337, FamilyLux},
{36963, FamilyHanzo},
{200200, FamilyZoo},
@@ -133,7 +133,7 @@ func TestEVMChainIDFor_StringInputs(t *testing.T) {
}{
{"lux", "mainnet", 96369},
{"lux", "testnet", 96368},
{"lux", "devnet", 96370},
{"lux", "devnet", 96367},
{"lux", "localnet", 31337},
{"LUX", "MAINNET", 96369},
{"Lux", "Main", 96369},
+1 -1
View File
@@ -12,7 +12,7 @@ import "github.com/luxfi/constants"
// ────────────────── ──────────────────────
// constants.MainnetID (1) constants.MainnetChainID (96369)
// constants.TestnetID (2) constants.TestnetChainID (96368)
// constants.DevnetID (3) constants.DevnetChainID (96370)
// constants.DevnetID (3) constants.DevnetChainID (96367)
// constants.LocalID (1337) constants.LocalChainID (31337)
//
// The primary network ID is SHARED across all Lux-derived L1s (Lux,