mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The node pinned luxfi/evm v1.104.30, whose precompile registry named 41 suite packages one by one and pinned the suite at v0.19.8. A precompile is only dispatchable if its init() has run, so this luxd linked 14 of the suite's 56 modules — and because luxd refuses an activation for a configKey it has never seen, six precompiles could not be activated by any chain however its genesis was written: aiInference, aivmBridge, modelRegistry, starkfri, swap and v3. evm v1.104.52 imports the suite's own registry instead of a copy of its list, so the set cannot drift from what the suite contains. This node now dispatches 56. cmd/surface prints that surface. It is the list an upgrade.json may draw from, so it is worth being able to ask the binary rather than read a table: every configKey Lux, Hanzo and Zoo activate is in it. Co-authored-by: Hanzo Dev <[email protected]>
28 lines
761 B
Go
28 lines
761 B
Go
// Command surface prints the precompile surface THIS luxd dispatches: one line
|
|
// per registered module, address and config key. A chain's upgrade.json may only
|
|
// name a configKey that appears here — luxd refuses an activation for one it has
|
|
// never seen — so this is the list a genesis is allowed to draw from.
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"sort"
|
|
|
|
_ "github.com/luxfi/evm/precompile/registry"
|
|
"github.com/luxfi/precompile/modules"
|
|
)
|
|
|
|
func main() {
|
|
all := modules.RegisteredModules()
|
|
rows := make([]string, 0, len(all))
|
|
for _, m := range all {
|
|
rows = append(rows, fmt.Sprintf("%s %s", m.Address.Hex(), m.ConfigKey))
|
|
}
|
|
sort.Strings(rows)
|
|
for _, r := range rows {
|
|
fmt.Println(r)
|
|
}
|
|
fmt.Fprintf(os.Stderr, "%d modules\n", len(rows))
|
|
}
|