From 2075fdaf8bb79f8b4624a7a5de0fb60e1344191d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Bizjak?= Date: Wed, 15 Jun 2022 18:45:47 +0200 Subject: [PATCH 1/2] Report correct absolute height. After each protocol version we record the absolute height of the last finalized block before the new genesis. This is so we can have a single set of heights. During startup we did not record this height correctly. Fixes #393 --- concordium-consensus/src/Concordium/MultiVersion.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/concordium-consensus/src/Concordium/MultiVersion.hs b/concordium-consensus/src/Concordium/MultiVersion.hs index 1c46b55e57..71dbae6390 100644 --- a/concordium-consensus/src/Concordium/MultiVersion.hs +++ b/concordium-consensus/src/Concordium/MultiVersion.hs @@ -652,12 +652,12 @@ startupSkov genesis = do newEConfig = VersionedConfiguration{..} oldVersions <- readIORef mvVersions writeIORef mvVersions (oldVersions `Vec.snoc` newVersion newEConfig) - let getCurrentGenesisAndHeight :: VersionedSkovM gsconf finconf pv (BlockHash, BlockHeight, Maybe SomeProtocolVersion) + let getCurrentGenesisAndHeight :: VersionedSkovM gsconf finconf pv (BlockHash, AbsoluteBlockHeight, Maybe SomeProtocolVersion) getCurrentGenesisAndHeight = liftSkov $ do currentGenesis <- getGenesisData lfHeight <- getLastFinalizedHeight nextPV <- getNextProtocolVersion - return (_gcCurrentHash currentGenesis, lfHeight, nextPV) + return (_gcCurrentHash currentGenesis, localToAbsoluteBlockHeight vcGenesisHeight lfHeight, nextPV) ((genesisHash, lastFinalizedHeight, nextPV), _) <- runMVR (runSkovT getCurrentGenesisAndHeight (mvrSkovHandlers newEConfig mvr) vcContext st) mvr notifyRegenesis (Just genesisHash) return (Left (newVersion newEConfig, lastFinalizedHeight, nextPV)) From 56c9d91d5d81d54e1d36f1edb32ca1b4fcd81c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Bizjak?= Date: Wed, 15 Jun 2022 18:49:57 +0200 Subject: [PATCH 2/2] Bump version to 4.2.1. --- concordium-node/Cargo.lock | 2 +- concordium-node/Cargo.toml | 2 +- service/windows/installer/Node.wxs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/concordium-node/Cargo.lock b/concordium-node/Cargo.lock index 4324807a70..f53eb19dd6 100644 --- a/concordium-node/Cargo.lock +++ b/concordium-node/Cargo.lock @@ -449,7 +449,7 @@ dependencies = [ [[package]] name = "concordium_node" -version = "4.2.0" +version = "4.2.1" dependencies = [ "anyhow", "app_dirs2", diff --git a/concordium-node/Cargo.toml b/concordium-node/Cargo.toml index 671e0b452f..fee54a0255 100644 --- a/concordium-node/Cargo.toml +++ b/concordium-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "concordium_node" -version = "4.2.0" # must be kept in sync with 'is_compatible_version' in 'src/configuration.rs' +version = "4.2.1" # must be kept in sync with 'is_compatible_version' in 'src/configuration.rs' description = "Concordium Node" authors = ["Concordium "] exclude = [".gitignore", ".gitlab-ci.yml", "test/**/*","**/**/.gitignore","**/**/.gitlab-ci.yml"] diff --git a/service/windows/installer/Node.wxs b/service/windows/installer/Node.wxs index e87c17da4d..66bfca12bf 100644 --- a/service/windows/installer/Node.wxs +++ b/service/windows/installer/Node.wxs @@ -2,9 +2,9 @@ - + - +