Skip to content

Commit

Permalink
Merge pull request #20 from PositionExchange/mb/20230105
Browse files Browse the repository at this point in the history
- Removed legacy syncing peer provider
- Remove blockchain dependency from engine
- Bump github.com/aws/aws-sdk-go from 1.30.1 to 1.33.0
- Bump github.com/btcsuite/btcd from 0.21.0-beta to 0.23.2
  • Loading branch information
dannyposi committed Jan 6, 2023
2 parents 16d1e9a + 0ccfecd commit 80ddf89
Show file tree
Hide file tree
Showing 38 changed files with 137 additions and 288 deletions.
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node1/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node10/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -63,6 +62,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000
DisablePrivateIPScan = false

Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node11/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node12/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node13/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node2/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node3/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node4/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
12 changes: 7 additions & 5 deletions .deployment/dockernet/nodes/node5/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand All @@ -33,6 +32,7 @@ Version = "2.5.4"
IsOffline = false
NoStaking = false
NodeType = "explorer"
RunElasticMode = false
ShardID = 0
TraceEnable = false

Expand Down Expand Up @@ -66,6 +66,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down Expand Up @@ -104,11 +105,12 @@ Version = "2.5.4"
MinPeers = 2

[TxPool]
BlacklistFile = "./.psc/blacklist.txt"
AccountSlots = 16
LocalAccountsFile = "./.psc/locals.txt"
RosettaFixFile = ""
AllowedTxsFile = "./.hmy/allowedtxs.txt"
BlacklistFile = "./.hmy/blacklist.txt"
GlobalSlots = 5120
LocalAccountsFile = "./.hmy/locals.txt"
RosettaFixFile = ""

[WS]
AuthPort = 9801
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node6/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node7/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node8/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
4 changes: 2 additions & 2 deletions .deployment/dockernet/nodes/node9/posichain.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version = "2.5.4"
Version = "2.5.8"

[BLSKeys]
KMSConfigFile = ""
Expand All @@ -18,7 +18,6 @@ Version = "2.5.4"

[DNSSync]
Client = true
LegacySyncing = false
Port = 6000
Server = true
ServerPort = 6000
Expand Down Expand Up @@ -62,6 +61,7 @@ Version = "2.5.4"
IP = "0.0.0.0"
KeyFile = "./.psckey"
MaxConnsPerIP = 10
MaxPeers = 0
Port = 9000

[Pprof]
Expand Down
7 changes: 3 additions & 4 deletions cmd/posichain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ func getDefaultDNSSyncConfig(nt nodeconfig.NetworkType) harmonyconfig.DnsSync {
zone := nodeconfig.GetDefaultDNSZone(nt)
port := nodeconfig.GetDefaultDNSPort(nt)
dnsSync := harmonyconfig.DnsSync{
Port: port,
Zone: zone,
LegacySyncing: false,
ServerPort: nodeconfig.DefaultDNSPort,
Port: port,
Zone: zone,
ServerPort: nodeconfig.DefaultDNSPort,
}
switch nt {
case nodeconfig.Mainnet:
Expand Down
6 changes: 6 additions & 0 deletions cmd/posichain/config_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ func init() {
confTree.Set("Version", "2.5.7")
return confTree
}
migrations["2.5.7"] = func(confTree *toml.Tree) *toml.Tree {
confTree.Delete("DNSSync.LegacySyncing")

confTree.Set("Version", "2.5.8")
return confTree
}

// check that the latest version here is the same as in default.go
largestKey := getNextVersion(migrations)
Expand Down
2 changes: 1 addition & 1 deletion cmd/posichain/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
nodeconfig "github.com/PositionExchange/posichain/internal/configs/node"
)

const tomlConfigVersion = "2.5.7"
const tomlConfigVersion = "2.5.8"

const (
defNetworkType = nodeconfig.Mainnet
Expand Down
4 changes: 0 additions & 4 deletions cmd/posichain/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,6 @@ func applyDNSSyncFlags(cmd *cobra.Command, cfg *harmonyconfig.HarmonyConfig) {
} else if cli.IsFlagChanged(cmd, legacyDNSZoneFlag) {
cfg.DNSSync.Zone = cli.GetStringFlagValue(cmd, legacyDNSZoneFlag)
} else if cli.IsFlagChanged(cmd, legacyDNSFlag) {
val := cli.GetBoolFlagValue(cmd, legacyDNSFlag)
if !val {
cfg.DNSSync.LegacySyncing = true
}
}

if cli.IsFlagChanged(cmd, dnsPortFlag) {
Expand Down

0 comments on commit 80ddf89

Please sign in to comment.