Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased changes

## 7.0.4

- Fix a bug where the next payday time reported by the `GetTokenomicsInfo` query was
incorrect (#1240).

## 7.0.3

- Fix a bug in the computation of the genesis height after the second protocol update. (#1237)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2798,8 +2798,8 @@ doMint pbs mint = do
bspBank bsp
& unhashed
%~ (Rewards.totalGTU +~ mintTotal mint)
. (Rewards.bakingRewardAccount +~ mintBakingReward mint)
. (Rewards.finalizationRewardAccount +~ mintFinalizationReward mint)
. (Rewards.bakingRewardAccount +~ mintBakingReward mint)
. (Rewards.finalizationRewardAccount +~ mintFinalizationReward mint)
let updAcc = addAccountAmount $ mintDevelopmentCharge mint
foundationAccount <- (^. cpFoundationAccount) <$> lookupCurrentParameters (bspUpdates bsp)
newAccounts <- Accounts.updateAccountsAtIndex' updAcc foundationAccount (bspAccounts bsp)
Expand Down
13 changes: 11 additions & 2 deletions concordium-consensus/src/Concordium/Queries.hs
Original file line number Diff line number Diff line change
Expand Up @@ -920,11 +920,20 @@ getRewardStatus =
return $ epochToUTC <$> reward
)
( \bp -> do
reward <- BS.getRewardStatus =<< blockState bp
bState <- blockState bp
reward <- BS.getRewardStatus bState
-- The reward status includes the next payday epoch. To convert this to a UTCTime,
-- we get the current epoch and the trigger block time (which we treat as the time of
-- the start of the next epoch) from the seed state. For each epoch after the next
-- epoch, we add the epoch duration to the trigger block time to get the time of the
-- payday.
ss <- BS.getSeedState bState
let nextEpoch = ss ^. epoch + 1
let deltaEpochs e = if e > nextEpoch then fromIntegral (e - nextEpoch) else 0
BaseV1.CoreGenesisParametersV1{..} <- SkovV1.gmParameters <$> use SkovV1.genesisMetadata
let epochToUTC e =
timestampToUTCTime $
addDuration genesisTime (fromIntegral e * genesisEpochDuration)
addDuration (ss ^. triggerBlockTime) (deltaEpochs e * genesisEpochDuration)
return $ epochToUTC <$> reward
)

Expand Down
2 changes: 1 addition & 1 deletion concordium-node/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion concordium-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "concordium_node"
version = "7.0.3" # must be kept in sync with 'is_compatible_version' in 'src/configuration.rs'
version = "7.0.4" # must be kept in sync with 'is_compatible_version' in 'src/configuration.rs'
description = "Concordium Node"
authors = ["Concordium <developers@concordium.com>"]
exclude = [".gitignore", ".gitlab-ci.yml", "test/**/*","**/**/.gitignore","**/**/.gitlab-ci.yml"]
Expand Down
5 changes: 2 additions & 3 deletions concordium-node/src/consensus_ffi/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1977,12 +1977,11 @@ impl ConsensusContainer {

pub fn send_finalization(&self, genesis_index: u32, msg: &[u8]) -> ConsensusFfiResponse {
wrap_send_data_to_c!(self, genesis_index, msg, receiveFinalizationMessage)
.check_consistent()
.check_consistent()
}

pub fn send_finalization_record(&self, genesis_index: u32, rec: &[u8]) -> ConsensusFfiResponse {
wrap_send_data_to_c!(self, genesis_index, rec, receiveFinalizationRecord)
.check_consistent()
wrap_send_data_to_c!(self, genesis_index, rec, receiveFinalizationRecord).check_consistent()
}

/// Send a transaction to consensus. Return whether the operation succeeded
Expand Down
Loading