diff --git a/CHANGELOG.md b/CHANGELOG.md
index daab8cbfed..a478a995e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [0.8.3] - 2024-09-09
+
+### Fixed
+
+- Handling verification key updates with proof authorization kind.
+- Block producer incorrectly discarding blocks if staking ledger between best tip and won slot were different.
+
## [0.8.2] - 2024-09-06
### Fixed
@@ -228,7 +235,8 @@ First public release.
- Alpha version of the node which can connect and syncup to the berkeleynet network, and keep applying new blocks to maintain consensus state and ledger up to date.
- Web-based frontend for the node.
-[Unreleased]: https://github.com/openmina/openmina/compare/v0.8.2...develop
+[Unreleased]: https://github.com/openmina/openmina/compare/v0.8.3...develop
+[0.8.3]: https://github.com/openmina/openmina/releases/tag/v0.8.2...v0.8.3
[0.8.2]: https://github.com/openmina/openmina/releases/tag/v0.8.1...v0.8.2
[0.8.1]: https://github.com/openmina/openmina/releases/tag/v0.8.0...v0.8.1
[0.8.0]: https://github.com/openmina/openmina/releases/tag/v0.7.0...v0.8.0
diff --git a/Cargo.lock b/Cargo.lock
index f90e0d45b4..579ba4fa51 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1013,7 +1013,7 @@ checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
[[package]]
name = "cli"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"bytes",
@@ -2412,7 +2412,7 @@ dependencies = [
[[package]]
name = "hash-tool"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"bs58 0.5.0",
"hex",
@@ -3010,7 +3010,7 @@ dependencies = [
[[package]]
name = "ledger-tool"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"mina-curves",
@@ -3336,7 +3336,7 @@ dependencies = [
[[package]]
name = "libp2p-rpc-behaviour"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"libp2p",
"log",
@@ -3715,7 +3715,7 @@ dependencies = [
[[package]]
name = "mina-transport"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"blake2",
"hex",
@@ -3726,7 +3726,7 @@ dependencies = [
[[package]]
name = "mina-tree"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"ark-ec",
@@ -4059,7 +4059,7 @@ dependencies = [
[[package]]
name = "node"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"derive_more",
@@ -4404,7 +4404,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "openmina-bootstrap-sandbox"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"base64 0.21.7",
"binprot",
@@ -4429,7 +4429,7 @@ dependencies = [
[[package]]
name = "openmina-core"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"ark-ff",
"binprot",
@@ -4456,7 +4456,7 @@ dependencies = [
[[package]]
name = "openmina-fuzzer"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"lazy_static",
"rand 0.8.5",
@@ -4467,7 +4467,7 @@ dependencies = [
[[package]]
name = "openmina-gossipsub-sandbox"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"bs58 0.5.0",
"env_logger",
@@ -4481,7 +4481,7 @@ dependencies = [
[[package]]
name = "openmina-macros"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"openmina-core",
@@ -4494,7 +4494,7 @@ dependencies = [
[[package]]
name = "openmina-node-account"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"argon2",
@@ -4515,7 +4515,7 @@ dependencies = [
[[package]]
name = "openmina-node-common"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"gloo-timers",
"gloo-utils",
@@ -4543,7 +4543,7 @@ dependencies = [
[[package]]
name = "openmina-node-invariants"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"documented",
"lazy_static",
@@ -4557,7 +4557,7 @@ dependencies = [
[[package]]
name = "openmina-node-native"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"bytes",
@@ -4591,7 +4591,7 @@ dependencies = [
[[package]]
name = "openmina-node-testing"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"axum",
@@ -4635,7 +4635,7 @@ dependencies = [
[[package]]
name = "openmina-node-web"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"bytes",
@@ -4661,7 +4661,7 @@ dependencies = [
[[package]]
name = "openmina-producer-dashboard"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"bincode",
"clap 4.5.2",
@@ -4753,7 +4753,7 @@ dependencies = [
[[package]]
name = "p2p"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"binprot",
@@ -4816,7 +4816,7 @@ dependencies = [
[[package]]
name = "p2p-testing"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"derive_more",
"futures",
@@ -5671,7 +5671,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "replay_dynamic_effects"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"node",
"openmina-node-invariants",
@@ -6015,7 +6015,7 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "salsa-simple"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"generic-array",
"hex",
@@ -6408,7 +6408,7 @@ dependencies = [
[[package]]
name = "snark"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"ark-ec",
"ark-ff",
@@ -7591,7 +7591,7 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]]
name = "vrf"
-version = "0.8.2"
+version = "0.8.3"
dependencies = [
"anyhow",
"ark-ec",
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 908b11de69..be799fd59c 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "cli"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/cli/replay_dynamic_effects/Cargo.toml b/cli/replay_dynamic_effects/Cargo.toml
index 0d11b20e1a..5556dbaa82 100644
--- a/cli/replay_dynamic_effects/Cargo.toml
+++ b/cli/replay_dynamic_effects/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "replay_dynamic_effects"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/core/Cargo.toml b/core/Cargo.toml
index adba0be8a8..68475e52a8 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-core"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/docker-compose.local.producers.yml b/docker-compose.local.producers.yml
index bdc8bb8b65..36ab249b1f 100644
--- a/docker-compose.local.producers.yml
+++ b/docker-compose.local.producers.yml
@@ -1,7 +1,7 @@
services:
local-producer-cluster:
container_name: local-producer-cluster
- image: openmina/openmina:0.8.2
+ image: openmina/openmina:0.8.3
environment:
- RUST_BACKTRACE=1
entrypoint: ["openmina-node-testing", "scenarios-generate", "--name", "simulation-small-forever-real-time"]
@@ -12,7 +12,7 @@ services:
frontend:
container_name: frontend
- image: openmina/frontend:0.8.2-producer-demo
+ image: openmina/frontend:0.8.3-producer-demo
# build:
# context: .
# dockerfile: Dockerfile_FE
diff --git a/frontend/cypress/e2e/block-production/won-slots/table.cy.ts b/frontend/cypress/e2e/block-production/won-slots/table.cy.ts
index 1262ddae74..c21afda42e 100644
--- a/frontend/cypress/e2e/block-production/won-slots/table.cy.ts
+++ b/frontend/cypress/e2e/block-production/won-slots/table.cy.ts
@@ -122,7 +122,7 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
}));
it('sort by transactions', () => execute(() => {
- cy.get('mina-block-production-won-slots-table .head > span:nth-child(5)')
+ cy.get('mina-block-production-won-slots-table .head > span:nth-child(6)')
.click()
.window()
.its('store')
@@ -135,7 +135,7 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
}));
it('sort by snark fees', () => execute(() => {
- cy.get('mina-block-production-won-slots-table .head > span:nth-child(7)')
+ cy.get('mina-block-production-won-slots-table .head > span:nth-child(8)')
.click()
.window()
.its('store')
@@ -148,7 +148,7 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
}));
it('sort by snark coinbase rewards', () => execute(() => {
- cy.get('mina-block-production-won-slots-table .head > span:nth-child(8)')
+ cy.get('mina-block-production-won-slots-table .head > span:nth-child(9)')
.click()
.window()
.its('store')
@@ -161,7 +161,7 @@ describe('BLOCK PRODUCTION WON SLOTS TABLE', () => {
}));
it('sort by snark tx fees rewards', () => execute(() => {
- cy.get('mina-block-production-won-slots-table .head > span:nth-child(9)')
+ cy.get('mina-block-production-won-slots-table .head > span:nth-child(10)')
.click()
.window()
.its('store')
diff --git a/frontend/package.json b/frontend/package.json
index 0b2b7c991e..fba516b62e 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,6 +1,6 @@
{
"name": "frontend",
- "version": "0.1",
+ "version": "0.8.3",
"scripts": {
"install:deps": "npm install",
"start": "npm install && ng serve --configuration local --open",
diff --git a/frontend/src/app/features/block-production/won-slots/block-production-won-slots.service.ts b/frontend/src/app/features/block-production/won-slots/block-production-won-slots.service.ts
index 99fbd1506c..dd729aeb33 100644
--- a/frontend/src/app/features/block-production/won-slots/block-production-won-slots.service.ts
+++ b/frontend/src/app/features/block-production/won-slots/block-production-won-slots.service.ts
@@ -36,6 +36,7 @@ export class BlockProductionWonSlotsService {
age: this.calculateTimeAgo(attempt),
slotTime: attempt.won_slot.slot_time,
globalSlot: attempt.won_slot.global_slot,
+ slotInEpoch: attempt.won_slot.global_slot % 7140,
vrfValueWithThreshold: attempt.won_slot.value_with_threshold,
active: attempt.active,
diff --git a/frontend/src/app/features/block-production/won-slots/cards/block-production-won-slots-cards.component.ts b/frontend/src/app/features/block-production/won-slots/cards/block-production-won-slots-cards.component.ts
index 75e77bd1a0..56157a3760 100644
--- a/frontend/src/app/features/block-production/won-slots/cards/block-production-won-slots-cards.component.ts
+++ b/frontend/src/app/features/block-production/won-slots/cards/block-production-won-slots-cards.component.ts
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { StoreDispatcher } from '@shared/base-classes/store-dispatcher.class';
import { BlockProductionWonSlotsSelectors } from '@block-production/won-slots/block-production-won-slots.state';
-import { lastItem, ONE_BILLION, ONE_MILLION, ONE_THOUSAND } from '@openmina/shared';
+import { lastItem, ONE_BILLION, ONE_MILLION, ONE_THOUSAND, toReadableDate } from '@openmina/shared';
import { getTimeDiff } from '@shared/helpers/date.helper';
import { filter } from 'rxjs';
import {
@@ -72,6 +72,7 @@ export class BlockProductionWonSlotsCardsComponent extends StoreDispatcher imple
)
.map(s => s.coinbaseRewards + s.txFeesRewards).reduce((a, b) => a + b, 0).toFixed(0);
+ this.card6.totalRewards = isNaN(+this.card6.totalRewards) ? '0' : this.card6.totalRewards;
this.detect();
}, filter(slots => slots.length > 0));
}
diff --git a/frontend/src/app/features/block-production/won-slots/table/block-production-won-slots-table.component.html b/frontend/src/app/features/block-production/won-slots/table/block-production-won-slots-table.component.html
index 96e0ae23fe..3e42122963 100644
--- a/frontend/src/app/features/block-production/won-slots/table/block-production-won-slots-table.component.html
+++ b/frontend/src/app/features/block-production/won-slots/table/block-production-won-slots-table.component.html
@@ -16,6 +16,7 @@
{{ row.age }}
{{ row.height ?? '-' }}
{{ row.globalSlot }}
+ {{ row.slotInEpoch ?? '-' }}
>> =
+ HashMap::with_capacity(128);
let account_updates = account_updates.try_map_to(|p| {
let account_id = p.account_id();
- if let SetOrKeep::Set(vk_next) = &p.body.update.verification_key {
- vks_overridden.insert(account_id.clone(), Some(vk_next.clone()));
- }
-
check_authorization(p)?;
- match (&p.body.authorization_kind, is_failed) {
+ let result = match (&p.body.authorization_kind, is_failed) {
(AuthorizationKind::Proof(vk_hash), false) => {
let prioritized_vk = {
// only lookup _past_ vk setting, ie exclude the new one we
@@ -4071,7 +4068,15 @@ pub mod zkapp_command {
_ => {
Ok((p.clone(), None))
}
+ };
+
+ // NOTE: we only update the overriden map AFTER verifying the update to make sure
+ // that the verification for the VK update itself is done against the previous VK.
+ if let SetOrKeep::Set(vk_next) = &p.body.update.verification_key {
+ vks_overridden.insert(p.account_id().clone(), Some(vk_next.clone()));
}
+
+ result
})?;
Ok(ZkAppCommand {
diff --git a/macros/Cargo.toml b/macros/Cargo.toml
index 92158d505c..1c3abe2499 100644
--- a/macros/Cargo.toml
+++ b/macros/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-macros"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
authors = [ "Alexander Koptelov " ]
diff --git a/node/Cargo.toml b/node/Cargo.toml
index 02cc6ba3ad..7e4790373e 100644
--- a/node/Cargo.toml
+++ b/node/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "node"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/account/Cargo.toml b/node/account/Cargo.toml
index ba47e5146c..b2d0506b5d 100644
--- a/node/account/Cargo.toml
+++ b/node/account/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-account"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/common/Cargo.toml b/node/common/Cargo.toml
index e05a4a103f..225ff49e9a 100644
--- a/node/common/Cargo.toml
+++ b/node/common/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-common"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/invariants/Cargo.toml b/node/invariants/Cargo.toml
index 97159f692b..f59591761d 100644
--- a/node/invariants/Cargo.toml
+++ b/node/invariants/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-invariants"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/native/Cargo.toml b/node/native/Cargo.toml
index 356aa24c0f..7b8db1185a 100644
--- a/node/native/Cargo.toml
+++ b/node/native/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-native"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/src/block_producer/block_producer_state.rs b/node/src/block_producer/block_producer_state.rs
index fe83508dc0..c9f896bccf 100644
--- a/node/src/block_producer/block_producer_state.rs
+++ b/node/src/block_producer/block_producer_state.rs
@@ -310,7 +310,9 @@ impl BlockProducerCurrentState {
return Some(BlockProducerWonSlotDiscardReason::BestTipGlobalSlotHigher);
}
- if &won_slot.staking_ledger_hash != best_tip.staking_epoch_ledger_hash() {
+ if &won_slot.staking_ledger_hash != best_tip.staking_epoch_ledger_hash()
+ && &won_slot.staking_ledger_hash != best_tip.next_epoch_ledger_hash()
+ {
return Some(BlockProducerWonSlotDiscardReason::BestTipStakingLedgerDifferent);
}
diff --git a/node/testing/Cargo.toml b/node/testing/Cargo.toml
index d788319265..c2241a0ce8 100644
--- a/node/testing/Cargo.toml
+++ b/node/testing/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-testing"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/node/web/Cargo.toml b/node/web/Cargo.toml
index 3af6f74b45..085b23efc9 100644
--- a/node/web/Cargo.toml
+++ b/node/web/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-node-web"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml
index 16fbdda90c..700a9dfd02 100644
--- a/p2p/Cargo.toml
+++ b/p2p/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "p2p"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/p2p/libp2p-rpc-behaviour/Cargo.toml b/p2p/libp2p-rpc-behaviour/Cargo.toml
index a334c1e9b4..0317cdd406 100644
--- a/p2p/libp2p-rpc-behaviour/Cargo.toml
+++ b/p2p/libp2p-rpc-behaviour/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "libp2p-rpc-behaviour"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/p2p/testing/Cargo.toml b/p2p/testing/Cargo.toml
index 8d58d4a0ec..044cf48c67 100644
--- a/p2p/testing/Cargo.toml
+++ b/p2p/testing/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "p2p-testing"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/producer-dashboard/Cargo.toml b/producer-dashboard/Cargo.toml
index 358b000be9..5783103001 100644
--- a/producer-dashboard/Cargo.toml
+++ b/producer-dashboard/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-producer-dashboard"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/snark/Cargo.toml b/snark/Cargo.toml
index a27d7a502d..30aaf69128 100644
--- a/snark/Cargo.toml
+++ b/snark/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "snark"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"
diff --git a/tools/bootstrap-sandbox/Cargo.toml b/tools/bootstrap-sandbox/Cargo.toml
index bb573c6c10..7992731d24 100644
--- a/tools/bootstrap-sandbox/Cargo.toml
+++ b/tools/bootstrap-sandbox/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-bootstrap-sandbox"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dependencies]
diff --git a/tools/gossipsub-sandbox/Cargo.toml b/tools/gossipsub-sandbox/Cargo.toml
index b080836839..d61346d63f 100644
--- a/tools/gossipsub-sandbox/Cargo.toml
+++ b/tools/gossipsub-sandbox/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "openmina-gossipsub-sandbox"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dependencies]
diff --git a/tools/hash-tool/Cargo.toml b/tools/hash-tool/Cargo.toml
index bdfda73104..2bd09d91d6 100644
--- a/tools/hash-tool/Cargo.toml
+++ b/tools/hash-tool/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "hash-tool"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dependencies]
diff --git a/tools/ledger-tool/Cargo.toml b/tools/ledger-tool/Cargo.toml
index 92498a6606..d4201e0f89 100644
--- a/tools/ledger-tool/Cargo.toml
+++ b/tools/ledger-tool/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ledger-tool"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dependencies]
diff --git a/tools/salsa-simple/Cargo.toml b/tools/salsa-simple/Cargo.toml
index 7922f98529..f09fdd59cd 100644
--- a/tools/salsa-simple/Cargo.toml
+++ b/tools/salsa-simple/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "salsa-simple"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dev-dependencies]
diff --git a/tools/transport/Cargo.toml b/tools/transport/Cargo.toml
index d2c1dfc895..6c9117dd92 100644
--- a/tools/transport/Cargo.toml
+++ b/tools/transport/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mina-transport"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
[dependencies]
diff --git a/vrf/Cargo.toml b/vrf/Cargo.toml
index b668a09ac8..c5567b6a3b 100644
--- a/vrf/Cargo.toml
+++ b/vrf/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vrf"
-version = "0.8.2"
+version = "0.8.3"
edition = "2021"
license = "Apache-2.0"