From c69df04adab96f70e691834f3e2fda4d721e4aa8 Mon Sep 17 00:00:00 2001 From: Yilun Date: Tue, 9 Jul 2019 02:30:01 -0700 Subject: [PATCH] Increase protocol and net version Signed-off-by: Yilun --- Makefile | 2 +- nknd.go | 2 +- node/neighbor.go | 4 ++-- util/config/config.go | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 78aa7639c..fef016cdb 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ build_local: ## Build local binaries without providing specific GOOS/GOARCH $(GC) $(BUILD_NKNC_PARAM) nknc.go ## the following parts will be removed after the transition period from testnet to mainnet [ -s "wallet.dat" ] && [ -s "wallet.pswd" ] && ! [ -s "wallet.json" ] && cat wallet.pswd wallet.pswd | ./nknc wallet -c || : - grep -qE "022d52b07dff29ae6ee22295da2dc315fef1e2337de7ab6e51539d379aa35b9503|0149c42944eea91f094c16538eff0449d4d1e236f31c8c706b2e40e98402984c" config.json && ! [ -s "config.json.bk" ] && mv config.json config.json.bk && cp config.mainnet.json config.json || : + [ -s "config.json" ] && ! [ -s "config.json.bk" ] && grep -qE "022d52b07dff29ae6ee22295da2dc315fef1e2337de7ab6e51539d379aa35b9503|0149c42944eea91f094c16538eff0449d4d1e236f31c8c706b2e40e98402984c" config.json && mv config.json config.json.bk && cp config.mainnet.json config.json || : rm -f Chain/*.ldb .PHONY: build_local_with_proxy diff --git a/nknd.go b/nknd.go index df13401a7..48a74abcf 100644 --- a/nknd.go +++ b/nknd.go @@ -38,7 +38,7 @@ import ( ) const ( - NetVersionNum = 1 // This is temporary and will be removed soon after mainnet is stabilized + NetVersionNum = 2 // This is temporary and will be removed soon after mainnet is stabilized ) var ( diff --git a/node/neighbor.go b/node/neighbor.go index 8dc6f6cf6..234d7f332 100644 --- a/node/neighbor.go +++ b/node/neighbor.go @@ -13,8 +13,8 @@ import ( ) const ( - maxNumRandomNeighbors = 16 - randomNeighborConnectInterval = config.ConsensusTimeout + maxNumRandomNeighbors = 8 + randomNeighborConnectInterval = 5 * config.ConsensusTimeout ) // The neighbor node list diff --git a/util/config/config.go b/util/config/config.go index 1f289aa3d..4e7e5e7c2 100644 --- a/util/config/config.go +++ b/util/config/config.go @@ -50,9 +50,9 @@ const ( GenerateIDBlockDelay = 8 RandomBeaconUniqueLength = vrf.Size RandomBeaconLength = vrf.Size + vrf.ProofSize - ProtocolVersion = 10 - MinCompatibleProtocolVersion = 10 - MaxCompatibleProtocolVersion = 19 + ProtocolVersion = 20 + MinCompatibleProtocolVersion = 20 + MaxCompatibleProtocolVersion = 29 DefaultTxPoolCap = 32 ShortHashSize = uint32(8) MaxAssetPrecision = uint32(8)