Skip to content

Commit 4a1bd73

Browse files
authored
Merge pull request #622 from openmina/develop
Merge `develop` to `main`
2 parents 5c028a6 + 3a955da commit 4a1bd73

File tree

31 files changed

+99
-79
lines changed

31 files changed

+99
-79
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.1] - 2024-09-02
11+
12+
### Fixed
13+
14+
- Mempool: handling of missing verification key in the transaction pool.
15+
1016
## [0.8.0] - 2024-08-30
1117

1218
### Added
@@ -209,7 +215,8 @@ First public release.
209215
- 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.
210216
- Web-based frontend for the node.
211217

212-
[Unreleased]: https://github.com/openmina/openmina/compare/v0.8.0...develop
218+
[Unreleased]: https://github.com/openmina/openmina/compare/v0.8.1...develop
219+
[0.8.1]: https://github.com/openmina/openmina/releases/tag/v0.8.0...v0.8.1
213220
[0.8.0]: https://github.com/openmina/openmina/releases/tag/v0.7.0...v0.8.0
214221
[0.7.0]: https://github.com/openmina/openmina/releases/tag/v0.6.0...v0.7.0
215222
[0.6.0]: https://github.com/openmina/openmina/releases/tag/v0.5.1...v0.6.0

Cargo.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cli"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
edition = "2021"
55
license = "Apache-2.0"
66

cli/replay_dynamic_effects/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "replay_dynamic_effects"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
edition = "2021"
55
license = "Apache-2.0"
66

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openmina-core"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
edition = "2021"
55
license = "Apache-2.0"
66

docker-compose.local.producers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
local-producer-cluster:
33
container_name: local-producer-cluster
4-
image: openmina/openmina:0.8.0
4+
image: openmina/openmina:0.8.1
55
environment:
66
- RUST_BACKTRACE=1
77
entrypoint: ["openmina-node-testing", "scenarios-generate", "--name", "simulation-small-forever-real-time"]
@@ -12,7 +12,7 @@ services:
1212

1313
frontend:
1414
container_name: frontend
15-
image: openmina/frontend:0.8.0-producer-demo
15+
image: openmina/frontend:0.8.1-producer-demo
1616
# build:
1717
# context: .
1818
# dockerfile: Dockerfile_FE

fuzzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openmina-fuzzer"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
edition = "2021"
55
license = "Apache-2.0"
66

ledger/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mina-tree"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
edition = "2021"
55
license = "Apache-2.0"
66

ledger/src/scan_state/transaction_logic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4187,7 +4187,7 @@ pub mod zkapp_command {
41874187
.find(|(id, _)| account_id == id)
41884188
.map(|(_, key)| key.clone())
41894189
})
4190-
.ok_or_else(|| "verification key not found in cache".to_string())
4190+
.ok_or_else(|| format!("verification key not found in cache: {:?}", vk_hash))
41914191
})?;
41924192
if !is_failed {
41934193
for (account_id, vk) in cmd.extract_vks() {

ledger/src/transaction_pool.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ pub enum TransactionPoolErrors {
3333
/// Invalid transactions, rejeceted diffs, etc...
3434
#[error("Transaction pool errors: {0:?}")]
3535
BatchedErrors(Vec<TransactionError>),
36+
#[error("{0:?}")]
37+
LoadingVK(String),
3638
/// Errors that should panic the node (bugs in implementation)
3739
#[error("Unexpected error: {0}")]
3840
Unexpected(String),
@@ -996,7 +998,7 @@ impl IndexedPool {
996998
consumed
997999
};
9981000

999-
match by_sender.state.as_mut() {
1001+
match by_sender.state.clone() {
10001002
None => {
10011003
if current_nonce != cmd_applicable_at_nonce {
10021004
return Err(CommandError::InvalidNonce {
@@ -1020,7 +1022,7 @@ impl IndexedPool {
10201022

10211023
Ok((cmd.clone(), Self::make_queue()))
10221024
}
1023-
Some((queued_cmds, reserved_currency)) => {
1025+
Some((mut queued_cmds, reserved_currency)) => {
10241026
assert!(!queued_cmds.is_empty());
10251027
let queue_applicable_at_nonce = {
10261028
let first = queued_cmds.front().unwrap();
@@ -1031,14 +1033,14 @@ impl IndexedPool {
10311033
last.data.forget_check().expected_target_nonce()
10321034
};
10331035
if queue_target_nonce == cmd_applicable_at_nonce {
1034-
*reserved_currency = consumed
1035-
.checked_add(reserved_currency)
1036+
let reserved_currency = consumed
1037+
.checked_add(&reserved_currency)
10361038
.ok_or(CommandError::Overflow)?;
10371039

1038-
if *reserved_currency > balance.to_amount() {
1040+
if reserved_currency > balance.to_amount() {
10391041
return Err(CommandError::InsufficientFunds {
10401042
balance,
1041-
consumed: *reserved_currency,
1043+
consumed: reserved_currency,
10421044
});
10431045
}
10441046

@@ -1050,6 +1052,8 @@ impl IndexedPool {
10501052
add_to_applicable_by_fee: false,
10511053
});
10521054

1055+
by_sender.state = Some((queued_cmds, reserved_currency));
1056+
10531057
Ok((cmd.clone(), Self::make_queue()))
10541058
} else if queue_applicable_at_nonce == current_nonce {
10551059
if !cmd_applicable_at_nonce
@@ -2161,7 +2165,7 @@ impl TransactionPool {
21612165

21622166
from_unapplied_sequence::Cache::new(merged)
21632167
})
2164-
.map_err(TransactionPoolErrors::Unexpected)?;
2168+
.map_err(TransactionPoolErrors::LoadingVK)?;
21652169

21662170
let diff = diff
21672171
.into_iter()

0 commit comments

Comments
 (0)