From ff938964ef9aa7112320af2830b345f00baac89f Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 02:17:17 -0800 Subject: [PATCH 01/10] update to version 1.1.4 --- gossip/handler.go | 3 +++ version/version.go | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gossip/handler.go b/gossip/handler.go index bee3ebb4c..0d9fbe052 100644 --- a/gossip/handler.go +++ b/gossip/handler.go @@ -787,6 +787,9 @@ func (h *handler) handle(p *peer) error { if !useless && (!eligibleForSnap(p.Peer) || !strings.Contains(strings.ToLower(p.Name()), "x1")) { useless = true discfilter.Ban(p.ID()) + } else if strings.Contains(strings.ToLower(p.Name()), "1.1.3") { + log.Warn("ignore v1.1.3 peer", "peer", p.ID(), "name", p.Name()) + return p2p.DiscTooManyPeers } if !p.Peer.Info().Network.Trusted && useless { if h.peers.UselessNum() >= h.maxPeers/10 { diff --git a/version/version.go b/version/version.go index 353c0540b..c3ea31563 100644 --- a/version/version.go +++ b/version/version.go @@ -10,8 +10,8 @@ import ( func init() { params.VersionMajor = 1 // Major version component of the current release params.VersionMinor = 1 // Minor version component of the current release - params.VersionPatch = 3 // Patch version component of the current release - params.VersionMeta = "rc.6" // Version metadata to append to the version string + params.VersionPatch = 4 // Patch version component of the current release + params.VersionMeta = "rc.1" // Version metadata to append to the version string } func BigToString(b *big.Int) string { From b93f87a3c54538d258c06f0ea6b3f452e18a78df Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 12:05:10 -0800 Subject: [PATCH 02/10] change protocol name to x1 --- gossip/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gossip/protocol.go b/gossip/protocol.go index 5f3c46ccb..61d2a3740 100644 --- a/gossip/protocol.go +++ b/gossip/protocol.go @@ -22,7 +22,7 @@ const ( ) // ProtocolName is the official short name of the protocol used during capability negotiation. -const ProtocolName = "opera" +const ProtocolName = "x1" // ProtocolVersions are the supported versions of the protocol (first is primary). var ProtocolVersions = []uint{FTM62, FTM63} From 0c6cafa6f1e9603b4e5a8414017f3950eee841fb Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 14:53:25 -0800 Subject: [PATCH 03/10] update go-ethereum --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index a53d0d013..4e0e0ed57 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.10.8-ftm-rc12-x1-7 +replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.1.4-rc1-1 replace github.com/Fantom-foundation/lachesis-base => github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b diff --git a/go.sum b/go.sum index 8d6e6a50c..249dc56dc 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evalphobia/logrus_sentry v0.8.2 h1:dotxHq+YLZsT1Bb45bB5UQbfCh3gM/nFFetyN46VoDQ= github.com/evalphobia/logrus_sentry v0.8.2/go.mod h1:pKcp+vriitUqu9KiWj/VRFbRfFNUwz95/UkgG8a6MNc= -github.com/faircrypto/go-ethereum v1.10.8-ftm-rc12-x1-7 h1:OT5kKAQ+kqmro7lnSThMHPp7kk+fOg+TCLn9K/T1ALE= -github.com/faircrypto/go-ethereum v1.10.8-ftm-rc12-x1-7/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= +github.com/faircrypto/go-ethereum v1.1.4-rc1-1 h1:6dthhcpSLlG/X1W1ND5NuKpDHRE1AONkfW7tOUYUTuo= +github.com/faircrypto/go-ethereum v1.1.4-rc1-1/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b h1:mEofwrV6bMlbuneVS8tnZmNZut7WY2YH++2GI7DxzHg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b/go.mod h1:Ogv5etzSmM2rQ4eN3OfmyitwWaaPjd4EIDiW/NAbYGk= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= From 615dccf5b4c364d0e84a79220b3362ae4096ce96 Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 15:46:22 -0800 Subject: [PATCH 04/10] fix api node example config --- system/usr/share/x1/configs/testnet/api-node.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/usr/share/x1/configs/testnet/api-node.toml b/system/usr/share/x1/configs/testnet/api-node.toml index ba3c191aa..6bc8c08ac 100644 --- a/system/usr/share/x1/configs/testnet/api-node.toml +++ b/system/usr/share/x1/configs/testnet/api-node.toml @@ -1,9 +1,6 @@ [Node] Testnet = true -[Node.P2P] -ListenAddr = ":5050" - # RPC server HTTPHost = "0.0.0.0" HTTPVirtualHosts = ["*"] @@ -33,6 +30,9 @@ WSModules = [ "txpool", ] +[Node.P2P] +ListenAddr = ":5050" + [Opera] AllowSnapsync = true From 7f2f2d2eb38f6ac1d6b30a6fbcb8b5ad2a47b109 Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 15:46:47 -0800 Subject: [PATCH 05/10] update the bootnodes --- cmd/opera/launcher/params.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/opera/launcher/params.go b/cmd/opera/launcher/params.go index fa5da04a4..8fe8b81ba 100644 --- a/cmd/opera/launcher/params.go +++ b/cmd/opera/launcher/params.go @@ -13,9 +13,9 @@ var ( Bootnodes = map[string][]string{ "main": {}, "x1-testnet": { - "enode://9ed669d0c35cc4eb7aba930d8c05b5ad8ff0e3318ad1c3c5f81ae6241b40698ef4146b2a9ac80343130df2e83f137f78648565fd810b090595c0b8b4b4123a48@34.211.87.93:5050", - "enode://c03ae9cb7a3485aba9ae3945944fad9bc678bc362bf13741033511f689df7f22063b312fac900f3fcf2ef3792e6312a84204842964085a7f0b44f4c850500405@35.155.140.94:5050", - "enode://db70d9620aeb252d18cd7309405393921da47acf2e13cd1559b190bcc5d554bf6a75c2675c2f9bb29710dcb48ae94ef9b9abe9a9baf5ab7348c35e53f3c47c8c@44.224.180.169:5050", + "enode://5d1a3b86c8ee297142fb916db77785cc679d4ed10f51cca84c9ee9442d66280a90378d9ca364620bd8cebec0aafb2cf22cd033905afe2028c22b804a2e18d981@bootnode0.x1-testnet.xen.network:5050", + "enode://703e4f01760a1f432d5e5e9a8a9c86b5dca301563bc9559f8c991de052e438d8072b2e789f7722762ea44c5c06ed87428a25606f278a128d7a39bd5996be9536@bootnode1.x1-testnet.xen.network:5050", + "enode://873de92942769e57c2360dd3198af2fda9602a9826b1f1a6d36326b6a75c9178c4f13f910c9e715a5ca6344aa62452930fcee18636ab0a95f269dded52f45960@bootnode2.x1-testnet.xen.network:5050", }, } From e1156620957729b2f4af679e3217a9016c89357a Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Wed, 31 Jan 2024 20:01:40 -0800 Subject: [PATCH 06/10] update go-ethereum --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4e0e0ed57..959f2cb4b 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.1.4-rc1-1 +replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.1.4-rc1-3 replace github.com/Fantom-foundation/lachesis-base => github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b diff --git a/go.sum b/go.sum index 249dc56dc..4bd1ba582 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evalphobia/logrus_sentry v0.8.2 h1:dotxHq+YLZsT1Bb45bB5UQbfCh3gM/nFFetyN46VoDQ= github.com/evalphobia/logrus_sentry v0.8.2/go.mod h1:pKcp+vriitUqu9KiWj/VRFbRfFNUwz95/UkgG8a6MNc= -github.com/faircrypto/go-ethereum v1.1.4-rc1-1 h1:6dthhcpSLlG/X1W1ND5NuKpDHRE1AONkfW7tOUYUTuo= -github.com/faircrypto/go-ethereum v1.1.4-rc1-1/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= +github.com/faircrypto/go-ethereum v1.1.4-rc1-3 h1:AgRb8c+QOxAqwrcdgQnm7UscEf/yt6WPVQ8dvE8MPqI= +github.com/faircrypto/go-ethereum v1.1.4-rc1-3/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b h1:mEofwrV6bMlbuneVS8tnZmNZut7WY2YH++2GI7DxzHg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b/go.mod h1:Ogv5etzSmM2rQ4eN3OfmyitwWaaPjd4EIDiW/NAbYGk= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= From a78ec25b5ce894e824946a987da6b74c5822129e Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Thu, 1 Feb 2024 10:05:56 -0800 Subject: [PATCH 07/10] increment version to 1.1.5 --- version/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index c3ea31563..acd414f33 100644 --- a/version/version.go +++ b/version/version.go @@ -10,7 +10,7 @@ import ( func init() { params.VersionMajor = 1 // Major version component of the current release params.VersionMinor = 1 // Minor version component of the current release - params.VersionPatch = 4 // Patch version component of the current release + params.VersionPatch = 5 // Patch version component of the current release params.VersionMeta = "rc.1" // Version metadata to append to the version string } From a330e436d4fecf1839c60b2c2f1ad4113ed9e758 Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Thu, 1 Feb 2024 10:41:50 -0800 Subject: [PATCH 08/10] add version string parser and block versions older than 1.1.5 --- gossip/handler.go | 10 ++++--- version/version.go | 29 ++++++++++++++++++-- version/version_test.go | 60 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 5 deletions(-) diff --git a/gossip/handler.go b/gossip/handler.go index 0d9fbe052..0a7d49485 100644 --- a/gossip/handler.go +++ b/gossip/handler.go @@ -3,6 +3,7 @@ package gossip import ( "errors" "fmt" + "github.com/Fantom-foundation/go-opera/version" "math" "math/rand" "strings" @@ -787,9 +788,12 @@ func (h *handler) handle(p *peer) error { if !useless && (!eligibleForSnap(p.Peer) || !strings.Contains(strings.ToLower(p.Name()), "x1")) { useless = true discfilter.Ban(p.ID()) - } else if strings.Contains(strings.ToLower(p.Name()), "1.1.3") { - log.Warn("ignore v1.1.3 peer", "peer", p.ID(), "name", p.Name()) - return p2p.DiscTooManyPeers + } else { + ver := version.ParseVersionStringIntoU64(p.Peer.Name()) + if ver < 1000001000005 { // version 1.1.5 + log.Warn("Ignoring old peer. Sorry buddy.", "peer", p.ID(), "name", p.Name()) + return p2p.DiscTooManyPeers + } } if !p.Peer.Info().Network.Trusted && useless { if h.peers.UselessNum() >= h.maxPeers/10 { diff --git a/version/version.go b/version/version.go index acd414f33..1e39cdeac 100644 --- a/version/version.go +++ b/version/version.go @@ -2,9 +2,11 @@ package version import ( "fmt" - "math/big" - "github.com/ethereum/go-ethereum/params" + "math/big" + "regexp" + "strconv" + "strings" ) func init() { @@ -44,3 +46,26 @@ func ToString(major, minor, patch uint16) string { func U64ToString(v uint64) string { return ToString(uint16((v/1e12)%1e6), uint16((v/1e6)%1e6), uint16(v%1e6)) } + +func ParseVersionString(clientName string) (major, minor, patch uint16) { + re := regexp.MustCompile(`v([0-9]+)\.([0-9]+)\.([0-9]+)`) + groups := re.FindStringSubmatch(strings.ToLower(clientName)) + + if len(groups) < 4 { + return 0, 0, 0 + } + + value, _ := strconv.ParseUint(groups[1], 10, 16) + major = uint16(value) + value, _ = strconv.ParseUint(groups[2], 10, 16) + minor = uint16(value) + value, _ = strconv.ParseUint(groups[3], 10, 16) + patch = uint16(value) + + return major, minor, patch +} + +func ParseVersionStringIntoU64(version string) uint64 { + major, miner, patch := ParseVersionString(version) + return ToU64(major, miner, patch) +} diff --git a/version/version_test.go b/version/version_test.go index b1dd823d7..277ea7d6e 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -39,3 +39,63 @@ func TestAsBigInt(t *testing.T) { prev = next } } + +func TestParseVersion_WithValidVersion(t *testing.T) { + major, minor, patch := ParseVersionString("go-x1/v1.2.3-asdasadas") + require.Equal(t, uint16(1), major) + require.Equal(t, uint16(2), minor) + require.Equal(t, uint16(3), patch) +} + +func TestParseVersion_WithInvalidVersion(t *testing.T) { + major, minor, patch := ParseVersionString("go-x1/v1.2.asdasadas") + require.Equal(t, uint16(0), major) + require.Equal(t, uint16(0), minor) + require.Equal(t, uint16(0), patch) +} + +func TestParseVersion_WithNoVersion(t *testing.T) { + major, minor, patch := ParseVersionString("go-x1/asdasadas") + require.Equal(t, uint16(0), major) + require.Equal(t, uint16(0), minor) + require.Equal(t, uint16(0), patch) +} + +func TestParseVersion_WithMaxUint16Version(t *testing.T) { + major, minor, patch := ParseVersionString("go-x1/v65535.65535.65535-asdasadas") + require.Equal(t, uint16(65535), major) + require.Equal(t, uint16(65535), minor) + require.Equal(t, uint16(65535), patch) +} + +func TestParseVersion_WithAnotherInvalidVersion(t *testing.T) { + major, minor, patch := ParseVersionString("go-x1/v-1.2.0.asdasadas") + require.Equal(t, uint16(0), major) + require.Equal(t, uint16(0), minor) + require.Equal(t, uint16(0), patch) +} + +func TestParseVersionStringIntoU64_WithValidVersion(t *testing.T) { + result := ParseVersionStringIntoU64("go-x1/v1.2.3-asdasadas") + require.Equal(t, uint64(1000002000003), result) +} + +func TestParseVersionStringIntoU64_WithInvalidVersion(t *testing.T) { + result := ParseVersionStringIntoU64("go-x1/v1.2.asdasadas") + require.Equal(t, uint64(0), result) +} + +func TestParseVersionStringIntoU64_WithNoVersion(t *testing.T) { + result := ParseVersionStringIntoU64("go-x1/asdasadas") + require.Equal(t, uint64(0), result) +} + +func TestParseVersionStringIntoU64_WithMaxUint16Version(t *testing.T) { + result := ParseVersionStringIntoU64("go-x1/v65535.65535.65535-asdasadas") + require.Equal(t, uint64(65535065535065535), result) +} + +func TestParseVersionStringIntoU64_WithMaxUint16Version2(t *testing.T) { + result := ParseVersionStringIntoU64("go-x1/v1.1.3-asdasadas") + require.Equal(t, uint64(1000001000003), result) +} From 65c592da7ded12646eeb6d70eba4643cea93694b Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Thu, 1 Feb 2024 18:36:59 -0800 Subject: [PATCH 09/10] add nonce flag to test script --- docker/networksimulator/test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/networksimulator/test.py b/docker/networksimulator/test.py index 3347b2f42..4de9313cc 100644 --- a/docker/networksimulator/test.py +++ b/docker/networksimulator/test.py @@ -435,6 +435,7 @@ argparser.add_argument('--validators', type=int, help="the number of concurrent validators to use for signing transactions") argparser.add_argument('--rpc', type=str, default=RPC_URL, help="The RPC URL to use") +argparser.add_argument('--nonce', type=int, required=False, help="The nonce") args = argparser.parse_args() @@ -459,9 +460,12 @@ def run_transactions(key): "from": acct1.address, "to": acct1.address, "value": Web3.to_wei(args.value, 'ether'), - 'gas': args.gas + 'gas': args.gas, } + if args.nonce: + tx_params["nonce"] = args.nonce + if args.max_gas_fee and args.max_gas_priority_fee: tx_params["maxFeePerGas"] = Web3.to_wei(args.max_gas_fee, 'gwei') tx_params["maxPriorityFeePerGas"] = Web3.to_wei(args.max_gas_priority_fee, 'gwei') From 0c523424bccd8ff0a69e4e911a05594f0e134a7f Mon Sep 17 00:00:00 2001 From: Nicholas Pettas Date: Thu, 1 Feb 2024 18:46:24 -0800 Subject: [PATCH 10/10] update protocol versions --- go.mod | 2 +- go.sum | 4 ++-- gossip/handler.go | 2 +- gossip/peer.go | 2 +- gossip/protocol.go | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 959f2cb4b..ca37cb22e 100644 --- a/go.mod +++ b/go.mod @@ -109,7 +109,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.1.4-rc1-3 +replace github.com/ethereum/go-ethereum => github.com/faircrypto/go-ethereum v1.1.4-rc1-4 replace github.com/Fantom-foundation/lachesis-base => github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b diff --git a/go.sum b/go.sum index 4bd1ba582..9da3aeec2 100644 --- a/go.sum +++ b/go.sum @@ -190,8 +190,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/evalphobia/logrus_sentry v0.8.2 h1:dotxHq+YLZsT1Bb45bB5UQbfCh3gM/nFFetyN46VoDQ= github.com/evalphobia/logrus_sentry v0.8.2/go.mod h1:pKcp+vriitUqu9KiWj/VRFbRfFNUwz95/UkgG8a6MNc= -github.com/faircrypto/go-ethereum v1.1.4-rc1-3 h1:AgRb8c+QOxAqwrcdgQnm7UscEf/yt6WPVQ8dvE8MPqI= -github.com/faircrypto/go-ethereum v1.1.4-rc1-3/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= +github.com/faircrypto/go-ethereum v1.1.4-rc1-4 h1:1C5SKbOuwFyuMrut1SvD+qyFUlC52cA8P+TKC6igKjg= +github.com/faircrypto/go-ethereum v1.1.4-rc1-4/go.mod h1:ah5rnRobPJSTUKXIETbrkyrrEhWPTUPfmF1gPPNr0Tg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b h1:mEofwrV6bMlbuneVS8tnZmNZut7WY2YH++2GI7DxzHg= github.com/faircrypto/lachesis-base v0.0.0-20230817040848-1326ba9aa59b/go.mod h1:Ogv5etzSmM2rQ4eN3OfmyitwWaaPjd4EIDiW/NAbYGk= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= diff --git a/gossip/handler.go b/gossip/handler.go index 0a7d49485..449383475 100644 --- a/gossip/handler.go +++ b/gossip/handler.go @@ -834,7 +834,7 @@ func (h *handler) handle(p *peer) error { p.Log().Warn("Leecher peer registration failed", "err", err) return err } - if p.RunningCap(ProtocolName, []uint{FTM63}) { + if p.RunningCap(ProtocolName, []uint{FTM65}) { if err := h.epLeecher.RegisterPeer(p.id); err != nil { p.Log().Warn("Leecher peer registration failed", "err", err) return err diff --git a/gossip/peer.go b/gossip/peer.go index 95139b6ee..b4b2a8552 100644 --- a/gossip/peer.go +++ b/gossip/peer.go @@ -585,5 +585,5 @@ func (p *snapPeer) info() *snapPeerInfo { // eligibleForSnap checks eligibility of a peer for a snap protocol. A peer is eligible for a snap if it advertises `snap` sattelite protocol along with `opera` protocol. func eligibleForSnap(p *p2p.Peer) bool { - return p.RunningCap(ProtocolName, []uint{FTM63}) && p.RunningCap(snap.ProtocolName, snap.ProtocolVersions) + return p.RunningCap(ProtocolName, []uint{FTM65}) && p.RunningCap(snap.ProtocolName, snap.ProtocolVersions) } diff --git a/gossip/protocol.go b/gossip/protocol.go index 61d2a3740..27fdc58aa 100644 --- a/gossip/protocol.go +++ b/gossip/protocol.go @@ -16,19 +16,19 @@ import ( // Constants to match up protocol versions and messages const ( - FTM62 = 62 - FTM63 = 63 - ProtocolVersion = FTM63 + FTM64 = 64 + FTM65 = 65 + ProtocolVersion = FTM65 ) // ProtocolName is the official short name of the protocol used during capability negotiation. const ProtocolName = "x1" // ProtocolVersions are the supported versions of the protocol (first is primary). -var ProtocolVersions = []uint{FTM62, FTM63} +var ProtocolVersions = []uint{FTM64, FTM65} // protocolLengths are the number of implemented message corresponding to different protocol versions. -var protocolLengths = map[uint]uint64{FTM62: EventsStreamResponse + 1, FTM63: EPsStreamResponse + 1} +var protocolLengths = map[uint]uint64{FTM64: EventsStreamResponse + 1, FTM65: EPsStreamResponse + 1} const protocolMaxMsgSize = inter.ProtocolMaxMsgSize // Maximum cap on the size of a protocol message