diff --git a/Cargo.lock b/Cargo.lock index e572d72555d..53f04339de4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2521,7 +2521,7 @@ dependencies = [ [[package]] name = "massa-client" -version = "0.26.0" +version = "0.26.1" dependencies = [ "anyhow", "atty", @@ -2549,7 +2549,7 @@ dependencies = [ [[package]] name = "massa-node" -version = "0.26.0" +version = "0.26.1" dependencies = [ "anyhow", "crossbeam-channel", @@ -2649,7 +2649,7 @@ dependencies = [ [[package]] name = "massa_api" -version = "0.26.0" +version = "0.26.1" dependencies = [ "async-trait", "futures", @@ -2682,7 +2682,7 @@ dependencies = [ [[package]] name = "massa_api_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "jsonrpsee", @@ -2705,7 +2705,7 @@ dependencies = [ [[package]] name = "massa_async_pool" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa-proto-rs", "massa_db_exports", @@ -2726,7 +2726,7 @@ dependencies = [ [[package]] name = "massa_bootstrap" -version = "0.26.0" +version = "0.26.1" dependencies = [ "bitvec", "crossbeam", @@ -2772,7 +2772,7 @@ dependencies = [ [[package]] name = "massa_channel" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam", "prometheus", @@ -2781,7 +2781,7 @@ dependencies = [ [[package]] name = "massa_cipher" -version = "0.26.0" +version = "0.26.1" dependencies = [ "aes-gcm", "displaydoc", @@ -2793,7 +2793,7 @@ dependencies = [ [[package]] name = "massa_consensus_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam-channel", "displaydoc", @@ -2819,7 +2819,7 @@ dependencies = [ [[package]] name = "massa_consensus_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam", "crossbeam-channel", @@ -2848,7 +2848,7 @@ dependencies = [ [[package]] name = "massa_db_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa_hash", @@ -2860,7 +2860,7 @@ dependencies = [ [[package]] name = "massa_db_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "lsmtree", "massa_db_exports", @@ -2873,7 +2873,7 @@ dependencies = [ [[package]] name = "massa_executed_ops" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa_db_exports", "massa_db_worker", @@ -2888,7 +2888,7 @@ dependencies = [ [[package]] name = "massa_execution_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa-proto-rs", @@ -2912,7 +2912,7 @@ dependencies = [ [[package]] name = "massa_execution_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "anyhow", "blake3", @@ -2958,7 +2958,7 @@ dependencies = [ [[package]] name = "massa_factory_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa_consensus_exports", @@ -2975,7 +2975,7 @@ dependencies = [ [[package]] name = "massa_factory_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam-channel", "massa_channel", @@ -2999,7 +2999,7 @@ dependencies = [ [[package]] name = "massa_final_state" -version = "0.26.0" +version = "0.26.1" dependencies = [ "bs58", "displaydoc", @@ -3028,7 +3028,7 @@ dependencies = [ [[package]] name = "massa_grpc" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "futures-util", @@ -3068,7 +3068,7 @@ dependencies = [ [[package]] name = "massa_hash" -version = "0.26.0" +version = "0.26.1" dependencies = [ "blake3", "bs58", @@ -3085,7 +3085,7 @@ dependencies = [ [[package]] name = "massa_ledger_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa-proto-rs", @@ -3103,7 +3103,7 @@ dependencies = [ [[package]] name = "massa_ledger_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa_db_exports", "massa_db_worker", @@ -3119,7 +3119,7 @@ dependencies = [ [[package]] name = "massa_logging" -version = "0.26.0" +version = "0.26.1" dependencies = [ "serde_json", "tracing", @@ -3127,7 +3127,7 @@ dependencies = [ [[package]] name = "massa_metrics" -version = "0.26.0" +version = "0.26.1" dependencies = [ "hyper", "lazy_static", @@ -3139,7 +3139,7 @@ dependencies = [ [[package]] name = "massa_models" -version = "0.26.0" +version = "0.26.1" dependencies = [ "bitvec", "bs58", @@ -3166,7 +3166,7 @@ dependencies = [ [[package]] name = "massa_module_cache" -version = "0.26.0" +version = "0.26.1" dependencies = [ "anyhow", "displaydoc", @@ -3187,7 +3187,7 @@ dependencies = [ [[package]] name = "massa_pool_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam-channel", "massa_execution_exports", @@ -3201,7 +3201,7 @@ dependencies = [ [[package]] name = "massa_pool_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam-channel", "massa_execution_exports", @@ -3221,7 +3221,7 @@ dependencies = [ [[package]] name = "massa_pos_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "bitvec", "crossbeam-channel", @@ -3245,7 +3245,7 @@ dependencies = [ [[package]] name = "massa_pos_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa_hash", "massa_models", @@ -3259,7 +3259,7 @@ dependencies = [ [[package]] name = "massa_protocol_exports" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa_hash", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "massa_protocol_worker" -version = "0.26.0" +version = "0.26.1" dependencies = [ "crossbeam", "ip_rfc", @@ -3315,7 +3315,7 @@ dependencies = [ [[package]] name = "massa_sdk" -version = "0.26.0" +version = "0.26.1" dependencies = [ "http", "jsonrpsee", @@ -3333,7 +3333,7 @@ dependencies = [ [[package]] name = "massa_serialization" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "nom", @@ -3344,7 +3344,7 @@ dependencies = [ [[package]] name = "massa_signature" -version = "0.26.0" +version = "0.26.1" dependencies = [ "bs58", "displaydoc", @@ -3362,7 +3362,7 @@ dependencies = [ [[package]] name = "massa_storage" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa_factory_exports", "massa_metrics", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "massa_time" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa-proto-rs", @@ -3386,7 +3386,7 @@ dependencies = [ [[package]] name = "massa_versioning" -version = "0.26.0" +version = "0.26.1" dependencies = [ "assert_matches", "machine", @@ -3411,7 +3411,7 @@ dependencies = [ [[package]] name = "massa_wallet" -version = "0.26.0" +version = "0.26.1" dependencies = [ "displaydoc", "massa_cipher", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "massa_xtask" -version = "0.26.0" +version = "0.26.1" dependencies = [ "massa_models", "toml_edit", diff --git a/massa-api-exports/Cargo.toml b/massa-api-exports/Cargo.toml index e82cc96130e..50a4968e11c 100644 --- a/massa-api-exports/Cargo.toml +++ b/massa-api-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_api_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-api/Cargo.toml b/massa-api/Cargo.toml index 417fbbb6adb..62a13759495 100644 --- a/massa-api/Cargo.toml +++ b/massa-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_api" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-async-pool/Cargo.toml b/massa-async-pool/Cargo.toml index 8df84b439aa..abccfaa6cae 100644 --- a/massa-async-pool/Cargo.toml +++ b/massa-async-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_async_pool" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-bootstrap/Cargo.toml b/massa-bootstrap/Cargo.toml index b20b26d9a83..078f4b7a7d3 100644 --- a/massa-bootstrap/Cargo.toml +++ b/massa-bootstrap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_bootstrap" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-bootstrap/src/client.rs b/massa-bootstrap/src/client.rs index 6277b030659..c1e54f17db4 100644 --- a/massa-bootstrap/src/client.rs +++ b/massa-bootstrap/src/client.rs @@ -431,32 +431,32 @@ pub fn get_state( err )) })?; - - // set initial execution trail hash - final_state_guard.init_execution_trail_hash(); - - // load initial deferred credits - final_state_guard - .pos_state - .load_initial_deferred_credits() - .map_err(|err| { - BootstrapError::GeneralError(format!( - "could not load initial deferred credits: {}", - err - )) - })?; } - // create the initial cycle of PoS cycle_history - let mut batch = DBBatch::new(); - let mut db_versioning_batch = DBBatch::new(); - final_state_guard.pos_state.create_initial_cycle(&mut batch); - let slot = Slot::new( final_state_guard.last_start_period, bootstrap_config.thread_count.saturating_sub(1), ); + // create the initial cycle of PoS cycle_history + let mut batch = DBBatch::new(); + let mut db_versioning_batch: BTreeMap, Option>> = DBBatch::new(); + final_state_guard.pos_state.create_initial_cycle(&mut batch); + + // set initial execution trail hash + final_state_guard.init_execution_trail_hash_to_batch(&mut batch); + + // load initial deferred credits + final_state_guard + .pos_state + .load_initial_deferred_credits(&mut batch) + .map_err(|err| { + BootstrapError::GeneralError(format!( + "could not load initial deferred credits: {}", + err + )) + })?; + // Need to write MIP store to Db if we want to bootstrap it to others final_state_guard .mip_store diff --git a/massa-bootstrap/src/tests/tools.rs b/massa-bootstrap/src/tests/tools.rs index b8ab5bd777c..e3fe05101f7 100644 --- a/massa-bootstrap/src/tests/tools.rs +++ b/massa-bootstrap/src/tests/tools.rs @@ -363,8 +363,12 @@ pub fn get_random_final_state_bootstrap( mip_store, db, ); - - final_state.init_execution_trail_hash(); + let mut batch = DBBatch::new(); + final_state.init_execution_trail_hash_to_batch(&mut batch); + final_state + .db + .write() + .write_batch(batch, Default::default(), None); final_state } diff --git a/massa-channel/Cargo.toml b/massa-channel/Cargo.toml index a844c445c50..3f8e56cae1b 100644 --- a/massa-channel/Cargo.toml +++ b/massa-channel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_channel" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-cipher/Cargo.toml b/massa-cipher/Cargo.toml index c2925b4eb71..19cf18b6ead 100644 --- a/massa-cipher/Cargo.toml +++ b/massa-cipher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_cipher" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-client/Cargo.toml b/massa-client/Cargo.toml index 4c3e075e723..4f42d2569c1 100644 --- a/massa-client/Cargo.toml +++ b/massa-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa-client" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-consensus-exports/Cargo.toml b/massa-consensus-exports/Cargo.toml index a23bb83fe3b..d1fafea724d 100644 --- a/massa-consensus-exports/Cargo.toml +++ b/massa-consensus-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_consensus_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-consensus-worker/Cargo.toml b/massa-consensus-worker/Cargo.toml index 8221083f3d4..a50e8465eb3 100644 --- a/massa-consensus-worker/Cargo.toml +++ b/massa-consensus-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_consensus_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-db-exports/Cargo.toml b/massa-db-exports/Cargo.toml index 5b2c9a0fb24..2421bbb8b4b 100644 --- a/massa-db-exports/Cargo.toml +++ b/massa-db-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_db_exports" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-db-worker/Cargo.toml b/massa-db-worker/Cargo.toml index 4d9996babe8..9ec7771c89d 100644 --- a/massa-db-worker/Cargo.toml +++ b/massa-db-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_db_worker" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-executed-ops/Cargo.toml b/massa-executed-ops/Cargo.toml index 5addbd5eb75..726e29ba428 100644 --- a/massa-executed-ops/Cargo.toml +++ b/massa-executed-ops/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_executed_ops" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-execution-exports/Cargo.toml b/massa-execution-exports/Cargo.toml index 629be5b0fcf..225d9efb22c 100644 --- a/massa-execution-exports/Cargo.toml +++ b/massa-execution-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_execution_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-execution-worker/Cargo.toml b/massa-execution-worker/Cargo.toml index 9107aa8d2e1..cea788ccf81 100644 --- a/massa-execution-worker/Cargo.toml +++ b/massa-execution-worker/Cargo.toml @@ -4,7 +4,7 @@ harness = false [package] name = "massa_execution_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-execution-worker/src/tests/mock.rs b/massa-execution-worker/src/tests/mock.rs index 2779dfac9b0..46ac2dcb188 100644 --- a/massa-execution-worker/src/tests/mock.rs +++ b/massa-execution-worker/src/tests/mock.rs @@ -141,9 +141,10 @@ pub fn get_sample_state( ) .unwrap() }; - final_state.init_execution_trail_hash(); + let mut batch: BTreeMap, Option>> = DBBatch::new(); final_state.pos_state.create_initial_cycle(&mut batch); + final_state.init_execution_trail_hash_to_batch(&mut batch); final_state .db .write() diff --git a/massa-factory-exports/Cargo.toml b/massa-factory-exports/Cargo.toml index 6d08923c1ed..94bcab25833 100644 --- a/massa-factory-exports/Cargo.toml +++ b/massa-factory-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_factory_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-factory-worker/Cargo.toml b/massa-factory-worker/Cargo.toml index e6bd67dbad2..f0b05b0b978 100644 --- a/massa-factory-worker/Cargo.toml +++ b/massa-factory-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_factory_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-final-state/Cargo.toml b/massa-final-state/Cargo.toml index 73e92bf1fd4..bba2aa24021 100644 --- a/massa-final-state/Cargo.toml +++ b/massa-final-state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_final_state" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-final-state/src/final_state.rs b/massa-final-state/src/final_state.rs index 67572ea0ba1..7a4a0ea22f0 100644 --- a/massa-final-state/src/final_state.rs +++ b/massa-final-state/src/final_state.rs @@ -119,13 +119,16 @@ impl FinalState { }; if reset_final_state { - // reset the execution trail hash - final_state.init_execution_trail_hash(); + final_state.db.read().set_initial_change_id(slot); + // delete the execution trail hash + final_state + .db + .write() + .delete_prefix(EXECUTION_TRAIL_HASH_PREFIX, STATE_CF, None); final_state.async_pool.reset(); final_state.pos_state.reset(); final_state.executed_ops.reset(); final_state.executed_denunciations.reset(); - final_state.db.read().set_initial_change_id(slot); } info!( @@ -801,12 +804,10 @@ impl FinalState { } /// Initialize the execution trail hash to zero. - pub fn init_execution_trail_hash(&mut self) { - let mut db_batch = DBBatch::new(); - db_batch.insert( + pub fn init_execution_trail_hash_to_batch(&mut self, batch: &mut DBBatch) { + batch.insert( EXECUTION_TRAIL_HASH_PREFIX.as_bytes().to_vec(), Some(massa_hash::Hash::zero().to_bytes().to_vec()), ); - self.db.write().write_batch(db_batch, DBBatch::new(), None); } } diff --git a/massa-grpc/Cargo.toml b/massa-grpc/Cargo.toml index d2157cf8ed2..49ca8e0c550 100644 --- a/massa-grpc/Cargo.toml +++ b/massa-grpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_grpc" -version = "0.26.0" +version = "0.26.1" edition = "2021" description = "GRPC API for Massa Blockchain" repository = "https://github.com/massalabs/massa/" diff --git a/massa-hash/Cargo.toml b/massa-hash/Cargo.toml index 2156964534a..2d8cf869ae5 100644 --- a/massa-hash/Cargo.toml +++ b/massa-hash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_hash" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-ledger-exports/Cargo.toml b/massa-ledger-exports/Cargo.toml index 5d451c16ff1..1fdb1c77192 100644 --- a/massa-ledger-exports/Cargo.toml +++ b/massa-ledger-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_ledger_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-ledger-worker/Cargo.toml b/massa-ledger-worker/Cargo.toml index d0e10d83d57..2b0923fbce5 100644 --- a/massa-ledger-worker/Cargo.toml +++ b/massa-ledger-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_ledger_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-logging/Cargo.toml b/massa-logging/Cargo.toml index 96af4190599..371545e878d 100644 --- a/massa-logging/Cargo.toml +++ b/massa-logging/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_logging" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-metrics/Cargo.toml b/massa-metrics/Cargo.toml index 885496593c8..93fb8543ea7 100644 --- a/massa-metrics/Cargo.toml +++ b/massa-metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_metrics" -version = "0.26.0" +version = "0.26.1" edition = "2021" [features] diff --git a/massa-models/Cargo.toml b/massa-models/Cargo.toml index 2cebae08f5b..3b00c887e27 100644 --- a/massa-models/Cargo.toml +++ b/massa-models/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_models" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-models/src/config/constants.rs b/massa-models/src/config/constants.rs index b80227f74b1..8a44cf4824d 100644 --- a/massa-models/src/config/constants.rs +++ b/massa-models/src/config/constants.rs @@ -59,7 +59,7 @@ lazy_static::lazy_static! { ) ) } else { - MassaTime::from_millis(1693994400000) // Wednesday, September 6, 2023 10:00:00 PM UTC + MassaTime::from_millis(1694170800000) // Friday, September 8, 2023 11:00:00 AM UTC }; /// TESTNET: time when the blockclique is ended. @@ -76,9 +76,9 @@ lazy_static::lazy_static! { /// node version pub static ref VERSION: Version = { if cfg!(feature = "sandbox") { - "SAND.26.0" + "SAND.26.1" } else { - "TEST.26.0" + "TEST.26.1" } .parse() .unwrap() diff --git a/massa-models/src/version.rs b/massa-models/src/version.rs index 1b20894e1dc..fe55ed2ab29 100644 --- a/massa-models/src/version.rs +++ b/massa-models/src/version.rs @@ -191,7 +191,10 @@ impl Deserializer for VersionDeserializer { impl Version { /// true if instance and major are the same pub fn is_compatible(&self, other: &Version) -> bool { - self.instance == other.instance && self.major == other.major + self.instance == other.instance + && self.major == other.major + && self.minor > 0 + && other.minor > 0 } } diff --git a/massa-module-cache/Cargo.toml b/massa-module-cache/Cargo.toml index 84579708615..6961edf46ff 100644 --- a/massa-module-cache/Cargo.toml +++ b/massa-module-cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_module_cache" -version = "0.26.0" +version = "0.26.1" edition = "2021" [features] diff --git a/massa-node/Cargo.toml b/massa-node/Cargo.toml index 8ab3852674b..68f26fb1605 100644 --- a/massa-node/Cargo.toml +++ b/massa-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa-node" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-node/base_config/openrpc.json b/massa-node/base_config/openrpc.json index 098ee82672a..f9c67d59df6 100644 --- a/massa-node/base_config/openrpc.json +++ b/massa-node/base_config/openrpc.json @@ -2,7 +2,7 @@ "openrpc": "1.2.4", "info": { "title": "Massa OpenRPC Specification", - "version": "TEST.26.0", + "version": "TEST.26.1", "description": "Massa OpenRPC Specification document. Find more information on https://docs.massa.net/en/latest/technical-doc/api.html", "termsOfService": "https://open-rpc.org", "contact": { diff --git a/massa-pool-exports/Cargo.toml b/massa-pool-exports/Cargo.toml index 5f3e5e96661..bc4a26e051d 100644 --- a/massa-pool-exports/Cargo.toml +++ b/massa-pool-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_pool_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-pool-worker/Cargo.toml b/massa-pool-worker/Cargo.toml index e7d3d95ae18..0455cace9ea 100644 --- a/massa-pool-worker/Cargo.toml +++ b/massa-pool-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_pool_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-pos-exports/Cargo.toml b/massa-pos-exports/Cargo.toml index 4b41544af71..cb6bd68234f 100644 --- a/massa-pos-exports/Cargo.toml +++ b/massa-pos-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_pos_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-pos-exports/src/pos_final_state.rs b/massa-pos-exports/src/pos_final_state.rs index 1760497c4d0..9d64ca3f203 100644 --- a/massa-pos-exports/src/pos_final_state.rs +++ b/massa-pos-exports/src/pos_final_state.rs @@ -204,7 +204,7 @@ impl PoSFinalState { } /// Try load initial deferred credits from file - pub fn load_initial_deferred_credits(&mut self) -> Result<(), PosError> { + pub fn load_initial_deferred_credits(&mut self, batch: &mut DBBatch) -> Result<(), PosError> { let Some(initial_deferred_credits_path) = &self.config.initial_deferred_credits_path else { return Ok(()); }; @@ -234,13 +234,11 @@ impl PoSFinalState { )) })?; - let mut db_batch = DBBatch::new(); for (address, deferred_credits) in initial_deferred_credits { for AddressInitialDefferredCredits { slot, amount } in deferred_credits { - self.put_deferred_credits_entry(&slot, &address, &amount, &mut db_batch); + self.put_deferred_credits_entry(&slot, &address, &amount, batch); } } - self.db.write().write_batch(db_batch, DBBatch::new(), None); Ok(()) } @@ -1708,10 +1706,12 @@ mod tests { cycle_info_deserializer, }; + let mut batch = DBBatch::new(); // load initial deferred credits pos_state - .load_initial_deferred_credits() + .load_initial_deferred_credits(&mut batch) .expect("error while loading initial deferred credits"); + db.write().write_batch(batch, DBBatch::new(), None); let deferred_credits = pos_state.get_deferred_credits().credits; diff --git a/massa-pos-worker/Cargo.toml b/massa-pos-worker/Cargo.toml index eb7cb48748e..4367b1901d1 100644 --- a/massa-pos-worker/Cargo.toml +++ b/massa-pos-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_pos_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-protocol-exports/Cargo.toml b/massa-protocol-exports/Cargo.toml index b76bd3a02df..c2b72f0529c 100644 --- a/massa-protocol-exports/Cargo.toml +++ b/massa-protocol-exports/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_protocol_exports" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-protocol-worker/Cargo.toml b/massa-protocol-worker/Cargo.toml index f0e8742cbbb..3fa3cb7e6e8 100644 --- a/massa-protocol-worker/Cargo.toml +++ b/massa-protocol-worker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_protocol_worker" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-sdk/Cargo.toml b/massa-sdk/Cargo.toml index 61f58d40d4d..6b90727b856 100644 --- a/massa-sdk/Cargo.toml +++ b/massa-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_sdk" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies] diff --git a/massa-serialization/Cargo.toml b/massa-serialization/Cargo.toml index 23a4802cfe4..1b6b97fbe8a 100644 --- a/massa-serialization/Cargo.toml +++ b/massa-serialization/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_serialization" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-signature/Cargo.toml b/massa-signature/Cargo.toml index c7f7df36a8d..c23ffaa86f3 100644 --- a/massa-signature/Cargo.toml +++ b/massa-signature/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_signature" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-storage/Cargo.toml b/massa-storage/Cargo.toml index 6c05e33ff79..727b56b520c 100644 --- a/massa-storage/Cargo.toml +++ b/massa-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_storage" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-time/Cargo.toml b/massa-time/Cargo.toml index 4d5b14f3d93..5402b77ae58 100644 --- a/massa-time/Cargo.toml +++ b/massa-time/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_time" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-versioning/Cargo.toml b/massa-versioning/Cargo.toml index b5346535eab..6233f00b8c2 100644 --- a/massa-versioning/Cargo.toml +++ b/massa-versioning/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_versioning" -version = "0.26.0" +version = "0.26.1" authors = ["Massa Labs "] edition = "2021" diff --git a/massa-wallet/Cargo.toml b/massa-wallet/Cargo.toml index f45bd2b5630..8a45cfe3499 100644 --- a/massa-wallet/Cargo.toml +++ b/massa-wallet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_wallet" -version = "0.26.0" +version = "0.26.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/massa-xtask/Cargo.toml b/massa-xtask/Cargo.toml index eade7b250c7..907074a5afb 100644 --- a/massa-xtask/Cargo.toml +++ b/massa-xtask/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "massa_xtask" -version = "0.26.0" +version = "0.26.1" edition = "2021" [dependencies]