From 495e443f11b3d6d190628513e20ff8aed92d68d0 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Tue, 6 Sep 2022 23:44:13 +0200 Subject: [PATCH] denote merge readiness in default graffiti MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace `-$versionBlob` in default graffiti with `/🐼` to indicate merge readiness according to social consensus. Our current default graffiti format currently uses 32 bytes, which is right at the capacity of what is possible. If we ever have a .10 patch in Oct/Nov/Dec, we would be surprised by an overflow. ``` Nimbus/v##.##.#-######-stateofus ``` --- beacon_chain/spec/datatypes/base.nim | 2 +- beacon_chain/version.nim | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/beacon_chain/spec/datatypes/base.nim b/beacon_chain/spec/datatypes/base.nim index 03c29ccac..ad279cdcf 100644 --- a/beacon_chain/spec/datatypes/base.nim +++ b/beacon_chain/spec/datatypes/base.nim @@ -871,7 +871,7 @@ func init*( func defaultGraffitiBytes*(): GraffitiBytes = const graffitiBytes = - toBytes("Nimbus/" & fullVersionStr) + toBytes("Nimbus/" & shortVersionStr & "/🐼") # PR #2875 static: doAssert graffitiBytes.len <= MAX_GRAFFITI_SIZE distinctBase(result)[0 ..< graffitiBytes.len] = graffitiBytes diff --git a/beacon_chain/version.nim b/beacon_chain/version.nim index 034b70c9d..c4480fd35 100644 --- a/beacon_chain/version.nim +++ b/beacon_chain/version.nim @@ -20,7 +20,7 @@ const versionMinor* = 8 versionBuild* = 2 - versionBlob* = "stateofus" # Single word - ends up in the default graffiti + versionBlob* = "stateofus" # Single word gitRevision* = strip(staticExec("git rev-parse --short HEAD"))[0..5] @@ -29,7 +29,8 @@ const versionAsStr* = $versionMajor & "." & $versionMinor & "." & $versionBuild - fullVersionStr* = "v" & versionAsStr & "-" & gitRevision & "-" & versionBlob + shortVersionStr* = "v" & versionAsStr & "-" & gitRevision + fullVersionStr* = shortVersionStr & "-" & versionBlob func shortNimBanner*(): string = const gitPrefix = "git hash: "