mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
fix: rename TLS key files to luxtls.key/crt
- Rename staking.key -> luxtls.key in embedded configs - Rename staking.crt -> luxtls.crt in embedded configs - Update imports to github.com/luxfi/constants
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Lux Netrunner - AI Assistant Knowledge Base
|
||||
|
||||
**Last Updated**: 2025-11-12
|
||||
**Last Updated**: 2026-01-07
|
||||
**Project**: Lux Netrunner
|
||||
**Organization**: Lux Network
|
||||
**Documentation Score**: 85/100
|
||||
@@ -43,6 +43,9 @@ netrunner control status
|
||||
# Save snapshot
|
||||
netrunner control save-snapshot snapshot-name
|
||||
|
||||
# Save hot snapshot (no node stop)
|
||||
netrunner control save-hot-snapshot snapshot-name
|
||||
|
||||
# Load snapshot
|
||||
netrunner control load-snapshot snapshot-name
|
||||
```
|
||||
@@ -365,7 +368,7 @@ To achieve full 4-chain bootstrap, we need to:
|
||||
- **Files Affected**: Any manually created `genesis.json`
|
||||
- **Solution**: Use proper Bech32 encoding library:
|
||||
```go
|
||||
import "github.com/luxfi/node/utils/formatting/address"
|
||||
import "github.com/luxfi/address"
|
||||
addr, err := address.Format("lux", hrp, publicKeyHash)
|
||||
```
|
||||
|
||||
@@ -581,9 +584,9 @@ When deploying manually (without netrunner):
|
||||
|
||||
#### "invalid checksum (expected..., got...)"
|
||||
**Cause**: Manually created address without proper Bech32 encoding
|
||||
**Solution**: Use `github.com/luxfi/node/utils/formatting/address` package
|
||||
**Solution**: Use `github.com/luxfi/address` package
|
||||
```go
|
||||
import "github.com/luxfi/node/utils/formatting/address"
|
||||
import "github.com/luxfi/address"
|
||||
addr, _ := address.Format("lux", hrp, pubKeyHash)
|
||||
```
|
||||
|
||||
@@ -1116,4 +1119,3 @@ This architecture provides a clean, production-ready approach to mainnet network
|
||||
- **State management**: Snapshot save/restore for reproducible testing
|
||||
- **No confusion**: Removes legacy `lux local` command entirely
|
||||
- **Mainnet-first**: Defaults to mainnet configuration with 5 validators
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ To start a new Lux network with five nodes (a cluster):
|
||||
|
||||
```bash
|
||||
# replace execPath with the path to Lux on your machine
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/node/build/node
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/sdk/node/build/node
|
||||
LUXD_EXEC_PATH="node"
|
||||
|
||||
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${LUXD_EXEC_PATH}'","numNodes":5,"logLevel":"INFO"}'
|
||||
@@ -259,6 +259,7 @@ curl -X POST -k http://localhost:8081/v1/control/savesnapshot -d '{"snapshot_nam
|
||||
|
||||
# or
|
||||
netrunner control save-snapshot snapshotName
|
||||
netrunner control save-hot-snapshot snapshotName
|
||||
```
|
||||
|
||||
To load a network from a snapshot:
|
||||
@@ -428,7 +429,7 @@ node5
|
||||
To restart a node (in this case, the one named `node1`):
|
||||
|
||||
```bash
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/node/build/node
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/sdk/node/build/node
|
||||
LUXD_EXEC_PATH="node"
|
||||
|
||||
# Note that you can restart the node with a different binary by providing
|
||||
@@ -447,7 +448,7 @@ node1
|
||||
To add a node (in this case, a new node named `node99`):
|
||||
|
||||
```bash
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/node/build/node
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/sdk/node/build/node
|
||||
LUXD_EXEC_PATH="node"
|
||||
|
||||
# Note that you can add the new node with a different binary by providing
|
||||
@@ -465,7 +466,7 @@ node99
|
||||
|
||||
To pause a node (in this case, node named `node99`):
|
||||
```bash
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/node/build/node
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/sdk/node/build/node
|
||||
LUXD_EXEC_PATH="node"
|
||||
|
||||
|
||||
@@ -481,7 +482,7 @@ node99
|
||||
|
||||
To resume a paused node (in this case, node named `node99`):
|
||||
```bash
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/node/build/node
|
||||
# e.g., ${HOME}/go/src/github.com/luxfi/sdk/node/build/node
|
||||
LUXD_EXEC_PATH="node"
|
||||
|
||||
|
||||
@@ -508,7 +509,7 @@ You can also provide additional flags that specify the node's config:
|
||||
`--db-dir`
|
||||
|
||||
Lux exposes a "test peer", which you can attach to a node.
|
||||
(See [here](https://github.com/luxfi/node/blob/master/network/peer/test_peer.go) for more information.)
|
||||
(See [here](https://github.com/luxfi/sdk/node/blob/master/network/peer/test_peer.go) for more information.)
|
||||
You can send messages through the test peer to the node it is attached to.
|
||||
|
||||
To attach a test peer to a node (in this case, `node1`):
|
||||
@@ -574,20 +575,20 @@ go install -v .
|
||||
subnet-cli create VMID subnetevm
|
||||
# srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy
|
||||
|
||||
# download from https://github.com/luxfi/node/releases
|
||||
# download from https://github.com/luxfi/sdk/node/releases
|
||||
# or build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/node/build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
cd ${HOME}/go/src/github.com/luxfi/node
|
||||
./scripts/build.sh
|
||||
|
||||
# ref. https://github.com/luxfi/subnet-evm/blob/b69e47e0398b5237cda0422f6a32969e64bde346/scripts/run.sh
|
||||
cd ${HOME}/go/src/github.com/luxfi/subnet-evm
|
||||
go build -v \
|
||||
-o ${HOME}/go/src/github.com/luxfi/node/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy \
|
||||
-o ${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins/srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy \
|
||||
./plugin
|
||||
|
||||
# make sure binaries are built
|
||||
find ${HOME}/go/src/github.com/luxfi/node/build
|
||||
find ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
# for example
|
||||
# .../build
|
||||
# .../build/plugins
|
||||
@@ -646,8 +647,8 @@ cat /tmp/subnet-evm.genesis.json
|
||||
|
||||
```bash
|
||||
# replace execPath with the path to Lux on your machine
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/node/build/plugins"
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins"
|
||||
|
||||
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${LUXD_EXEC_PATH}'","numNodes":5,"logLevel":"INFO","pluginDir":"'${LUXD_PLUGIN_PATH}'","blockchainSpecs":[{"vm_name":"subnetevm","genesis":"/tmp/subnet-evm.genesis.json"}]}'
|
||||
|
||||
@@ -702,19 +703,19 @@ go install -v .
|
||||
subnet-cli create VMID blobvm
|
||||
# kM6h4LYe3AcEU1MB2UNg6ubzAiDAALZzpVrbX8zn3hXF6Avd8
|
||||
|
||||
# download from https://github.com/luxfi/node/releases
|
||||
# download from https://github.com/luxfi/sdk/node/releases
|
||||
# or build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/node/build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
cd ${HOME}/go/src/github.com/luxfi/node
|
||||
./scripts/build.sh
|
||||
|
||||
cd ${HOME}/go/src/github.com/luxfi/blobvm
|
||||
go build -v \
|
||||
-o ${HOME}/go/src/github.com/luxfi/node/build/plugins/kM6h4LYe3AcEU1MB2UNg6ubzAiDAALZzpVrbX8zn3hXF6Avd8 \
|
||||
-o ${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins/kM6h4LYe3AcEU1MB2UNg6ubzAiDAALZzpVrbX8zn3hXF6Avd8 \
|
||||
./cmd/blobvm
|
||||
|
||||
# make sure binaries are built
|
||||
find ${HOME}/go/src/github.com/luxfi/node/build
|
||||
find ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
# for example
|
||||
# .../build
|
||||
# .../build/plugins
|
||||
@@ -732,8 +733,8 @@ cat /tmp/blobvm.genesis.json
|
||||
|
||||
```bash
|
||||
# replace execPath with the path to Lux on your machine
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/node/build/plugins"
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins"
|
||||
|
||||
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${LUXD_EXEC_PATH}'","numNodes":5,"logLevel":"INFO","pluginDir":"'${LUXD_PLUGIN_PATH}'","blockchainSpecs":[{"vm_name":"blobvm","genesis":"/tmp/blobvm.genesis.json"}]}'
|
||||
|
||||
@@ -788,9 +789,9 @@ go install -v .
|
||||
subnet-cli create VMID timestampvm
|
||||
# tGas3T58KzdjcJ2iKSyiYsWiqYctRXaPTqBCA11BqEkNg8kPc
|
||||
|
||||
# download from https://github.com/luxfi/node/releases
|
||||
# download from https://github.com/luxfi/sdk/node/releases
|
||||
# or build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/node/build
|
||||
rm -rf ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
cd ${HOME}/go/src/github.com/luxfi/node
|
||||
./scripts/build.sh
|
||||
|
||||
@@ -799,11 +800,11 @@ cd ${HOME}/go/src/github.com/luxfi/node
|
||||
# ./scripts/build.sh
|
||||
cd ${HOME}/go/src/github.com/luxfi/timestampvm
|
||||
go build -v \
|
||||
-o ${HOME}/go/src/github.com/luxfi/node/build/plugins/tGas3T58KzdjcJ2iKSyiYsWiqYctRXaPTqBCA11BqEkNg8kPc \
|
||||
-o ${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins/tGas3T58KzdjcJ2iKSyiYsWiqYctRXaPTqBCA11BqEkNg8kPc \
|
||||
./main
|
||||
|
||||
# make sure binaries are built
|
||||
find ${HOME}/go/src/github.com/luxfi/node/build
|
||||
find ${HOME}/go/src/github.com/luxfi/sdk/node/build
|
||||
# for example
|
||||
# .../build
|
||||
# .../build/plugins
|
||||
@@ -818,8 +819,8 @@ echo hello > /tmp/timestampvm.genesis.json
|
||||
|
||||
```bash
|
||||
# replace execPath with the path to Lux on your machine
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/node/build/plugins"
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/node"
|
||||
LUXD_PLUGIN_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/plugins"
|
||||
|
||||
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${LUXD_EXEC_PATH}'","numNodes":5,"logLevel":"INFO","pluginDir":"'${LUXD_PLUGIN_PATH}'","blockchainSpecs":[{"vmName":"timestampvm","genesis":"/tmp/timestampvm.genesis.json","blockchain_alias":"timestamp"}]}'
|
||||
|
||||
|
||||
+6
-6
@@ -3,12 +3,12 @@ package api
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/api/health"
|
||||
"github.com/luxfi/node/api/info"
|
||||
"github.com/luxfi/node/indexer"
|
||||
"github.com/luxfi/node/vms/exchangevm"
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/sdk/api/admin"
|
||||
"github.com/luxfi/sdk/api/health"
|
||||
"github.com/luxfi/sdk/api/indexer"
|
||||
"github.com/luxfi/sdk/api/info"
|
||||
"github.com/luxfi/vm/vms/exchangevm"
|
||||
"github.com/luxfi/vm/vms/platformvm"
|
||||
// evmclient "github.com/luxfi/evm/plugin/evm/client"
|
||||
)
|
||||
|
||||
|
||||
+7
-7
@@ -7,13 +7,13 @@ import (
|
||||
ethereum "github.com/luxfi/geth"
|
||||
"github.com/luxfi/geth/common"
|
||||
"github.com/luxfi/geth/core/types"
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/api/health"
|
||||
"github.com/luxfi/node/api/info"
|
||||
"github.com/luxfi/node/indexer"
|
||||
"github.com/luxfi/node/utils/rpc"
|
||||
"github.com/luxfi/node/vms/exchangevm"
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/sdk/api/admin"
|
||||
"github.com/luxfi/sdk/api/health"
|
||||
"github.com/luxfi/sdk/api/indexer"
|
||||
"github.com/luxfi/sdk/api/info"
|
||||
"github.com/luxfi/sdk/utils/rpc"
|
||||
"github.com/luxfi/vm/vms/exchangevm"
|
||||
"github.com/luxfi/vm/vms/platformvm"
|
||||
// evmclient "github.com/luxfi/evm/plugin/evm/client"
|
||||
)
|
||||
|
||||
|
||||
+5
-5
@@ -4,17 +4,17 @@ package mocks
|
||||
|
||||
import (
|
||||
api "github.com/luxfi/netrunner/api"
|
||||
admin "github.com/luxfi/node/api/admin"
|
||||
admin "github.com/luxfi/sdk/api/admin"
|
||||
|
||||
exchangevm "github.com/luxfi/node/vms/exchangevm"
|
||||
exchangevm "github.com/luxfi/vm/vms/exchangevm"
|
||||
|
||||
indexer "github.com/luxfi/node/indexer"
|
||||
indexer "github.com/luxfi/sdk/api/indexer"
|
||||
|
||||
info "github.com/luxfi/node/api/info"
|
||||
info "github.com/luxfi/sdk/api/info"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
platformvm "github.com/luxfi/node/vms/platformvm"
|
||||
platformvm "github.com/luxfi/vm/vms/platformvm"
|
||||
)
|
||||
|
||||
// Client is an autogenerated mock type for the Client type
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"path/filepath"
|
||||
|
||||
badger "github.com/dgraph-io/badger/v4"
|
||||
"github.com/luxfi/geth/common"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var dbPath string
|
||||
flag.StringVar(&dbPath, "db", "", "BadgerDB path")
|
||||
flag.Parse()
|
||||
|
||||
if dbPath == "" {
|
||||
log.Fatal("Usage: check-last-block --db <badgerdb>")
|
||||
}
|
||||
|
||||
// Open BadgerDB
|
||||
opts := badger.DefaultOptions(filepath.Clean(dbPath)).WithReadOnly(true)
|
||||
db, err := badger.Open(opts)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to open DB: %v", err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
// Check for LastBlock key
|
||||
var lastHash common.Hash
|
||||
err = db.View(func(txn *badger.Txn) error {
|
||||
item, err := txn.Get([]byte("LastBlock"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("no LastBlock key: %v", err)
|
||||
}
|
||||
return item.Value(func(val []byte) error {
|
||||
copy(lastHash[:], val)
|
||||
return nil
|
||||
})
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
} else {
|
||||
fmt.Printf("LastBlock hash: %s\n", lastHash.Hex())
|
||||
}
|
||||
|
||||
// Try to find highest canonical block
|
||||
var maxHeight uint64
|
||||
err = db.View(func(txn *badger.Txn) error {
|
||||
opts := badger.DefaultIteratorOptions
|
||||
opts.PrefetchValues = false
|
||||
it := txn.NewIterator(opts)
|
||||
defer it.Close()
|
||||
|
||||
prefix := []byte("n")
|
||||
for it.Seek(prefix); it.ValidForPrefix(prefix); it.Next() {
|
||||
key := it.Item().Key()
|
||||
if len(key) == 9 && key[0] == 'n' {
|
||||
height := binary.BigEndian.Uint64(key[1:9])
|
||||
if height > maxHeight {
|
||||
maxHeight = height
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
if err == nil && maxHeight > 0 {
|
||||
fmt.Printf("Highest canonical block found: %d\n", maxHeight)
|
||||
}
|
||||
}
|
||||
@@ -77,6 +77,7 @@ func NewCommand() *cobra.Command {
|
||||
newSendOutboundMessageCommand(),
|
||||
newStopCommand(),
|
||||
newSaveSnapshotCommand(),
|
||||
newSaveHotSnapshotCommand(),
|
||||
newLoadSnapshotCommand(),
|
||||
newRemoveSnapshotCommand(),
|
||||
newGetSnapshotNamesCommand(),
|
||||
@@ -1115,6 +1116,34 @@ func saveSnapshotFunc(_ *cobra.Command, args []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func newSaveHotSnapshotCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "save-hot-snapshot snapshot-name",
|
||||
Short: "Requests server to save a hot network snapshot.",
|
||||
RunE: saveHotSnapshotFunc,
|
||||
Args: cobra.ExactArgs(1),
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
|
||||
func saveHotSnapshotFunc(_ *cobra.Command, args []string) error {
|
||||
cli, err := newClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer cli.Close()
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
|
||||
resp, err := cli.SaveHotSnapshot(ctx, args[0])
|
||||
cancel()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ux.Print(logger, log.Green.Wrap("save-hot-snapshot response: %+v"), resp)
|
||||
return nil
|
||||
}
|
||||
|
||||
func newLoadSnapshotCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "load-snapshot snapshot-name",
|
||||
|
||||
@@ -232,7 +232,8 @@ curl -X POST -k http://localhost:8081/v1/control/savesnapshot -d '{
|
||||
- `netrunner control create-blockchains` - Deploy blockchains
|
||||
|
||||
### Snapshot Commands
|
||||
- `netrunner control save-snapshot` - Save network state
|
||||
- `netrunner control save-snapshot` - Save network state (stops network)
|
||||
- `netrunner control save-hot-snapshot` - Save network state without stopping
|
||||
- `netrunner control load-snapshot` - Load network state
|
||||
- `netrunner control get-snapshot-names` - List snapshots
|
||||
- `netrunner control remove-snapshot` - Delete snapshot
|
||||
|
||||
@@ -70,7 +70,7 @@ Create a 5-node network:
|
||||
|
||||
```bash
|
||||
# Set the path to your Lux binary
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/node/build/node"
|
||||
LUXD_EXEC_PATH="${HOME}/go/src/github.com/luxfi/sdk/node/build/node"
|
||||
|
||||
# Start the network
|
||||
netrunner control start \
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/netrunner/engines"
|
||||
"github.com/luxfi/node/api/health"
|
||||
"github.com/luxfi/node/api/info"
|
||||
"github.com/luxfi/sdk/api/info"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
Binary file not shown.
@@ -8,13 +8,13 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/log/level"
|
||||
"github.com/luxfi/netrunner/local"
|
||||
"github.com/luxfi/netrunner/network"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/staking"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -121,7 +121,7 @@ func run(logger log.Logger, binaryPath string) error {
|
||||
logger.Info("one node's ID is", log.Stringer("nodeID", node1ID))
|
||||
|
||||
// Add a new node with generated cert/key/nodeid
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -11,20 +11,24 @@ require (
|
||||
github.com/btcsuite/btcd/btcutil v1.1.6
|
||||
github.com/dgraph-io/badger/v4 v4.9.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4
|
||||
github.com/luxfi/address v1.0.0
|
||||
github.com/luxfi/config v1.0.0
|
||||
github.com/luxfi/consensus v1.22.47
|
||||
github.com/luxfi/const v1.4.0
|
||||
github.com/luxfi/crypto v1.17.32
|
||||
github.com/luxfi/consensus v1.22.51
|
||||
github.com/luxfi/constants v1.4.2
|
||||
github.com/luxfi/crypto v1.17.37
|
||||
github.com/luxfi/genesis v1.5.19
|
||||
github.com/luxfi/geth v1.16.67
|
||||
github.com/luxfi/geth v1.16.68
|
||||
github.com/luxfi/go-bip39 v1.1.2
|
||||
github.com/luxfi/ids v1.2.6
|
||||
github.com/luxfi/ids v1.2.7
|
||||
github.com/luxfi/keys v1.0.6
|
||||
github.com/luxfi/log v1.2.1
|
||||
github.com/luxfi/math v1.2.0
|
||||
github.com/luxfi/math v1.2.2
|
||||
github.com/luxfi/metric v1.4.8
|
||||
github.com/luxfi/node v1.22.75
|
||||
github.com/luxfi/p2p v1.18.4
|
||||
github.com/luxfi/sdk v1.16.40
|
||||
github.com/luxfi/sdk/api v0.0.1
|
||||
github.com/luxfi/units v1.0.0
|
||||
github.com/luxfi/version v1.0.1
|
||||
github.com/onsi/ginkgo/v2 v2.27.3
|
||||
github.com/onsi/gomega v1.38.3
|
||||
github.com/otiai10/copy v1.14.1
|
||||
@@ -53,6 +57,9 @@ require (
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/chelnak/ysmrr v0.6.0 // indirect
|
||||
github.com/clipperhouse/stringish v0.1.1 // indirect
|
||||
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
|
||||
github.com/cloudflare/circl v1.6.2 // indirect
|
||||
github.com/cockroachdb/errors v1.12.0 // indirect
|
||||
github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect
|
||||
@@ -70,6 +77,7 @@ require (
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
|
||||
github.com/ethereum/go-verkle v0.2.2 // indirect
|
||||
github.com/fatih/color v1.18.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/getsentry/sentry-go v0.40.0 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
@@ -83,44 +91,59 @@ require (
|
||||
github.com/google/btree v1.1.3 // indirect
|
||||
github.com/google/flatbuffers v25.12.19+incompatible // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20251213031049-b05bdaca462f // indirect
|
||||
github.com/google/renameio/v2 v2.0.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/gorilla/mux v1.8.1 // indirect
|
||||
github.com/gorilla/rpc v1.2.1 // indirect
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/holiman/uint256 v1.3.2 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect
|
||||
github.com/klauspost/compress v1.18.2 // indirect
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
github.com/kr/pretty v0.3.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/luxfi/address v1.0.0 // indirect
|
||||
github.com/luxfi/cache v1.1.0 // indirect
|
||||
github.com/luxfi/database v1.2.18 // indirect
|
||||
github.com/luxfi/database v1.17.35 // indirect
|
||||
github.com/luxfi/evm v0.8.28 // indirect
|
||||
github.com/luxfi/go-bip32 v1.0.2 // indirect
|
||||
github.com/luxfi/keychain v1.0.1 // indirect
|
||||
github.com/luxfi/math/big v0.1.0 // indirect
|
||||
github.com/luxfi/math/safe v0.0.1 // indirect
|
||||
github.com/luxfi/mock v0.1.0 // indirect
|
||||
github.com/luxfi/p2p v1.18.3 // indirect
|
||||
github.com/luxfi/sampler v1.0.0 // indirect
|
||||
github.com/luxfi/staking v1.0.0 // indirect
|
||||
github.com/luxfi/tls v1.0.0
|
||||
github.com/luxfi/trace v0.1.4 // indirect
|
||||
github.com/luxfi/upgrade v1.0.0 // indirect
|
||||
github.com/luxfi/utils v1.1.0 // indirect
|
||||
github.com/luxfi/vm v1.0.1 // indirect
|
||||
github.com/luxfi/vm v1.0.2 // indirect
|
||||
github.com/luxfi/warp v1.18.2 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.19 // indirect
|
||||
github.com/melbahja/goph v1.4.0 // indirect
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/olekukonko/errors v1.1.0 // indirect
|
||||
github.com/olekukonko/ll v0.0.9 // indirect
|
||||
github.com/olekukonko/tablewriter v1.0.9 // indirect
|
||||
github.com/otiai10/mint v1.6.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pires/go-proxyproto v0.8.1 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/sftp v1.13.5 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/posthog/posthog-go v1.6.1 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.67.4 // indirect
|
||||
github.com/prometheus/procfs v0.19.2 // indirect
|
||||
github.com/rivo/uniseg v0.4.7 // indirect
|
||||
github.com/rogpeppe/go-internal v1.14.1 // indirect
|
||||
github.com/rs/cors v1.11.1 // indirect
|
||||
github.com/sagikazarmark/locafero v0.12.0 // indirect
|
||||
github.com/schollz/progressbar/v3 v3.18.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
github.com/spf13/afero v1.15.0 // indirect
|
||||
github.com/spf13/cast v1.10.0 // indirect
|
||||
@@ -149,6 +172,7 @@ require (
|
||||
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 // indirect
|
||||
golang.org/x/net v0.48.0 // indirect
|
||||
golang.org/x/sys v0.39.0 // indirect
|
||||
golang.org/x/term v0.38.0 // indirect
|
||||
golang.org/x/text v0.32.0 // indirect
|
||||
golang.org/x/time v0.14.0 // indirect
|
||||
golang.org/x/tools v0.40.0 // indirect
|
||||
@@ -156,3 +180,4 @@ require (
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
||||
)
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
|
||||
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chelnak/ysmrr v0.6.0 h1:kMhO0oI02tl/9szvxrOE0yeImtrK4KQhER0oXu1K/iM=
|
||||
github.com/chelnak/ysmrr v0.6.0/go.mod h1:56JSrmQgb7/7xoMvuD87h3PE/qW6K1+BQcrgWtVLTUo=
|
||||
github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM=
|
||||
github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY=
|
||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
@@ -113,6 +117,8 @@ github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJ
|
||||
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8=
|
||||
github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8=
|
||||
github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk=
|
||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
||||
github.com/ferranbt/fastssz v1.0.0 h1:9EXXYsracSqQRBQiHeaVsG/KQeYblPf40hsQPb9Dzk8=
|
||||
github.com/ferranbt/fastssz v1.0.0/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
@@ -199,12 +205,12 @@ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5T
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
|
||||
github.com/graph-gophers/graphql-go v1.8.0 h1:NT05/H+PdH1/PONExlUycnhULYHBy98dxV63WYc0Ng8=
|
||||
github.com/graph-gophers/graphql-go v1.8.0/go.mod h1:23olKZ7duEvHlF/2ELEoSZaY1aNPfShjP782SOoNTyM=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4 h1:kEISI/Gx67NzH3nJxAmY/dGac80kKZgZt134u7Y/k1s=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4/go.mod h1:6Nz966r3vQYCqIzWsuEl9d7cf7mRhtDmm++sOxlnfxI=
|
||||
github.com/hashicorp/go-bexpr v0.1.15 h1:flTYJAqZAlK+t8ezezb6WQGlRO1D4+GEF/HmH+xZo5k=
|
||||
github.com/hashicorp/go-bexpr v0.1.15/go.mod h1:HGKbAByHn2aJWUV47gL7+IjLK79iU3EZIbOwCXJZLoE=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db h1:IZUYC/xb3giYwBLMnr8d0TGTzPKFGNTCGgGLoyeX330=
|
||||
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db/go.mod h1:xTEYN9KCHxuYHs+NmrmzFcnvHMzLLNiGFafCb1n3Mfg=
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=
|
||||
@@ -230,6 +236,8 @@ github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJS
|
||||
github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE=
|
||||
github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung=
|
||||
github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=
|
||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg=
|
||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
|
||||
@@ -237,6 +245,8 @@ github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uq
|
||||
github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
@@ -251,54 +261,52 @@ github.com/luxfi/cache v1.1.0 h1:6LUyGGZ+rrMAJBbAU6+UwkcamXj3zsboRUodIof2Ong=
|
||||
github.com/luxfi/cache v1.1.0/go.mod h1:9GvlEEE9rFPaaWxvVpSPwW8ZMo2+8VMNNcuPa4AwzPg=
|
||||
github.com/luxfi/config v1.0.0 h1:EFIFkdus3YdDklhlwHKJNYLpSVuvWqHm+fs/TGckv5U=
|
||||
github.com/luxfi/config v1.0.0/go.mod h1:71q4A4m7vj+o1qnL1dNk/tVII+Ugiwvi9+jVMN2xxTU=
|
||||
github.com/luxfi/consensus v1.22.47 h1:iMVimbKap4T7sCNWs3Pb2yq1LVD9d9/sXmWHMiyCSDQ=
|
||||
github.com/luxfi/consensus v1.22.47/go.mod h1:LWAJvhE36LP8OrR3dPjjdc50vTTL4R2nbrvB+CDvb0w=
|
||||
github.com/luxfi/const v1.4.0 h1:8bHt5I8g76TkeuFIY478aYtfcLgbdkGNo/e/Sy3+6p0=
|
||||
github.com/luxfi/const v1.4.0/go.mod h1:qWfecjdImPY3kXsy3UAe4ZVpMcsp2/iUlHwUMPVREoI=
|
||||
github.com/luxfi/crypto v1.17.32 h1:qEKDETNMeU7T82UMEEGYh0bbJ0ZZdx0sAMRwFXt69aQ=
|
||||
github.com/luxfi/crypto v1.17.32/go.mod h1:laZTnEq0BD/fnPhd5ke/79WgFhV3TZjmfPxk+b8zbrE=
|
||||
github.com/luxfi/database v1.2.18 h1:yppRuZf3FKnr3v4o+UHNfSW+cXtUIUibtyki0+EqiIs=
|
||||
github.com/luxfi/database v1.2.18/go.mod h1:dYxaF30KGJQzuxA3VH7+WGU5/dhwRyzLgzSk9F3wje0=
|
||||
github.com/luxfi/consensus v1.22.51 h1:ul7YqQEjsdTCOPxH50Dk3C82DDVNIM4tyQNKYyeFy6M=
|
||||
github.com/luxfi/consensus v1.22.51/go.mod h1:6/kQBgDLP3KiwIaaGJEfYlaG83fKL5uZ0TI9AUsDGic=
|
||||
github.com/luxfi/constants v1.4.1 h1:nd9A/9PaN2XBMPExHo+mgkDt60vrxRoQ/e+UKqskbDg=
|
||||
github.com/luxfi/constants v1.4.1/go.mod h1:qWfecjdImPY3kXsy3UAe4ZVpMcsp2/iUlHwUMPVREoI=
|
||||
github.com/luxfi/crypto v1.17.37 h1:75ZvsRu6I36P6wb1gNO4yB846UuHojoCrSeQ48MArvU=
|
||||
github.com/luxfi/crypto v1.17.37/go.mod h1:vu+pCHdyPQZULzrA+K+lTFYrg8vOtNdu+/5Vko8RzZ0=
|
||||
github.com/luxfi/database v1.17.35 h1:T2/oaZlSyoIdk0lDkoEiTTWfBSePvTWGlT5R/Gt0v/s=
|
||||
github.com/luxfi/database v1.17.35/go.mod h1:dYxaF30KGJQzuxA3VH7+WGU5/dhwRyzLgzSk9F3wje0=
|
||||
github.com/luxfi/evm v0.8.28 h1:XDfyQnikJZ3HyVLdUxaOYKTdG6YgVotHlj+wBWbpX8A=
|
||||
github.com/luxfi/evm v0.8.28/go.mod h1:m51sh7/sDsbA8YXsR6wxrHj9iL4Epfri3uhZZtDSTo0=
|
||||
github.com/luxfi/genesis v1.5.19 h1:q9ETV3NXTlJBhhkVKYDidaQqBDb1jgY3TdaLPfBGu0k=
|
||||
github.com/luxfi/genesis v1.5.19/go.mod h1:888i1w8e67HIpgLuveIdd+3ESWCXHgnz7cijF6dDAKI=
|
||||
github.com/luxfi/geth v1.16.67 h1:ILPG59XNnNKIz1YNO1fJFV+doZXBjcQkb4oXQyz1HUM=
|
||||
github.com/luxfi/geth v1.16.67/go.mod h1:QWPyY3vlGQfm8SX/PE6q4XHTBe7X4Gw+SGDJi5QU1pg=
|
||||
github.com/luxfi/geth v1.16.68 h1:0jTD3AMrOH8O6tC2PpLo7Kz34qzJMKk8ZucQzJ9942U=
|
||||
github.com/luxfi/geth v1.16.68/go.mod h1:vA/ecZrwQ3tkli+0EJhutopm76R30yvS/VhgV0UDisE=
|
||||
github.com/luxfi/go-bip32 v1.0.2 h1:7vFbb+Wr4Z499q2tuCLdd7wWjtn8sH+HWBlx76mhH9Y=
|
||||
github.com/luxfi/go-bip32 v1.0.2/go.mod h1:bc7/LXDKAJQZ/F0Xjf5yXaTZxY9/ssLb4FC+Hxn/cDk=
|
||||
github.com/luxfi/go-bip39 v1.1.2 h1:p+wLMPGs6MLQh7q0YIsmy2EhHL7LHiELEGTJko6t/Jg=
|
||||
github.com/luxfi/go-bip39 v1.1.2/go.mod h1:96de9VkR2kY/ASAnhMtvt3TSh+PZkAFAngNj0GjRGDo=
|
||||
github.com/luxfi/ids v1.2.6 h1:Ru86pltAcWPhCT7FH/MwwuAYXkeZbt9ZwfuR883c8MI=
|
||||
github.com/luxfi/ids v1.2.6/go.mod h1:svLsj7e6ixJVfRYaQqv9RWjBIW11Vz738+d08BVpeCg=
|
||||
github.com/luxfi/ids v1.2.7 h1:3B42EbzR2cdY3veo1yOFOOIeEE+HULnCye2Ye32nXqI=
|
||||
github.com/luxfi/ids v1.2.7/go.mod h1:svLsj7e6ixJVfRYaQqv9RWjBIW11Vz738+d08BVpeCg=
|
||||
github.com/luxfi/keychain v1.0.1 h1:8tTzPnZSi0M6UtKRBCypnGFrLNry9BvWfS5ol33yDF0=
|
||||
github.com/luxfi/keychain v1.0.1/go.mod h1:X7HLk5QRZ1VHJxovAyBL6z7f/nlosoXlveEtvUGhoaw=
|
||||
github.com/luxfi/keys v1.0.6 h1:mKB0xjQoNpJxj59UNfdPfuqUoRT48Itt7PvRXU+X3iY=
|
||||
github.com/luxfi/keys v1.0.6/go.mod h1:hVqfOm6n4/ZN2O6AirlLEpgBhW8bsxNo2EbiNvggGUk=
|
||||
github.com/luxfi/log v1.2.1 h1:L2JM8MjGPF8rBnY+EXODS9x5OQTGSgeQ1SPFmeB+oPY=
|
||||
github.com/luxfi/log v1.2.1/go.mod h1:0vJzb4Hl9fvgwWDMKcbCD/SYH3bO0iSmgZMcYdfdl1o=
|
||||
github.com/luxfi/math v1.2.0 h1:cZVQQj1PrIWh3Oy6xfbBL44xay4QFuAXZBg9+pWPBmE=
|
||||
github.com/luxfi/math v1.2.0/go.mod h1:gcmMy6raVf6xrQW/4UmFXEEXC/UC2tZeGkxdiDzeBSg=
|
||||
github.com/luxfi/math v1.2.2 h1:TtkSm8HlR8bLrqVD8UgRBxAVmytqAU46+l8j+FoWgAw=
|
||||
github.com/luxfi/math v1.2.2/go.mod h1:C8STnF2H+D6rqBPt248CiWY2TGuJgdtv/+4UqrT15iM=
|
||||
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/math/safe v0.0.0-20260105093802-21b7243e9ffb h1:o59qZF1vHGqrxt1w0G+hvKqGn2m2c1eRSQ0hmfXSNRI=
|
||||
github.com/luxfi/math/safe v0.0.0-20260105093802-21b7243e9ffb/go.mod h1:EejrmOJHh03YAD8+Zww8cPcMR1K3Q2I7w1dX4sMloeo=
|
||||
github.com/luxfi/metric v1.4.8 h1:mMbcJW+E1z6qQxn34+BE109HlvT6ciiDXuc10qEBJRs=
|
||||
github.com/luxfi/metric v1.4.8/go.mod h1:AUQ7NSNz9WndAcr/SKnOkP7XSFFnBXOa+ihtJYfDaQY=
|
||||
github.com/luxfi/mock v0.1.0 h1:IwElfNu+T9sXvzFX6tudPDx1vqPuACRSRdxpD5lxW+o=
|
||||
github.com/luxfi/mock v0.1.0/go.mod h1:izF+9K0gGzFC9zERn6Po37v46eLdPB+EIsDjL3GLk+U=
|
||||
github.com/luxfi/node v1.22.75 h1:kOs6bbwP23scRTDN1YTjglcVQgncpaZqmeZIV/Cheqc=
|
||||
github.com/luxfi/node v1.22.75/go.mod h1:97xyVTMBFq/LmbrQ0VMA6DNNWBYSu+3jQG1ztBBEuHc=
|
||||
github.com/luxfi/p2p v1.18.3 h1:RUxZdRyQq5YLvaLUb6v86sv5ElFLR16Pq0jen9RAKho=
|
||||
github.com/luxfi/p2p v1.18.3/go.mod h1:9jmpwJqTTrrz3VF+7vgIAjcixB7CvvRcT5p2o4vz3m0=
|
||||
github.com/luxfi/precompile v0.4.0 h1:xvaiUi9rf11Hqn4J9mlsw+KsXWkZmZxByc0GGHn2k+o=
|
||||
github.com/luxfi/precompile v0.4.0/go.mod h1:ZSc4SN4X5S6ASj8VQYVtrlzKQwGFcw9Utq3IFQ1Ua/I=
|
||||
github.com/luxfi/precompile v0.4.1 h1:QBMCYsCWptPOVO0/BH1MY3QuE5cPkQ9nh85wDZDkzDc=
|
||||
github.com/luxfi/precompile v0.4.1/go.mod h1:Wqb52S3F5jA4H1In3Ygau+cAaiLq5iiS9AFLnBCozSE=
|
||||
github.com/luxfi/sampler v1.0.0 h1:k8Sf6otW83w4pQp0jXLA+g3J/joB7w7SqXQsWmNTOV0=
|
||||
github.com/luxfi/sampler v1.0.0/go.mod h1:f96/ozlj9vFfZj+akLtrHn4VpulQahwB+MQQhpeIekk=
|
||||
github.com/luxfi/staking v1.0.0 h1:pYI7XMGGb/zK2ATfTIkush/7HPWE7IS2yfmJqj4nzes=
|
||||
github.com/luxfi/staking v1.0.0/go.mod h1:E+fm3upfQTOu0fLCr3Uo4xYgAm7r/vEzgcUpNAhJuSE=
|
||||
github.com/luxfi/trace v0.1.4 h1:ttCRyXGwWuz232se+lIUqhWHBoTuvPLhHH/hLWyqtaM=
|
||||
github.com/luxfi/trace v0.1.4/go.mod h1:Az7HWh+PCuPftXjQu+ssjv51nKauaFu+q2un7bmZYBA=
|
||||
github.com/luxfi/units v1.0.0 h1:2aNVB+WsP1XeDob71IsO0w3jJqP3FtZdYnFsmORkJZg=
|
||||
github.com/luxfi/units v1.0.0/go.mod h1:tma28v4ed1tupdS0kpSeyO+u1wWK/g1NqODPbN1YzmA=
|
||||
github.com/luxfi/utils v1.1.0 h1:ti7HvjNwJd4ILDMERJtOAWE9mF8l+zqDVkgWnF7Agic=
|
||||
github.com/luxfi/utils v1.1.0/go.mod h1:ABqhBdGNig0CaDcnNYldv1byS0BTNi5IKPbJSPF1p98=
|
||||
github.com/luxfi/vm v1.0.1 h1:eZqrp6mEFPkhiv5kf5ZXmYAbXXjpS9axpUQG3cd3yts=
|
||||
github.com/luxfi/vm v1.0.1/go.mod h1:PJinuF4McLaHN57iKf8p7h89wIQhQT//LD/fac+/Dk8=
|
||||
github.com/luxfi/vm v1.0.2 h1:JnMm6QTh1nwWKXFy4Qf9Ej38KyXzFeprcy3Rp8/516s=
|
||||
github.com/luxfi/vm v1.0.2/go.mod h1:cRmy9WL9keIkl5XgGcP1w/RbwiMSYucjGdQ3LrSF0aQ=
|
||||
github.com/luxfi/warp v1.18.2 h1:TWmXjKXI7nxaDOnXIrw8BQTI/nCEniA17bs06bwNB4Q=
|
||||
github.com/luxfi/warp v1.18.2/go.mod h1:qu3TZv98repNhIDf04I6pzXePSgHjzP+JoSfWmF4PBA=
|
||||
github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo=
|
||||
@@ -309,10 +317,14 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
|
||||
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
|
||||
github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
|
||||
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
|
||||
github.com/mfridman/tparse v0.18.0 h1:wh6dzOKaIwkUGyKgOntDW4liXSo37qg5AXbIhkMV3vE=
|
||||
github.com/mfridman/tparse v0.18.0/go.mod h1:gEvqZTuCgEhPbYk/2lS3Kcxg1GmTxxU7kTC8DvP0i/A=
|
||||
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
|
||||
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/pointerstructure v1.2.1 h1:ZhBBeX8tSlRpu/FFhXH4RC4OJzFlqsQhoHZAz4x7TIw=
|
||||
@@ -326,6 +338,12 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI=
|
||||
github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
|
||||
github.com/olekukonko/errors v1.1.0 h1:RNuGIh15QdDenh+hNvKrJkmxxjV4hcS50Db478Ou5sM=
|
||||
github.com/olekukonko/errors v1.1.0/go.mod h1:ppzxA5jBKcO1vIpCXQ9ZqgDh8iwODz6OXIGKU8r5m4Y=
|
||||
github.com/olekukonko/ll v0.0.9 h1:Y+1YqDfVkqMWuEQMclsF9HUR5+a82+dxJuL1HHSRpxI=
|
||||
github.com/olekukonko/ll v0.0.9/go.mod h1:En+sEW0JNETl26+K8eZ6/W4UQ7CYSrrgg/EdIYT2H8g=
|
||||
github.com/olekukonko/tablewriter v1.0.9 h1:XGwRsYLC2bY7bNd93Dk51bcPZksWZmLYuaTHR0FqfL8=
|
||||
github.com/olekukonko/tablewriter v1.0.9/go.mod h1:5c+EBPeSqvXnLLgkm9isDdzR3wjfBkHR9Nhfp3NWrzo=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
@@ -369,9 +387,13 @@ github.com/pires/go-proxyproto v0.8.1/go.mod h1:ZKAAyp3cgy5Y5Mo4n9AlScrkCZwUy0g3
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.13.5 h1:a3RLUqkyjYRtBTZJZ1VRrKbN3zhuPLlUc3sphVz81go=
|
||||
github.com/pkg/sftp v1.13.5/go.mod h1:wHDZ0IZX6JcBYRK1TH9bcVq8G7TLpVHYIGJRFnmPfxg=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posthog/posthog-go v1.6.1 h1:3ZspN1rTqaK3WBWwLr+rAzDMeeolmdGDT3BxzNweFrc=
|
||||
github.com/posthog/posthog-go v1.6.1/go.mod h1:ZPCind3bz8xDLK0Zhvpv1fQav6WfRcQDqTMfMXmna98=
|
||||
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
@@ -380,6 +402,8 @@ github.com/prometheus/common v0.67.4 h1:yR3NqWO1/UyO1w2PhUvXlGQs/PtFmoveVO0KZ4+L
|
||||
github.com/prometheus/common v0.67.4/go.mod h1:gP0fq6YjjNCLssJCQp0yk4M8W6ikLURwkdd/YKtTbyI=
|
||||
github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws=
|
||||
github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||
@@ -391,6 +415,8 @@ github.com/sagikazarmark/locafero v0.12.0 h1:/NQhBAkUb4+fH1jivKHWusDYFjMOOKU88ee
|
||||
github.com/sagikazarmark/locafero v0.12.0/go.mod h1:sZh36u/YSZ918v0Io+U9ogLYQJ9tLLBmM4eneO6WwsI=
|
||||
github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo=
|
||||
github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U=
|
||||
github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=
|
||||
github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
@@ -440,6 +466,7 @@ github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYI
|
||||
github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI=
|
||||
github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw=
|
||||
github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ=
|
||||
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=
|
||||
github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU=
|
||||
github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4=
|
||||
github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU=
|
||||
@@ -449,6 +476,7 @@ github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBi
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
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=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
@@ -489,6 +517,9 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnf
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
|
||||
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
|
||||
golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 h1:fQsdNF2N+/YewlRZiricy4P1iimyPKZ/xwniHj8Q2a0=
|
||||
@@ -496,6 +527,7 @@ golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93/go.mod h1:EPRbTFwzwjXj9NpYyy
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI=
|
||||
golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg=
|
||||
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@@ -506,10 +538,14 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
|
||||
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -517,6 +553,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -539,16 +576,23 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
|
||||
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
|
||||
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
|
||||
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
|
||||
golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI=
|
||||
@@ -559,6 +603,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA=
|
||||
golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
||||
+19
-19
@@ -21,17 +21,18 @@ import (
|
||||
"github.com/luxfi/keys"
|
||||
|
||||
"github.com/luxfi/genesis/pkg/genesis"
|
||||
"github.com/luxfi/node/vms/platformvm/reward"
|
||||
"github.com/luxfi/vm/vms/platformvm/reward"
|
||||
|
||||
"github.com/luxfi/node/vms/components/lux"
|
||||
"github.com/luxfi/node/vms/components/verify"
|
||||
"github.com/luxfi/node/wallet/chain/x"
|
||||
"github.com/luxfi/sdk/wallet/chain/x"
|
||||
"github.com/luxfi/vm/vms/components/lux"
|
||||
"github.com/luxfi/vm/vms/components/verify"
|
||||
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
"github.com/luxfi/config"
|
||||
luxconfig "github.com/luxfi/config"
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/crypto/secp256k1"
|
||||
"github.com/luxfi/ids"
|
||||
@@ -40,21 +41,20 @@ import (
|
||||
"github.com/luxfi/netrunner/network"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/node/vms/platformvm/signer"
|
||||
"github.com/luxfi/node/vms/platformvm/txs"
|
||||
"github.com/luxfi/node/vms/secp256k1fx"
|
||||
pwallet "github.com/luxfi/node/wallet/chain/p"
|
||||
pwalletwallet "github.com/luxfi/node/wallet/chain/p/wallet"
|
||||
"github.com/luxfi/sdk/api/admin"
|
||||
pwallet "github.com/luxfi/sdk/wallet/chain/p"
|
||||
pwalletwallet "github.com/luxfi/sdk/wallet/chain/p/wallet"
|
||||
"github.com/luxfi/vm/vms/platformvm"
|
||||
"github.com/luxfi/vm/vms/platformvm/signer"
|
||||
"github.com/luxfi/vm/vms/platformvm/txs"
|
||||
"github.com/luxfi/vm/vms/secp256k1fx"
|
||||
|
||||
pbuilder "github.com/luxfi/node/wallet/chain/p/builder"
|
||||
psigner "github.com/luxfi/node/wallet/chain/p/signer"
|
||||
xbuilder "github.com/luxfi/node/wallet/chain/x/builder"
|
||||
xsigner "github.com/luxfi/node/wallet/chain/x/signer"
|
||||
primary "github.com/luxfi/node/wallet/net/primary"
|
||||
common "github.com/luxfi/node/wallet/net/primary/common"
|
||||
pbuilder "github.com/luxfi/sdk/wallet/chain/p/builder"
|
||||
psigner "github.com/luxfi/sdk/wallet/chain/p/signer"
|
||||
xbuilder "github.com/luxfi/sdk/wallet/chain/x/builder"
|
||||
xsigner "github.com/luxfi/sdk/wallet/chain/x/signer"
|
||||
primary "github.com/luxfi/sdk/wallet/primary"
|
||||
common "github.com/luxfi/sdk/wallet/primary/common"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -15,7 +15,8 @@ import (
|
||||
|
||||
"maps"
|
||||
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/crypto/bls/signer/localsigner"
|
||||
luxcrypto "github.com/luxfi/crypto/secp256k1"
|
||||
@@ -25,11 +26,10 @@ import (
|
||||
"github.com/luxfi/netrunner/network"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/vms/platformvm/signer"
|
||||
"github.com/luxfi/vm/vms/platformvm/signer"
|
||||
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils/formatting/address"
|
||||
"github.com/luxfi/address"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
)
|
||||
|
||||
// patchGenesisPreservingRaw patches a top-level genesis JSON document while guaranteeing that
|
||||
@@ -155,7 +155,7 @@ func NewConfigForNetwork(binaryPath string, numNodes uint32, networkID uint32) (
|
||||
}
|
||||
for i := 0; i < toAdd; i++ {
|
||||
nodeConfig := refNodeConfig
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return netConfig, fmt.Errorf("couldn't generate staking Cert/Key: %w", err)
|
||||
}
|
||||
@@ -347,7 +347,7 @@ func NewConfigForNetwork(binaryPath string, numNodes uint32, networkID uint32) (
|
||||
}
|
||||
} else {
|
||||
// Generate new keys for additional nodes beyond the 5 embedded ones
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return network.Config{}, fmt.Errorf("couldn't generate staking Cert/Key for node %d: %w", i, err)
|
||||
}
|
||||
@@ -552,7 +552,7 @@ func NewConfigForNetworkWithCustomGenesis(binaryPath string, numNodes uint32, ge
|
||||
for i := 0; i < toAdd; i++ {
|
||||
nodeConfig := node.Config{}
|
||||
nodeConfig.Flags = maps.Clone(refNodeConfig.Flags)
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return netConfig, fmt.Errorf("couldn't generate staking Cert/Key: %w", err)
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,11 +11,11 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import (
|
||||
luxcrypto "github.com/luxfi/crypto/secp256k1"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/keys"
|
||||
"github.com/luxfi/node/utils/formatting/address"
|
||||
"github.com/luxfi/address"
|
||||
)
|
||||
|
||||
// KeyInfo contains computed addresses from a private key.
|
||||
|
||||
@@ -5,10 +5,10 @@ package mocks
|
||||
import (
|
||||
context "context"
|
||||
|
||||
health "github.com/luxfi/node/api/health"
|
||||
health "github.com/luxfi/sdk/api/health"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
rpc "github.com/luxfi/node/utils/rpc"
|
||||
rpc "github.com/luxfi/sdk/utils/rpc"
|
||||
)
|
||||
|
||||
// Client is an autogenerated mock type for the Client type
|
||||
|
||||
+14
-14
@@ -22,6 +22,7 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
"github.com/luxfi/config"
|
||||
luxconfig "github.com/luxfi/config"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
luxcrypto "github.com/luxfi/crypto/secp256k1"
|
||||
@@ -35,13 +36,12 @@ import (
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/netrunner/utils/constants"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils/beacon"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/sdk/utils/beacon"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
|
||||
"github.com/luxfi/node/utils/formatting/address"
|
||||
"github.com/luxfi/node/utils/wrappers"
|
||||
"github.com/luxfi/address"
|
||||
"github.com/luxfi/sdk/utils/wrappers"
|
||||
"golang.org/x/mod/semver"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
@@ -50,8 +50,8 @@ const (
|
||||
defaultNodeNamePrefix = "node"
|
||||
configFileName = "config.json"
|
||||
upgradeConfigFileName = "upgrade.json"
|
||||
stakingKeyFileName = "staking.key"
|
||||
stakingCertFileName = "staking.crt"
|
||||
stakingKeyFileName = "luxtls.key"
|
||||
stakingCertFileName = "luxtls.crt"
|
||||
stakingSigningKeyFileName = "signer.key"
|
||||
genesisFileName = "genesis.json"
|
||||
stopTimeout = 30 * time.Second
|
||||
@@ -72,7 +72,7 @@ var (
|
||||
_ NodeProcessCreator = (*nodeProcessCreator)(nil)
|
||||
|
||||
warnFlags = map[string]struct{}{
|
||||
config.NetworkNameKey: {},
|
||||
config.NetworkIDKey: {},
|
||||
config.BootstrapIPsKey: {},
|
||||
config.BootstrapIDsKey: {},
|
||||
}
|
||||
@@ -275,12 +275,12 @@ func init() {
|
||||
panic(err)
|
||||
}
|
||||
defaultNetworkConfig.NodeConfigs[i].Flags = flags
|
||||
stakingKey, err := fs.ReadFile(configsDir, fmt.Sprintf("node%d/staking.key", i+1))
|
||||
stakingKey, err := fs.ReadFile(configsDir, fmt.Sprintf("node%d/luxtls.key", i+1))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defaultNetworkConfig.NodeConfigs[i].StakingKey = string(stakingKey)
|
||||
stakingCert, err := fs.ReadFile(configsDir, fmt.Sprintf("node%d/staking.crt", i+1))
|
||||
stakingCert, err := fs.ReadFile(configsDir, fmt.Sprintf("node%d/luxtls.crt", i+1))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -444,7 +444,7 @@ func NewDefaultConfigNNodes(binaryPath string, numNodes uint32) (network.Config,
|
||||
}
|
||||
for i := 0; i < toAdd; i++ {
|
||||
nodeConfig := refNodeConfig
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return netConfig, fmt.Errorf("couldn't generate staking Cert/Key: %w", err)
|
||||
}
|
||||
@@ -644,7 +644,7 @@ func (ln *localNetwork) addNode(nodeConfig node.Config) (node.Node, error) {
|
||||
log.String("node", nodeConfig.Name),
|
||||
log.Int("certLen", len(nodeConfig.StakingCert)),
|
||||
log.Int("keyLen", len(nodeConfig.StakingKey)))
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("couldn't generate staking Cert/Key: %w", err)
|
||||
}
|
||||
@@ -1249,7 +1249,7 @@ func (ln *localNetwork) buildArgs(
|
||||
|
||||
// Flags for Lux
|
||||
flags := map[string]string{
|
||||
config.NetworkNameKey: fmt.Sprintf("%d", ln.networkID),
|
||||
config.NetworkIDKey: fmt.Sprintf("%d", ln.networkID),
|
||||
config.DataDirKey: dataDir,
|
||||
config.DBPathKey: dbDir,
|
||||
config.LogsDirKey: logsDir,
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/netrunner/api"
|
||||
@@ -23,11 +24,10 @@ import (
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/api/health"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/utils/rpc"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/sdk/api/health"
|
||||
"github.com/luxfi/sdk/utils/rpc"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -21,13 +21,13 @@ import (
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/api/health"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/sdk/node/api/health"
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/consensus/networking/router"
|
||||
luxlog "github.com/luxfi/log"
|
||||
"github.com/luxfi/node/utils/rpc"
|
||||
"github.com/luxfi/utils/rpc"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
+14
-11
@@ -10,7 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
validators "github.com/luxfi/consensus/validator" // package name is validators
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
@@ -19,14 +19,14 @@ import (
|
||||
"github.com/luxfi/netrunner/api"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/network/throttling"
|
||||
"github.com/luxfi/node/network/tracker"
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils"
|
||||
"github.com/luxfi/node/utils/compression"
|
||||
"github.com/luxfi/node/version"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/p2p/throttling"
|
||||
"github.com/luxfi/p2p/tracker"
|
||||
"github.com/luxfi/sdk/utils"
|
||||
"github.com/luxfi/sdk/utils/compression"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
"github.com/luxfi/version"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
@@ -88,12 +88,15 @@ func defaultGetConnFunc(ctx context.Context, node node.Node) (net.Conn, error) {
|
||||
|
||||
// AttachPeer: see Network
|
||||
func (node *localNode) AttachPeer(ctx context.Context, router peer.InboundHandler) (peer.Peer, error) {
|
||||
tlsCert, err := staking.NewTLSCert()
|
||||
tlsCert, err := luxtls.NewTLSCert()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tlsConfg := peer.TLSConfig(*tlsCert, nil)
|
||||
clientUpgrader := peer.NewTLSClientUpgrader(tlsConfg, metric.NewCounter(metric.CounterOpts{}))
|
||||
clientUpgrader := peer.NewTLSClientUpgrader(tlsConfg, metric.NewCounter(metric.CounterOpts{
|
||||
Name: "test_counter",
|
||||
Help: "test counter for testing",
|
||||
}))
|
||||
conn, err := node.getConnFunc(ctx, node)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
+13
-13
@@ -13,22 +13,22 @@ import (
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/network/throttling"
|
||||
"github.com/luxfi/node/consensus/networking/router"
|
||||
"github.com/luxfi/node/consensus/networking/tracker"
|
||||
"github.com/luxfi/node/consensus/validators"
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils"
|
||||
"github.com/luxfi/node/utils/constants"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/p2p/throttling"
|
||||
"github.com/luxfi/sdk/node/consensus/networking/router"
|
||||
"github.com/luxfi/sdk/node/consensus/networking/tracker"
|
||||
"github.com/luxfi/sdk/node/consensus/validators"
|
||||
"github.com/luxfi/staking"
|
||||
"github.com/luxfi/utils"
|
||||
"github.com/luxfi/utils/constants"
|
||||
"github.com/luxfi/crypto/bls"
|
||||
luxlog "github.com/luxfi/log"
|
||||
luxmetrics "github.com/luxfi/metrics"
|
||||
"github.com/luxfi/node/utils/math/meter"
|
||||
"github.com/luxfi/node/utils/resource"
|
||||
"github.com/luxfi/node/utils/set"
|
||||
"github.com/luxfi/node/version"
|
||||
"github.com/luxfi/math/meter"
|
||||
"github.com/luxfi/utils/resource"
|
||||
"github.com/luxfi/utils/set"
|
||||
"github.com/luxfi/version"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
||||
+8
-8
@@ -15,16 +15,16 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/geth/metrics"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils/ips"
|
||||
"github.com/luxfi/node/utils/wrappers"
|
||||
"github.com/luxfi/node/version"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/sdk/utils/ips"
|
||||
"github.com/luxfi/sdk/utils/wrappers"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
"github.com/luxfi/version"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ func verifyProtocol(
|
||||
errCh chan error,
|
||||
) {
|
||||
// do the TLS handshake
|
||||
myTLSCert, err := staking.NewTLSCert()
|
||||
myTLSCert, err := luxtls.NewTLSCert()
|
||||
if err != nil {
|
||||
errCh <- err
|
||||
return
|
||||
|
||||
@@ -14,14 +14,14 @@ import (
|
||||
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/message"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/node/staking"
|
||||
"github.com/luxfi/node/utils/constants"
|
||||
"github.com/luxfi/node/utils/ips"
|
||||
"github.com/luxfi/node/utils/logging"
|
||||
"github.com/luxfi/node/utils/wrappers"
|
||||
"github.com/luxfi/node/version"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
"github.com/luxfi/staking"
|
||||
"github.com/luxfi/utils/constants"
|
||||
"github.com/luxfi/utils/ips"
|
||||
"github.com/luxfi/utils/logging"
|
||||
"github.com/luxfi/utils/wrappers"
|
||||
"github.com/luxfi/version"
|
||||
"github.com/luxfi/metrics"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
+239
-31
@@ -7,13 +7,15 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
luxconfig "github.com/luxfi/config"
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/netrunner/api"
|
||||
@@ -21,7 +23,8 @@ import (
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/sdk/api/admin"
|
||||
dircopy "github.com/otiai10/copy"
|
||||
)
|
||||
|
||||
@@ -31,6 +34,29 @@ type NetworkState struct {
|
||||
ChainID2ElasticChainID map[string]string `json:"chainID2ElasticChainID"`
|
||||
}
|
||||
|
||||
const (
|
||||
hotSnapshotManifestName = "hot_snapshot.json"
|
||||
hotSnapshotVersion = 1
|
||||
)
|
||||
|
||||
type hotSnapshotManifest struct {
|
||||
Version int `json:"version"`
|
||||
Network string `json:"network"`
|
||||
Nodes map[string]hotSnapshotNode `json:"nodes"`
|
||||
}
|
||||
|
||||
type hotSnapshotNode struct {
|
||||
LastVersion uint64 `json:"last_version"`
|
||||
Backups []hotSnapshotBackup `json:"backups"`
|
||||
}
|
||||
|
||||
type hotSnapshotBackup struct {
|
||||
Since uint64 `json:"since"`
|
||||
Version uint64 `json:"version"`
|
||||
Path string `json:"path"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
}
|
||||
|
||||
// NewNetwork returns a new network from the given snapshot
|
||||
func NewNetworkFromSnapshot(
|
||||
log log.Logger,
|
||||
@@ -225,14 +251,29 @@ func (ln *localNetwork) loadSnapshot(
|
||||
networkConfig.NodeConfigs[i].Flags[k] = v
|
||||
}
|
||||
}
|
||||
// load db
|
||||
for _, nodeConfig := range networkConfig.NodeConfigs {
|
||||
sourceDBDir := filepath.Join(snapshotDBDir, nodeConfig.Name)
|
||||
targetDBDir := filepath.Join(filepath.Join(ln.rootDir, nodeConfig.Name), defaultDBSubdir)
|
||||
if err := dircopy.Copy(sourceDBDir, targetDBDir); err != nil {
|
||||
return fmt.Errorf("failure loading node %q db dir: %w", nodeConfig.Name, err)
|
||||
hotManifestPath := filepath.Join(snapshotDir, hotSnapshotManifestName)
|
||||
hotManifest, err := loadHotSnapshotManifest(hotManifestPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if hotManifest != nil {
|
||||
if err := ln.prepareHotSnapshotDirs(networkConfig.NodeConfigs); err != nil {
|
||||
return err
|
||||
}
|
||||
for i := range networkConfig.NodeConfigs {
|
||||
targetDBDir := filepath.Join(filepath.Join(ln.rootDir, networkConfig.NodeConfigs[i].Name), defaultDBSubdir)
|
||||
networkConfig.NodeConfigs[i].Flags[config.DBPathKey] = targetDBDir
|
||||
}
|
||||
} else {
|
||||
// load db from full directory copies
|
||||
for _, nodeConfig := range networkConfig.NodeConfigs {
|
||||
sourceDBDir := filepath.Join(snapshotDBDir, nodeConfig.Name)
|
||||
targetDBDir := filepath.Join(filepath.Join(ln.rootDir, nodeConfig.Name), defaultDBSubdir)
|
||||
if err := dircopy.Copy(sourceDBDir, targetDBDir); err != nil {
|
||||
return fmt.Errorf("failure loading node %q db dir: %w", nodeConfig.Name, err)
|
||||
}
|
||||
nodeConfig.Flags[config.DBPathKey] = targetDBDir
|
||||
}
|
||||
nodeConfig.Flags[config.DBPathKey] = targetDBDir
|
||||
}
|
||||
// replace binary path
|
||||
if binaryPath != "" {
|
||||
@@ -294,13 +335,21 @@ func (ln *localNetwork) loadSnapshot(
|
||||
ln.chainID2ElasticChainID[chainID] = elasticChainID
|
||||
}
|
||||
}
|
||||
return ln.loadConfig(ctx, networkConfig)
|
||||
if err := ln.loadConfig(ctx, networkConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if hotManifest != nil {
|
||||
if err := ln.applyHotSnapshot(ctx, snapshotDir, networkConfig.NodeConfigs, hotManifest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SaveHotSnapshot saves a snapshot without stopping the network.
|
||||
// Uses copy-on-write on filesystems that support it (APFS on macOS).
|
||||
// WARNING: Hot snapshots may have minor inconsistencies if writes occur during copy.
|
||||
// For guaranteed consistency, use SaveSnapshot which stops the network.
|
||||
// Uses the admin snapshot API to stream a consistent backup while nodes continue serving.
|
||||
func (ln *localNetwork) SaveHotSnapshot(ctx context.Context, snapshotName string) (string, error) {
|
||||
ln.lock.RLock() // Read lock - doesn't block network operations
|
||||
defer ln.lock.RUnlock()
|
||||
@@ -311,20 +360,23 @@ func (ln *localNetwork) SaveHotSnapshot(ctx context.Context, snapshotName string
|
||||
if len(snapshotName) == 0 {
|
||||
return "", fmt.Errorf("invalid snapshotName %q", snapshotName)
|
||||
}
|
||||
// check if snapshot already exists
|
||||
snapshotDir := filepath.Join(ln.snapshotsDir, snapshotPrefix+snapshotName)
|
||||
if _, err := os.Stat(snapshotDir); err == nil {
|
||||
return "", fmt.Errorf("snapshot %q already exists", snapshotName)
|
||||
networkName := constants.NetworkName(ln.networkID)
|
||||
snapshotExists := true
|
||||
if _, err := os.Stat(snapshotDir); err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
snapshotExists = false
|
||||
} else {
|
||||
return "", fmt.Errorf("failed to access snapshot dir: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Collect node info (read-only, safe during operation)
|
||||
nodesConfig := map[string]node.Config{}
|
||||
nodesDBDir := map[string]string{}
|
||||
for nodeName, node := range ln.nodes {
|
||||
nodeConfig := node.config
|
||||
nodeConfig.Flags = maps.Clone(nodeConfig.Flags)
|
||||
nodesConfig[nodeName] = nodeConfig
|
||||
nodesDBDir[nodeName] = node.GetDbDir()
|
||||
}
|
||||
|
||||
// Preserve current node ports
|
||||
@@ -350,27 +402,28 @@ func (ln *localNetwork) SaveHotSnapshot(ctx context.Context, snapshotName string
|
||||
nodesConfig[nodeName] = nodeConfig
|
||||
}
|
||||
|
||||
// Sync filesystem to flush pending writes
|
||||
syncFilesystem()
|
||||
|
||||
// Create main snapshot dirs
|
||||
snapshotDBDir := filepath.Join(snapshotDir, defaultDBSubdir)
|
||||
if err := os.MkdirAll(snapshotDBDir, os.ModePerm); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Copy db directories (hot - network still running)
|
||||
// On APFS (macOS), dircopy uses clonefile which is CoW and instant
|
||||
for _, nodeConfig := range nodesConfig {
|
||||
sourceDBDir, ok := nodesDBDir[nodeConfig.Name]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("failure obtaining db path for node %q", nodeConfig.Name)
|
||||
manifestPath := filepath.Join(snapshotDir, hotSnapshotManifestName)
|
||||
manifest, err := loadHotSnapshotManifest(manifestPath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if manifest == nil {
|
||||
if snapshotExists {
|
||||
return "", fmt.Errorf("snapshot %q exists without hot manifest; choose a new name or remove it", snapshotName)
|
||||
}
|
||||
sourceDBDir = filepath.Join(sourceDBDir, constants.NetworkName(ln.networkID))
|
||||
targetDBDir := filepath.Join(filepath.Join(snapshotDBDir, nodeConfig.Name), constants.NetworkName(ln.networkID))
|
||||
if err := dircopy.Copy(sourceDBDir, targetDBDir); err != nil {
|
||||
return "", fmt.Errorf("failure saving node %q db dir: %w", nodeConfig.Name, err)
|
||||
manifest = &hotSnapshotManifest{
|
||||
Version: hotSnapshotVersion,
|
||||
Network: networkName,
|
||||
Nodes: map[string]hotSnapshotNode{},
|
||||
}
|
||||
} else if manifest.Network != networkName {
|
||||
return "", fmt.Errorf("hot snapshot network mismatch: got %q want %q", manifest.Network, networkName)
|
||||
}
|
||||
|
||||
// Save network config
|
||||
@@ -409,6 +462,49 @@ func (ln *localNetwork) SaveHotSnapshot(ctx context.Context, snapshotName string
|
||||
return "", err
|
||||
}
|
||||
|
||||
for _, nodeConfig := range nodesConfig {
|
||||
localNode, ok := ln.nodes[nodeConfig.Name]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("node %q not found for hot snapshot", nodeConfig.Name)
|
||||
}
|
||||
adminClient := localNode.GetAPIClient().AdminAPI()
|
||||
if adminClient == nil {
|
||||
return "", fmt.Errorf("admin API client is nil for node %q", nodeConfig.Name)
|
||||
}
|
||||
|
||||
nodeManifest := manifest.Nodes[nodeConfig.Name]
|
||||
since := nodeManifest.LastVersion
|
||||
|
||||
nodeSnapshotDir := filepath.Join(snapshotDBDir, nodeConfig.Name, networkName, "backups")
|
||||
if err := os.MkdirAll(nodeSnapshotDir, os.ModePerm); err != nil {
|
||||
return "", fmt.Errorf("failed to create backup dir for node %q: %w", nodeConfig.Name, err)
|
||||
}
|
||||
|
||||
timestamp := time.Now().UTC().Format("20060102T150405Z")
|
||||
backupFile := fmt.Sprintf("backup_since_%d_%s.bak", since, timestamp)
|
||||
backupPath := filepath.Join(nodeSnapshotDir, backupFile)
|
||||
|
||||
version, err := requestAdminSnapshot(ctx, adminClient, backupPath, since)
|
||||
if err != nil {
|
||||
_ = os.Remove(backupPath)
|
||||
return "", fmt.Errorf("failed to snapshot node %q: %w", nodeConfig.Name, err)
|
||||
}
|
||||
|
||||
relativePath := filepath.ToSlash(filepath.Join(defaultDBSubdir, nodeConfig.Name, networkName, "backups", backupFile))
|
||||
nodeManifest.Backups = append(nodeManifest.Backups, hotSnapshotBackup{
|
||||
Since: since,
|
||||
Version: version,
|
||||
Path: relativePath,
|
||||
CreatedAt: time.Now().UTC().Format(time.RFC3339),
|
||||
})
|
||||
nodeManifest.LastVersion = version
|
||||
manifest.Nodes[nodeConfig.Name] = nodeManifest
|
||||
}
|
||||
|
||||
if err := saveHotSnapshotManifest(manifestPath, manifest); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
ln.logger.Info("Hot snapshot saved", log.String("snapshot", snapshotName), log.String("path", snapshotDir))
|
||||
return snapshotDir, nil
|
||||
}
|
||||
@@ -450,3 +546,115 @@ func (ln *localNetwork) GetSnapshotNames() ([]string, error) {
|
||||
}
|
||||
return snapshots, nil
|
||||
}
|
||||
|
||||
func loadHotSnapshotManifest(path string) (*hotSnapshotManifest, error) {
|
||||
data, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, fmt.Errorf("failed to read hot snapshot manifest: %w", err)
|
||||
}
|
||||
manifest := &hotSnapshotManifest{}
|
||||
if err := json.Unmarshal(data, manifest); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse hot snapshot manifest: %w", err)
|
||||
}
|
||||
if manifest.Version != hotSnapshotVersion {
|
||||
return nil, fmt.Errorf("unsupported hot snapshot version %d", manifest.Version)
|
||||
}
|
||||
if manifest.Nodes == nil {
|
||||
manifest.Nodes = map[string]hotSnapshotNode{}
|
||||
}
|
||||
return manifest, nil
|
||||
}
|
||||
|
||||
func saveHotSnapshotManifest(path string, manifest *hotSnapshotManifest) error {
|
||||
data, err := json.MarshalIndent(manifest, "", " ")
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal hot snapshot manifest: %w", err)
|
||||
}
|
||||
return createFileAndWrite(path, data)
|
||||
}
|
||||
|
||||
func (ln *localNetwork) prepareHotSnapshotDirs(nodeConfigs []node.Config) error {
|
||||
for _, nodeConfig := range nodeConfigs {
|
||||
targetDBDir := filepath.Join(ln.rootDir, nodeConfig.Name, defaultDBSubdir)
|
||||
if err := os.RemoveAll(targetDBDir); err != nil {
|
||||
return fmt.Errorf("failed to clear db dir for node %q: %w", nodeConfig.Name, err)
|
||||
}
|
||||
if err := os.MkdirAll(targetDBDir, 0o750); err != nil {
|
||||
return fmt.Errorf("failed to create db dir for node %q: %w", nodeConfig.Name, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (ln *localNetwork) applyHotSnapshot(
|
||||
ctx context.Context,
|
||||
snapshotDir string,
|
||||
nodeConfigs []node.Config,
|
||||
manifest *hotSnapshotManifest,
|
||||
) error {
|
||||
for _, nodeConfig := range nodeConfigs {
|
||||
nodeName := nodeConfig.Name
|
||||
nodeManifest, ok := manifest.Nodes[nodeName]
|
||||
if !ok || len(nodeManifest.Backups) == 0 {
|
||||
return fmt.Errorf("missing hot snapshot backups for node %q", nodeName)
|
||||
}
|
||||
|
||||
localNode, ok := ln.nodes[nodeName]
|
||||
if !ok {
|
||||
return fmt.Errorf("node %q not found while applying hot snapshot", nodeName)
|
||||
}
|
||||
|
||||
adminClient := localNode.GetAPIClient().AdminAPI()
|
||||
if adminClient == nil {
|
||||
return fmt.Errorf("admin API client is nil for node %q", nodeName)
|
||||
}
|
||||
|
||||
backups := append([]hotSnapshotBackup(nil), nodeManifest.Backups...)
|
||||
sort.Slice(backups, func(i, j int) bool {
|
||||
return backups[i].Since < backups[j].Since
|
||||
})
|
||||
|
||||
for _, backup := range backups {
|
||||
backupPath := filepath.Join(snapshotDir, filepath.FromSlash(backup.Path))
|
||||
if err := requestAdminLoad(ctx, adminClient, backupPath); err != nil {
|
||||
return fmt.Errorf("failed to load backup for node %q: %w", nodeName, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type adminSnapshotArgs struct {
|
||||
Path string `json:"path"`
|
||||
Since uint64 `json:"since"`
|
||||
}
|
||||
|
||||
type adminSnapshotReply struct {
|
||||
Success bool `json:"success"`
|
||||
Version uint64 `json:"version"`
|
||||
}
|
||||
|
||||
type adminLoadArgs struct {
|
||||
Path string `json:"path"`
|
||||
}
|
||||
|
||||
func requestAdminSnapshot(ctx context.Context, adminClient *admin.Client, path string, since uint64) (uint64, error) {
|
||||
reply := &adminSnapshotReply{}
|
||||
if err := adminClient.Requester.SendRequest(ctx, "admin.snapshot", &adminSnapshotArgs{
|
||||
Path: path,
|
||||
Since: since,
|
||||
}, reply); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return reply.Version, nil
|
||||
}
|
||||
|
||||
func requestAdminLoad(ctx context.Context, adminClient *admin.Client, path string) error {
|
||||
return adminClient.Requester.SendRequest(ctx, "admin.load", &adminLoadArgs{
|
||||
Path: path,
|
||||
}, &struct{}{})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package local
|
||||
|
||||
import "github.com/luxfi/node/message"
|
||||
import "github.com/luxfi/p2p/message"
|
||||
|
||||
var _ message.OutboundMessage = &TestMsg{}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ package local
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/node/vms/platformvm/txs"
|
||||
pwalletwallet "github.com/luxfi/node/wallet/chain/p/wallet"
|
||||
"github.com/luxfi/node/wallet/net/primary/common"
|
||||
pwalletwallet "github.com/luxfi/sdk/wallet/chain/p/wallet"
|
||||
"github.com/luxfi/sdk/wallet/primary/common"
|
||||
"github.com/luxfi/vm/vms/platformvm"
|
||||
"github.com/luxfi/vm/vms/platformvm/txs"
|
||||
)
|
||||
|
||||
// walletClient wraps platformvm.Client to implement wallet.Client
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@ import (
|
||||
|
||||
"maps"
|
||||
|
||||
constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/genesis/pkg/genesis"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
|
||||
"github.com/luxfi/netrunner/utils"
|
||||
"github.com/luxfi/node/utils/formatting/address"
|
||||
"github.com/luxfi/address"
|
||||
"github.com/luxfi/units"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/netrunner/api"
|
||||
"github.com/luxfi/netrunner/network/node/status"
|
||||
"github.com/luxfi/node/config"
|
||||
"github.com/luxfi/node/network/peer"
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/p2p/peer"
|
||||
)
|
||||
|
||||
// Node represents an Lux node
|
||||
@@ -125,10 +125,10 @@ func validateConfigFile(configFile []byte, expectedNetworkID uint32) error {
|
||||
if err := json.Unmarshal(configFile, &configMap); err != nil {
|
||||
return fmt.Errorf("could not unmarshal config file: %w", err)
|
||||
}
|
||||
if networkIDIntf, ok := configMap[config.NetworkNameKey]; ok {
|
||||
if networkIDIntf, ok := configMap[config.NetworkIDKey]; ok {
|
||||
networkID, ok := networkIDIntf.(float64)
|
||||
if !ok {
|
||||
return fmt.Errorf("wrong type for field %q in config expected float64 got %T", config.NetworkNameKey, networkIDIntf)
|
||||
return fmt.Errorf("wrong type for field %q in config expected float64 got %T", config.NetworkIDKey, networkIDIntf)
|
||||
}
|
||||
if uint32(networkID) != expectedNetworkID {
|
||||
return fmt.Errorf("config file network id %d differs from genesis network id %d", int(networkID), expectedNetworkID)
|
||||
|
||||
+1672
-843
File diff suppressed because it is too large
Load Diff
+73
-27
@@ -272,15 +272,24 @@ message ListOfAttachedPeerInfo {
|
||||
}
|
||||
|
||||
message StartRequest {
|
||||
string exec_path = 1;
|
||||
optional uint32 num_nodes = 2;
|
||||
optional string whitelisted_chains = 3;
|
||||
optional string global_node_config = 4;
|
||||
// Network identifier - name or ID
|
||||
// Supported values: "mainnet" (1), "testnet" (2), "devnet" (3), "custom" (1337)
|
||||
// or any custom network name
|
||||
string network_name = 1;
|
||||
|
||||
// Node consensus engine type
|
||||
// Supported values: "luxd", "avalanchego", "geth", "op-node", "custom"
|
||||
string node_type = 2;
|
||||
|
||||
string exec_path = 4;
|
||||
optional uint32 num_nodes = 5;
|
||||
optional string whitelisted_chains = 6;
|
||||
optional string global_node_config = 7;
|
||||
// Used for both database and log files.
|
||||
optional string root_data_dir = 5;
|
||||
optional string root_data_dir = 8;
|
||||
|
||||
// Plugin dir from which to load all custom VM executables.
|
||||
string plugin_dir = 6;
|
||||
string plugin_dir = 9;
|
||||
|
||||
// The list of:
|
||||
// - custom chain's VM name
|
||||
@@ -299,30 +308,30 @@ message StartRequest {
|
||||
// If this field is set to none (by default), the node/network-runner
|
||||
// does not install the custom chain and does not create the chain,
|
||||
// even if the VM binary exists on the local plugins directory.
|
||||
repeated BlockchainSpec blockchain_specs = 7;
|
||||
repeated BlockchainSpec blockchain_specs = 10;
|
||||
|
||||
map<string, string> custom_node_configs = 8;
|
||||
map<string, string> custom_node_configs = 11;
|
||||
|
||||
// Map of chain name to config file contents.
|
||||
// If specified, will create a file "chainname/config.json" with
|
||||
// the contents provided here.
|
||||
map<string, string> chain_configs = 9;
|
||||
map<string, string> chain_configs = 12;
|
||||
|
||||
// Map of chain name to upgrade file contents.
|
||||
// If specified, will create a file "chainname/upgrade.json" with
|
||||
// the contents provided here.
|
||||
map<string, string> upgrade_configs = 10;
|
||||
map<string, string> upgrade_configs = 13;
|
||||
|
||||
// reassign default/custom ports if they are already taken
|
||||
optional bool reassign_ports_if_used = 11;
|
||||
optional bool reassign_ports_if_used = 14;
|
||||
|
||||
// use dynamic ports instead of default ones
|
||||
optional bool dynamic_ports = 12;
|
||||
optional bool dynamic_ports = 15;
|
||||
|
||||
// Map of chain id to chain config file contents.
|
||||
// If specified, will create a file "chainid.json" under chains config dir with
|
||||
// the contents provided here.
|
||||
map<string, string> chain_config_files = 13;
|
||||
map<string, string> chain_config_files = 16;
|
||||
}
|
||||
|
||||
message RPCVersionRequest {}
|
||||
@@ -451,10 +460,24 @@ message CreateChainsResponse {
|
||||
repeated string chain_ids = 2;
|
||||
}
|
||||
|
||||
message HealthRequest {}
|
||||
message HealthRequest {
|
||||
// Network name to check health for
|
||||
// If empty, checks overall server health
|
||||
optional string network_name = 1;
|
||||
}
|
||||
|
||||
message HealthResponse {
|
||||
ClusterInfo cluster_info = 1;
|
||||
// Network-specific health information
|
||||
optional NetworkHealth network_health = 2;
|
||||
}
|
||||
|
||||
message NetworkHealth {
|
||||
string network_name = 1;
|
||||
uint32 network_id = 2;
|
||||
bool healthy = 3;
|
||||
repeated string healthy_nodes = 4;
|
||||
repeated string unhealthy_nodes = 5;
|
||||
}
|
||||
|
||||
message URIsRequest {}
|
||||
@@ -463,16 +486,35 @@ message URIsResponse {
|
||||
repeated string uris = 1;
|
||||
}
|
||||
|
||||
message WaitForHealthyRequest {}
|
||||
message WaitForHealthyRequest {
|
||||
// Network name to wait for
|
||||
// If empty, waits for any network to be healthy
|
||||
optional string network_name = 1;
|
||||
}
|
||||
|
||||
message WaitForHealthyResponse {
|
||||
ClusterInfo cluster_info = 1;
|
||||
}
|
||||
|
||||
message StatusRequest {}
|
||||
message StatusRequest {
|
||||
// Network name to get status for
|
||||
// If empty, returns overall server status
|
||||
optional string network_name = 1;
|
||||
}
|
||||
|
||||
message StatusResponse {
|
||||
ClusterInfo cluster_info = 1;
|
||||
// Network-specific status information
|
||||
optional NetworkStatus network_status = 2;
|
||||
}
|
||||
|
||||
message NetworkStatus {
|
||||
string network_name = 1;
|
||||
uint32 network_id = 2;
|
||||
string status = 3; // "running", "stopped", "starting", "error"
|
||||
uint32 num_nodes = 4;
|
||||
repeated rpcpb.NodeInfo nodes = 5;
|
||||
repeated rpcpb.ChainInfo chains = 6;
|
||||
}
|
||||
|
||||
message StreamStatusRequest {
|
||||
@@ -593,7 +635,8 @@ message SendOutboundMessageResponse {
|
||||
}
|
||||
|
||||
message SaveSnapshotRequest {
|
||||
string snapshot_name = 1;
|
||||
string network_name = 1;
|
||||
string snapshot_name = 2;
|
||||
}
|
||||
|
||||
message SaveSnapshotResponse {
|
||||
@@ -601,15 +644,16 @@ message SaveSnapshotResponse {
|
||||
}
|
||||
|
||||
message LoadSnapshotRequest {
|
||||
string snapshot_name = 1;
|
||||
optional string exec_path = 2;
|
||||
string plugin_dir = 3;
|
||||
optional string root_data_dir = 4;
|
||||
map<string, string> chain_configs = 5;
|
||||
map<string, string> upgrade_configs = 6;
|
||||
optional string global_node_config = 7;
|
||||
optional bool reassign_ports_if_used = 8;
|
||||
map<string, string> chain_config_files = 9;
|
||||
string network_name = 1;
|
||||
string snapshot_name = 2;
|
||||
optional string exec_path = 3;
|
||||
string plugin_dir = 4;
|
||||
optional string root_data_dir = 5;
|
||||
map<string, string> chain_configs = 6;
|
||||
map<string, string> upgrade_configs = 7;
|
||||
optional string global_node_config = 8;
|
||||
optional bool reassign_ports_if_used = 9;
|
||||
map<string, string> chain_config_files = 10;
|
||||
}
|
||||
|
||||
message LoadSnapshotResponse {
|
||||
@@ -617,13 +661,15 @@ message LoadSnapshotResponse {
|
||||
}
|
||||
|
||||
message RemoveSnapshotRequest {
|
||||
string snapshot_name = 1;
|
||||
string network_name = 1;
|
||||
string snapshot_name = 2;
|
||||
}
|
||||
|
||||
message RemoveSnapshotResponse {
|
||||
}
|
||||
|
||||
message GetSnapshotNamesRequest {
|
||||
string network_name = 1;
|
||||
}
|
||||
|
||||
message GetSnapshotNamesResponse {
|
||||
|
||||
+97
-122
@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.0
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: rpcpb/rpc.proto
|
||||
|
||||
@@ -8,7 +8,6 @@ package rpcpb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
@@ -16,8 +15,8 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
PingService_Ping_FullMethodName = "/rpcpb.PingService/Ping"
|
||||
@@ -39,9 +38,8 @@ func NewPingServiceClient(cc grpc.ClientConnInterface) PingServiceClient {
|
||||
}
|
||||
|
||||
func (c *pingServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PingResponse)
|
||||
err := c.cc.Invoke(ctx, PingService_Ping_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, PingService_Ping_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -50,24 +48,20 @@ func (c *pingServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...g
|
||||
|
||||
// PingServiceServer is the server API for PingService service.
|
||||
// All implementations must embed UnimplementedPingServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type PingServiceServer interface {
|
||||
Ping(context.Context, *PingRequest) (*PingResponse, error)
|
||||
mustEmbedUnimplementedPingServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedPingServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedPingServiceServer struct{}
|
||||
// UnimplementedPingServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedPingServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPingServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
||||
}
|
||||
func (UnimplementedPingServiceServer) mustEmbedUnimplementedPingServiceServer() {}
|
||||
func (UnimplementedPingServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafePingServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PingServiceServer will
|
||||
@@ -77,13 +71,6 @@ type UnsafePingServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterPingServiceServer(s grpc.ServiceRegistrar, srv PingServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedPingServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&PingService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -164,7 +151,7 @@ type ControlServiceClient interface {
|
||||
URIs(ctx context.Context, in *URIsRequest, opts ...grpc.CallOption) (*URIsResponse, error)
|
||||
WaitForHealthy(ctx context.Context, in *WaitForHealthyRequest, opts ...grpc.CallOption) (*WaitForHealthyResponse, error)
|
||||
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||
StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamStatusResponse], error)
|
||||
StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (ControlService_StreamStatusClient, error)
|
||||
RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error)
|
||||
AddNode(ctx context.Context, in *AddNodeRequest, opts ...grpc.CallOption) (*AddNodeResponse, error)
|
||||
RestartNode(ctx context.Context, in *RestartNodeRequest, opts ...grpc.CallOption) (*RestartNodeResponse, error)
|
||||
@@ -191,9 +178,8 @@ func NewControlServiceClient(cc grpc.ClientConnInterface) ControlServiceClient {
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) RPCVersion(ctx context.Context, in *RPCVersionRequest, opts ...grpc.CallOption) (*RPCVersionResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RPCVersionResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_RPCVersion_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_RPCVersion_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -201,9 +187,8 @@ func (c *controlServiceClient) RPCVersion(ctx context.Context, in *RPCVersionReq
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StartResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_Start_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_Start_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -211,9 +196,8 @@ func (c *controlServiceClient) Start(ctx context.Context, in *StartRequest, opts
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) CreateBlockchains(ctx context.Context, in *CreateBlockchainsRequest, opts ...grpc.CallOption) (*CreateBlockchainsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateBlockchainsResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_CreateBlockchains_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_CreateBlockchains_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -221,9 +205,8 @@ func (c *controlServiceClient) CreateBlockchains(ctx context.Context, in *Create
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) TransformElasticChains(ctx context.Context, in *TransformElasticChainsRequest, opts ...grpc.CallOption) (*TransformElasticChainsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TransformElasticChainsResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_TransformElasticChains_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_TransformElasticChains_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -231,9 +214,8 @@ func (c *controlServiceClient) TransformElasticChains(ctx context.Context, in *T
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) AddPermissionlessValidator(ctx context.Context, in *AddPermissionlessValidatorRequest, opts ...grpc.CallOption) (*AddPermissionlessValidatorResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddPermissionlessValidatorResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_AddPermissionlessValidator_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_AddPermissionlessValidator_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -241,9 +223,8 @@ func (c *controlServiceClient) AddPermissionlessValidator(ctx context.Context, i
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) RemoveChainValidator(ctx context.Context, in *RemoveChainValidatorRequest, opts ...grpc.CallOption) (*RemoveChainValidatorResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveChainValidatorResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveChainValidator_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveChainValidator_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -251,9 +232,8 @@ func (c *controlServiceClient) RemoveChainValidator(ctx context.Context, in *Rem
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) CreateChains(ctx context.Context, in *CreateChainsRequest, opts ...grpc.CallOption) (*CreateChainsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateChainsResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_CreateChains_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_CreateChains_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -261,9 +241,8 @@ func (c *controlServiceClient) CreateChains(ctx context.Context, in *CreateChain
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(HealthResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_Health_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_Health_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -271,9 +250,8 @@ func (c *controlServiceClient) Health(ctx context.Context, in *HealthRequest, op
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) URIs(ctx context.Context, in *URIsRequest, opts ...grpc.CallOption) (*URIsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(URIsResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_URIs_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_URIs_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -281,9 +259,8 @@ func (c *controlServiceClient) URIs(ctx context.Context, in *URIsRequest, opts .
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) WaitForHealthy(ctx context.Context, in *WaitForHealthyRequest, opts ...grpc.CallOption) (*WaitForHealthyResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(WaitForHealthyResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_WaitForHealthy_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_WaitForHealthy_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -291,22 +268,20 @@ func (c *controlServiceClient) WaitForHealthy(ctx context.Context, in *WaitForHe
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StatusResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_Status_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_Status_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamStatusResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &ControlService_ServiceDesc.Streams[0], ControlService_StreamStatus_FullMethodName, cOpts...)
|
||||
func (c *controlServiceClient) StreamStatus(ctx context.Context, in *StreamStatusRequest, opts ...grpc.CallOption) (ControlService_StreamStatusClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &ControlService_ServiceDesc.Streams[0], ControlService_StreamStatus_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[StreamStatusRequest, StreamStatusResponse]{ClientStream: stream}
|
||||
x := &controlServiceStreamStatusClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -316,13 +291,26 @@ func (c *controlServiceClient) StreamStatus(ctx context.Context, in *StreamStatu
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ControlService_StreamStatusClient = grpc.ServerStreamingClient[StreamStatusResponse]
|
||||
type ControlService_StreamStatusClient interface {
|
||||
Recv() (*StreamStatusResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type controlServiceStreamStatusClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *controlServiceStreamStatusClient) Recv() (*StreamStatusResponse, error) {
|
||||
m := new(StreamStatusResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) RemoveNode(ctx context.Context, in *RemoveNodeRequest, opts ...grpc.CallOption) (*RemoveNodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveNodeResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveNode_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveNode_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -330,9 +318,8 @@ func (c *controlServiceClient) RemoveNode(ctx context.Context, in *RemoveNodeReq
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) AddNode(ctx context.Context, in *AddNodeRequest, opts ...grpc.CallOption) (*AddNodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AddNodeResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_AddNode_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_AddNode_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -340,9 +327,8 @@ func (c *controlServiceClient) AddNode(ctx context.Context, in *AddNodeRequest,
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) RestartNode(ctx context.Context, in *RestartNodeRequest, opts ...grpc.CallOption) (*RestartNodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RestartNodeResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_RestartNode_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_RestartNode_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -350,9 +336,8 @@ func (c *controlServiceClient) RestartNode(ctx context.Context, in *RestartNodeR
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) PauseNode(ctx context.Context, in *PauseNodeRequest, opts ...grpc.CallOption) (*PauseNodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PauseNodeResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_PauseNode_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_PauseNode_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -360,9 +345,8 @@ func (c *controlServiceClient) PauseNode(ctx context.Context, in *PauseNodeReque
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) ResumeNode(ctx context.Context, in *ResumeNodeRequest, opts ...grpc.CallOption) (*ResumeNodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ResumeNodeResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_ResumeNode_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_ResumeNode_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -370,9 +354,8 @@ func (c *controlServiceClient) ResumeNode(ctx context.Context, in *ResumeNodeReq
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StopResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_Stop_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_Stop_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -380,9 +363,8 @@ func (c *controlServiceClient) Stop(ctx context.Context, in *StopRequest, opts .
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) AttachPeer(ctx context.Context, in *AttachPeerRequest, opts ...grpc.CallOption) (*AttachPeerResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AttachPeerResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_AttachPeer_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_AttachPeer_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -390,9 +372,8 @@ func (c *controlServiceClient) AttachPeer(ctx context.Context, in *AttachPeerReq
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) SendOutboundMessage(ctx context.Context, in *SendOutboundMessageRequest, opts ...grpc.CallOption) (*SendOutboundMessageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SendOutboundMessageResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_SendOutboundMessage_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_SendOutboundMessage_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -400,9 +381,8 @@ func (c *controlServiceClient) SendOutboundMessage(ctx context.Context, in *Send
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) SaveSnapshot(ctx context.Context, in *SaveSnapshotRequest, opts ...grpc.CallOption) (*SaveSnapshotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SaveSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_SaveSnapshot_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_SaveSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -410,9 +390,8 @@ func (c *controlServiceClient) SaveSnapshot(ctx context.Context, in *SaveSnapsho
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) SaveHotSnapshot(ctx context.Context, in *SaveSnapshotRequest, opts ...grpc.CallOption) (*SaveSnapshotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SaveSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_SaveHotSnapshot_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_SaveHotSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -420,9 +399,8 @@ func (c *controlServiceClient) SaveHotSnapshot(ctx context.Context, in *SaveSnap
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) LoadSnapshot(ctx context.Context, in *LoadSnapshotRequest, opts ...grpc.CallOption) (*LoadSnapshotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LoadSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_LoadSnapshot_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_LoadSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -430,9 +408,8 @@ func (c *controlServiceClient) LoadSnapshot(ctx context.Context, in *LoadSnapsho
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) RemoveSnapshot(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*RemoveSnapshotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RemoveSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveSnapshot_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_RemoveSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -440,9 +417,8 @@ func (c *controlServiceClient) RemoveSnapshot(ctx context.Context, in *RemoveSna
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) GetSnapshotNames(ctx context.Context, in *GetSnapshotNamesRequest, opts ...grpc.CallOption) (*GetSnapshotNamesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetSnapshotNamesResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_GetSnapshotNames_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, ControlService_GetSnapshotNames_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -451,7 +427,7 @@ func (c *controlServiceClient) GetSnapshotNames(ctx context.Context, in *GetSnap
|
||||
|
||||
// ControlServiceServer is the server API for ControlService service.
|
||||
// All implementations must embed UnimplementedControlServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type ControlServiceServer interface {
|
||||
RPCVersion(context.Context, *RPCVersionRequest) (*RPCVersionResponse, error)
|
||||
Start(context.Context, *StartRequest) (*StartResponse, error)
|
||||
@@ -464,7 +440,7 @@ type ControlServiceServer interface {
|
||||
URIs(context.Context, *URIsRequest) (*URIsResponse, error)
|
||||
WaitForHealthy(context.Context, *WaitForHealthyRequest) (*WaitForHealthyResponse, error)
|
||||
Status(context.Context, *StatusRequest) (*StatusResponse, error)
|
||||
StreamStatus(*StreamStatusRequest, grpc.ServerStreamingServer[StreamStatusResponse]) error
|
||||
StreamStatus(*StreamStatusRequest, ControlService_StreamStatusServer) error
|
||||
RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error)
|
||||
AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error)
|
||||
RestartNode(context.Context, *RestartNodeRequest) (*RestartNodeResponse, error)
|
||||
@@ -483,90 +459,86 @@ type ControlServiceServer interface {
|
||||
mustEmbedUnimplementedControlServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedControlServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedControlServiceServer struct{}
|
||||
// UnimplementedControlServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedControlServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedControlServiceServer) RPCVersion(context.Context, *RPCVersionRequest) (*RPCVersionResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RPCVersion not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RPCVersion not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) Start(context.Context, *StartRequest) (*StartResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Start not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Start not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) CreateBlockchains(context.Context, *CreateBlockchainsRequest) (*CreateBlockchainsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateBlockchains not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateBlockchains not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) TransformElasticChains(context.Context, *TransformElasticChainsRequest) (*TransformElasticChainsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method TransformElasticChains not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method TransformElasticChains not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) AddPermissionlessValidator(context.Context, *AddPermissionlessValidatorRequest) (*AddPermissionlessValidatorResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddPermissionlessValidator not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddPermissionlessValidator not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) RemoveChainValidator(context.Context, *RemoveChainValidatorRequest) (*RemoveChainValidatorResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RemoveChainValidator not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveChainValidator not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) CreateChains(context.Context, *CreateChainsRequest) (*CreateChainsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method CreateChains not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateChains not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) Health(context.Context, *HealthRequest) (*HealthResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Health not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Health not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) URIs(context.Context, *URIsRequest) (*URIsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method URIs not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method URIs not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) WaitForHealthy(context.Context, *WaitForHealthyRequest) (*WaitForHealthyResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method WaitForHealthy not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method WaitForHealthy not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Status not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Status not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) StreamStatus(*StreamStatusRequest, grpc.ServerStreamingServer[StreamStatusResponse]) error {
|
||||
return status.Error(codes.Unimplemented, "method StreamStatus not implemented")
|
||||
func (UnimplementedControlServiceServer) StreamStatus(*StreamStatusRequest, ControlService_StreamStatusServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method StreamStatus not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RemoveNode not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AddNode not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddNode not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) RestartNode(context.Context, *RestartNodeRequest) (*RestartNodeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RestartNode not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RestartNode not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) PauseNode(context.Context, *PauseNodeRequest) (*PauseNodeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PauseNode not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method PauseNode not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) ResumeNode(context.Context, *ResumeNodeRequest) (*ResumeNodeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ResumeNode not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResumeNode not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) Stop(context.Context, *StopRequest) (*StopResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Stop not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) AttachPeer(context.Context, *AttachPeerRequest) (*AttachPeerResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AttachPeer not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AttachPeer not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) SendOutboundMessage(context.Context, *SendOutboundMessageRequest) (*SendOutboundMessageResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SendOutboundMessage not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SendOutboundMessage not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) SaveSnapshot(context.Context, *SaveSnapshotRequest) (*SaveSnapshotResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SaveSnapshot not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SaveSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) SaveHotSnapshot(context.Context, *SaveSnapshotRequest) (*SaveSnapshotResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SaveHotSnapshot not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SaveHotSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) LoadSnapshot(context.Context, *LoadSnapshotRequest) (*LoadSnapshotResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method LoadSnapshot not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LoadSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) RemoveSnapshot(context.Context, *RemoveSnapshotRequest) (*RemoveSnapshotResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RemoveSnapshot not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RemoveSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) GetSnapshotNames(context.Context, *GetSnapshotNamesRequest) (*GetSnapshotNamesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetSnapshotNames not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSnapshotNames not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) mustEmbedUnimplementedControlServiceServer() {}
|
||||
func (UnimplementedControlServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeControlServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ControlServiceServer will
|
||||
@@ -576,13 +548,6 @@ type UnsafeControlServiceServer interface {
|
||||
}
|
||||
|
||||
func RegisterControlServiceServer(s grpc.ServiceRegistrar, srv ControlServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedControlServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&ControlService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -789,11 +754,21 @@ func _ControlService_StreamStatus_Handler(srv interface{}, stream grpc.ServerStr
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ControlServiceServer).StreamStatus(m, &grpc.GenericServerStream[StreamStatusRequest, StreamStatusResponse]{ServerStream: stream})
|
||||
return srv.(ControlServiceServer).StreamStatus(m, &controlServiceStreamStatusServer{stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type ControlService_StreamStatusServer = grpc.ServerStreamingServer[StreamStatusResponse]
|
||||
type ControlService_StreamStatusServer interface {
|
||||
Send(*StreamStatusResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type controlServiceStreamStatusServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *controlServiceStreamStatusServer) Send(m *StreamStatusResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _ControlService_RemoveNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RemoveNodeRequest)
|
||||
|
||||
@@ -47,13 +47,13 @@ if [ ! -f /tmp/node-v${VERSION_1}/node ]
|
||||
then
|
||||
############################
|
||||
# download node
|
||||
# https://github.com/luxfi/node/releases
|
||||
# https://github.com/luxfi/sdk/node/releases
|
||||
GOARCH=$(go env GOARCH)
|
||||
GOOS=$(go env GOOS)
|
||||
DOWNLOAD_URL=https://github.com/luxfi/node/releases/download/v${VERSION_1}/node-linux-${GOARCH}-v${VERSION_1}.tar.gz
|
||||
DOWNLOAD_URL=https://github.com/luxfi/sdk/node/releases/download/v${VERSION_1}/node-linux-${GOARCH}-v${VERSION_1}.tar.gz
|
||||
DOWNLOAD_PATH=/tmp/node.tar.gz
|
||||
if [[ ${GOOS} == "darwin" ]]; then
|
||||
DOWNLOAD_URL=https://github.com/luxfi/node/releases/download/v${VERSION_1}/node-macos-v${VERSION_1}.zip
|
||||
DOWNLOAD_URL=https://github.com/luxfi/sdk/node/releases/download/v${VERSION_1}/node-macos-v${VERSION_1}.zip
|
||||
DOWNLOAD_PATH=/tmp/node.zip
|
||||
fi
|
||||
|
||||
@@ -78,13 +78,13 @@ if [ ! -f /tmp/node-v${VERSION_2}/node ]
|
||||
then
|
||||
############################
|
||||
# download node
|
||||
# https://github.com/luxfi/node/releases
|
||||
# https://github.com/luxfi/sdk/node/releases
|
||||
GOARCH=$(go env GOARCH)
|
||||
GOOS=$(go env GOOS)
|
||||
DOWNLOAD_URL=https://github.com/luxfi/node/releases/download/v${VERSION_2}/node-linux-${GOARCH}-v${VERSION_2}.tar.gz
|
||||
DOWNLOAD_URL=https://github.com/luxfi/sdk/node/releases/download/v${VERSION_2}/node-linux-${GOARCH}-v${VERSION_2}.tar.gz
|
||||
DOWNLOAD_PATH=/tmp/node.tar.gz
|
||||
if [[ ${GOOS} == "darwin" ]]; then
|
||||
DOWNLOAD_URL=https://github.com/luxfi/node/releases/download/v${VERSION_2}/node-macos-v${VERSION_2}.zip
|
||||
DOWNLOAD_URL=https://github.com/luxfi/sdk/node/releases/download/v${VERSION_2}/node-macos-v${VERSION_2}.zip
|
||||
DOWNLOAD_PATH=/tmp/node.zip
|
||||
fi
|
||||
|
||||
|
||||
+16
-12
@@ -16,16 +16,16 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
"github.com/luxfi/config"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/netrunner/local"
|
||||
"github.com/luxfi/netrunner/network"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
"github.com/luxfi/netrunner/rpcpb"
|
||||
"github.com/luxfi/netrunner/utils/constants"
|
||||
netconstants "github.com/luxfi/netrunner/utils/constants"
|
||||
"github.com/luxfi/netrunner/ux"
|
||||
"github.com/luxfi/node/config"
|
||||
|
||||
luxd_constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/log"
|
||||
)
|
||||
|
||||
@@ -93,6 +93,10 @@ type localNetworkOptions struct {
|
||||
redirectNodesOutput bool
|
||||
globalNodeConfig string
|
||||
|
||||
// Node consensus engine type
|
||||
// Determines which binary to use and how to configure it
|
||||
nodeType string // "luxd", "avalanchego", "geth", "op-node", etc.
|
||||
|
||||
pluginDir string
|
||||
customNodeConfigs map[string]string
|
||||
|
||||
@@ -120,7 +124,7 @@ func newLocalNetwork(opts localNetworkOptions) (*localNetwork, error) {
|
||||
LogLevel: opts.logLevel,
|
||||
DisplayLevel: opts.logLevel,
|
||||
})
|
||||
logger, err := logFactory.Make(constants.LogNameMain)
|
||||
logger, err := logFactory.Make(netconstants.LogNameMain)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -153,7 +157,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
// If so, use the appropriate genesis configuration
|
||||
var cfg network.Config
|
||||
var err error
|
||||
networkID := luxd_constants.CustomID // default to local (1337)
|
||||
networkID := constants.CustomID // default to local (1337)
|
||||
if networkIDVal, ok := globalConfig["network-id"]; ok {
|
||||
switch v := networkIDVal.(type) {
|
||||
case float64:
|
||||
@@ -168,7 +172,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
}
|
||||
}
|
||||
|
||||
lc.log.Info("createConfig networkID parsed", "networkID", networkID, "MainnetID", luxd_constants.MainnetID, "TestnetID", luxd_constants.TestnetID)
|
||||
lc.log.Info("createConfig networkID parsed", "networkID", networkID, "MainnetID", constants.MainnetID, "TestnetID", constants.TestnetID)
|
||||
|
||||
// CRITICAL: Check if we're resuming from existing state.
|
||||
// If node1/genesis.json exists AND node1/db has data, we MUST use the existing genesis
|
||||
@@ -193,7 +197,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
useMnemonic := mnemonic != ""
|
||||
|
||||
switch networkID {
|
||||
case luxd_constants.MainnetID: // LUX Mainnet (1)
|
||||
case constants.MainnetID: // LUX Mainnet (1)
|
||||
if useMnemonic {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading mainnet genesis FROM MNEMONIC (funds allocated to derived address)"))
|
||||
cfg, err = local.NewMainnetConfigFromMnemonic(lc.options.execPath, lc.options.numNodes)
|
||||
@@ -202,7 +206,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading CANONICAL mainnet genesis (deterministic bytes)"))
|
||||
cfg, err = local.NewCanonicalMainnetConfig(lc.options.execPath, lc.options.numNodes)
|
||||
}
|
||||
case luxd_constants.TestnetID: // LUX Testnet (2)
|
||||
case constants.TestnetID: // LUX Testnet (2)
|
||||
if useMnemonic {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading testnet genesis FROM MNEMONIC (funds allocated to derived address)"))
|
||||
cfg, err = local.NewTestnetConfigFromMnemonic(lc.options.execPath, lc.options.numNodes)
|
||||
@@ -211,7 +215,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading CANONICAL testnet genesis (deterministic bytes)"))
|
||||
cfg, err = local.NewCanonicalTestnetConfig(lc.options.execPath, lc.options.numNodes)
|
||||
}
|
||||
case luxd_constants.DevnetID: // LUX Devnet (3)
|
||||
case constants.DevnetID: // LUX Devnet (3)
|
||||
if useMnemonic {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading devnet genesis FROM MNEMONIC (funds allocated to derived address)"))
|
||||
cfg, err = local.NewDevnetConfigFromMnemonic(lc.options.execPath, lc.options.numNodes)
|
||||
@@ -219,7 +223,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading CANONICAL devnet genesis (deterministic bytes)"))
|
||||
cfg, err = local.NewCanonicalDevnetConfig(lc.options.execPath, lc.options.numNodes)
|
||||
}
|
||||
case luxd_constants.CustomID: // Custom/Local (1337)
|
||||
case constants.CustomID: // Custom/Local (1337)
|
||||
if useMnemonic {
|
||||
ux.Print(lc.log, "%s", log.Green.Wrap("Loading custom genesis FROM MNEMONIC (funds allocated to derived address)"))
|
||||
cfg, err = local.NewLocalConfigFromMnemonic(lc.options.execPath, lc.options.numNodes)
|
||||
@@ -241,7 +245,7 @@ func (lc *localNetwork) createConfig() error {
|
||||
// since canonical genesis is already deterministic)
|
||||
if isResume && existingGenesis != "" {
|
||||
if cfg.Genesis != existingGenesis {
|
||||
if networkID == luxd_constants.MainnetID || networkID == luxd_constants.TestnetID {
|
||||
if networkID == constants.MainnetID || networkID == constants.TestnetID {
|
||||
// Log warning but use canonical - this shouldn't happen with proper setup
|
||||
ux.Print(lc.log, "%s", log.Orange.Wrap("WARNING: Existing genesis differs from canonical. Using canonical."))
|
||||
fmt.Fprintf(os.Stderr, "WARNING: Genesis mismatch detected. Using canonical genesis.\n")
|
||||
@@ -724,7 +728,7 @@ func (lc *localNetwork) updateChainInfo(ctx context.Context) error {
|
||||
chainIDList := []string{}
|
||||
for _, chain := range chains {
|
||||
// Skip both PlatformChainID and PrimaryNetworkID (which is ids.Empty)
|
||||
if chain.ID != luxd_constants.PlatformChainID && chain.ID != luxd_constants.PrimaryNetworkID {
|
||||
if chain.ID != constants.PlatformChainID && chain.ID != constants.PrimaryNetworkID {
|
||||
chainIDList = append(chainIDList, chain.ID.String())
|
||||
}
|
||||
}
|
||||
|
||||
+316
-197
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@ import (
|
||||
"maps"
|
||||
"slices"
|
||||
|
||||
luxd_constants "github.com/luxfi/const"
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/message"
|
||||
luxd_ "github.com/luxfi/constantsants"
|
||||
"github.com/luxfi/p2p/message"
|
||||
"github.com/luxfi/sdk/api/admin"
|
||||
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/vm/vms/platformvm"
|
||||
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/message"
|
||||
luxd_constants "github.com/luxfi/node/utils/constants"
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/sdk/node/api/admin"
|
||||
"github.com/luxfi/p2p/message"
|
||||
luxd_constants "github.com/luxfi/utils/constants"
|
||||
"github.com/luxfi/sdk/node/vms/platformvm"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/luxfi/netrunner/utils/constants"
|
||||
"github.com/luxfi/netrunner/ux"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/node/utils/logging"
|
||||
"github.com/luxfi/utils/logging"
|
||||
"github.com/luxfi/metrics"
|
||||
ginkgo "github.com/onsi/ginkgo/v2"
|
||||
"github.com/onsi/gomega"
|
||||
|
||||
@@ -14,10 +14,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/node/api/admin"
|
||||
"github.com/luxfi/node/message"
|
||||
luxd_constants "github.com/luxfi/node/utils/constants"
|
||||
"github.com/luxfi/node/vms/platformvm"
|
||||
"github.com/luxfi/sdk/node/api/admin"
|
||||
"github.com/luxfi/p2p/message"
|
||||
luxd_constants "github.com/luxfi/utils/constants"
|
||||
"github.com/luxfi/sdk/node/vms/platformvm"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/luxfi/netrunner/client"
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/luxfi/crypto/bls/signer/localsigner"
|
||||
"github.com/luxfi/node/staking"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ func EncodeNodeKeys(key *NodeKeys) *EncodedNodeKeys {
|
||||
}
|
||||
|
||||
func generateNodeKeys() (*NodeKeys, error) {
|
||||
stakingCert, stakingKey, err := staking.NewCertAndKeyBytes()
|
||||
stakingCert, stakingKey, err := luxtls.NewCertAndKeyBytes()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("couldn't generate staking cert/key: %w", err)
|
||||
}
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/luxfi/log"
|
||||
rpcb "github.com/luxfi/netrunner/rpcpb"
|
||||
"github.com/luxfi/netrunner/ux"
|
||||
"github.com/luxfi/node/staking"
|
||||
luxtls "github.com/luxfi/tls"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -21,7 +21,7 @@ const (
|
||||
)
|
||||
|
||||
func ToNodeID(stakingKey, stakingCert []byte) (ids.NodeID, error) {
|
||||
cert, err := staking.LoadTLSCertFromBytes(stakingKey, stakingCert)
|
||||
cert, err := luxtls.LoadTLSCertFromBytes(stakingKey, stakingCert)
|
||||
if err != nil {
|
||||
return ids.EmptyNodeID, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user