cmd/bootstrap: a kademlia-only server (#1001)

This commit is contained in:
JT Olio 2019-01-09 08:59:51 -07:00 committed by Egon Elbre
parent 7090a31ef3
commit f8ee5f88e5
8 changed files with 223 additions and 77 deletions

14
cmd/bootstrap/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
ARG CGO_ENABLED=1
ARG REPOSITORY=../storj.io/storj
ARG PACKAGE=storj.io/storj/cmd/bootstrap
FROM storjlabs/golang as build-env
# final stage
FROM alpine
ENV CONF_PATH=/root/.local/share/storj/bootstrap
EXPOSE 28967
WORKDIR /app
VOLUME /root/.local/share/storj/bootstrap
COPY --from=build-env /app /app/bootstrap
COPY cmd/bootstrap/entrypoint /entrypoint
ENTRYPOINT ["/entrypoint"]

10
cmd/bootstrap/entrypoint Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -euo pipefail
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
./bootstrap setup
fi
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"
exec ./bootstrap run $RUN_PARAMS "$@"

108
cmd/bootstrap/main.go Normal file
View File

@ -0,0 +1,108 @@
// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package main
import (
"fmt"
"os"
"path/filepath"
"github.com/spf13/cobra"
"storj.io/storj/internal/fpath"
"storj.io/storj/pkg/cfgstruct"
"storj.io/storj/pkg/identity"
"storj.io/storj/pkg/kademlia"
"storj.io/storj/pkg/process"
"storj.io/storj/pkg/server"
)
// Bootstrap defines a bootstrap node configuration
type Bootstrap struct {
CA identity.CASetupConfig `setup:"true"`
Identity identity.SetupConfig `setup:"true"`
Server server.Config
Kademlia kademlia.BootstrapConfig
}
var (
rootCmd = &cobra.Command{
Use: "bootstrap",
Short: "bootstrap",
}
runCmd = &cobra.Command{
Use: "run",
Short: "Run the bootstrap server",
RunE: cmdRun,
}
setupCmd = &cobra.Command{
Use: "setup",
Short: "Create config files",
RunE: cmdSetup,
Annotations: map[string]string{"type": "setup"},
}
cfg Bootstrap
defaultConfDir string
confDir *string
)
const (
defaultServerAddr = ":28967"
)
func init() {
defaultConfDir = fpath.ApplicationDir("storj", "bootstrap")
dirParam := cfgstruct.FindConfigDirParam()
if dirParam != "" {
defaultConfDir = dirParam
}
confDir = rootCmd.PersistentFlags().String("config-dir", defaultConfDir, "main directory for bootstrap configuration")
rootCmd.AddCommand(runCmd)
rootCmd.AddCommand(setupCmd)
cfgstruct.Bind(runCmd.Flags(), &cfg, cfgstruct.ConfDir(defaultConfDir))
cfgstruct.BindSetup(setupCmd.Flags(), &cfg, cfgstruct.ConfDir(defaultConfDir))
}
func cmdRun(cmd *cobra.Command, args []string) (err error) {
return cfg.Server.Run(process.Ctx(cmd), nil, cfg.Kademlia)
}
func cmdSetup(cmd *cobra.Command, args []string) (err error) {
setupDir, err := filepath.Abs(*confDir)
if err != nil {
return err
}
valid, err := fpath.IsValidSetupDir(setupDir)
if err != nil {
return err
}
if !valid {
return fmt.Errorf("bootstrap configuration already exists (%v). Rerun with --overwrite", setupDir)
}
err = os.MkdirAll(setupDir, 0700)
if err != nil {
return err
}
overrides := map[string]interface{}{
"identity.cert-path": cfg.Identity.CertPath,
"identity.key-path": cfg.Identity.KeyPath,
"identity.server.address": defaultServerAddr,
"kademlia.bootstrap-addr": "localhost" + defaultServerAddr,
}
return process.SaveConfig(cmd.Flags(), filepath.Join(setupDir, "config.yaml"), overrides)
}
func main() {
process.Exec(rootCmd)
}

View File

@ -100,14 +100,33 @@ func newNetwork(flags *Flags) (*Processes, error) {
configDir = flags.Directory
host = flags.Host
gatewayPort = 9000
bootstrapPort = 9999
satellitePort = 10000
storageNodePort = 11000
difficulty = "10"
)
var bootstrapSatellite *Process
bootstrap := processes.New(Info{
Name: "bootstrap/0",
Executable: "bootstrap",
Directory: filepath.Join(configDir, "bootstrap", "0"),
Address: net.JoinHostPort(host, strconv.Itoa(bootstrapPort)),
})
bootstrap.Arguments = withCommon(Arguments{
"setup": {
"--ca.difficulty", difficulty,
},
"run": {
"--kademlia.bootstrap-addr", bootstrap.Address,
"--kademlia.operator.email", "bootstrap@example.com",
"--kademlia.operator.wallet", "0x0123456789012345678901234567890123456789",
"--server.address", bootstrap.Address,
},
})
// Create satellites making the first satellite bootstrap
var satellites []*Process
for i := 0; i < flags.SatelliteCount; i++ {
process := processes.New(Info{
Name: fmt.Sprintf("satellite/%d", i),
@ -115,21 +134,17 @@ func newNetwork(flags *Flags) (*Processes, error) {
Directory: filepath.Join(configDir, "satellite", fmt.Sprint(i)),
Address: net.JoinHostPort(host, strconv.Itoa(satellitePort+i)),
})
satellites = append(satellites, process)
bootstrapAddr := process.Address
if bootstrapSatellite != nil {
bootstrapAddr = bootstrapSatellite.Address
process.WaitForStart(bootstrapSatellite)
} else {
bootstrapSatellite = process
}
// satellite must wait for bootstrap to start
process.WaitForStart(bootstrap)
process.Arguments = withCommon(Arguments{
"setup": {
"--ca.difficulty", difficulty,
},
"run": {
"--kademlia.bootstrap-addr", bootstrapAddr,
"--kademlia.bootstrap-addr", bootstrap.Address,
"--server.address", process.Address,
"--audit.satellite-addr", process.Address,
@ -140,10 +155,8 @@ func newNetwork(flags *Flags) (*Processes, error) {
}
// Create gateways for each satellite
for i := 0; i < flags.SatelliteCount; i++ {
for i, satellite := range satellites {
accessKey, secretKey := randomKey(), randomKey()
satellite := processes.List[i]
process := processes.New(Info{
Name: fmt.Sprintf("gateway/%d", i),
Executable: "gateway",
@ -189,14 +202,14 @@ func newNetwork(flags *Flags) (*Processes, error) {
})
// storage node must wait for bootstrap to start
process.WaitForStart(bootstrapSatellite)
process.WaitForStart(bootstrap)
process.Arguments = withCommon(Arguments{
"setup": {
"--ca.difficulty", difficulty,
},
"run": {
"--kademlia.bootstrap-addr", bootstrapSatellite.Address,
"--kademlia.bootstrap-addr", bootstrap.Address,
"--kademlia.operator.email", fmt.Sprintf("storage%d@example.com", i),
"--kademlia.operator.wallet", "0x0123456789012345678901234567890123456789",
"--server.address", process.Address,

12
go.sum
View File

@ -165,10 +165,6 @@ github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpR
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jtolds/go-luar v0.0.0-20170419063437-0786921db8c0 h1:UyVaeqfY1fLPMt1iUTaWsxUNxYAzZVyK+7G+a3sRfhk=
github.com/jtolds/go-luar v0.0.0-20170419063437-0786921db8c0/go.mod h1:OtVLEpPHGJkn8jgGrHlYELCA3uXLU0YSfNN0faeDM2M=
github.com/jtolds/monkit-hw v0.0.0-20181213143340-df8ef2bea56c h1:N/A0UrhPBdHMU22x3cF/6WY5FSAo13bKr9GyXe98duA=
github.com/jtolds/monkit-hw v0.0.0-20181213143340-df8ef2bea56c/go.mod h1:1liUiYZzx8ZoPTfZrBE2q8DFRDPafts0GGjslOtcZcw=
github.com/jtolds/monkit-hw v0.0.0-20190107153309-3091a0ff7dea h1:STEw4qx0Bjyo7kNPP6Xx7t7p7BZ2Nqb4MPl7PM8S51k=
github.com/jtolds/monkit-hw v0.0.0-20190107153309-3091a0ff7dea/go.mod h1:1liUiYZzx8ZoPTfZrBE2q8DFRDPafts0GGjslOtcZcw=
github.com/jtolds/monkit-hw v0.0.0-20190108155550-0f753668cf20 h1:XK96humQhnPbQ24uKtSHKbdShDgrKYqlWBNKJTcIKbg=
github.com/jtolds/monkit-hw v0.0.0-20190108155550-0f753668cf20/go.mod h1:1liUiYZzx8ZoPTfZrBE2q8DFRDPafts0GGjslOtcZcw=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
@ -343,8 +339,6 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941 h1:qBTHLajHecfu+xzRI9PqVDcqx7SdHj9d4B+EzSn3tAc=
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc h1:F5tKCVGp+MUAHhKp5MZtGqAlGX3+oCsiL1Q629FL90M=
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@ -352,8 +346,6 @@ golang.org/x/net v0.0.0-20180821023952-922f4815f713/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181003013248-f5e5bdd77824 h1:MkjFNbaZJyH98M67Q3umtwZ+EdVdrNJLqSwZp5vcv60=
golang.org/x/net v0.0.0-20181003013248-f5e5bdd77824/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181106065722-10aee1819953 h1:LuZIitY8waaxUfNIdtajyE/YzA/zyf0YxXG27VpLrkg=
golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
@ -366,10 +358,6 @@ golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181213081344-73d4af5aa059 h1:dpoPtGwlE4qn2foaFdJVk6ab5yxp7pnyiKlpLgQyMkk=
golang.org/x/sys v0.0.0-20181213081344-73d4af5aa059/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190107070147-cb59ee366067 h1:ZQ+T5m/gpZNl7OSxsilFj415MZc4Y6Dv+GKZV2MIvS4=
golang.org/x/sys v0.0.0-20190107070147-cb59ee366067/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190108104531-7fbe1cd0fcc2 h1:ku9Kvp2ZBWAz3GyvuUH3UV1bZCd7RxH0Qf1epWfIDKc=
golang.org/x/sys v0.0.0-20190108104531-7fbe1cd0fcc2/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=

View File

@ -60,6 +60,15 @@ func (c StorageNodeConfig) Run(ctx context.Context, server *provider.Provider) e
return Config(c).Run(ctx, server, pb.NodeType_STORAGE)
}
// BootstrapConfig is a Config that implements provider.Responsibility as
// a bootstrap server
type BootstrapConfig Config
// Run implements provider.Responsibility
func (c BootstrapConfig) Run(ctx context.Context, server *provider.Provider) error {
return Config(c).Run(ctx, server, pb.NodeType_BOOTSTRAP)
}
// SatelliteConfig is a Config that implements provider.Responsibility as
// a satellite
type SatelliteConfig Config

View File

@ -27,6 +27,7 @@ const (
NodeType_SATELLITE NodeType = 1
NodeType_STORAGE NodeType = 2
NodeType_UPLINK NodeType = 3
NodeType_BOOTSTRAP NodeType = 4
)
var NodeType_name = map[int32]string{
@ -34,19 +35,21 @@ var NodeType_name = map[int32]string{
1: "SATELLITE",
2: "STORAGE",
3: "UPLINK",
4: "BOOTSTRAP",
}
var NodeType_value = map[string]int32{
"INVALID": 0,
"SATELLITE": 1,
"STORAGE": 2,
"UPLINK": 3,
"BOOTSTRAP": 4,
}
func (x NodeType) String() string {
return proto.EnumName(NodeType_name, int32(x))
}
func (NodeType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{0}
return fileDescriptor_node_67af40c3abfaa4ce, []int{0}
}
// NodeTransport is an enum of possible transports for the overlay network
@ -67,7 +70,7 @@ func (x NodeTransport) String() string {
return proto.EnumName(NodeTransport_name, int32(x))
}
func (NodeTransport) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{1}
return fileDescriptor_node_67af40c3abfaa4ce, []int{1}
}
// NodeRestrictions contains all relevant data about a nodes ability to store data
@ -83,7 +86,7 @@ func (m *NodeRestrictions) Reset() { *m = NodeRestrictions{} }
func (m *NodeRestrictions) String() string { return proto.CompactTextString(m) }
func (*NodeRestrictions) ProtoMessage() {}
func (*NodeRestrictions) Descriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{0}
return fileDescriptor_node_67af40c3abfaa4ce, []int{0}
}
func (m *NodeRestrictions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeRestrictions.Unmarshal(m, b)
@ -142,7 +145,7 @@ func (m *Node) Reset() { *m = Node{} }
func (m *Node) String() string { return proto.CompactTextString(m) }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{1}
return fileDescriptor_node_67af40c3abfaa4ce, []int{1}
}
func (m *Node) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Node.Unmarshal(m, b)
@ -252,7 +255,7 @@ func (m *NodeAddress) Reset() { *m = NodeAddress{} }
func (m *NodeAddress) String() string { return proto.CompactTextString(m) }
func (*NodeAddress) ProtoMessage() {}
func (*NodeAddress) Descriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{2}
return fileDescriptor_node_67af40c3abfaa4ce, []int{2}
}
func (m *NodeAddress) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeAddress.Unmarshal(m, b)
@ -305,7 +308,7 @@ func (m *NodeStats) Reset() { *m = NodeStats{} }
func (m *NodeStats) String() string { return proto.CompactTextString(m) }
func (*NodeStats) ProtoMessage() {}
func (*NodeStats) Descriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{3}
return fileDescriptor_node_67af40c3abfaa4ce, []int{3}
}
func (m *NodeStats) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeStats.Unmarshal(m, b)
@ -386,7 +389,7 @@ func (m *NodeMetadata) Reset() { *m = NodeMetadata{} }
func (m *NodeMetadata) String() string { return proto.CompactTextString(m) }
func (*NodeMetadata) ProtoMessage() {}
func (*NodeMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_node_442160371250321a, []int{4}
return fileDescriptor_node_67af40c3abfaa4ce, []int{4}
}
func (m *NodeMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NodeMetadata.Unmarshal(m, b)
@ -430,49 +433,49 @@ func init() {
proto.RegisterEnum("node.NodeTransport", NodeTransport_name, NodeTransport_value)
}
func init() { proto.RegisterFile("node.proto", fileDescriptor_node_442160371250321a) }
func init() { proto.RegisterFile("node.proto", fileDescriptor_node_67af40c3abfaa4ce) }
var fileDescriptor_node_442160371250321a = []byte{
// 642 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcf, 0x4e, 0xdb, 0x40,
0x10, 0xc6, 0x49, 0x62, 0x9c, 0x78, 0xec, 0xa4, 0x66, 0x40, 0xc8, 0x6a, 0xd5, 0x12, 0x82, 0xaa,
0x46, 0x54, 0x4a, 0x29, 0x3d, 0x51, 0x55, 0xaa, 0xc2, 0x1f, 0xa1, 0xa8, 0x2e, 0x45, 0x9b, 0xc0,
0x81, 0x8b, 0x65, 0xe2, 0x2d, 0x5d, 0x11, 0x62, 0xcb, 0x5e, 0x0b, 0xf1, 0x86, 0x3d, 0xf4, 0x09,
0x7a, 0xe0, 0x15, 0xfa, 0x0a, 0xd5, 0xce, 0x3a, 0xc4, 0x56, 0xd5, 0x5b, 0xf6, 0xfb, 0x7e, 0x9e,
0xf1, 0xce, 0x37, 0x31, 0xc0, 0x3c, 0x8e, 0xf8, 0x20, 0x49, 0x63, 0x19, 0xa3, 0xa1, 0x7e, 0x3f,
0x87, 0x9b, 0xf8, 0x26, 0xd6, 0x4a, 0xef, 0x12, 0xdc, 0xb3, 0x38, 0xe2, 0x8c, 0x67, 0x32, 0x15,
0x53, 0x29, 0xe2, 0x79, 0x86, 0xaf, 0xa1, 0xf3, 0x3d, 0xe5, 0x3c, 0xb8, 0x0e, 0xe7, 0xd1, 0xbd,
0x88, 0xe4, 0x0f, 0xaf, 0xd6, 0xad, 0xf5, 0x1b, 0xac, 0xad, 0xd4, 0xc3, 0x85, 0x88, 0x2f, 0xc0,
0x22, 0x2c, 0x12, 0xd9, 0xad, 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50, 0xd4, 0x5e, 0xb9, 0x68, 0xef, 0x13, 0x38, 0xe5, 0xfd, 0xc4, 0x0d,
0x58, 0xe5, 0x77, 0xa1, 0x98, 0xd1, 0x38, 0x2d, 0xa6, 0x0f, 0xb8, 0x09, 0xe6, 0x7d, 0x38, 0x9b,
0x71, 0x59, 0xa4, 0x51, 0x9c, 0x76, 0x3f, 0x43, 0x6b, 0xf1, 0x97, 0x43, 0x1b, 0x9a, 0xa3, 0xb3,
0xcb, 0xa1, 0x3f, 0x3a, 0x76, 0x57, 0xb0, 0x0d, 0xd6, 0x78, 0x38, 0x39, 0xf1, 0xfd, 0xd1, 0xe4,
0xc4, 0xad, 0x29, 0x6f, 0x3c, 0xf9, 0xc6, 0x86, 0xa7, 0x27, 0x6e, 0x1d, 0x01, 0xcc, 0x8b, 0x73,
0x7f, 0x74, 0xf6, 0xc5, 0x6d, 0xec, 0x6e, 0x43, 0xbb, 0xb2, 0x03, 0xe8, 0x82, 0x33, 0x39, 0x3a,
0x0f, 0x26, 0xfe, 0x38, 0x38, 0x65, 0xe7, 0x47, 0xee, 0xca, 0xa1, 0x71, 0x55, 0x4f, 0xae, 0xaf,
0x4d, 0xfa, 0x46, 0x7d, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x40, 0x85, 0x29, 0xc3, 0x04,
0x00, 0x00,
var fileDescriptor_node_67af40c3abfaa4ce = []byte{
// 652 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xc1, 0x4e, 0xdb, 0x40,
0x10, 0x86, 0x49, 0x6c, 0x9c, 0x78, 0xec, 0xa4, 0x66, 0x40, 0xc8, 0x6a, 0xd5, 0x12, 0x82, 0xaa,
0x46, 0x54, 0x4a, 0x29, 0x3d, 0x51, 0xf5, 0x92, 0x00, 0x42, 0x51, 0xdd, 0x10, 0x6d, 0x0c, 0x07,
0x2e, 0x96, 0x89, 0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43, 0xab, 0xb2, 0x12, 0xe8, 0x80, 0xed, 0x9f, 0x4e, 0x02, 0xdf, 0x9b, 0x06, 0x17, 0x64,
0x72, 0xea, 0x6c, 0x0c, 0xf5, 0x9b, 0x7a, 0x72, 0x7b, 0x6b, 0xc8, 0x4f, 0xd6, 0xa7, 0xbf, 0x01,
0x00, 0x00, 0xff, 0xff, 0xc0, 0x8a, 0x68, 0xa5, 0xd2, 0x04, 0x00, 0x00,
}

View File

@ -38,6 +38,7 @@ enum NodeType {
SATELLITE = 1;
STORAGE = 2;
UPLINK = 3;
BOOTSTRAP = 4;
}
// NodeAddress contains the information needed to communicate with a node on the network