mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-26 23:48:54 +00:00
refactor(genesis): re-export LightMnemonic from published luxfi/light v1.0.0 (#14)
genesis.LightMnemonic becomes a backward-compat re-export of light.Mnemonic (github.com/luxfi/light v1.0.0) — one source of truth for the public dev seed, no local replace directive, published semver. Orthogonal to the pre-existing constants v1.6.1 <-> ids MChainID/FChainID skew that blocks this module's full build (verified: ids resolves to v1.2.10 with and without this change; identical errors either way). Co-authored-by: Hanzo AI <ai@hanzo.ai>
This commit is contained in:
committed by
GitHub
co-authored by
Hanzo AI
parent
6a3e80d0e7
commit
92312c1413
@@ -35,6 +35,7 @@ require (
|
||||
github.com/luxfi/cache v1.2.1 // indirect
|
||||
github.com/luxfi/codec v1.1.4 // indirect
|
||||
github.com/luxfi/geth v1.16.98 // indirect
|
||||
github.com/luxfi/light v1.0.0
|
||||
github.com/luxfi/math/big v0.1.0 // indirect
|
||||
github.com/luxfi/metric v1.5.5 // indirect
|
||||
github.com/luxfi/mock v0.1.1 // indirect
|
||||
|
||||
@@ -215,3 +215,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
github.com/luxfi/light v1.0.0 h1:zTJgp5M0xX8rIwRjYDQgOGhLas3rgXyhkszrTX+ne3s=
|
||||
github.com/luxfi/light v1.0.0/go.mod h1:1G0kgjEe/srlBMCIrFq4IvhnrMuHKFG18CRUWfw1z30=
|
||||
|
||||
+6
-3
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/luxfi/go-bip32"
|
||||
"github.com/luxfi/go-bip39"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/light"
|
||||
"github.com/luxfi/log"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
"golang.org/x/crypto/sha3"
|
||||
@@ -74,7 +75,11 @@ const (
|
||||
// value of LUX_MNEMONIC to bootstrap a local network (network ID >=
|
||||
// 1337). RefuseLightMnemonicOnProduction enforces it cannot be used
|
||||
// on mainnet/testnet/devnet (network IDs 1/2/3).
|
||||
LightMnemonic = "light light light light light light light light light light light energy"
|
||||
//
|
||||
// Single source of truth: github.com/luxfi/light.Mnemonic. This is a
|
||||
// backward-compat re-export so existing genesis.LightMnemonic callers
|
||||
// keep working; do not re-declare the literal here.
|
||||
LightMnemonic = light.Mnemonic
|
||||
)
|
||||
|
||||
// KeyInfo contains parsed key information for a node
|
||||
@@ -574,7 +579,6 @@ func privateKeyToEVMAddress(privKey []byte) (ids.ShortID, error) {
|
||||
return addr, nil
|
||||
}
|
||||
|
||||
|
||||
// keccakBytes returns Keccak256(data) as a []byte slice (saves the
|
||||
// two-step assignment-then-slice that Go requires for function-returned
|
||||
// arrays).
|
||||
@@ -1123,4 +1127,3 @@ func buildConfigFromKeyInfos(networkID uint32, validatorKeys []KeyInfo, allKeys
|
||||
Message: genesisMessage(networkID),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user