mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
go list ./... returned nothing, so no package here could be built or tested and the failure was invisible: one directory held a Go test beside fifteen .cpp files, which makes it a Go package the toolchain then refuses. The generator moves to the golden/ subdirectory the other two C++ chains already use. That silence was hiding a package that does not compile. host/ calls EnsureIdentity and identity.go defines LoadIdentity — a rename that happened on one side — and it has no importers, because the Go host is cmd/luxd now. Deleted rather than repaired: the thing it was a stand-in for arrived. The operator tools came across too (backup, blscheck, ceremony, config, genesishash, keytoaddr, pqkeygen, repair-proposervm, wire) plus benchmarks and examples, so the package set now differs from the retired repo by exactly one name: main/ is cmd/luxd. Two tests were right and are now satisfied rather than silenced. The purity test looked for ./main; it looks where the daemon lives. The chain-address test found conformance/dex spelling /v1/chain by hand — but that is its own module on purpose, since it links an EVM ABI and a signer the node must not carry, so it cannot call Chain. The rule is about this module, and the walk now says so.
35 lines
659 B
Go
35 lines
659 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/luxfi/crypto/bls"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
fmt.Println("Usage: blscheck <signer.key path>")
|
|
os.Exit(1)
|
|
}
|
|
|
|
keyBytes, err := os.ReadFile(os.Args[1])
|
|
if err != nil {
|
|
fmt.Printf("Error reading key file: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
fmt.Printf("Key file size: %d bytes\n", len(keyBytes))
|
|
fmt.Printf("Key bytes (hex): %x\n", keyBytes)
|
|
|
|
sk, err := bls.SecretKeyFromBytes(keyBytes)
|
|
if err != nil {
|
|
fmt.Printf("Error parsing secret key: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
pk := sk.PublicKey()
|
|
pkBytes := bls.PublicKeyToCompressedBytes(pk)
|
|
fmt.Printf("Derived public key: 0x%x\n", pkBytes)
|
|
}
|